@duplicati/ngclient 0.0.142 → 0.0.144

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 (130) hide show
  1. package/assets/dest-icons/aliyun.png +0 -0
  2. package/assets/dest-icons/aws.png +0 -0
  3. package/assets/dest-icons/azure.png +0 -0
  4. package/assets/dest-icons/backblaze.png +0 -0
  5. package/assets/dest-icons/box-com.png +0 -0
  6. package/assets/dest-icons/dropbox.png +0 -0
  7. package/assets/dest-icons/external-harddrive.png +0 -0
  8. package/assets/dest-icons/file-jump.png +0 -0
  9. package/assets/dest-icons/file-system.png +0 -0
  10. package/assets/dest-icons/filen.png +0 -0
  11. package/assets/dest-icons/ftp.png +0 -0
  12. package/assets/dest-icons/google-cloud.png +0 -0
  13. package/assets/dest-icons/google-drive.png +0 -0
  14. package/assets/dest-icons/idrive-e2.png +0 -0
  15. package/assets/dest-icons/jottacloud.png +0 -0
  16. package/assets/dest-icons/mega-nz.png +0 -0
  17. package/assets/dest-icons/nas.png +0 -0
  18. package/assets/dest-icons/office-365.png +0 -0
  19. package/assets/dest-icons/one-drive.png +0 -0
  20. package/assets/dest-icons/open-stack.png +0 -0
  21. package/assets/dest-icons/pcloud.png +0 -0
  22. package/assets/dest-icons/rackspace.png +0 -0
  23. package/assets/dest-icons/rclone.png +0 -0
  24. package/assets/dest-icons/sftp.png +0 -0
  25. package/assets/dest-icons/sharepoint.png +0 -0
  26. package/assets/dest-icons/sia-cloud.png +0 -0
  27. package/assets/dest-icons/sia_logo_dark.92db63f5.svg +6 -0
  28. package/assets/dest-icons/smb.png +0 -0
  29. package/assets/dest-icons/ssh.png +0 -0
  30. package/assets/dest-icons/storj.png +0 -0
  31. package/assets/dest-icons/tahoelafs.png +0 -0
  32. package/assets/dest-icons/tencent-cloud.png +0 -0
  33. package/assets/dest-icons/webdav.png +0 -0
  34. package/{chunk-SWLG7DS7.js → chunk-2CTSAUUN.js} +1 -1
  35. package/chunk-2NU5Y4V7.js +1 -0
  36. package/{chunk-JB75BUPF.js → chunk-3UN32GIC.js} +1 -1
  37. package/{chunk-GFSWKDRL.js → chunk-5PSLWJTF.js} +1 -1
  38. package/{chunk-OWAZS6AA.js → chunk-66BSPEOQ.js} +1 -1
  39. package/{chunk-3L3SGYRX.js → chunk-6GC5VKTI.js} +1 -1
  40. package/{chunk-UBFQDZB5.js → chunk-6WWCFRZ5.js} +1 -1
  41. package/{chunk-65QCOV7I.js → chunk-6XBSQDXR.js} +1 -1
  42. package/chunk-74NKDA4G.js +1 -0
  43. package/{chunk-PEWNHZLZ.js → chunk-7X7K5IXS.js} +1 -1
  44. package/chunk-AB2L3URR.js +1 -0
  45. package/{chunk-O2RJYKE4.js → chunk-AO4O42CM.js} +1 -1
  46. package/{chunk-DUKSWBLV.js → chunk-ARXKB7WH.js} +1 -1
  47. package/{chunk-GXARFIQG.js → chunk-B7NRTB6T.js} +1 -1
  48. package/{chunk-PWV3UKIW.js → chunk-BGUKMOKY.js} +1 -1
  49. package/{chunk-VMNRHHVY.js → chunk-BIETD4DI.js} +1 -1
  50. package/{chunk-3BODZQHK.js → chunk-BXRW2LGW.js} +1 -1
  51. package/chunk-C2L3SQU3.js +1 -0
  52. package/chunk-CDRDYQEV.js +1 -0
  53. package/{chunk-QIQH4ASK.js → chunk-CFNP4FBG.js} +1 -1
  54. package/{chunk-ZTHT3VVI.js → chunk-CTEFMU6N.js} +1 -1
  55. package/chunk-ERKYRXHP.js +8 -0
  56. package/chunk-ETCRT3EV.js +1 -0
  57. package/{chunk-WEAHBXR2.js → chunk-FFY3NRCC.js} +1 -1
  58. package/{chunk-Z2U5JI53.js → chunk-FVE45QKX.js} +1 -1
  59. package/{chunk-ERIXY2FW.js → chunk-GCZWFRPZ.js} +1 -1
  60. package/{chunk-LIJJPCCP.js → chunk-GDBU3Z7P.js} +1 -1
  61. package/{chunk-HBKQWKW7.js → chunk-GHFYBZHQ.js} +1 -1
  62. package/{chunk-X5ISYEI2.js → chunk-GO22DJ44.js} +1 -1
  63. package/chunk-HKZX6OB5.js +1 -0
  64. package/{chunk-2G6UXMJB.js → chunk-IGOZJJE3.js} +1 -1
  65. package/{chunk-C32RWSXV.js → chunk-J2MHNGNQ.js} +1 -1
  66. package/{chunk-QM6X5ZEC.js → chunk-J3BBLPAD.js} +1 -1
  67. package/{chunk-BMYQZKPC.js → chunk-J5PSMGKZ.js} +1 -1
  68. package/{chunk-QC2NBFUR.js → chunk-JA7OQSO3.js} +1 -1
  69. package/{chunk-EDW3WHAP.js → chunk-JIHMT35A.js} +1 -1
  70. package/{chunk-UV3WAAEX.js → chunk-K3ZQ67VT.js} +1 -1
  71. package/{chunk-QD2VHHZY.js → chunk-KGJAK6OP.js} +1 -1
  72. package/{chunk-PHIECUWX.js → chunk-KOVQRACM.js} +1 -1
  73. package/{chunk-LAUG2PZW.js → chunk-LEXA637O.js} +1 -1
  74. package/chunk-ODVCGM2O.js +1 -0
  75. package/{chunk-PMZGBC4U.js → chunk-OTMW34HV.js} +1 -1
  76. package/{chunk-P2DII6CV.js → chunk-OXOOR7I4.js} +1 -1
  77. package/{chunk-V7UTQSCX.js → chunk-PT7UQJD4.js} +1 -1
  78. package/chunk-QNOIURSX.js +1 -0
  79. package/{chunk-BVEALUGN.js → chunk-QY6E755W.js} +1 -1
  80. package/{chunk-CNUHBPET.js → chunk-SCOG2I64.js} +1 -1
  81. package/{chunk-PJBVFTZK.js → chunk-T4TFHAZT.js} +1 -1
  82. package/{chunk-OBJPWKDY.js → chunk-TJOWPBPB.js} +1 -1
  83. package/{chunk-X6QMUQPK.js → chunk-UGLRUY6T.js} +1 -1
  84. package/{chunk-UCZV35IF.js → chunk-UT6XGEMV.js} +1 -1
  85. package/chunk-UUODEERG.js +1 -0
  86. package/{chunk-OICFVPYU.js → chunk-UW4GBMEP.js} +1 -1
  87. package/{chunk-OAW2NFZX.js → chunk-WHKW5IYF.js} +1 -1
  88. package/{chunk-VC6TE2B6.js → chunk-WWFNG47J.js} +1 -1
  89. package/{chunk-ZGU7OKMF.js → chunk-X3IA226Q.js} +1 -1
  90. package/{chunk-TAPLSJ2K.js → chunk-XHUUCB2W.js} +1 -1
  91. package/{chunk-5SPGCYAQ.js → chunk-XNVRJH42.js} +1 -1
  92. package/{chunk-YIV6PKM7.js → chunk-XQ4CAUD4.js} +1 -1
  93. package/{chunk-47WDRGVN.js → chunk-ZGAC2JKG.js} +1 -1
  94. package/chunk-ZVIRETHC.js +1 -0
  95. package/index.html +1 -1
  96. package/locale/messages.cs.json +1 -0
  97. package/locale/messages.da.json +3 -20
  98. package/locale/messages.de.json +126 -104
  99. package/locale/messages.en_GB.json +1 -0
  100. package/locale/messages.es.json +1 -0
  101. package/locale/messages.fi.json +1 -0
  102. package/locale/messages.fr.json +1 -0
  103. package/locale/messages.hu.json +1 -0
  104. package/locale/messages.it.json +144 -112
  105. package/locale/messages.ja_JP.json +1 -0
  106. package/locale/messages.nl_NL.json +7 -106
  107. package/locale/messages.pl.json +29 -0
  108. package/locale/messages.pt.json +1 -0
  109. package/locale/messages.pt_BR.json +1 -0
  110. package/locale/messages.ru.json +1 -0
  111. package/locale/messages.sr_RS.json +1 -0
  112. package/locale/messages.sv_SE.json +1 -0
  113. package/locale/messages.zh-Hans.json +3 -97
  114. package/locale/messages.zh_CN.json +1 -88
  115. package/locale/messages.zh_TW.json +2 -0
  116. package/main-SUSCPR3H.js +1 -0
  117. package/package.json +1 -1
  118. package/chunk-4URGDROZ.js +0 -1
  119. package/chunk-5DO6JZVF.js +0 -1
  120. package/chunk-5OIM6PRU.js +0 -1
  121. package/chunk-5SH42EY6.js +0 -1
  122. package/chunk-7765XHNC.js +0 -8
  123. package/chunk-ATYS35R4.js +0 -1
  124. package/chunk-E6UP7FUD.js +0 -1
  125. package/chunk-JA5QSJM3.js +0 -1
  126. package/chunk-JF4IGUR6.js +0 -1
  127. package/chunk-LT2T7TXS.js +0 -1
  128. package/chunk-R3OYJX7V.js +0 -1
  129. package/chunk-YCTTQQ6B.js +0 -1
  130. package/main-TVE62AWE.js +0 -1
@@ -1 +1 @@
1
- import{a as ut}from"./chunk-BVEALUGN.js";import{a as Oe}from"./chunk-UACX27D3.js";import{a as rt,b as Ke,c as _t}from"./chunk-VC72SWC4.js";import{b as re}from"./chunk-QGFC5ZUR.js";import{a as ot}from"./chunk-GUH5TMOS.js";import{a as he}from"./chunk-OWAZS6AA.js";import{b as Te,c as Q,d as fe,e as Z,f as Ae,h as st,i as ae,j as Pe,k as Ne,n as at,o as De,p as lt,q as Me,r as ye,s as le,t as Re}from"./chunk-USU2EHJV.js";import{b as oe,d as z}from"./chunk-L2EO4M4B.js";import{A as Ee,C as nt,a as j,b as Je,e as et,g as se,l as q,p as tt,t as Y}from"./chunk-WRNQOX5R.js";import{h as it}from"./chunk-QM6X5ZEC.js";import{Ab as a,Bb as l,Cb as m,Gb as B,H as Ie,Hb as k,Jb as b,Oc as L,Pc as ie,Qb as C,Ra as _,Rb as F,Sb as f,Tc as ke,Uc as Ve,V as ge,Vb as xe,Vc as Se,Wb as E,Yb as u,_ as M,bb as H,ea as d,ec as me,fa as p,fc as Ce,gb as Ye,gc as be,ic as Fe,lc as G,mc as ve,nc as Ze,oa as g,qc as w,rc as $,sc as I,tb as Qe,ub as y,vb as R,wb as Le,xb as Ue,yb as Ge,zb as T,zc as Be}from"./chunk-QDFCX6XE.js";import{a as x,b as W}from"./chunk-EUDKD2JW.js";var we=class s{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||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};function mt(s,t){if(s&1){let e=b();a(0,"div",24)(1,"sh-form-field")(2,"label",25),f(3,7),l(),a(4,"input",26,0),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),E("focus",function(){d(e);let i=be(5);return p(i.showPicker())}),l(),a(6,"sh-icon",27),G(7,"clock"),l()(),a(8,"sh-form-field"),m(9,"label",28),a(10,"input",29,1),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),E("focus",function(){d(e);let i=be(11);return p(i.showPicker())}),l(),a(12,"sh-icon",27),G(13,"calendar"),l()()(),a(14,"div",24)(15,"sh-form-field")(16,"label",30),f(17,8),l(),a(18,"input",31),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),l()(),a(19,"sh-select",32)(20,"input",33),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),l()()(),a(21,"app-toggle-card",34),B(22,35),f(23,9),k(),a(24,"div",36)(25,"sh-toggle",19),C(26,10),a(27,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),l(),F(),l(),a(28,"sh-toggle",19),C(29,11),a(30,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),l(),F(),l(),a(31,"sh-toggle",19),C(32,12),a(33,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),l(),F(),l(),a(34,"sh-toggle",19),C(35,13),a(36,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),l(),F(),l(),a(37,"sh-toggle",19),C(38,14),a(39,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),l(),F(),l(),a(40,"sh-toggle",19),C(41,15),a(42,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),l(),F(),l(),a(43,"sh-toggle",19),C(44,16),a(45,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),l(),F(),l()()()}if(s&2){let e=u();_(4),w("ngModel",e.scheduleFields.nextTime().time),_(6),w("ngModel",e.scheduleFields.nextTime().date),_(8),w("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),w("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),w("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Ct=[{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`}],te={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}}},Xe=class s{#e=M(J);#t=M(z);#i=M(oe);unitOptions=Ct;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||s)};static \u0275cmp=H({type:s,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 c;c=$localize`Run again every`;let h;h=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let U;U=$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 X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,c,h,S,O,P,U,K,v,X,[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&&(a(0,"h3",17),f(1,2),l(),a(2,"div",18)(3,"sh-toggle",19),C(4,3),a(5,"input",20),I("ngModelChange",function(o){return $(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),F(),l(),a(6,"p"),f(7,4),l()(),y(8,mt,46,14),a(9,"div",21)(10,"button",22),E("click",function(){return n.goBack()}),C(11,5),m(12,"sh-icon"),F(),l(),a(13,"button",23),E("click",function(){return n.next()}),C(14,6),m(15,"sh-icon"),F(),l()()),e&2&&(_(5),w("ngModel",n.scheduleFields.autoRun),_(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[le,Q,Ne,Te,Z,ae,q,Ee,j,se,Y,Oe],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 Ft(s,t){if(s&1&&(B(0,4),G(1),k()),s&2){let e,n=u();_(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(s,t){if(s&1&&(B(0,5),G(1),k()),s&2){let e,n=u();_(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],$e=class s{path=Ve.required();osType=Ve();pathChange=ke();remove=ke();internalPath=g("");pathType=g("-Expression");currentExpressionOption=L(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=L(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(x({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(x({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(x({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(x({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(x({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(x({},n),{startsWith:"*.",endsWith:""}):W(x({},n),{startsWith:"",endsWith:""}))});pathEffect=ie(()=>{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||s)};static \u0275cmp=H({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"sh-primary"]]},template:function(e,n){if(e&1&&(a(0,"sh-select",0)(1,"input",1),I("ngModelChange",function(o){return $(n.pathType,o)||(n.pathType=o),o}),E("ngModelChange",function(){return n.updateFilter()}),l()(),a(2,"sh-form-field",2)(3,"input",3),I("ngModelChange",function(o){return $(n.internalPath,o)||(n.internalPath=o),o}),E("ngModelChange",function(){return n.updateFilter()}),l(),y(4,Ft,2,1,"ng-container",4),y(5,St,2,1,"ng-container",5),l(),a(6,"div",6),E("click",function(){return n.removeFilter()}),a(7,"sh-icon",7),G(8,"x-circle"),l()()),e&2){let i,o;T("options",n.expressionOptions())("isClearable",!1),_(),w("ngModel",n.pathType),_(2),w("ngModel",n.internalPath),_(),R(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),_(),R(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[le,Q,Z,ae,Y,q,j],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 ht=["formRef"],ct=()=>({standalone:!0});function Tt(s,t){if(s&1){let e=b();a(0,"sh-form-field",42)(1,"input",43),I("ngModelChange",function(i){d(e);let o=u(2);return $(o.editingPath,i)||(o.editingPath=i),p(i)}),l()(),a(2,"button",44),E("click",function(){d(e);let i=u(2);return p(i.updatePath())}),a(3,"sh-icon"),G(4,"floppy-disk"),l()(),a(5,"button",44),E("click",function(){d(e);let i=u(2);return p(i.cancelEditPath())}),a(6,"sh-icon"),G(7,"x-bold"),l()()}if(s&2){let e=u(2);_(),w("ngModel",e.editingPath),T("ngModelOptions",Be(2,ct))}}function ft(s,t){if(s&1){let e=b();a(0,"sh-form-field",42),m(1,"input",45),l(),a(2,"button",44),E("click",function(){d(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),a(3,"sh-icon"),G(4,"pen"),l()(),a(5,"button",44),E("click",function(){d(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),a(6,"sh-icon"),G(7,"trash-simple"),l()()}if(s&2){let e=u().$implicit;Qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Be(3,ct))}}function At(s,t){if(s&1&&(a(0,"div",30),y(1,Tt,8,3)(2,ft,8,4),l()),s&2){let e=t.$implicit,n=u();_(),R(n.oldPath()===e?1:2)}}function Pt(s,t){if(s&1){let e=b();a(0,"app-new-filter",47),E("pathChange",function(i){let o=d(e).$index,r=u(2);return p(r.patchPathAt(i,o))})("remove",function(){let i=d(e).$index,o=u(2);return p(o.removePathAt(i))}),l()}if(s&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Nt(s,t){if(s&1&&Ue(0,Pt,1,2,"app-new-filter",46,Le),s&2){let e=u();Ge(e.pathArray())}}function Dt(s,t){if(s&1&&(a(0,"div",41)(1,"sh-form-field"),m(2,"input",48),l(),a(3,"sh-select",49),m(4,"input",50),l()()),s&2){let e=u();_(3),T("options",e.sizeOptions())("isClearable",!1)}}var V=new ye,Mt=["Bytes","KB","MB","GB","TB","PB"],dt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),ze=class s{#e=M(J);#t=M(z);#i=M(oe);formRef=Se.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new st("");filesLargerThan=L(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=g(Mt);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=L(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=L(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=g(null);editingPath=g(null);addingNewPath=g(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let 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(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),o=this.pathArray().map((c,h)=>h===e?`${t}`:`${c}`).join("\0"),r=[i,o].filter(c=>c&&c!=="").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,c)=>c!==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||s)};static \u0275cmp=H({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&me(n.formRef,ht,5),e&2&&Ce()},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 c;c=$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 O;O=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let X;X=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$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 A;A=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],r,c,h,S,O,P,U,K,v,X,D,ee,_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"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",A,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=b();a(0,"form",16,0),E("submit",function(){return d(i),p(n.next())}),a(2,"div",17)(3,"h3",18),f(4,1),l(),a(5,"app-file-tree",19)(6,"label",20),f(7,2),l(),m(8,"input",21),l(),a(9,"div",22)(10,"button",23),E("click",function(){return d(i),p(n.goBack())}),C(11,3),m(12,"sh-icon"),F(),l(),a(13,"button",24),C(14,4),m(15,"sh-icon"),F(),l()()(),a(16,"div",25)(17,"app-toggle-card",26),B(18,27),f(19,5),k(),a(20,"p",28),f(21,6),l(),a(22,"div",29),Ue(23,At,3,1,"div",30,Le),a(25,"div",31)(26,"sh-form-field"),m(27,"input",32),l(),a(28,"button",33),E("click",function(){return d(i),p(n.addNewPath())}),a(29,"sh-icon"),G(30,"plus"),l()()()()(),a(31,"app-toggle-card",26),B(32,27),f(33,7),k(),a(34,"p",28),f(35,8),l(),a(36,"button",34),E("click",function(){return d(i),p(n.addFilter())}),f(37,9),l(),y(38,Nt,2,0),l(),a(39,"app-toggle-card",35),B(40,27),f(41,10),k(),a(42,"p",28),f(43,11),l(),a(44,"sh-toggle",36),C(45,12),m(46,"input",37),F(),l(),a(47,"sh-toggle",36),C(48,13),m(49,"input",38),F(),l(),a(50,"sh-toggle",36),C(51,14),m(52,"input",39),F(),l(),a(53,"sh-toggle",40),E("click",function(){return d(i),p(n.toggleFilesLargerThan())}),f(54,15),l(),y(55,Dt,5,2,"div",41),l()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),Ge(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),R((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),Fe("active",n.filesLargerThan()),_(2),R(n.filesLargerThan()?55:-1)}},dependencies:[le,Pe,Q,Ne,Te,Z,Ae,ae,Re,at,De,Me,lt,q,j,se,Ee,Y,$e,ut,Oe],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 pt="1W:1D,4W:1W,12M:1M",J=class s{#e=M(z);#t=M(he);#i=M(et);#n=M(it);#s=M(we);generalForm=gt();sourceDataForm=dt();scheduleFields={autoRun:g(te.autoRun),nextTime:g(te.nextTime),runAgain:g(te.runAgain)};settings=g([]);optionsFields={remoteVolumeSize:g("50MB"),backupRetention:g("all"),backupRetentionTime:g(""),backupRetentionVersions:g(0),backupRetentionCustom:g("")};targetUrlModel=g(null);backupMetadata=g(null);isDraft=g(!1);backupId=g(null);backupName=L(()=>this.generalFormSignal()?.name??"");isSubmitting=g(!1);finishedLoading=g(!1);backupDefaults=g(null);applicationOptions=g(null);isNew=L(()=>this.backupId()==="new");osType=L(()=>this.#t.systemInfo()?.OSType);selectedOptions=g([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=L(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=g("");#a=g(null);#l=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#a.asReadonly();#d=ie(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#a.set(null))});setTestState(t,e){this.#o.set(t),this.#a.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=L(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=L(()=>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(Ie(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(Ie(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(ot,{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(c=>`${c.Include?"":"-"}${c.Expression}`)??[],i=t.Settings?.find(c=>c.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(c=>c.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:"",c=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),c&&c!==""&&(h.compression=c),this.generalForm.patchValue(h)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>x(x({},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===pt)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.#s.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,U])=>U).map(([P,U])=>P):[],c=n.path?.split("\0")??[],h=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,U])=>U&&P!=="filesLargerThan").map(([P])=>P),O=n.excludes?.filesLargerThan;return S.length&&h.push({Name:"--exclude-files-attributes",Value:S.join(",")}),O&&O.size!==null&&O.unit!==null&&h.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:c.filter(P=>!P.startsWith("-")),Settings:h,Filters:c.filter(P=>P.startsWith("-")).map((P,U)=>({Order:U,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:pt});break}let c=[...t,...n],h=this.settings().filter(S=>!c.includes(S.Name)).map(S=>{let O=S.Value;return typeof S.Value=="number"&&(O=S.Value.toString()),typeof S.Value=="boolean"&&(O=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:O}});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){this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.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||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(s,t){s&1&&(a(0,"sh-alert",17),C(1,5),m(2,"sh-icon",26),F(),l())}function Ot(s,t){if(s&1&&G(0),s&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function wt(s,t){if(s&1&&m(0,"sh-progress-bar",40),s&2){let e=u(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function $t(s,t){s&1&&(a(0,"span",35),f(1,10),l())}function It(s,t){s&1&&(C(0,8,1),m(1,"sh-icon"),F())}function Lt(s,t){s&1&&(C(0,8,2),m(1,"sh-icon"),F())}function Ut(s,t){s&1&&(C(0,11,1),m(1,"sh-icon",42),F())}function Gt(s,t){s&1&&(C(0,11,2),m(1,"sh-icon"),F())}function xt(s,t){if(s&1){let e=b();a(0,"button",41),E("click",function(){d(e);let i=u(3);return p(i.copyPassword())}),C(1,11),y(2,Ut,2,0)(3,Gt,2,0),F(),l()}if(s&2){let e=u(3);_(2),R(e.copiedPassword()?2:3)}}function bt(s,t){s&1&&(a(0,"sh-alert",39),f(1,12),l())}function vt(s,t){if(s&1){let e=b();a(0,"div",30)(1,"sh-form-field")(2,"label",31),C(3,7),m(4,"sup"),F(),l(),m(5,"input",32),l(),y(6,wt,1,9,"sh-progress-bar",33),a(7,"sh-form-field"),m(8,"input",34),y(9,$t,2,0,"span",35),l(),a(10,"div",36)(11,"button",37),E("click",function(){d(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),C(12,8),y(13,It,2,0)(14,Lt,2,0),F(),l(),a(15,"button",37),E("click",function(){d(e);let i=u(2);return p(i.generatePassword())}),C(16,9),m(17,"sh-icon"),F(),l(),y(18,xt,4,1,"button",38),l(),y(19,bt,2,0,"sh-alert",39),l()}if(s&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),R(e.showPassword()?13:14),_(5),R(e.showCopyPassword()?18:-1),_(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Bt(s,t){if(s&1&&(a(0,"sh-select",27)(1,"label",28),f(2,6),l(),m(3,"input",29),Ye(4,Ot,1,1,"ng-template"),l(),y(5,vt,20,7,"div",30)),s&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function kt(s,t){if(s&1&&(a(0,"button",24),C(1,13),m(2,"sh-icon"),F(),l()),s&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(s,t){if(s&1&&(a(0,"button",25),C(1,14),m(2,"sh-icon"),F(),l()),s&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ne=new ye,gt=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>ne.group({name:ne.control(s.name,[fe.required]),description:ne.control(s.description),encryption:ne.control(s.encryption,[_t()]),password:ne.control(s.password,[Ke(t=>t?.value.encryption!=="",[fe.required])]),repeatPassword:ne.control(s.repeatPassword,[Ke(t=>t?.value.encryption!=="",[fe.required])]),compression:ne.control(s.compression)}),pe={Key:"-",DisplayName:"None"},je=class s{#e=M(z);#t=M(oe);#i=M(rt);#n=M(J);#s=M(he);formRef=Se.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=g(!1);copiedPassword=g(!1);showCopyPassword=g(!1);noneOptionKey=pe.Key;encryptionEffect=ie(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=L(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=L(()=>{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||s)};static \u0275cmp=H({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&me(n.formRef,yt,5),e&2&&Ce()},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 c;c=$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 O;O=$localize`Encryption`;let P;P=$localize`Password`;let U;U=$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=xe(v);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let D;D=$localize`Passwords do not match`;let ee;ee=$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:`,ee=xe(ee);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,c,h,O,K,v,X,D,ee,_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",U,"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=b();a(0,"form",15,0),E("submit",function(){return d(i),p(n.next())}),a(2,"h3",16),f(3,1),l(),y(4,Rt,3,0,"sh-alert",17),a(5,"sh-form-field")(6,"label",18),C(7,2),m(8,"sup"),F(),l(),m(9,"input",19),l(),a(10,"sh-form-field")(11,"label",20),f(12,3),l(),m(13,"textarea",21),l(),y(14,Bt,6,3),a(15,"div",22)(16,"button",23),E("click",function(){return d(i),p(n.exit())}),C(17,4),m(18,"sh-icon"),F(),l(),y(19,kt,3,1,"button",24)(20,Vt,3,1,"button",25),l()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),R(n.isNew()?14:-1),_(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,Pe,Q,Z,Ae,De,Me,q,Y,se,j,tt,Je,nt],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,je as c,te as d,Xe as e,dt as f,ze as g,J as h};
1
+ import{a as ut}from"./chunk-QY6E755W.js";import{a as Oe}from"./chunk-UACX27D3.js";import{a as rt,b as Ke,c as _t}from"./chunk-VC72SWC4.js";import{b as re}from"./chunk-QGFC5ZUR.js";import{a as ot}from"./chunk-GUH5TMOS.js";import{a as he}from"./chunk-66BSPEOQ.js";import{b as Te,c as Q,d as fe,e as Z,f as Ae,h as st,i as ae,j as Pe,k as Ne,n as at,o as De,p as lt,q as Me,r as ye,s as le,t as Re}from"./chunk-USU2EHJV.js";import{b as oe,d as z}from"./chunk-L2EO4M4B.js";import{A as Ee,C as nt,a as j,b as Je,e as et,g as se,l as q,p as tt,t as Y}from"./chunk-WRNQOX5R.js";import{h as it}from"./chunk-J3BBLPAD.js";import{Ab as a,Bb as l,Cb as m,Gb as B,H as Ie,Hb as k,Jb as b,Oc as L,Pc as ie,Qb as C,Ra as _,Rb as F,Sb as f,Tc as ke,Uc as Ve,V as ge,Vb as xe,Vc as Se,Wb as E,Yb as u,_ as M,bb as H,ea as d,ec as me,fa as p,fc as Ce,gb as Ye,gc as be,ic as Fe,lc as G,mc as ve,nc as Ze,oa as g,qc as w,rc as $,sc as I,tb as Qe,ub as y,vb as R,wb as Le,xb as Ue,yb as Ge,zb as T,zc as Be}from"./chunk-QDFCX6XE.js";import{a as x,b as W}from"./chunk-EUDKD2JW.js";var we=class s{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||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};function mt(s,t){if(s&1){let e=b();a(0,"div",24)(1,"sh-form-field")(2,"label",25),f(3,7),l(),a(4,"input",26,0),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),E("focus",function(){d(e);let i=be(5);return p(i.showPicker())}),l(),a(6,"sh-icon",27),G(7,"clock"),l()(),a(8,"sh-form-field"),m(9,"label",28),a(10,"input",29,1),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),E("focus",function(){d(e);let i=be(11);return p(i.showPicker())}),l(),a(12,"sh-icon",27),G(13,"calendar"),l()()(),a(14,"div",24)(15,"sh-form-field")(16,"label",30),f(17,8),l(),a(18,"input",31),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),l()(),a(19,"sh-select",32)(20,"input",33),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),l()()(),a(21,"app-toggle-card",34),B(22,35),f(23,9),k(),a(24,"div",36)(25,"sh-toggle",19),C(26,10),a(27,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),l(),F(),l(),a(28,"sh-toggle",19),C(29,11),a(30,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),l(),F(),l(),a(31,"sh-toggle",19),C(32,12),a(33,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),l(),F(),l(),a(34,"sh-toggle",19),C(35,13),a(36,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),l(),F(),l(),a(37,"sh-toggle",19),C(38,14),a(39,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),l(),F(),l(),a(40,"sh-toggle",19),C(41,15),a(42,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),l(),F(),l(),a(43,"sh-toggle",19),C(44,16),a(45,"input",20),I("ngModelChange",function(i){d(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),l(),F(),l()()()}if(s&2){let e=u();_(4),w("ngModel",e.scheduleFields.nextTime().time),_(6),w("ngModel",e.scheduleFields.nextTime().date),_(8),w("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),w("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),w("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),w("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Ct=[{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`}],te={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}}},Xe=class s{#e=M(J);#t=M(z);#i=M(oe);unitOptions=Ct;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||s)};static \u0275cmp=H({type:s,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 c;c=$localize`Run again every`;let h;h=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let U;U=$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 X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,c,h,S,O,P,U,K,v,X,[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&&(a(0,"h3",17),f(1,2),l(),a(2,"div",18)(3,"sh-toggle",19),C(4,3),a(5,"input",20),I("ngModelChange",function(o){return $(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),F(),l(),a(6,"p"),f(7,4),l()(),y(8,mt,46,14),a(9,"div",21)(10,"button",22),E("click",function(){return n.goBack()}),C(11,5),m(12,"sh-icon"),F(),l(),a(13,"button",23),E("click",function(){return n.next()}),C(14,6),m(15,"sh-icon"),F(),l()()),e&2&&(_(5),w("ngModel",n.scheduleFields.autoRun),_(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[le,Q,Ne,Te,Z,ae,q,Ee,j,se,Y,Oe],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 Ft(s,t){if(s&1&&(B(0,4),G(1),k()),s&2){let e,n=u();_(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(s,t){if(s&1&&(B(0,5),G(1),k()),s&2){let e,n=u();_(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],$e=class s{path=Ve.required();osType=Ve();pathChange=ke();remove=ke();internalPath=g("");pathType=g("-Expression");currentExpressionOption=L(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=L(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(x({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(x({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(x({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(x({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(x({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(x({},n),{startsWith:"*.",endsWith:""}):W(x({},n),{startsWith:"",endsWith:""}))});pathEffect=ie(()=>{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||s)};static \u0275cmp=H({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"sh-primary"]]},template:function(e,n){if(e&1&&(a(0,"sh-select",0)(1,"input",1),I("ngModelChange",function(o){return $(n.pathType,o)||(n.pathType=o),o}),E("ngModelChange",function(){return n.updateFilter()}),l()(),a(2,"sh-form-field",2)(3,"input",3),I("ngModelChange",function(o){return $(n.internalPath,o)||(n.internalPath=o),o}),E("ngModelChange",function(){return n.updateFilter()}),l(),y(4,Ft,2,1,"ng-container",4),y(5,St,2,1,"ng-container",5),l(),a(6,"div",6),E("click",function(){return n.removeFilter()}),a(7,"sh-icon",7),G(8,"x-circle"),l()()),e&2){let i,o;T("options",n.expressionOptions())("isClearable",!1),_(),w("ngModel",n.pathType),_(2),w("ngModel",n.internalPath),_(),R(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),_(),R(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[le,Q,Z,ae,Y,q,j],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 ht=["formRef"],ct=()=>({standalone:!0});function Tt(s,t){if(s&1){let e=b();a(0,"sh-form-field",42)(1,"input",43),I("ngModelChange",function(i){d(e);let o=u(2);return $(o.editingPath,i)||(o.editingPath=i),p(i)}),l()(),a(2,"button",44),E("click",function(){d(e);let i=u(2);return p(i.updatePath())}),a(3,"sh-icon"),G(4,"floppy-disk"),l()(),a(5,"button",44),E("click",function(){d(e);let i=u(2);return p(i.cancelEditPath())}),a(6,"sh-icon"),G(7,"x-bold"),l()()}if(s&2){let e=u(2);_(),w("ngModel",e.editingPath),T("ngModelOptions",Be(2,ct))}}function ft(s,t){if(s&1){let e=b();a(0,"sh-form-field",42),m(1,"input",45),l(),a(2,"button",44),E("click",function(){d(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),a(3,"sh-icon"),G(4,"pen"),l()(),a(5,"button",44),E("click",function(){d(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),a(6,"sh-icon"),G(7,"trash-simple"),l()()}if(s&2){let e=u().$implicit;Qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Be(3,ct))}}function At(s,t){if(s&1&&(a(0,"div",30),y(1,Tt,8,3)(2,ft,8,4),l()),s&2){let e=t.$implicit,n=u();_(),R(n.oldPath()===e?1:2)}}function Pt(s,t){if(s&1){let e=b();a(0,"app-new-filter",47),E("pathChange",function(i){let o=d(e).$index,r=u(2);return p(r.patchPathAt(i,o))})("remove",function(){let i=d(e).$index,o=u(2);return p(o.removePathAt(i))}),l()}if(s&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Nt(s,t){if(s&1&&Ue(0,Pt,1,2,"app-new-filter",46,Le),s&2){let e=u();Ge(e.pathArray())}}function Dt(s,t){if(s&1&&(a(0,"div",41)(1,"sh-form-field"),m(2,"input",48),l(),a(3,"sh-select",49),m(4,"input",50),l()()),s&2){let e=u();_(3),T("options",e.sizeOptions())("isClearable",!1)}}var V=new ye,Mt=["Bytes","KB","MB","GB","TB","PB"],dt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),ze=class s{#e=M(J);#t=M(z);#i=M(oe);formRef=Se.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new st("");filesLargerThan=L(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=g(Mt);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=L(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=L(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=g(null);editingPath=g(null);addingNewPath=g(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let 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(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),o=this.pathArray().map((c,h)=>h===e?`${t}`:`${c}`).join("\0"),r=[i,o].filter(c=>c&&c!=="").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,c)=>c!==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||s)};static \u0275cmp=H({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&me(n.formRef,ht,5),e&2&&Ce()},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 c;c=$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 O;O=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let U;U=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let X;X=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$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 A;A=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],r,c,h,S,O,P,U,K,v,X,D,ee,_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"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",A,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=b();a(0,"form",16,0),E("submit",function(){return d(i),p(n.next())}),a(2,"div",17)(3,"h3",18),f(4,1),l(),a(5,"app-file-tree",19)(6,"label",20),f(7,2),l(),m(8,"input",21),l(),a(9,"div",22)(10,"button",23),E("click",function(){return d(i),p(n.goBack())}),C(11,3),m(12,"sh-icon"),F(),l(),a(13,"button",24),C(14,4),m(15,"sh-icon"),F(),l()()(),a(16,"div",25)(17,"app-toggle-card",26),B(18,27),f(19,5),k(),a(20,"p",28),f(21,6),l(),a(22,"div",29),Ue(23,At,3,1,"div",30,Le),a(25,"div",31)(26,"sh-form-field"),m(27,"input",32),l(),a(28,"button",33),E("click",function(){return d(i),p(n.addNewPath())}),a(29,"sh-icon"),G(30,"plus"),l()()()()(),a(31,"app-toggle-card",26),B(32,27),f(33,7),k(),a(34,"p",28),f(35,8),l(),a(36,"button",34),E("click",function(){return d(i),p(n.addFilter())}),f(37,9),l(),y(38,Nt,2,0),l(),a(39,"app-toggle-card",35),B(40,27),f(41,10),k(),a(42,"p",28),f(43,11),l(),a(44,"sh-toggle",36),C(45,12),m(46,"input",37),F(),l(),a(47,"sh-toggle",36),C(48,13),m(49,"input",38),F(),l(),a(50,"sh-toggle",36),C(51,14),m(52,"input",39),F(),l(),a(53,"sh-toggle",40),E("click",function(){return d(i),p(n.toggleFilesLargerThan())}),f(54,15),l(),y(55,Dt,5,2,"div",41),l()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),Ge(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),R((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),Fe("active",n.filesLargerThan()),_(2),R(n.filesLargerThan()?55:-1)}},dependencies:[le,Pe,Q,Ne,Te,Z,Ae,ae,Re,at,De,Me,lt,q,j,se,Ee,Y,$e,ut,Oe],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 pt="1W:1D,4W:1W,12M:1M",J=class s{#e=M(z);#t=M(he);#i=M(et);#n=M(it);#s=M(we);generalForm=gt();sourceDataForm=dt();scheduleFields={autoRun:g(te.autoRun),nextTime:g(te.nextTime),runAgain:g(te.runAgain)};settings=g([]);optionsFields={remoteVolumeSize:g("50MB"),backupRetention:g("all"),backupRetentionTime:g(""),backupRetentionVersions:g(0),backupRetentionCustom:g("")};targetUrlModel=g(null);backupMetadata=g(null);isDraft=g(!1);backupId=g(null);backupName=L(()=>this.generalFormSignal()?.name??"");isSubmitting=g(!1);finishedLoading=g(!1);backupDefaults=g(null);applicationOptions=g(null);isNew=L(()=>this.backupId()==="new");osType=L(()=>this.#t.systemInfo()?.OSType);selectedOptions=g([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=L(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=g("");#a=g(null);#l=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#a.asReadonly();#d=ie(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#a.set(null))});setTestState(t,e){this.#o.set(t),this.#a.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=L(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=L(()=>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(Ie(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(Ie(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(ot,{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(c=>`${c.Include?"":"-"}${c.Expression}`)??[],i=t.Settings?.find(c=>c.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(c=>c.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:"",c=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),c&&c!==""&&(h.compression=c),this.generalForm.patchValue(h)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>x(x({},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===pt)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.#s.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,U])=>U).map(([P,U])=>P):[],c=n.path?.split("\0")??[],h=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,U])=>U&&P!=="filesLargerThan").map(([P])=>P),O=n.excludes?.filesLargerThan;return S.length&&h.push({Name:"--exclude-files-attributes",Value:S.join(",")}),O&&O.size!==null&&O.unit!==null&&h.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:c.filter(P=>!P.startsWith("-")),Settings:h,Filters:c.filter(P=>P.startsWith("-")).map((P,U)=>({Order:U,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:pt});break}let c=[...t,...n],h=this.settings().filter(S=>!c.includes(S.Name)).map(S=>{let O=S.Value;return typeof S.Value=="number"&&(O=S.Value.toString()),typeof S.Value=="boolean"&&(O=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:O}});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(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.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||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(s,t){s&1&&(a(0,"sh-alert",17),C(1,5),m(2,"sh-icon",26),F(),l())}function Ot(s,t){if(s&1&&G(0),s&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function wt(s,t){if(s&1&&m(0,"sh-progress-bar",40),s&2){let e=u(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function $t(s,t){s&1&&(a(0,"span",35),f(1,10),l())}function It(s,t){s&1&&(C(0,8,1),m(1,"sh-icon"),F())}function Lt(s,t){s&1&&(C(0,8,2),m(1,"sh-icon"),F())}function Ut(s,t){s&1&&(C(0,11,1),m(1,"sh-icon",42),F())}function Gt(s,t){s&1&&(C(0,11,2),m(1,"sh-icon"),F())}function xt(s,t){if(s&1){let e=b();a(0,"button",41),E("click",function(){d(e);let i=u(3);return p(i.copyPassword())}),C(1,11),y(2,Ut,2,0)(3,Gt,2,0),F(),l()}if(s&2){let e=u(3);_(2),R(e.copiedPassword()?2:3)}}function bt(s,t){s&1&&(a(0,"sh-alert",39),f(1,12),l())}function vt(s,t){if(s&1){let e=b();a(0,"div",30)(1,"sh-form-field")(2,"label",31),C(3,7),m(4,"sup"),F(),l(),m(5,"input",32),l(),y(6,wt,1,9,"sh-progress-bar",33),a(7,"sh-form-field"),m(8,"input",34),y(9,$t,2,0,"span",35),l(),a(10,"div",36)(11,"button",37),E("click",function(){d(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),C(12,8),y(13,It,2,0)(14,Lt,2,0),F(),l(),a(15,"button",37),E("click",function(){d(e);let i=u(2);return p(i.generatePassword())}),C(16,9),m(17,"sh-icon"),F(),l(),y(18,xt,4,1,"button",38),l(),y(19,bt,2,0,"sh-alert",39),l()}if(s&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),R(e.showPassword()?13:14),_(5),R(e.showCopyPassword()?18:-1),_(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Bt(s,t){if(s&1&&(a(0,"sh-select",27)(1,"label",28),f(2,6),l(),m(3,"input",29),Ye(4,Ot,1,1,"ng-template"),l(),y(5,vt,20,7,"div",30)),s&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function kt(s,t){if(s&1&&(a(0,"button",24),C(1,13),m(2,"sh-icon"),F(),l()),s&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(s,t){if(s&1&&(a(0,"button",25),C(1,14),m(2,"sh-icon"),F(),l()),s&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ne=new ye,gt=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>ne.group({name:ne.control(s.name,[fe.required]),description:ne.control(s.description),encryption:ne.control(s.encryption,[_t()]),password:ne.control(s.password,[Ke(t=>t?.value.encryption!=="",[fe.required])]),repeatPassword:ne.control(s.repeatPassword,[Ke(t=>t?.value.encryption!=="",[fe.required])]),compression:ne.control(s.compression)}),pe={Key:"-",DisplayName:"None"},je=class s{#e=M(z);#t=M(oe);#i=M(rt);#n=M(J);#s=M(he);formRef=Se.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=g(!1);copiedPassword=g(!1);showCopyPassword=g(!1);noneOptionKey=pe.Key;encryptionEffect=ie(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=L(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=L(()=>{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||s)};static \u0275cmp=H({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&me(n.formRef,yt,5),e&2&&Ce()},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 c;c=$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 O;O=$localize`Encryption`;let P;P=$localize`Password`;let U;U=$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=xe(v);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let D;D=$localize`Passwords do not match`;let ee;ee=$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:`,ee=xe(ee);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,c,h,O,K,v,X,D,ee,_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",U,"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=b();a(0,"form",15,0),E("submit",function(){return d(i),p(n.next())}),a(2,"h3",16),f(3,1),l(),y(4,Rt,3,0,"sh-alert",17),a(5,"sh-form-field")(6,"label",18),C(7,2),m(8,"sup"),F(),l(),m(9,"input",19),l(),a(10,"sh-form-field")(11,"label",20),f(12,3),l(),m(13,"textarea",21),l(),y(14,Bt,6,3),a(15,"div",22)(16,"button",23),E("click",function(){return d(i),p(n.exit())}),C(17,4),m(18,"sh-icon"),F(),l(),y(19,kt,3,1,"button",24)(20,Vt,3,1,"button",25),l()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),R(n.isNew()?14:-1),_(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,Pe,Q,Z,Ae,De,Me,q,Y,se,j,tt,Je,nt],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,je as c,te as d,Xe as e,dt as f,ze as g,J as h};
@@ -1 +1 @@
1
- import{a as Re,b as $e}from"./chunk-WEAHBXR2.js";import{a as ve}from"./chunk-QC2NBFUR.js";import{a as k}from"./chunk-PWV3UKIW.js";import"./chunk-5SPGCYAQ.js";import{a as Ee}from"./chunk-JB75BUPF.js";import"./chunk-P2DII6CV.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-OWAZS6AA.js";import"./chunk-CWBEE627.js";import{a as Le}from"./chunk-7AMBMWZP.js";import{c as fe,d as Oe,e as Pe,i as De,r as Ne,s as Me,t as Ie}from"./chunk-USU2EHJV.js";import"./chunk-47WDRGVN.js";import{b as pe,d as Te}from"./chunk-4URGDROZ.js";import{c as ce,e as ue,f as de}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{C as Ce,a as I,b as G,c as Se,e as ge,g as w,k as he,l as Fe,n as me,u as Ae}from"./chunk-WRNQOX5R.js";import{h as x}from"./chunk-QM6X5ZEC.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as i,Cb as l,H as V,Jb as E,Oc as re,Pc as Q,Qb as u,Ra as r,Rb as d,Sb as O,Tc as le,Vb as $,Vc as _e,Wb as g,Xc as K,Yb as c,_ as F,bb as M,ea as m,ec as ne,fa as A,fc as oe,ic as H,kc as v,lc as h,mc as X,nc as z,oa as T,qc as W,rc as q,sc as j,tc as ie,ub as p,uc as se,vb as S,vc as b,wb as Z,xb as ee,yb as te,zb as P,zc as ae}from"./chunk-QDFCX6XE.js";import{a as B,b as Y}from"./chunk-EUDKD2JW.js";var Ge=["scroller"];function we(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell-ringing"),i())}function xe(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell"),i())}function ke(n,o){if(n&1&&l(0,"app-notification",8),n&2){c(2);let e=b(6);P("index",0)("notification",e.content)}}function Ue(n,o){if(n&1&&(s(0,"div",11),h(1),i()),n&2){c(3);let e=b(6);r(),z(" ",e.content.content," ")}}function Be(n,o){if(n&1&&(s(0,"sh-alert")(1,"div",10),h(2),i(),p(3,Ue,2,1,"div",11),i()),n&2){c(2);let e=b(6);v(e.content.type||"error"),r(2),X(e.content.title),r(),S(e.content.content?3:-1)}}function Ye(n,o){if(n&1&&(s(0,"div",6),p(1,ke,1,2,"app-notification",8)(2,Be,4,4,"sh-alert",9),i()),n&2){c();let e=b(6);r(),S(e.type==="notification"?1:2)}}function Ve(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,2),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleNotifications())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),l(9,"app-notifications"),i()()()()}}function Xe(n,o){if(n&1&&(s(0,"div",20),h(1),i()),n&2){let e=c().$implicit;r(),z(" ",e.content," ")}}function ze(n,o){if(n&1){let e=E();s(0,"sh-alert",18,1),g("click",function(){let a=m(e).$implicit,_=c(2);return A(_.deleteAlertByIndex(a.id))}),s(2,"div",19),h(3),i(),p(4,Xe,2,1,"div",20),i()}if(n&2){let e=o.$implicit;v(e.type),P("id",e.id),r(3),X(e.title),r(),S(e.content?4:-1)}}function We(n,o){n&1&&(s(0,"p",17),O(1,4),i())}function qe(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,3),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleAlerts())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),ee(9,ze,5,5,"sh-alert",16,Z,!1,We,2,0,"p",17),i()()()()}if(n&2){let e=c();r(9),te(e.alertHistory())}}var be=new Ne,y=class n{#e=F(Se);#t=F(k);isSubmitting=T(!1);messageSent=T(!1);form=be.group({message:be.control("",[Oe.required])});notifications=this.#t.notifications;shownMessage=T(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=re(()=>this.alertHistory().filter(o=>o.isOpen).length);scroller=_e("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=T(null);previousNotificationsCount=T(null);constructor(){Q(()=>{let o=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==o.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3)):o.length&&this.previousHistoryCount()!==o.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:o[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(o){this.#e.removeAlert(o)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ne(t.scroller,Ge,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let o;o=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],o,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=E();s(0,"button",5),g("click",function(){return m(a),A(t.toggleAlerts())}),s(1,"sh-icon"),h(2,"info"),i()(),s(3,"button",5),g("click",function(){return m(a),A(t.toggleNotifications())}),p(4,we,2,0,"sh-icon")(5,xe,2,0,"sh-icon"),i(),ie(6),p(7,Ye,3,1,"div",6),p(8,Ve,10,0,"div",7),p(9,qe,12,1,"div",7)}if(e&2){v(t.alertHistory().length?"error":""),r(3),v(t.notifications().length?"error":""),r(),S(t.notifications().length?4:5),r(2);let a=se(t.shownMessage());r(),S(a?7:-1),r(),S(t.isNotificationsOpen()?8:-1),r(),S(t.isAlertsOpen()?9:-1)}},dependencies:[Ie,G,I,w,$e,Re],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function je(n,o){n&1&&(s(0,"sh-icon",14),h(1,"check"),i())}function Qe(n,o){n&1&&(s(0,"sh-icon",15),h(1,"prohibit"),i())}function Ke(n,o){if(n&1){let e=E();s(0,"button",20),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,5),i()}if(n&2){let e=c();H("loader",e.isUpdating())}}function Je(n,o){if(n&1){let e=E();s(0,"button",21),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,6),i()}if(n&2){let e=c();H("loader",e.isUpdating()),P("disabled",!0)}}var U=class n{#e=F(x);closed=le();isUpdating=T(!1);passphrase=T("");repeatPassphrase=T("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let o;o=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let _;_=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,_=$(_);let D;D=$localize`Passphrase`;let N;N=$localize`Repeat passphrase`;let L;L=$localize`Not now thanks`;let R;R=$localize` Yes, update passphrase now `;let C;return C=$localize` Yes, update passphrase now `,[a,_,D,N,L,R,C,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",o,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),O(2,0),i()(),s(3,"div",8)(4,"sh-alert",9),u(5,1),l(6,"br")(7,"br"),d(),i(),s(8,"sh-form-field")(9,"label",10),O(10,2),i(),s(11,"input",11),j("ngModelChange",function(_){return q(t.passphrase,_)||(t.passphrase=_),_}),i()(),s(12,"sh-form-field")(13,"label",12),O(14,3),i(),s(15,"input",13),j("ngModelChange",function(_){return q(t.repeatPassphrase,_)||(t.repeatPassphrase=_),_}),i(),p(16,je,2,0,"sh-icon",14)(17,Qe,2,0,"sh-icon",15),i()(),s(18,"footer",16)(19,"button",17),g("click",function(){return t.cancel()}),O(20,4),i(),p(21,Ke,2,2,"button",18)(22,Je,2,3,"button",19),i()),e&2&&(r(11),W("ngModel",t.passphrase),r(4),P("disabled",t.passphrase().length===0),W("ngModel",t.repeatPassphrase),r(),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),H("loader",t.isUpdating()),r(2),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Me,fe,Pe,De,G,Fe,I,Ce],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var Ze=()=>({exact:!0});function et(n,o){n&1&&(s(0,"sh-icon"),h(1,"sun"),i())}function tt(n,o){n&1&&(s(0,"sh-icon"),h(1,"moon"),i())}function nt(n,o){if(n&1){let e=E();s(0,"button",22),g("click",function(){m(e);let a=c();return A(a.changeDefaultClientTo("ngax"))}),u(1,7),l(2,"sh-icon"),d(),i(),s(3,"button",22),g("click",function(){m(e);let a=c();return A(a.logout())}),u(4,8),l(5,"sh-icon"),d(),i()}}var J=class n{#e=F(ve);#t=F(x);#n=F(Ee);#o=F(pe);#i=F(ge);#s=F(k);#a=F(Te);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:o=>{let e=o["autogenerated-passphrase"]==="True",t=o["has-asked-for-password-change"]==="True";e&&!t&&this.#i.open(U,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(o){this.#r(o),window.location.replace(`/${o}`)}logout(){this.#a.logout()}#r(o){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+o+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let o;o=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let _;_=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let D;D=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON:`,D=$(D);let N;N=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:`,N=$(N);let L;L=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let R;return R=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[o,e,t,a,_,D,N,L,R,["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"sh-sidenav")(1,"div",9)(2,"header"),l(3,"app-logo"),s(4,"button",10),g("click",function(){return t.toggleBodyClass()}),p(5,et,2,0,"sh-icon")(6,tt,2,0,"sh-icon"),i()(),s(7,"sh-list",11)(8,"button",12),u(9,0),l(10,"sh-icon"),d(),i(),s(11,"button",13),u(12,1),l(13,"sh-icon"),d(),i(),s(14,"button",14),u(15,2),l(16,"sh-icon"),d(),i(),s(17,"button",15),u(18,3),l(19,"sh-icon"),d(),i()(),l(20,"div",16),s(21,"sh-list",17),p(22,nt,6,0),l(23,"sh-divider"),s(24,"button",18),u(25,4),l(26,"sh-icon"),d(),i(),s(27,"a",19),u(28,5),l(29,"sh-icon")(30,"sh-icon",20),d(),i(),s(31,"a",21),u(32,6),l(33,"sh-icon")(34,"sh-icon",20),d(),i()()(),l(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),S(t.isDarkMode()?5:6),r(3),P("routerLinkActiveOptions",ae(3,Ze)),r(14),S(t.relayIsEnabled()?-1:22))},dependencies:[ce,ue,de,Ae,I,me,w,he,y,Le],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{J as default};
1
+ import{a as Re,b as $e}from"./chunk-FFY3NRCC.js";import{a as ve}from"./chunk-JA7OQSO3.js";import{a as k}from"./chunk-BGUKMOKY.js";import"./chunk-XNVRJH42.js";import{a as Ee}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{a as Le}from"./chunk-7AMBMWZP.js";import{c as fe,d as Oe,e as Pe,i as De,r as Ne,s as Me,t as Ie}from"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import{b as pe,d as Te}from"./chunk-ETCRT3EV.js";import{c as ce,e as ue,f as de}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{C as Ce,a as I,b as G,c as Se,e as ge,g as w,k as he,l as Fe,n as me,u as Ae}from"./chunk-WRNQOX5R.js";import{h as x}from"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as i,Cb as l,H as V,Jb as E,Oc as re,Pc as Q,Qb as u,Ra as r,Rb as d,Sb as O,Tc as le,Vb as $,Vc as _e,Wb as g,Xc as K,Yb as c,_ as F,bb as M,ea as m,ec as ne,fa as A,fc as oe,ic as H,kc as v,lc as h,mc as X,nc as z,oa as T,qc as W,rc as q,sc as j,tc as ie,ub as p,uc as se,vb as S,vc as b,wb as Z,xb as ee,yb as te,zb as P,zc as ae}from"./chunk-QDFCX6XE.js";import{a as B,b as Y}from"./chunk-EUDKD2JW.js";var Ge=["scroller"];function we(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell-ringing"),i())}function xe(n,o){n&1&&(s(0,"sh-icon"),h(1,"bell"),i())}function ke(n,o){if(n&1&&l(0,"app-notification",8),n&2){c(2);let e=b(6);P("index",0)("notification",e.content)}}function Ue(n,o){if(n&1&&(s(0,"div",11),h(1),i()),n&2){c(3);let e=b(6);r(),z(" ",e.content.content," ")}}function Be(n,o){if(n&1&&(s(0,"sh-alert")(1,"div",10),h(2),i(),p(3,Ue,2,1,"div",11),i()),n&2){c(2);let e=b(6);v(e.content.type||"error"),r(2),X(e.content.title),r(),S(e.content.content?3:-1)}}function Ye(n,o){if(n&1&&(s(0,"div",6),p(1,ke,1,2,"app-notification",8)(2,Be,4,4,"sh-alert",9),i()),n&2){c();let e=b(6);r(),S(e.type==="notification"?1:2)}}function Ve(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,2),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleNotifications())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),l(9,"app-notifications"),i()()()()}}function Xe(n,o){if(n&1&&(s(0,"div",20),h(1),i()),n&2){let e=c().$implicit;r(),z(" ",e.content," ")}}function ze(n,o){if(n&1){let e=E();s(0,"sh-alert",18,1),g("click",function(){let a=m(e).$implicit,_=c(2);return A(_.deleteAlertByIndex(a.id))}),s(2,"div",19),h(3),i(),p(4,Xe,2,1,"div",20),i()}if(n&2){let e=o.$implicit;v(e.type),P("id",e.id),r(3),X(e.title),r(),S(e.content?4:-1)}}function We(n,o){n&1&&(s(0,"p",17),O(1,4),i())}function qe(n,o){if(n&1){let e=E();s(0,"div",7)(1,"div",12)(2,"h6",13),u(3,3),s(4,"button",5),g("click",function(){m(e);let a=c();return A(a.toggleAlerts())}),l(5,"sh-icon"),i(),d(),i(),s(6,"div",14,0)(8,"div",15),ee(9,ze,5,5,"sh-alert",16,Z,!1,We,2,0,"p",17),i()()()()}if(n&2){let e=c();r(9),te(e.alertHistory())}}var be=new Ne,y=class n{#e=F(Se);#t=F(k);isSubmitting=T(!1);messageSent=T(!1);form=be.group({message:be.control("",[Oe.required])});notifications=this.#t.notifications;shownMessage=T(null);shownMessageInterval=null;alertHistory=this.#e.alertHistory;alertHistoryIsOpen=this.#e.alertHistoryIsOpen;alertHistoryIsHidden=this.#e.alertHistoryIsHidden;numberOfOpenAlerts=re(()=>this.alertHistory().filter(o=>o.isOpen).length);scroller=_e("scroller");isAlertsOpen=K(!1);isNotificationsOpen=K(!1);previousHistoryCount=T(null);previousNotificationsCount=T(null);constructor(){Q(()=>{let o=this.alertHistory(),e=this.notifications();if(e.length===0){this.shownMessage.set(null);return}e.length&&this.previousHistoryCount()!==o.length&&!this.isNotificationsOpen()?(this.shownMessage.set({content:e[0],countDown:3,type:"notification"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3)):o.length&&this.previousHistoryCount()!==o.length&&!this.isAlertsOpen()&&(this.shownMessage.set({content:o[0],countDown:3,type:"alert"}),this.previousHistoryCount.set(o.length),this.shownMessageInterval=setInterval(()=>{let t=this.shownMessage();if(t?.countDown===0){this.shownMessage.set(null),this.shownMessageInterval=null;return}t!==null&&this.shownMessage.update(a=>Y(B({},a),{countDown:a.countDown-1}))},1e3))}),Q(()=>{this.alertHistoryIsOpen(),this.scrollToBottom()})}resetPreviewMessage(){this.shownMessage.set(null),this.shownMessageInterval=null}toggleAlerts(){this.isAlertsOpen()?this.isAlertsOpen.set(!1):(this.isAlertsOpen.set(!0),this.isNotificationsOpen.set(!1),this.resetPreviewMessage())}toggleNotifications(){this.isNotificationsOpen.set(!this.isNotificationsOpen()),this.isAlertsOpen()&&this.isAlertsOpen.set(!1)}deleteAlertByIndex(o){this.#e.removeAlert(o)}scrollToBottom(){this.scroller()&&this.scroller()?.nativeElement&&this.scroller().nativeElement.scrollTo(0,this.scroller().nativeElement.scrollHeight)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-service-hub"]],viewQuery:function(e,t){e&1&&ne(t.scroller,Ge,5),e&2&&oe()},inputs:{isAlertsOpen:[1,"isAlertsOpen"],isNotificationsOpen:[1,"isNotificationsOpen"]},outputs:{isAlertsOpen:"isAlertsOpenChange",isNotificationsOpen:"isNotificationsOpenChange"},decls:10,vars:9,consts:()=>{let o;o=$localize` Notifications ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize` Alerts ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let t;return t=$localize`No alerts yet`,[["scroller",""],["alerts",""],o,e,t,["shButton","",3,"click"],[1,"preview-alert-wrap"],[1,"alert-stream-modal"],[3,"index","notification"],[3,"class"],["ship-alert-title",""],["ship-alert-content",""],[1,"alert-stream-modal-content"],[1,"paragraph-20"],[1,"alert-stream-modal-list-scroller"],[1,"alert-stream-modal-list"],[3,"class","id"],[1,"no-alerts"],[3,"click","id"],["title",""],["content",""]]},template:function(e,t){if(e&1){let a=E();s(0,"button",5),g("click",function(){return m(a),A(t.toggleAlerts())}),s(1,"sh-icon"),h(2,"info"),i()(),s(3,"button",5),g("click",function(){return m(a),A(t.toggleNotifications())}),p(4,we,2,0,"sh-icon")(5,xe,2,0,"sh-icon"),i(),ie(6),p(7,Ye,3,1,"div",6),p(8,Ve,10,0,"div",7),p(9,qe,12,1,"div",7)}if(e&2){v(t.alertHistory().length?"error":""),r(3),v(t.notifications().length?"error":""),r(),S(t.notifications().length?4:5),r(2);let a=se(t.shownMessage());r(),S(a?7:-1),r(),S(t.isNotificationsOpen()?8:-1),r(),S(t.isAlertsOpen()?9:-1)}},dependencies:[Ie,G,I,w,$e,Re],styles:["[_nghost-%COMP%]{display:flex;position:fixed;gap:.5rem;bottom:1.5rem;right:1.5rem;z-index:5000}@media only screen and (max-width: 768px){[_nghost-%COMP%]{bottom:1rem;right:1rem}}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{margin:0}.preview-alert-wrap[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column;min-width:15.625rem}.helpdesk-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.helpdesk-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.helpdesk-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:1rem;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.helpdesk-modal-content[_ngcontent-%COMP%] .message-sent[_ngcontent-%COMP%]{padding:0 1rem 1rem;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:0 1rem 1rem;display:flex;flex-direction:column;align-items:flex-end;gap:1rem}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%;text-wrap:pretty}.helpdesk-modal-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.alert-stream-modal[_ngcontent-%COMP%]{position:absolute;bottom:2.6875rem;right:0;display:flex;flex-direction:column}@media only screen and (max-width: 768px){.alert-stream-modal[_ngcontent-%COMP%]{bottom:2.6875rem}}.alert-stream-modal-list-scroller[_ngcontent-%COMP%]{overflow-y:auto;max-height:18.75rem}.alert-stream-modal-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:20rem;border:1px solid var(--base-4);background-color:var(--base-1);border-radius:var(--shape-2)}.alert-stream-modal-content[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;align-items:center;justify-content:space-between}.no-alerts[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"],changeDetection:0})};function je(n,o){n&1&&(s(0,"sh-icon",14),h(1,"check"),i())}function Qe(n,o){n&1&&(s(0,"sh-icon",15),h(1,"prohibit"),i())}function Ke(n,o){if(n&1){let e=E();s(0,"button",20),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,5),i()}if(n&2){let e=c();H("loader",e.isUpdating())}}function Je(n,o){if(n&1){let e=E();s(0,"button",21),g("click",function(){m(e);let a=c();return A(a.updatePassphrase())}),O(1,6),i()}if(n&2){let e=c();H("loader",e.isUpdating()),P("disabled",!0)}}var U=class n{#e=F(x);closed=le();isUpdating=T(!1);passphrase=T("");repeatPassphrase=T("");updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()}))}cancel(){this.isUpdating.set(!0),this.#e.patchApiV1Serversettings({requestBody:{"has-asked-for-password-change":"True"}}).pipe(V(()=>this.isUpdating.set(!1))).subscribe({next:()=>this.closed.emit()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-change-passphrase-alert-dialog"]],outputs:{closed:"closed"},decls:23,vars:7,consts:()=>{let o;o=$localize`Enter new password`;let e;e=$localize`Repeat password`;let t;t=$localize`Password have to be filled and have to match`;let a;a=$localize`Change passphrase`;let _;_=$localize` Duplicati needs to be secured with a passphrase and a random passphrase has been generated for you. ${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK:${"[\uFFFD#6\uFFFD\uFFFD/#6\uFFFD|\uFFFD#7\uFFFD\uFFFD/#7\uFFFD]"}:LINE_BREAK: If you open Duplicati from the tray icon, you do not need a passphrase, but if you plan to open it from another location you need to set a passphrase you know. Do you want to set a passphrase now? `,_=$(_);let D;D=$localize`Passphrase`;let N;N=$localize`Repeat passphrase`;let L;L=$localize`Not now thanks`;let R;R=$localize` Yes, update passphrase now `;let C;return C=$localize` Yes, update passphrase now `,[a,_,D,N,L,R,C,["header",""],["content",""],["type","warning"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",o,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",e,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",t,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",t,1,"raised","primary",3,"click","disabled"]]},template:function(e,t){e&1&&(s(0,"header",7)(1,"h3"),O(2,0),i()(),s(3,"div",8)(4,"sh-alert",9),u(5,1),l(6,"br")(7,"br"),d(),i(),s(8,"sh-form-field")(9,"label",10),O(10,2),i(),s(11,"input",11),j("ngModelChange",function(_){return q(t.passphrase,_)||(t.passphrase=_),_}),i()(),s(12,"sh-form-field")(13,"label",12),O(14,3),i(),s(15,"input",13),j("ngModelChange",function(_){return q(t.repeatPassphrase,_)||(t.repeatPassphrase=_),_}),i(),p(16,je,2,0,"sh-icon",14)(17,Qe,2,0,"sh-icon",15),i()(),s(18,"footer",16)(19,"button",17),g("click",function(){return t.cancel()}),O(20,4),i(),p(21,Ke,2,2,"button",18)(22,Je,2,3,"button",19),i()),e&2&&(r(11),W("ngModel",t.passphrase),r(4),P("disabled",t.passphrase().length===0),W("ngModel",t.repeatPassphrase),r(),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?16:17),r(3),H("loader",t.isUpdating()),r(2),S(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?21:22))},dependencies:[Me,fe,Pe,De,G,Fe,I,Ce],styles:["[_nghost-%COMP%]{display:block;--dialog-p: 1.5rem}[content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};var Ze=()=>({exact:!0});function et(n,o){n&1&&(s(0,"sh-icon"),h(1,"sun"),i())}function tt(n,o){n&1&&(s(0,"sh-icon"),h(1,"moon"),i())}function nt(n,o){if(n&1){let e=E();s(0,"button",22),g("click",function(){m(e);let a=c();return A(a.changeDefaultClientTo("ngax"))}),u(1,7),l(2,"sh-icon"),d(),i(),s(3,"button",22),g("click",function(){m(e);let a=c();return A(a.logout())}),u(4,8),l(5,"sh-icon"),d(),i()}}var J=class n{#e=F(ve);#t=F(x);#n=F(Ee);#o=F(pe);#i=F(ge);#s=F(k);#a=F(Te);relayIsEnabled=this.#o.relayIsEnabled;isDarkMode=this.#e.isDarkMode;ngOnInit(){return this.#s.init(),this.#n.getBackups(!0),this.#t.getApiV1Serversettings().subscribe({next:o=>{let e=o["autogenerated-passphrase"]==="True",t=o["has-asked-for-password-change"]==="True";e&&!t&&this.#i.open(U,{maxWidth:"500px"})}})}toggleBodyClass(){this.#e.toggleBodyClass()}changeDefaultClientTo(o){this.#r(o),window.location.replace(`/${o}`)}logout(){this.#a.logout()}#r(o){var e=new Date;e.setTime(e.getTime()+90*24*60*60*1e3),document.cookie="default-client="+o+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["app-layout"]],decls:37,vars:4,consts:()=>{let o;o=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:house${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Home `;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Add backup `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:gear${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Settings `;let _;_=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: About Duplicati `;let D;D=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:files${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON: Documentation ${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#29\uFFFD|\uFFFD/#30\uFFFD]"}:CLOSE_TAG_SH_ICON:`,D=$(D);let N;N=$localize`${"\uFFFD#33\uFFFD"}:START_TAG_SH_ICON:chats-circle${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Visit forum ${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:arrow-square-out${"[\uFFFD/#33\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:`,N=$(N);let L;L=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skip-back${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Use old UI `;let R;return R=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:sign-out${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Log out `,[o,e,t,a,_,D,N,L,R,["sidenav",""],["shButton","",1,"icon","small",3,"click"],[1,"base-1","primary"],["action","","routerLink","/","routerLinkActive","active",3,"routerLinkActiveOptions"],["action","","routerLink","/add-backup","routerLinkActive","active"],["action","","routerLink","/restore","routerLinkActive","active"],["action","","routerLink","/settings","routerLinkActive","active"],[1,"spacer"],[1,"base-1l","primary"],["action","","routerLink","/about","routerLinkActive","active"],["href","https://docs.duplicati.com","target","_blank","action",""],["suffix",""],["href","https://forum.duplicati.com","target","_blank","action",""],["action","",3,"click"]]},template:function(e,t){e&1&&(s(0,"sh-sidenav")(1,"div",9)(2,"header"),l(3,"app-logo"),s(4,"button",10),g("click",function(){return t.toggleBodyClass()}),p(5,et,2,0,"sh-icon")(6,tt,2,0,"sh-icon"),i()(),s(7,"sh-list",11)(8,"button",12),u(9,0),l(10,"sh-icon"),d(),i(),s(11,"button",13),u(12,1),l(13,"sh-icon"),d(),i(),s(14,"button",14),u(15,2),l(16,"sh-icon"),d(),i(),s(17,"button",15),u(18,3),l(19,"sh-icon"),d(),i()(),l(20,"div",16),s(21,"sh-list",17),p(22,nt,6,0),l(23,"sh-divider"),s(24,"button",18),u(25,4),l(26,"sh-icon"),d(),i(),s(27,"a",19),u(28,5),l(29,"sh-icon")(30,"sh-icon",20),d(),i(),s(31,"a",21),u(32,6),l(33,"sh-icon")(34,"sh-icon",20),d(),i()()(),l(35,"router-outlet")(36,"app-service-hub"),i()),e&2&&(r(5),S(t.isDarkMode()?5:6),r(3),P("routerLinkActiveOptions",ae(3,Ze)),r(14),S(t.relayIsEnabled()?-1:22))},dependencies:[ce,ue,de,Ae,I,me,w,he,y,Le],styles:["[_nghost-%COMP%]{height:100vh;width:100%;overflow:hidden}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1.25rem;gap:.75rem}h3[title][_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}div[sidenav][_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh}"],changeDetection:0})};export{J as default};
@@ -1 +1 @@
1
- import{h as d}from"./chunk-QM6X5ZEC.js";import{H as r,Oc as s,Pc as g,V as n,_ as o,oa as l}from"./chunk-QDFCX6XE.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=o(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(r(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
1
+ import{h as d}from"./chunk-J3BBLPAD.js";import{H as r,Oc as s,Pc as g,V as n,_ as o,oa as l}from"./chunk-QDFCX6XE.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=o(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(r(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
@@ -0,0 +1 @@
1
+ import{e as a,f as b}from"./chunk-TJOWPBPB.js";import"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-QGFC5ZUR.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import"./chunk-ETCRT3EV.js";import"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1 +1 @@
1
- import{b as y}from"./chunk-QGFC5ZUR.js";import{a as w}from"./chunk-P2DII6CV.js";import{a as b}from"./chunk-OWAZS6AA.js";import"./chunk-4URGDROZ.js";import"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as I,g as U,p as $}from"./chunk-WRNQOX5R.js";import{h as x}from"./chunk-QM6X5ZEC.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as a,Bb as r,Cb as d,H as g,Jb as f,Oa as M,Oc as k,Qb as O,Ra as l,Rb as P,Sb as F,Tb as E,Ub as h,Wb as T,Yb as p,_,bb as D,ea as m,fa as C,ic as L,lc as u,mc as R,oa as S,r as v,ub as s,vb as c,zb as G}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";function V(n,o){n&1&&d(0,"sh-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),O(1,2),d(2,"sh-icon"),P(),r()),n&2){let e,t,i=p(2);G("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),l(2),E((t=i.serverState())==null?null:t.UpdatedVersion),h(1)}}function X(n,o){if(n&1){let e=f();a(0,"button",6),T("click",function(){m(e);let i=p();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=p();L("loader",t.checkingForUpdates()),l(2),c((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function z(n,o){if(n&1){let e=f();a(0,"button",6),T("click",function(){m(e);let i=p();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function H(n,o){n&1&&d(0,"sh-progress-bar",3)}var N=class n{#e=_(x);#t=_(w);#n=_(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=k(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(v(o=>o.Acknowledgements),g(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(g(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),F(3,0),r(),a(4,"p"),F(5,1),r(),a(6,"div",4),s(7,X,3,3)(8,z,2,0,"button",5),s(9,H,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;c(t.isLoading()?0:-1),l(5),E(t.duplicatiVersion()),h(5),l(2),c(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),c(((A=t.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),R(t.generalInfo())}},dependencies:[$,U,I],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
1
+ import{b as y}from"./chunk-QGFC5ZUR.js";import{a as w}from"./chunk-OXOOR7I4.js";import{a as b}from"./chunk-66BSPEOQ.js";import"./chunk-ETCRT3EV.js";import"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as I,g as U,p as $}from"./chunk-WRNQOX5R.js";import{h as x}from"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as a,Bb as r,Cb as d,H as g,Jb as f,Oa as M,Oc as k,Qb as O,Ra as l,Rb as P,Sb as F,Tb as E,Ub as h,Wb as T,Yb as p,_,bb as D,ea as m,fa as C,ic as L,lc as u,mc as R,oa as S,r as v,ub as s,vb as c,zb as G}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";function V(n,o){n&1&&d(0,"sh-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),O(1,2),d(2,"sh-icon"),P(),r()),n&2){let e,t,i=p(2);G("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,M),l(2),E((t=i.serverState())==null?null:t.UpdatedVersion),h(1)}}function X(n,o){if(n&1){let e=f();a(0,"button",6),T("click",function(){m(e);let i=p();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=p();L("loader",t.checkingForUpdates()),l(2),c((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function z(n,o){if(n&1){let e=f();a(0,"button",6),T("click",function(){m(e);let i=p();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function H(n,o){n&1&&d(0,"sh-progress-bar",3)}var N=class n{#e=_(x);#t=_(w);#n=_(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=k(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(v(o=>o.Acknowledgements),g(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(g(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=D({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),F(3,0),r(),a(4,"p"),F(5,1),r(),a(6,"div",4),s(7,X,3,3)(8,z,2,0,"button",5),s(9,H,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;c(t.isLoading()?0:-1),l(5),E(t.duplicatiVersion()),h(5),l(2),c(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),c(((A=t.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),R(t.generalInfo())}},dependencies:[$,U,I],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
@@ -1 +1 @@
1
- import{a as R}from"./chunk-OWAZS6AA.js";import{a as k,n as w}from"./chunk-WRNQOX5R.js";import"./chunk-QM6X5ZEC.js";import{ea as D}from"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as c,Ac as _,Bb as r,Bc as $,Hc as b,Ib as u,Jb as M,Oc as A,Ra as l,Sb as P,Wb as N,Yb as s,_ as y,bb as T,ea as O,fa as x,gb as m,gc as C,hc as E,ic as S,lc as a,mc as F,oa as p,ub as d,vb as f,xb as I,yb as v,zb as g}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var V=e=>({children:e,level:0}),Y=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),z=(e,t)=>t.id;function B(e,t){if(e&1&&(c(0,"sh-icon"),a(1,"caret-down"),r()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function G(e,t){e&1&&(c(0,"sh-icon"),a(1,"dot"),r())}function U(e,t){e&1&&u(0)}function X(e,t){if(e&1&&m(0,U,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,Y,$(2,j,n.children,o.level+1)))}}function q(e,t){if(e&1){let n=M();c(0,"div",4,1),N("click",function(){let i=O(n).$implicit,L=s(2);return x(i.children.length>0&&L.toggleNode(i))}),d(2,B,2,2,"sh-icon",5)(3,G,2,0,"sh-icon"),c(4,"div",6),a(5),r()(),d(6,X,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),f(n.children.length>0?2:3),l(3),F(n.text),l(),f(n.isOpen()?6:-1)}}function H(e,t){if(e&1&&(c(0,"sh-list"),I(1,q,7,7,null,null,z),r()),e&2){let n=t.$implicit;E("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function J(e,t){e&1&&u(0)}var h=class e{#e=y(R);treeStructure=A(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:p(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:p(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),m(2,H,3,2,"ng-template",null,0,b)(4,J,1,0,"ng-container",3)),n&2){let i=C(3);l(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,Y,_(2,V,o.treeStructure())))}},dependencies:[w,k,D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{h as default};
1
+ import{a as R}from"./chunk-66BSPEOQ.js";import{a as k,n as w}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import{ea as D}from"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as c,Ac as _,Bb as r,Bc as $,Hc as b,Ib as u,Jb as M,Oc as A,Ra as l,Sb as P,Wb as N,Yb as s,_ as y,bb as T,ea as O,fa as x,gb as m,gc as C,hc as E,ic as S,lc as a,mc as F,oa as p,ub as d,vb as f,xb as I,yb as v,zb as g}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var V=e=>({children:e,level:0}),Y=e=>({$implicit:e}),j=(e,t)=>({children:e,level:t}),z=(e,t)=>t.id;function B(e,t){if(e&1&&(c(0,"sh-icon"),a(1,"caret-down"),r()),e&2){let n=s().$implicit;S("open",n.isOpen())}}function G(e,t){e&1&&(c(0,"sh-icon"),a(1,"dot"),r())}function U(e,t){e&1&&u(0)}function X(e,t){if(e&1&&m(0,U,1,0,"ng-container",3),e&2){let n=s().$implicit,o=s().$implicit;s();let i=C(3);g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(5,Y,$(2,j,n.children,o.level+1)))}}function q(e,t){if(e&1){let n=M();c(0,"div",4,1),N("click",function(){let i=O(n).$implicit,L=s(2);return x(i.children.length>0&&L.toggleNode(i))}),d(2,B,2,2,"sh-icon",5)(3,G,2,0,"sh-icon"),c(4,"div",6),a(5),r()(),d(6,X,1,7,"ng-container")}if(e&2){let n=t.$implicit;S("cannot-toggle",n.children.length===0)("open",n.isOpen()),l(2),f(n.children.length>0?2:3),l(3),F(n.text),l(),f(n.isOpen()?6:-1)}}function H(e,t){if(e&1&&(c(0,"sh-list"),I(1,q,7,7,null,null,z),r()),e&2){let n=t.$implicit;E("padding-left",n.level*.25,"rem"),l(),v(n.children)}}function J(e,t){e&1&&u(0)}var h=class e{#e=y(R);treeStructure=A(()=>{let t=this.#e.systemInfo();return this.processObject(t,0)});toggleNode(t){t.isOpen.update(n=>!n)}processObject(t,n){let o=[];for(let i in t)typeof t[i]=="object"?o.push({id:i,text:i,children:this.processObject(t[i],n+1),level:n,isOpen:p(!1)}):o.push({id:i,text:`${i}: ${t[i]}`,children:[],level:n,isOpen:p(!1)});return o}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=T({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let t;return t=$localize`System info`,[["recursiveTree",""],["treeNode",""],t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(n,o){if(n&1&&(c(0,"h3"),P(1,2),r(),m(2,H,3,2,"ng-template",null,0,b)(4,J,1,0,"ng-container",3)),n&2){let i=C(3);l(4),g("ngTemplateOutlet",i)("ngTemplateOutletContext",_(4,Y,_(2,V,o.treeStructure())))}},dependencies:[w,k,D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"],changeDetection:0})};export{h as default};