@duplicati/ngclient 0.0.164 → 0.0.165

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 (56) hide show
  1. package/{chunk-WZAZENJC.js → chunk-2DSLXKCS.js} +1 -1
  2. package/{chunk-4GY6ZWN5.js → chunk-2NUXSSQT.js} +1 -1
  3. package/{chunk-Z5W4ULWF.js → chunk-2QQJ6ZBU.js} +1 -1
  4. package/{chunk-EOKEY2WO.js → chunk-43UBTE3L.js} +1 -1
  5. package/{chunk-VNGJCKGG.js → chunk-4M7H3XII.js} +1 -1
  6. package/{chunk-TBTQMBCJ.js → chunk-5NPUZRFY.js} +1 -1
  7. package/{chunk-MSASOFXF.js → chunk-5U6T552I.js} +1 -1
  8. package/{chunk-75C77QFK.js → chunk-A66RJUYO.js} +1 -1
  9. package/{chunk-Y4GDUNWN.js → chunk-AAIMJHAS.js} +1 -1
  10. package/{chunk-VEON764K.js → chunk-BB73BKGN.js} +1 -1
  11. package/{chunk-ZLLXHZQV.js → chunk-D2ZTG4GG.js} +1 -1
  12. package/{chunk-DF6VTK4B.js → chunk-DQ7EARGM.js} +1 -1
  13. package/{chunk-7XXYLQEN.js → chunk-EM7XX5OF.js} +1 -1
  14. package/chunk-F3EXRAZJ.js +1 -0
  15. package/{chunk-X4KK6R3X.js → chunk-FG7TM7PO.js} +1 -1
  16. package/chunk-I3AX7HPO.js +1 -0
  17. package/{chunk-SVQCV5AE.js → chunk-IEGVSOLM.js} +1 -1
  18. package/{chunk-O5W6EGCB.js → chunk-IME3RCXO.js} +1 -1
  19. package/{chunk-OHP7HLY2.js → chunk-JEWYZWQN.js} +1 -1
  20. package/{chunk-EVJEPFC6.js → chunk-JIVJVJKU.js} +1 -1
  21. package/{chunk-GOFRTODH.js → chunk-KFYMEXS6.js} +1 -1
  22. package/{chunk-MCOUCF6F.js → chunk-KGO3OR7H.js} +1 -1
  23. package/{chunk-2VOU6SHS.js → chunk-KIUZUG7C.js} +1 -1
  24. package/{chunk-XTFTWEJS.js → chunk-KLODM6IK.js} +1 -1
  25. package/{chunk-JPRQYGHQ.js → chunk-LEYSCNJE.js} +1 -1
  26. package/{chunk-465L4ZG5.js → chunk-ORLZQJMN.js} +1 -1
  27. package/{chunk-35KH4G7Y.js → chunk-P2GZAEQX.js} +1 -1
  28. package/{chunk-D3LEV6WL.js → chunk-PFZG7ACX.js} +1 -1
  29. package/{chunk-NZDZUPC5.js → chunk-PZOMPDFS.js} +1 -1
  30. package/{chunk-E5E5ASXG.js → chunk-Q6RATRPG.js} +1 -1
  31. package/{chunk-DY4NXNVS.js → chunk-QNEJVXLY.js} +1 -1
  32. package/{chunk-URAI6X74.js → chunk-RVELYERL.js} +1 -1
  33. package/{chunk-732GPC5D.js → chunk-SDIOWQX7.js} +1 -1
  34. package/{chunk-4Z72AON4.js → chunk-SQSTMZR3.js} +1 -1
  35. package/chunk-TCDG7C5J.js +1 -0
  36. package/{chunk-2CWLIRUP.js → chunk-TVD2HREV.js} +1 -1
  37. package/{chunk-MPQNBRD5.js → chunk-TX7FNDPL.js} +1 -1
  38. package/{chunk-W2SSWLYM.js → chunk-UEUGGMU7.js} +1 -1
  39. package/{chunk-EUVXYJ2O.js → chunk-ULC4PUPL.js} +1 -1
  40. package/{chunk-W4KOKNGU.js → chunk-UVPLU2YS.js} +1 -1
  41. package/{chunk-QMHLXETS.js → chunk-VLCXKEIA.js} +1 -1
  42. package/{chunk-X5BOJXMC.js → chunk-WNP2PFJP.js} +1 -1
  43. package/{chunk-CZRQ3GX6.js → chunk-XAUZOGDI.js} +1 -1
  44. package/{chunk-NME5JWZN.js → chunk-Y27QHU4A.js} +1 -1
  45. package/{chunk-NFIJYWQI.js → chunk-YGVXQBSL.js} +1 -1
  46. package/{chunk-SXFSAK5L.js → chunk-YIMKL4H6.js} +1 -1
  47. package/{chunk-ACZQPL4M.js → chunk-ZNZH3TU5.js} +1 -1
  48. package/{chunk-2QT6CZNW.js → chunk-ZSP3PG56.js} +1 -1
  49. package/{chunk-RNWKZDZM.js → chunk-ZTM5RK6J.js} +1 -1
  50. package/index.html +1 -1
  51. package/main-NIJHUKOR.js +1 -0
  52. package/package.json +1 -1
  53. package/chunk-5RQDJUIT.js +0 -1
  54. package/chunk-XKKT2NP5.js +0 -1
  55. package/chunk-XUN5TTJC.js +0 -1
  56. package/main-75X3EGHT.js +0 -1
@@ -1 +1 @@
1
- import{a as Ct}from"./chunk-5KMPTDRJ.js";import{b as ye,c as dt,d as pt}from"./chunk-2DP4QU4T.js";import{a as ut,b as Ve,c as ct}from"./chunk-AWXWGD4T.js";import{a as _t}from"./chunk-POJT4MSX.js";import{b as re}from"./chunk-WJDMMKWE.js";import{a as rt}from"./chunk-QBHHGHBJ.js";import{a as Oe}from"./chunk-AE7T2DAH.js";import{b as lt}from"./chunk-TC7HZO7D.js";import{B as ae,G as Y,K as ot,O as le,U as st,V as Me,X as at,b as Te,c as z,d as he,e as j,f as Ne,h as Qe,i as oe,j as fe,k as Ze,n as et,o as Pe,p as tt,q as Ae,r as De,s as se,t as Re,u as q,w as nt,z as it}from"./chunk-TGNUULAU.js";import{b as ie,d as H}from"./chunk-XUN5TTJC.js";import{$b as u,Ab as $e,Bb as xe,Bc as me,Cb as N,Db as a,Eb as l,Fb as S,H as we,Jb as B,Kb as k,Mb as x,Rc as G,Sa as r,Sc as ne,Tb as m,Ub as F,V as Ce,Vb as f,Wc as Be,Xc as ke,Yb as Ue,Yc as Fe,Zb as T,_ as A,cb as J,ea as p,fa as C,gc as ge,hb as je,hc as Ee,ic as be,kc as Se,nc as U,oc as ve,pa as E,pc as Ye,sc as L,tc as I,ub as qe,uc as w,xb as D,yb as R,zb as Ge}from"./chunk-ZBK64QS2.js";import{a as b,b as X}from"./chunk-EUDKD2JW.js";var Le=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=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};function mt(s,t){if(s&1){let e=x();a(0,"div",24)(1,"sh-form-field")(2,"label",25),f(3,7),l(),a(4,"input",26,0),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),C(i)}),T("focus",function(){p(e);let i=be(5);return C(i.showPicker())}),l(),a(6,"sh-icon",27),U(7,"clock"),l()(),a(8,"sh-form-field"),S(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),C(i)}),T("focus",function(){p(e);let i=be(11);return C(i.showPicker())}),l(),a(12,"sh-icon",27),U(13,"calendar"),l()()(),a(14,"div",24)(15,"sh-form-field")(16,"label",30),f(17,8),l(),a(18,"input",31),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),C(i)}),l()(),a(19,"sh-select",32)(20,"input",33),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),C(i)}),l()()(),a(21,"sh-toggle-card",34),B(22,35),f(23,9),k(),a(24,"div",36)(25,"sh-toggle",19),m(26,10),a(27,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),C(i)}),l(),F(),l(),a(28,"sh-toggle",19),m(29,11),a(30,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),C(i)}),l(),F(),l(),a(31,"sh-toggle",19),m(32,12),a(33,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),C(i)}),l(),F(),l(),a(34,"sh-toggle",19),m(35,13),a(36,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),C(i)}),l(),F(),l(),a(37,"sh-toggle",19),m(38,14),a(39,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),C(i)}),l(),F(),l(),a(40,"sh-toggle",19),m(41,15),a(42,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),C(i)}),l(),F(),l(),a(43,"sh-toggle",19),m(44,16),a(45,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),C(i)}),l(),F(),l()()()}if(s&2){let e=u();r(4),L("ngModel",e.scheduleFields.nextTime().time),r(6),L("ngModel",e.scheduleFields.nextTime().date),r(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),r(),N("options",e.unitOptions)("isClearable",!1),r(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),N("disallowToggle",!0),r(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Ft=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class s{#e=A(Q);#t=A(H);#i=A(ie);unitOptions=Ft;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=J({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 d;d=$localize`Next time`;let c;c=$localize`Run again every`;let _;_=$localize`Allowed days`;let g;g=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,d,c,_,g,y,h,$,K,v,W,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),f(1,2),l(),a(2,"div",18)(3,"sh-toggle",19),m(4,3),a(5,"input",20),w("ngModelChange",function(o){return I(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),F(),l(),a(6,"p"),f(7,4),l()(),D(8,mt,46,14),a(9,"div",21)(10,"button",22),T("click",function(){return n.goBack()}),m(11,5),S(12,"sh-icon"),F(),l(),a(13,"button",23),T("click",function(){return n.next()}),m(14,6),S(15,"sh-icon"),F(),l()()),e&2&&(r(5),L("ngModel",n.scheduleFields.autoRun),r(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[se,z,Ze,Te,j,oe,Y,Me,q,ae,le,st],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 Tt(s,t){if(s&1){let e=x();a(0,"sh-select",2)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l()()}if(s&2){let e=u();N("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),r(),L("ngModel",e.internalPath)}}function ht(s,t){if(s&1&&(B(0,7),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Nt(s,t){if(s&1&&(B(0,8),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ft(s,t){if(s&1){let e=x();a(0,"sh-form-field",3)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l(),D(2,ht,2,1,"ng-container",7),D(3,Nt,2,1,"ng-container",8),l()}if(s&2){let e,n,i=u();r(),L("ngModel",i.internalPath),r(),R(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),r(),R(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Pt=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],At=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ie=class s{path=ke.required();osType=ke();pathChange=Be();remove=Be();internalPath=E("");pathType=E("-Expression");currentExpressionOption=G(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=E(Pt);expressionOptions=G(()=>{let e=this.osType()==="Windows"?"\\":"/";return At.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(b({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(b({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(b({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(b({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(b({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(b({},n),{startsWith:"*.",endsWith:""}):X(b({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(a(0,"sh-select",0)(1,"input",1),w("ngModelChange",function(o){return I(n.pathType,o)||(n.pathType=o),o}),T("ngModelChange",function(){return n.updateFilter()}),l()(),D(2,Tt,2,4,"sh-select",2)(3,ft,4,3,"sh-form-field",3),a(4,"div",4),T("click",function(){return n.removeFilter()}),a(5,"sh-icon",5),U(6,"x-circle"),l()()),e&2){let i;N("options",n.expressionOptions())("isClearable",!1),r(),L("ngModel",n.pathType),r(),R(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[se,z,j,oe,le,Y,q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Dt=["formRef"],He=()=>({standalone:!0});function Rt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41)(1,"input",42),w("ngModelChange",function(i){p(e);let o=u(2);return I(o.editingPath,i)||(o.editingPath=i),C(i)}),l()(),a(2,"button",43),T("click",function(){p(e);let i=u(2);return C(i.updatePath())}),a(3,"sh-icon"),U(4,"floppy-disk"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u(2);return C(i.cancelEditPath())}),a(6,"sh-icon"),U(7,"x-bold"),l()()}if(s&2){let e=u(2);r(),L("ngModel",e.editingPath),N("ngModelOptions",me(2,He))}}function Mt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41),S(1,"input",44),l(),a(2,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.editPath(i))}),a(3,"sh-icon"),U(4,"pen"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.removePath(i))}),a(6,"sh-icon"),U(7,"trash-simple"),l()()}if(s&2){let e=u().$implicit;qe("readonly",!0),r(),N("ngModel",e)("ngModelOptions",me(3,He))}}function Ot(s,t){if(s&1&&(a(0,"div",30),D(1,Rt,8,3)(2,Mt,8,4),l()),s&2){let e=t.$implicit,n=u();r(),R(n.oldPath()===e?1:2)}}function yt(s,t){if(s&1){let e=x();a(0,"app-new-filter",46),T("pathChange",function(i){let o=p(e).$index,d=u(2);return C(d.patchPathAt(i,o))})("remove",function(){let i=p(e).$index,o=u(2);return C(o.removePathAt(i))}),l()}if(s&2){let e=t.$implicit,n=u(2);N("path",e)("osType",n.osType()??"")}}function Lt(s,t){if(s&1&&$e(0,yt,1,2,"app-new-filter",45,Ge),s&2){let e=u();xe(e.pathArray())}}function It(s,t){if(s&1){let e=x();a(0,"div",31)(1,"app-size",47),T("ngModelChange",function(i){p(e);let o=u();return C(o.updateFilesLargerThan(i))}),l()()}if(s&2){let e=u();r(),N("ngModel",e.filesLargerThan())("ngModelOptions",me(2,He))}}var V=new De,gt=(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)})})}),Je=class s{#e=A(Q);#t=A(H);#i=A(ie);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Qe("");filesLargerThan=G(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=G(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=E(null);editingPath=E(null);addingNewPath=E(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=ye(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(d=>d&&d!=="").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,_)=>_===e?`${t}`:`${c}`).join("\0"),d=[i,o].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(d)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),i=this.pathArray().filter((d,c)=>c!==t).join("\0"),o=[n,i].filter(d=>d&&d!=="").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=J({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Dt,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let d;d=$localize`Source Data`;let c;c=$localize`Folder path`;let _;_=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let g;g=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let y;y=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let $;$=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let W;W=$localize`Exclude`;let M;M=$localize`Choose if there’s any files you want to exclude.`;let Z;Z=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let P;return P=$localize`Edit path`,[["formRef",""],d,c,_,g,y,h,$,K,v,W,M,Z,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",P,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),T("submit",function(){return p(i),C(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(),S(8,"input",21),l(),a(9,"div",22)(10,"button",23),T("click",function(){return p(i),C(n.goBack())}),m(11,3),S(12,"sh-icon"),F(),l(),a(13,"button",24),m(14,4),S(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),$e(23,Ot,3,1,"div",30,Ge),a(25,"div",31)(26,"sh-form-field"),S(27,"input",32),l(),a(28,"button",33),T("click",function(){return p(i),C(n.addNewPath())}),a(29,"sh-icon"),U(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),T("click",function(){return p(i),C(n.addFilter())}),f(37,9),l(),D(38,Lt,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),m(45,12),S(46,"input",37),F(),l(),a(47,"sh-toggle",36),m(48,13),S(49,"input",38),F(),l(),a(50,"sh-toggle",36),m(51,14),S(52,"input",39),F(),l(),a(53,"sh-toggle",40),T("click",function(){return p(i),C(n.toggleFilesLargerThan())}),f(54,15),l(),D(55,It,2,3,"div",31),l()()()}if(e&2){let i;N("formGroup",n.sourceDataForm),r(5),N("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),N("disallowToggle",!0),r(6),xe(n.nonFilterPaths()),r(4),N("formControl",n.newPathCtrl),r(4),N("disallowToggle",!0),r(7),R((i=n.pathSignal())!=null&&i.length?38:-1),r(),N("disallowToggle",!0),r(14),Se("active",n.filesLargerThan()),r(2),R(n.filesLargerThan()?55:-1)}},dependencies:[se,fe,z,Te,j,Ne,oe,Re,et,Pe,Ae,tt,Y,q,ae,Me,Ie,pt,Ct,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;overflow:auto}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Et="1W:1D,4W:1W,12M:1M",Q=class s{#e=A(H);#t=A(Oe);#i=A(it);#n=A(lt);#r=A(_t);#o=A(Le);generalForm=St();sourceDataForm=gt();scheduleFields={autoRun:E(ee.autoRun),nextTime:E(ee.nextTime),runAgain:E(ee.runAgain)};settings=E([]);optionsFields={remoteVolumeSize:E("50MB"),backupRetention:E("all"),backupRetentionTime:E(""),backupRetentionVersions:E(0),backupRetentionCustom:E("")};targetUrlModel=E(null);backupMetadata=E(null);isDraft=E(!1);backupId=E(null);backupName=G(()=>this.generalFormSignal()?.name??"");isSubmitting=E(!1);finishedLoading=E(!1);backupDefaults=E(null);applicationOptions=E(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=E([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#s=E("");#a=E(null);#l=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#a.asReadonly();#p=ne(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#s.set(""),this.#a.set(null))});setTestState(t,e){this.#s.set(t),this.#a.set(e??null)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=G(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=G(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#c(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#_(),this.#e.navigate(["/"]);return}this.#i.open(rt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),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?.toLowerCase()?.split(",")??[],o=t.Settings?.find(c=>c.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,d={path:[...e,...n].join("\0"),excludes:{hidden:i.includes("hidden"),system:i.includes("system"),temporary:i.includes("temporary"),filesLargerThan:o===null?void 0:ye(o)}};this.sourceDataForm.patchValue(d)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(g=>g.Name==="encryption-module"),o=t.Settings?.find(g=>g.Name==="passphrase")?.Value??"",d=i?.Value&&i.Value.length?i.Value:"",c=t.Settings?.find(g=>g.Name==="compression-module")?.Value??"",_={name:t.Name??"",description:t.Description??""};e&&e!==""&&(_.name=e),n&&n!==""&&(_.description=n),d&&d!==""&&(_.encryption=d),o&&o!==""&&(_.password=o,_.repeatPassword=o),c&&c!==""&&(_.compression=c),this.generalForm.patchValue(_)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#d(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>b(b({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=(t.Settings??[]).map(_=>_);if(e){let _=this.#r.serverSettings()??{};Object.keys(_).filter(g=>g.startsWith("--")).forEach(g=>{i.find(h=>h.Name===g)||i.push({Name:g,Value:_[g],Filter:null})})}let o=i.filter(_=>!n.includes(_.Name)),d=i.filter(_=>n.includes(_.Name));this.settings.set(o??[]),o?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var c="all";d?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Et)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(c)}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()}}#c(){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.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let d=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,$])=>$).map(([h,$])=>h):[],c=n.path?.split("\0")??[],_=this.mapFormsToSettings(),g=Object.entries(n.excludes??{}).filter(([h,$])=>$&&h!=="filesLargerThan").map(([h])=>h),y=n.excludes?.filesLargerThan;return g.length&&_.push({Name:"--exclude-files-attributes",Value:g.join(",")}),y&&y.size!==null&&y.unit!==null&&_.push({Name:"--skip-files-larger-than",Value:`${y.size}${y.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:c.filter(h=>!(h.startsWith("-")||h.startsWith("+"))),Settings:_,Filters:c.filter(h=>h.startsWith("-")||h.startsWith("+")).map((h,$)=>({Order:$,Include:h.startsWith("+"),Expression:h.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:d}: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 d=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":d.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":d.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":d.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":d.push({Name:"retention-policy",Value:Et});break}let c=[...t,...n],_=this.settings().filter(g=>!c.includes(g.Name)).map(g=>{let y=g.Value;return typeof g.Value=="number"&&(y=g.Value.toString()),typeof g.Value=="boolean"&&(y=g.Value?"True":"False"),{Name:g.Name?.startsWith("--")?g.Name:`--${g.Name}`,Value:y}});return[...i,...o,...d,..._]}#d(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)}#_(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(ee.autoRun),this.scheduleFields.nextTime.set(ee.nextTime),this.scheduleFields.runAgain.set(ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};var wt=["formRef"];function Gt(s,t){s&1&&(a(0,"sh-alert",17),m(1,5),S(2,"sh-icon",26),F(),l())}function $t(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ye(" ",e.DisplayName," ")}}function xt(s,t){if(s&1&&S(0,"sh-progress-bar",40),s&2){let e=u(3);Se("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),N("value",e.calculatePasswordStrength()*(100/5))}}function Ut(s,t){s&1&&(a(0,"span",35),f(1,10),l())}function bt(s,t){s&1&&(m(0,8,1),S(1,"sh-icon"),F())}function vt(s,t){s&1&&(m(0,8,2),S(1,"sh-icon"),F())}function Bt(s,t){s&1&&(m(0,11,1),S(1,"sh-icon",42),F())}function kt(s,t){s&1&&(m(0,11,2),S(1,"sh-icon"),F())}function Vt(s,t){if(s&1){let e=x();a(0,"button",41),T("click",function(){p(e);let i=u(3);return C(i.copyPassword())}),m(1,11),D(2,Bt,2,0)(3,kt,2,0),F(),l()}if(s&2){let e=u(3);r(2),R(e.copiedPassword()?2:3)}}function Kt(s,t){s&1&&(a(0,"sh-alert",39),f(1,12),l())}function Wt(s,t){if(s&1){let e=x();a(0,"div",30)(1,"sh-form-field")(2,"label",31),m(3,7),S(4,"sup"),F(),l(),S(5,"input",32),l(),D(6,xt,1,9,"sh-progress-bar",33),a(7,"sh-form-field"),S(8,"input",34),D(9,Ut,2,0,"span",35),l(),a(10,"div",36)(11,"button",37),T("click",function(){p(e);let i=u(2);return C(i.showPassword.set(!i.showPassword()))}),m(12,8),D(13,bt,2,0)(14,vt,2,0),F(),l(),a(15,"button",37),T("click",function(){p(e);let i=u(2);return C(i.generatePassword())}),m(16,9),S(17,"sh-icon"),F(),l(),D(18,Vt,4,1,"button",38),l(),D(19,Kt,2,0,"sh-alert",39),l()}if(s&2){let e=u(2);r(5),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.password?6:-1),r(2),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),R(e.showPassword()?13:14),r(5),R(e.showCopyPassword()?18:-1),r(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Xt(s,t){if(s&1&&(a(0,"sh-select",27)(1,"label",28),f(2,6),l(),S(3,"input",29),je(4,$t,1,1,"ng-template"),l(),D(5,Wt,20,7,"div",30)),s&2){let e=u();N("options",e.encryptionOptions())("isClearable",!1),r(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Jt(s,t){if(s&1&&(a(0,"button",24),m(1,13),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.nameAndDescriptionValid()===!1)}}function Ht(s,t){if(s&1&&(a(0,"button",25),m(1,14),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,St=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(s.name,[he.required]),description:te.control(s.description),encryption:te.control(s.encryption,[ct()]),password:te.control(s.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(s.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(s.compression)}),pe={Key:"-",DisplayName:"None"},ze=class s{#e=A(H);#t=A(ie);#i=A(ut);#n=A(Q);#r=A(Oe);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=G(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,wt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let d;d=$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 _;_=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let g;g=$localize`Encryption`;let y;y=$localize`Encryption`;let h;h=$localize`Password`;let $;$=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ue(v);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let M;M=$localize`Passwords do not match`;let Z;Z=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ue(Z);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,o,d,c,_,y,K,v,W,M,Z,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",g,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),T("submit",function(){return p(i),C(n.next())}),a(2,"h3",16),f(3,1),l(),D(4,Gt,3,0,"sh-alert",17),a(5,"sh-form-field")(6,"label",18),m(7,2),S(8,"sup"),F(),l(),S(9,"input",19),l(),a(10,"sh-form-field")(11,"label",20),f(12,3),l(),S(13,"textarea",21),l(),D(14,Xt,6,3),a(15,"div",22)(16,"button",23),T("click",function(){return p(i),C(n.exit())}),m(17,4),S(18,"sh-icon"),F(),l(),D(19,Jt,3,1,"button",24)(20,Ht,3,1,"button",25),l()()}if(e&2){let i;N("formGroup",n.generalForm),r(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),R(n.isNew()?14:-1),r(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,fe,z,j,Ne,Pe,Ae,Y,le,ae,q,ot,nt,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{St as a,pe as b,ze as c,ee as d,Ke as e,gt as f,Je as g,Q as h};
1
+ import{a as Ct}from"./chunk-5KMPTDRJ.js";import{b as ye,c as dt,d as pt}from"./chunk-2DP4QU4T.js";import{a as ut,b as Ve,c as ct}from"./chunk-AWXWGD4T.js";import{a as _t}from"./chunk-POJT4MSX.js";import{b as re}from"./chunk-WJDMMKWE.js";import{a as rt}from"./chunk-QBHHGHBJ.js";import{a as Oe}from"./chunk-AE7T2DAH.js";import{b as lt}from"./chunk-TC7HZO7D.js";import{B as ae,G as Y,K as ot,O as le,U as st,V as Me,X as at,b as Te,c as z,d as he,e as j,f as Ne,h as Qe,i as oe,j as fe,k as Ze,n as et,o as Pe,p as tt,q as Ae,r as De,s as se,t as Re,u as q,w as nt,z as it}from"./chunk-TGNUULAU.js";import{b as ie,d as H}from"./chunk-F3EXRAZJ.js";import{$b as u,Ab as $e,Bb as xe,Bc as me,Cb as N,Db as a,Eb as l,Fb as S,H as we,Jb as B,Kb as k,Mb as x,Rc as G,Sa as r,Sc as ne,Tb as m,Ub as F,V as Ce,Vb as f,Wc as Be,Xc as ke,Yb as Ue,Yc as Fe,Zb as T,_ as A,cb as J,ea as p,fa as C,gc as ge,hb as je,hc as Ee,ic as be,kc as Se,nc as U,oc as ve,pa as E,pc as Ye,sc as L,tc as I,ub as qe,uc as w,xb as D,yb as R,zb as Ge}from"./chunk-ZBK64QS2.js";import{a as b,b as X}from"./chunk-EUDKD2JW.js";var Le=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=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};function mt(s,t){if(s&1){let e=x();a(0,"div",24)(1,"sh-form-field")(2,"label",25),f(3,7),l(),a(4,"input",26,0),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),C(i)}),T("focus",function(){p(e);let i=be(5);return C(i.showPicker())}),l(),a(6,"sh-icon",27),U(7,"clock"),l()(),a(8,"sh-form-field"),S(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),C(i)}),T("focus",function(){p(e);let i=be(11);return C(i.showPicker())}),l(),a(12,"sh-icon",27),U(13,"calendar"),l()()(),a(14,"div",24)(15,"sh-form-field")(16,"label",30),f(17,8),l(),a(18,"input",31),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),C(i)}),l()(),a(19,"sh-select",32)(20,"input",33),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),C(i)}),l()()(),a(21,"sh-toggle-card",34),B(22,35),f(23,9),k(),a(24,"div",36)(25,"sh-toggle",19),m(26,10),a(27,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),C(i)}),l(),F(),l(),a(28,"sh-toggle",19),m(29,11),a(30,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),C(i)}),l(),F(),l(),a(31,"sh-toggle",19),m(32,12),a(33,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),C(i)}),l(),F(),l(),a(34,"sh-toggle",19),m(35,13),a(36,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),C(i)}),l(),F(),l(),a(37,"sh-toggle",19),m(38,14),a(39,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),C(i)}),l(),F(),l(),a(40,"sh-toggle",19),m(41,15),a(42,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),C(i)}),l(),F(),l(),a(43,"sh-toggle",19),m(44,16),a(45,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),C(i)}),l(),F(),l()()()}if(s&2){let e=u();r(4),L("ngModel",e.scheduleFields.nextTime().time),r(6),L("ngModel",e.scheduleFields.nextTime().date),r(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),r(),N("options",e.unitOptions)("isClearable",!1),r(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),N("disallowToggle",!0),r(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Ft=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class s{#e=A(Q);#t=A(H);#i=A(ie);unitOptions=Ft;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=J({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 d;d=$localize`Next time`;let c;c=$localize`Run again every`;let _;_=$localize`Allowed days`;let g;g=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,d,c,_,g,y,h,$,K,v,W,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),f(1,2),l(),a(2,"div",18)(3,"sh-toggle",19),m(4,3),a(5,"input",20),w("ngModelChange",function(o){return I(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),F(),l(),a(6,"p"),f(7,4),l()(),D(8,mt,46,14),a(9,"div",21)(10,"button",22),T("click",function(){return n.goBack()}),m(11,5),S(12,"sh-icon"),F(),l(),a(13,"button",23),T("click",function(){return n.next()}),m(14,6),S(15,"sh-icon"),F(),l()()),e&2&&(r(5),L("ngModel",n.scheduleFields.autoRun),r(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[se,z,Ze,Te,j,oe,Y,Me,q,ae,le,st],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 Tt(s,t){if(s&1){let e=x();a(0,"sh-select",2)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l()()}if(s&2){let e=u();N("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),r(),L("ngModel",e.internalPath)}}function ht(s,t){if(s&1&&(B(0,7),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Nt(s,t){if(s&1&&(B(0,8),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ft(s,t){if(s&1){let e=x();a(0,"sh-form-field",3)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l(),D(2,ht,2,1,"ng-container",7),D(3,Nt,2,1,"ng-container",8),l()}if(s&2){let e,n,i=u();r(),L("ngModel",i.internalPath),r(),R(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),r(),R(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Pt=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],At=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ie=class s{path=ke.required();osType=ke();pathChange=Be();remove=Be();internalPath=E("");pathType=E("-Expression");currentExpressionOption=G(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=E(Pt);expressionOptions=G(()=>{let e=this.osType()==="Windows"?"\\":"/";return At.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(b({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(b({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(b({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(b({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(b({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(b({},n),{startsWith:"*.",endsWith:""}):X(b({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(a(0,"sh-select",0)(1,"input",1),w("ngModelChange",function(o){return I(n.pathType,o)||(n.pathType=o),o}),T("ngModelChange",function(){return n.updateFilter()}),l()(),D(2,Tt,2,4,"sh-select",2)(3,ft,4,3,"sh-form-field",3),a(4,"div",4),T("click",function(){return n.removeFilter()}),a(5,"sh-icon",5),U(6,"x-circle"),l()()),e&2){let i;N("options",n.expressionOptions())("isClearable",!1),r(),L("ngModel",n.pathType),r(),R(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[se,z,j,oe,le,Y,q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Dt=["formRef"],He=()=>({standalone:!0});function Rt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41)(1,"input",42),w("ngModelChange",function(i){p(e);let o=u(2);return I(o.editingPath,i)||(o.editingPath=i),C(i)}),l()(),a(2,"button",43),T("click",function(){p(e);let i=u(2);return C(i.updatePath())}),a(3,"sh-icon"),U(4,"floppy-disk"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u(2);return C(i.cancelEditPath())}),a(6,"sh-icon"),U(7,"x-bold"),l()()}if(s&2){let e=u(2);r(),L("ngModel",e.editingPath),N("ngModelOptions",me(2,He))}}function Mt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41),S(1,"input",44),l(),a(2,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.editPath(i))}),a(3,"sh-icon"),U(4,"pen"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.removePath(i))}),a(6,"sh-icon"),U(7,"trash-simple"),l()()}if(s&2){let e=u().$implicit;qe("readonly",!0),r(),N("ngModel",e)("ngModelOptions",me(3,He))}}function Ot(s,t){if(s&1&&(a(0,"div",30),D(1,Rt,8,3)(2,Mt,8,4),l()),s&2){let e=t.$implicit,n=u();r(),R(n.oldPath()===e?1:2)}}function yt(s,t){if(s&1){let e=x();a(0,"app-new-filter",46),T("pathChange",function(i){let o=p(e).$index,d=u(2);return C(d.patchPathAt(i,o))})("remove",function(){let i=p(e).$index,o=u(2);return C(o.removePathAt(i))}),l()}if(s&2){let e=t.$implicit,n=u(2);N("path",e)("osType",n.osType()??"")}}function Lt(s,t){if(s&1&&$e(0,yt,1,2,"app-new-filter",45,Ge),s&2){let e=u();xe(e.pathArray())}}function It(s,t){if(s&1){let e=x();a(0,"div",31)(1,"app-size",47),T("ngModelChange",function(i){p(e);let o=u();return C(o.updateFilesLargerThan(i))}),l()()}if(s&2){let e=u();r(),N("ngModel",e.filesLargerThan())("ngModelOptions",me(2,He))}}var V=new De,gt=(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)})})}),Je=class s{#e=A(Q);#t=A(H);#i=A(ie);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Qe("");filesLargerThan=G(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=G(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=E(null);editingPath=E(null);addingNewPath=E(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=ye(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(d=>d&&d!=="").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,_)=>_===e?`${t}`:`${c}`).join("\0"),d=[i,o].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(d)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),i=this.pathArray().filter((d,c)=>c!==t).join("\0"),o=[n,i].filter(d=>d&&d!=="").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=J({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Dt,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let d;d=$localize`Source Data`;let c;c=$localize`Folder path`;let _;_=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let g;g=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let y;y=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let $;$=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let W;W=$localize`Exclude`;let M;M=$localize`Choose if there’s any files you want to exclude.`;let Z;Z=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let P;return P=$localize`Edit path`,[["formRef",""],d,c,_,g,y,h,$,K,v,W,M,Z,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",P,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),T("submit",function(){return p(i),C(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(),S(8,"input",21),l(),a(9,"div",22)(10,"button",23),T("click",function(){return p(i),C(n.goBack())}),m(11,3),S(12,"sh-icon"),F(),l(),a(13,"button",24),m(14,4),S(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),$e(23,Ot,3,1,"div",30,Ge),a(25,"div",31)(26,"sh-form-field"),S(27,"input",32),l(),a(28,"button",33),T("click",function(){return p(i),C(n.addNewPath())}),a(29,"sh-icon"),U(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),T("click",function(){return p(i),C(n.addFilter())}),f(37,9),l(),D(38,Lt,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),m(45,12),S(46,"input",37),F(),l(),a(47,"sh-toggle",36),m(48,13),S(49,"input",38),F(),l(),a(50,"sh-toggle",36),m(51,14),S(52,"input",39),F(),l(),a(53,"sh-toggle",40),T("click",function(){return p(i),C(n.toggleFilesLargerThan())}),f(54,15),l(),D(55,It,2,3,"div",31),l()()()}if(e&2){let i;N("formGroup",n.sourceDataForm),r(5),N("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),N("disallowToggle",!0),r(6),xe(n.nonFilterPaths()),r(4),N("formControl",n.newPathCtrl),r(4),N("disallowToggle",!0),r(7),R((i=n.pathSignal())!=null&&i.length?38:-1),r(),N("disallowToggle",!0),r(14),Se("active",n.filesLargerThan()),r(2),R(n.filesLargerThan()?55:-1)}},dependencies:[se,fe,z,Te,j,Ne,oe,Re,et,Pe,Ae,tt,Y,q,ae,Me,Ie,pt,Ct,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;overflow:auto}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Et="1W:1D,4W:1W,12M:1M",Q=class s{#e=A(H);#t=A(Oe);#i=A(it);#n=A(lt);#r=A(_t);#o=A(Le);generalForm=St();sourceDataForm=gt();scheduleFields={autoRun:E(ee.autoRun),nextTime:E(ee.nextTime),runAgain:E(ee.runAgain)};settings=E([]);optionsFields={remoteVolumeSize:E("50MB"),backupRetention:E("all"),backupRetentionTime:E(""),backupRetentionVersions:E(0),backupRetentionCustom:E("")};targetUrlModel=E(null);backupMetadata=E(null);isDraft=E(!1);backupId=E(null);backupName=G(()=>this.generalFormSignal()?.name??"");isSubmitting=E(!1);finishedLoading=E(!1);backupDefaults=E(null);applicationOptions=E(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=E([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#s=E("");#a=E(null);#l=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#a.asReadonly();#p=ne(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#s.set(""),this.#a.set(null))});setTestState(t,e){this.#s.set(t),this.#a.set(e??null)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=G(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=G(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#c(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#_(),this.#e.navigate(["/"]);return}this.#i.open(rt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),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?.toLowerCase()?.split(",")??[],o=t.Settings?.find(c=>c.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,d={path:[...e,...n].join("\0"),excludes:{hidden:i.includes("hidden"),system:i.includes("system"),temporary:i.includes("temporary"),filesLargerThan:o===null?void 0:ye(o)}};this.sourceDataForm.patchValue(d)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(g=>g.Name==="encryption-module"),o=t.Settings?.find(g=>g.Name==="passphrase")?.Value??"",d=i?.Value&&i.Value.length?i.Value:"",c=t.Settings?.find(g=>g.Name==="compression-module")?.Value??"",_={name:t.Name??"",description:t.Description??""};e&&e!==""&&(_.name=e),n&&n!==""&&(_.description=n),d&&d!==""&&(_.encryption=d),o&&o!==""&&(_.password=o,_.repeatPassword=o),c&&c!==""&&(_.compression=c),this.generalForm.patchValue(_)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#d(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>b(b({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=(t.Settings??[]).map(_=>_);if(e){let _=this.#r.serverSettings()??{};Object.keys(_).filter(g=>g.startsWith("--")).forEach(g=>{i.find(h=>h.Name===g)||i.push({Name:g,Value:_[g],Filter:null})})}let o=i.filter(_=>!n.includes(_.Name)),d=i.filter(_=>n.includes(_.Name));this.settings.set(o??[]),o?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var c="all";d?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Et)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(c)}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()}}#c(){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.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let d=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,$])=>$).map(([h,$])=>h):[],c=n.path?.split("\0")??[],_=this.mapFormsToSettings(),g=Object.entries(n.excludes??{}).filter(([h,$])=>$&&h!=="filesLargerThan").map(([h])=>h),y=n.excludes?.filesLargerThan;return g.length&&_.push({Name:"--exclude-files-attributes",Value:g.join(",")}),y&&y.size!==null&&y.unit!==null&&_.push({Name:"--skip-files-larger-than",Value:`${y.size}${y.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:c.filter(h=>!(h.startsWith("-")||h.startsWith("+"))),Settings:_,Filters:c.filter(h=>h.startsWith("-")||h.startsWith("+")).map((h,$)=>({Order:$,Include:h.startsWith("+"),Expression:h.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:d}: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 d=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":d.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":d.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":d.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":d.push({Name:"retention-policy",Value:Et});break}let c=[...t,...n],_=this.settings().filter(g=>!c.includes(g.Name)).map(g=>{let y=g.Value;return typeof g.Value=="number"&&(y=g.Value.toString()),typeof g.Value=="boolean"&&(y=g.Value?"True":"False"),{Name:g.Name?.startsWith("--")?g.Name:`--${g.Name}`,Value:y}});return[...i,...o,...d,..._]}#d(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)}#_(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(ee.autoRun),this.scheduleFields.nextTime.set(ee.nextTime),this.scheduleFields.runAgain.set(ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};var wt=["formRef"];function Gt(s,t){s&1&&(a(0,"sh-alert",17),m(1,5),S(2,"sh-icon",26),F(),l())}function $t(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ye(" ",e.DisplayName," ")}}function xt(s,t){if(s&1&&S(0,"sh-progress-bar",40),s&2){let e=u(3);Se("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),N("value",e.calculatePasswordStrength()*(100/5))}}function Ut(s,t){s&1&&(a(0,"span",35),f(1,10),l())}function bt(s,t){s&1&&(m(0,8,1),S(1,"sh-icon"),F())}function vt(s,t){s&1&&(m(0,8,2),S(1,"sh-icon"),F())}function Bt(s,t){s&1&&(m(0,11,1),S(1,"sh-icon",42),F())}function kt(s,t){s&1&&(m(0,11,2),S(1,"sh-icon"),F())}function Vt(s,t){if(s&1){let e=x();a(0,"button",41),T("click",function(){p(e);let i=u(3);return C(i.copyPassword())}),m(1,11),D(2,Bt,2,0)(3,kt,2,0),F(),l()}if(s&2){let e=u(3);r(2),R(e.copiedPassword()?2:3)}}function Kt(s,t){s&1&&(a(0,"sh-alert",39),f(1,12),l())}function Wt(s,t){if(s&1){let e=x();a(0,"div",30)(1,"sh-form-field")(2,"label",31),m(3,7),S(4,"sup"),F(),l(),S(5,"input",32),l(),D(6,xt,1,9,"sh-progress-bar",33),a(7,"sh-form-field"),S(8,"input",34),D(9,Ut,2,0,"span",35),l(),a(10,"div",36)(11,"button",37),T("click",function(){p(e);let i=u(2);return C(i.showPassword.set(!i.showPassword()))}),m(12,8),D(13,bt,2,0)(14,vt,2,0),F(),l(),a(15,"button",37),T("click",function(){p(e);let i=u(2);return C(i.generatePassword())}),m(16,9),S(17,"sh-icon"),F(),l(),D(18,Vt,4,1,"button",38),l(),D(19,Kt,2,0,"sh-alert",39),l()}if(s&2){let e=u(2);r(5),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.password?6:-1),r(2),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),R(e.showPassword()?13:14),r(5),R(e.showCopyPassword()?18:-1),r(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Xt(s,t){if(s&1&&(a(0,"sh-select",27)(1,"label",28),f(2,6),l(),S(3,"input",29),je(4,$t,1,1,"ng-template"),l(),D(5,Wt,20,7,"div",30)),s&2){let e=u();N("options",e.encryptionOptions())("isClearable",!1),r(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Jt(s,t){if(s&1&&(a(0,"button",24),m(1,13),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.nameAndDescriptionValid()===!1)}}function Ht(s,t){if(s&1&&(a(0,"button",25),m(1,14),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,St=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(s.name,[he.required]),description:te.control(s.description),encryption:te.control(s.encryption,[ct()]),password:te.control(s.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(s.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(s.compression)}),pe={Key:"-",DisplayName:"None"},ze=class s{#e=A(H);#t=A(ie);#i=A(ut);#n=A(Q);#r=A(Oe);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=G(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,wt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let d;d=$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 _;_=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let g;g=$localize`Encryption`;let y;y=$localize`Encryption`;let h;h=$localize`Password`;let $;$=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ue(v);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let M;M=$localize`Passwords do not match`;let Z;Z=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ue(Z);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,o,d,c,_,y,K,v,W,M,Z,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",g,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),T("submit",function(){return p(i),C(n.next())}),a(2,"h3",16),f(3,1),l(),D(4,Gt,3,0,"sh-alert",17),a(5,"sh-form-field")(6,"label",18),m(7,2),S(8,"sup"),F(),l(),S(9,"input",19),l(),a(10,"sh-form-field")(11,"label",20),f(12,3),l(),S(13,"textarea",21),l(),D(14,Xt,6,3),a(15,"div",22)(16,"button",23),T("click",function(){return p(i),C(n.exit())}),m(17,4),S(18,"sh-icon"),F(),l(),D(19,Jt,3,1,"button",24)(20,Ht,3,1,"button",25),l()()}if(e&2){let i;N("formGroup",n.generalForm),r(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),R(n.isNew()?14:-1),r(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,fe,z,j,Ne,Pe,Ae,Y,le,ae,q,ot,nt,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{St as a,pe as b,ze as c,ee as d,Ke as e,gt as f,Je as g,Q as h};
@@ -1 +1 @@
1
- import{a as B}from"./chunk-75C77QFK.js";import{a as z}from"./chunk-4Z72AON4.js";import{a as R}from"./chunk-HVB6ARTT.js";import{a as $}from"./chunk-QBHHGHBJ.js";import{a as b}from"./chunk-AE7T2DAH.js";import{b as P}from"./chunk-TC7HZO7D.js";import{z as S}from"./chunk-TGNUULAU.js";import{H as u,P as k,Rc as c,Sc as f,V as m,_ as s,n as d,pa as n,r as h}from"./chunk-ZBK64QS2.js";import{a,b as r}from"./chunk-EUDKD2JW.js";var F={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,Error:$localize`Error!`},_=class g{#i=s(R);#t=s(P);#o=s(B);#e=s(z);#c=s(S);#g=s(b);#s=n(!1);#a=n(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(a({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#d=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#l(r(a({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open($,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(a({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#l(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#l(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(r(a({},e),{progress:this.#p(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?F[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,v=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",p=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${p}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${p}`:i=`${v}${o} files (${this.#i.transform(l)}) to go ${p}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||g)};static \u0275prov=m({token:g,factory:g.\u0275fac,providedIn:"root"})};export{_ as a};
1
+ import{a as B}from"./chunk-A66RJUYO.js";import{a as z}from"./chunk-SQSTMZR3.js";import{a as R}from"./chunk-HVB6ARTT.js";import{a as $}from"./chunk-QBHHGHBJ.js";import{a as b}from"./chunk-AE7T2DAH.js";import{b as P}from"./chunk-TC7HZO7D.js";import{z as S}from"./chunk-TGNUULAU.js";import{H as u,P as k,Rc as c,Sc as f,V as m,_ as s,n as d,pa as n,r as h}from"./chunk-ZBK64QS2.js";import{a,b as r}from"./chunk-EUDKD2JW.js";var F={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,Error:$localize`Error!`},_=class g{#i=s(R);#t=s(P);#o=s(B);#e=s(z);#c=s(S);#g=s(b);#s=n(!1);#a=n(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(a({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#d=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#l(r(a({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open($,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(a({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#l(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#l(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(r(a({},e),{progress:this.#p(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?F[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,v=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",p=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${p}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${p}`:i=`${v}${o} files (${this.#i.transform(l)}) to go ${p}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||g)};static \u0275prov=m({token:g,factory:g.\u0275fac,providedIn:"root"})};export{_ as a};
@@ -1 +1 @@
1
- import{a as Y,f as _n}from"./chunk-D7OP5FPA.js";import{a as an}from"./chunk-ACZQPL4M.js";import{a as on}from"./chunk-MPQNBRD5.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as tn}from"./chunk-75C77QFK.js";import"./chunk-4Z72AON4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import{a as nn}from"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as en}from"./chunk-TC7HZO7D.js";import{A as Ve,B as Ue,C as Ke,E as je,F as We,J as qe,K as Qe,R as Ye,S as Ze,u as ze}from"./chunk-TGNUULAU.js";import{e as we}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as u,Ab as w,Bb as z,Bc as q,Cb as d,Cc as D,Db as o,Eb as t,Fb as C,Gc as M,H as K,Hc as G,Ic as $,Jb as O,Kb as N,Kc as Q,Lb as f,Mb as H,Pa as j,Sa as a,Sc as Je,Tb as r,Ub as c,Vb as E,Wb as A,Xb as h,Yb as W,Zb as R,_ as v,cb as xe,ea as P,fa as I,hb as m,ib as ke,ic as V,kc as L,nc as s,pa as X,pc as p,sb as ye,sc as Be,tb as be,tc as ve,uc as Xe,xb as g,yb as S,zb as J}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var rn=()=>[import("./chunk-PKK4MIRQ.js").then(e=>e.NgTemplateOutlet),je,Ze,Ye,import("./chunk-LH6XLRJU.js").then(e=>e.DurationFormatPipe),import("./chunk-PIMTQKQK.js").then(e=>e.BytesPipe),import("./chunk-Z4MDYLVI.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=e=>["/backup",e],Fn=e=>["/restore",e],Tn=e=>["/backup",e,"export"],Cn=e=>["/backup",e,"delete"],En=e=>["/backup",e,"database"],dn=e=>["/backup",e,"commandline"],gn=e=>["/backup",e,"log"];function Sn(e,i){if(e&1){let n=H();o(0,"button",54),R("click",function(){let F=P(n).$implicit,T=u(2);return I(T.sortByColumn.set(F.value))}),E(1,15),t()}if(e&2){let n=i.$implicit,_=u(2);L("active",_.orderBy()===n.value),a(),A(n.label),h(1)}}function pn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),r(2,14),C(3,"strong")(4,"sh-icon"),c(),t(),O(5,57),w(6,Sn,2,3,"button",58,J),N(),t()),e&2){let n=u();a(4),A(n.orderBy()),h(2),a(2),z(n.sortOrderOptions())}}function On(e,i){if(e&1&&(o(0,"p")(1,"span"),E(2,21),t(),s(3),M(4,"relativeTime"),t()),e&2){let n=u().$implicit,_=u(4);a(3),p(" ",$(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Nn(e,i){if(e&1&&(s(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(4);p(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function mn(e,i){e&1&&(O(0),s(1,"-"),N())}function Mn(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Pn(e,i){e&1&&(O(0),s(1,"-"),N())}function In(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function fn(e,i){e&1&&(O(0),s(1,"-"),N())}function Dn(e,i){e&1&&(o(0,"sh-chip",65),E(1,22),t())}function Rn(e,i){e&1&&f(0)}function $n(e,i){if(e&1&&(o(0,"div",61)(1,"div",48)(2,"h3"),s(3),o(4,"sh-chip"),C(5,"img",62),s(6),t()(),o(7,"p")(8,"span"),E(9,16),t(),s(10),M(11,"relativeTime"),t(),g(12,On,5,4,"p"),o(13,"p")(14,"span"),E(15,17),t(),g(16,Nn,2,4)(17,mn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),E(20,18),t(),g(21,Mn,2,3)(22,Pn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),E(25,19),t(),g(26,In,2,3)(27,fn,2,0,"ng-container"),t()(),o(28,"div",63)(29,"sh-chip",64),E(30,20),t(),g(31,Dn,2,0,"sh-chip",65),t(),o(32,"div",52),m(33,Rn,1,0,"ng-container",66),t()()),e&2){let n=i.$implicit,_=u(4),F=V(51);a(3),p(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),d("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),p(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),p(" ",$(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),S(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),S(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),S(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),S(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let T=_.getBackupVersionCount(n);a(4),A(T)(T),h(30),a(),S(n.Backup.ExternalID?31:-1),a(2),d("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function An(e,i){if(e&1&&w(0,$n,34,18,"div",61,J),e&2){let n=u(3);z(n.backups())}}function hn(e,i){e&1&&(O(0),E(1,23),N())}function Ln(e,i){if(e&1&&(o(0,"div",59),g(1,An,2,0)(2,hn,2,0,"ng-container"),t()),e&2){let n=u(2);a(),S(n.backups().length?1:2)}}function Hn(e,i){e&1&&(r(0,24,1),f(1),c())}function Gn(e,i){e&1&&(r(0,25,1),f(1),c())}function xn(e,i){e&1&&(r(0,26,1),f(1),c())}function kn(e,i){e&1&&(r(0,27,1),f(1),c())}function yn(e,i){e&1&&(r(0,28,1),f(1),c())}function bn(e,i){e&1&&(r(0,29,1),f(1),c())}function Bn(e,i){e&1&&(r(0,30,1),f(1),c())}function vn(e,i){if(e&1&&(s(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);p(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Xn(e,i){e&1&&(O(0),s(1,"-"),N())}function Jn(e,i){if(e&1&&(s(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);p(" ",$(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function wn(e,i){e&1&&(O(0),s(1,"-"),N())}function zn(e,i){if(e&1&&(s(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(3);p(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Vn(e,i){e&1&&(O(0),s(1,"-"),N())}function Un(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Kn(e,i){e&1&&(O(0),s(1,"-"),N())}function jn(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Wn(e,i){e&1&&(O(0),s(1,"-"),N())}function qn(e,i){e&1&&f(0)}function Qn(e,i){if(e&1&&(o(0,"tr")(1,"td"),s(2),t(),o(3,"td")(4,"sh-chip",53),C(5,"img",62),s(6),t()(),o(7,"td"),g(8,vn,2,4)(9,Xn,2,0,"ng-container"),t(),o(10,"td"),g(11,Jn,2,4)(12,wn,2,0,"ng-container"),t(),o(13,"td"),g(14,zn,2,4)(15,Vn,2,0,"ng-container"),t(),o(16,"td"),g(17,Un,2,3)(18,Kn,2,0,"ng-container"),t(),o(19,"td"),g(20,jn,2,3)(21,Wn,2,0,"ng-container"),t(),o(22,"td")(23,"span"),E(24,33),t()(),o(25,"td"),m(26,qn,1,0,"ng-container",66),t()()),e&2){let n=i.$implicit,_=u(3),F=V(51);a(2),p(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),d("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),p(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),S(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),S(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),S(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),S(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),S(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let T=_.getBackupVersionCount(n);a(4),A(T)(T),h(24),a(2),d("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function Yn(e,i){if(e&1){let n=H();o(0,"sh-table",67),Xe("sortByColumnChange",function(F){P(n);let T=u(2);return ve(T.sortByColumn,F)||(T.sortByColumn=F),I(F)}),o(1,"tr",68)(2,"th",69),r(3,24),m(4,Hn,2,0,"ng-container",70),c(),t(),o(5,"th",71),r(6,25),m(7,Gn,2,0,"ng-container",70),c(),t(),o(8,"th",72),r(9,26),m(10,xn,2,0,"ng-container",70),c(),t(),o(11,"th",73),r(12,27),m(13,kn,2,0,"ng-container",70),c(),t(),o(14,"th",74),r(15,28),m(16,yn,2,0,"ng-container",70),c(),t(),o(17,"th",75),r(18,29),m(19,bn,2,0,"ng-container",70),c(),t(),o(20,"th",76),r(21,30),m(22,Bn,2,0,"ng-container",70),c(),t(),o(23,"th"),E(24,31),t(),o(25,"th"),E(26,32),t()(),w(27,Qn,27,14,"tr",null,J),t()}if(e&2){let n=u(2),_=V(53);d("data",n.backups())("loading",n.backupsLoading()),Be("sortByColumn",n.sortByColumn),a(4),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(5),z(n.backups())}}function Zn(e,i){if(e&1&&g(0,Ln,3,1,"div",59)(1,Yn,29,10,"sh-table",60),e&2){let n=u();S(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function et(e,i){e&1&&(o(0,"div",77),C(1,"sh-progress-bar",78),o(2,"div",48)(3,"h3"),E(4,34),t()()())}function nt(e,i){e&1&&E(0,35,1)}function tt(e,i){e&1&&(o(0,"sh-icon"),s(1,"check"),t())}function it(e,i){e&1&&(o(0,"sh-icon"),s(1,"dots-three-vertical"),t())}function ot(e,i){if(e&1){let n=H();o(0,"button",79),R("click",function(){let F=P(n).$implicit,T=u();return I(T.startBackup(F.Backup.ID))}),r(1,35),C(2,"sh-icon"),g(3,nt,1,0),c(),t(),o(4,"button",80)(5,"sh-icon"),s(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,tt,2,0,"sh-icon")(10,it,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",81),s(13,"Operations"),t(),o(14,"button",82),r(15,36),C(16,"sh-icon"),c(),t(),o(17,"button",82),r(18,37),C(19,"sh-icon"),c(),t(),o(20,"button",82),r(21,38),C(22,"sh-icon"),c(),t(),C(23,"sh-divider"),o(24,"h3",81),E(25,39),t(),o(26,"button",82),r(27,40),C(28,"sh-icon"),c(),t(),o(29,"button",54),R("click",function(){let F=P(n).$implicit,T=u();return I(T.verifyFiles(F.Backup.ID))}),r(30,41),C(31,"sh-icon"),c(),t(),o(32,"button",54),R("click",function(){let F=P(n).$implicit,T=u();return I(T.compressBackup(F.Backup.ID))}),r(33,42),C(34,"sh-icon"),c(),t(),o(35,"button",82),r(36,43),C(37,"sh-icon"),c(),t(),C(38,"sh-divider"),o(39,"h3",81),E(40,44),t(),o(41,"button",82),r(42,45),C(43,"sh-icon"),c(),t(),N(),t()}if(e&2){let n=i.$implicit,_=u();L("loader",_.startingBackup()===n.Backup.ID),a(3),S(_.viewMode()==="list"?3:-1),a(),d("routerLink",D(15,un,n.Backup.ID)),a(4),L("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),S(_.successId()===n.Backup.ID?9:10),a(5),d("routerLink",D(17,Fn,n.Backup.ID)),a(3),d("routerLink",D(19,Tn,n.Backup.ID)),a(3),d("routerLink",D(21,Cn,n.Backup.ID)),a(6),d("routerLink",D(23,En,n.Backup.ID)),a(9),d("routerLink",D(25,dn,n.Backup.ID)),a(6),d("routerLink",D(27,gn,n.Backup.ID))}}function _t(e,i){e&1&&(o(0,"sh-icon",83),s(1,"funnel-simple"),t(),o(2,"sh-icon",84),s(3,"sort-ascending"),t(),o(4,"sh-icon",85),s(5,"sort-descending"),t())}var at={file:{Display:$localize`Local`,Icon:null}},Z=class e{#n=v(en);#t=v(on);#e=v(tn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Je(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return Y(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=Y(n);if(!_)return"";let F=at[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let T="http://null?"+i.split("?")[1],x=new URL(T).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=xe({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let T;T=$localize`Recover your files from any backup set.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let ae;ae=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`Externally managed`;let Fe;Fe=$localize`No backups founds`;let Te;Te=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize`Version`;let Ne;Ne=$localize`Actions`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let me;me=$localize` ${B}:ICU@@3521773141017690117: `;let Me;Me=$localize`Loading backups...`;let Pe;Pe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ie;Ie=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let De;De=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Re;Re=$localize`Advanced`;let $e;$e=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ae;Ae=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let he;he=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Le;Le=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let He;He=$localize`Reporting`;let Ge;return Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,T,U,x,k,y,ee,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Te,Ce,Ee,de,ge,Se,pe,Oe,Ne,me,Me,Pe,Ie,fe,De,Re,$e,Ae,he,Le,He,Ge,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){if(n&1){let F=H();C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),C(4,"img",47),o(5,"div",48)(6,"h3"),E(7,2),t(),o(8,"p"),E(9,3),t()(),o(10,"button",49),r(11,4),C(12,"sh-icon"),c(),t()(),o(13,"sh-card",46),C(14,"img",50),o(15,"div",48)(16,"h3"),E(17,5),t(),o(18,"p"),E(19,6),t()(),o(20,"button",49),r(21,7),C(22,"sh-icon"),c(),t()()(),o(23,"div",51)(24,"h2"),O(25),E(26,8),N(),o(27,"div",52)(28,"sh-button-group",53)(29,"button",54),R("click",function(){return P(F),I(_.viewMode.set("list"))}),r(30,9),C(31,"sh-icon"),c(),t(),o(32,"button",54),R("click",function(){return P(F),I(_.viewMode.set("details"))}),r(33,10),C(34,"sh-icon"),c(),t()(),o(35,"sh-menu",55)(36,"button",56),r(37,11),C(38,"strong")(39,"sh-icon"),c(),t(),O(40,57),o(41,"button",54),R("click",function(){return P(F),I(_.setTimeType("relative"))}),E(42,12),t(),o(43,"button",54),R("click",function(){return P(F),I(_.setTimeType("actual"))}),E(44,13),t(),N(),t(),g(45,pn,8,1,"sh-menu",55),t()(),ke(46,Zn,2,1)(47,et,5,0),ye(48,46,rn,null,47),t()(),m(50,ot,44,29,"ng-template",null,0,Q)(52,_t,6,0,"ng-template",null,1,Q)}n&2&&(a(3),d("routerLink",q(9,cn)),a(10),d("routerLink",q(10,sn)),a(16),L("active",_.viewMode()==="list"),a(3),L("active",_.viewMode()==="details"),a(7),A(_.timeType()),h(37),a(6),S(_.viewMode()==="list"?45:-1),a(3),be(!_.backupsLoading()))},dependencies:[we,an,Ke,Ue,ze,We,qe,Qe,Ve],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{Z as default};
1
+ import{a as Y,f as _n}from"./chunk-D7OP5FPA.js";import{a as an}from"./chunk-ZNZH3TU5.js";import{a as on}from"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as tn}from"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import{a as nn}from"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import{b as en}from"./chunk-TC7HZO7D.js";import{A as Ve,B as Ue,C as Ke,E as je,F as We,J as qe,K as Qe,R as Ye,S as Ze,u as ze}from"./chunk-TGNUULAU.js";import{e as we}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as u,Ab as w,Bb as z,Bc as q,Cb as d,Cc as D,Db as o,Eb as t,Fb as C,Gc as M,H as K,Hc as G,Ic as $,Jb as O,Kb as N,Kc as Q,Lb as f,Mb as H,Pa as j,Sa as a,Sc as Je,Tb as r,Ub as c,Vb as E,Wb as A,Xb as h,Yb as W,Zb as R,_ as v,cb as xe,ea as P,fa as I,hb as m,ib as ke,ic as V,kc as L,nc as s,pa as X,pc as p,sb as ye,sc as Be,tb as be,tc as ve,uc as Xe,xb as g,yb as S,zb as J}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var rn=()=>[import("./chunk-PKK4MIRQ.js").then(e=>e.NgTemplateOutlet),je,Ze,Ye,import("./chunk-LH6XLRJU.js").then(e=>e.DurationFormatPipe),import("./chunk-PIMTQKQK.js").then(e=>e.BytesPipe),import("./chunk-Z4MDYLVI.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=e=>["/backup",e],Fn=e=>["/restore",e],Tn=e=>["/backup",e,"export"],Cn=e=>["/backup",e,"delete"],En=e=>["/backup",e,"database"],dn=e=>["/backup",e,"commandline"],gn=e=>["/backup",e,"log"];function Sn(e,i){if(e&1){let n=H();o(0,"button",54),R("click",function(){let F=P(n).$implicit,T=u(2);return I(T.sortByColumn.set(F.value))}),E(1,15),t()}if(e&2){let n=i.$implicit,_=u(2);L("active",_.orderBy()===n.value),a(),A(n.label),h(1)}}function pn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),r(2,14),C(3,"strong")(4,"sh-icon"),c(),t(),O(5,57),w(6,Sn,2,3,"button",58,J),N(),t()),e&2){let n=u();a(4),A(n.orderBy()),h(2),a(2),z(n.sortOrderOptions())}}function On(e,i){if(e&1&&(o(0,"p")(1,"span"),E(2,21),t(),s(3),M(4,"relativeTime"),t()),e&2){let n=u().$implicit,_=u(4);a(3),p(" ",$(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Nn(e,i){if(e&1&&(s(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(4);p(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function mn(e,i){e&1&&(O(0),s(1,"-"),N())}function Mn(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Pn(e,i){e&1&&(O(0),s(1,"-"),N())}function In(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function fn(e,i){e&1&&(O(0),s(1,"-"),N())}function Dn(e,i){e&1&&(o(0,"sh-chip",65),E(1,22),t())}function Rn(e,i){e&1&&f(0)}function $n(e,i){if(e&1&&(o(0,"div",61)(1,"div",48)(2,"h3"),s(3),o(4,"sh-chip"),C(5,"img",62),s(6),t()(),o(7,"p")(8,"span"),E(9,16),t(),s(10),M(11,"relativeTime"),t(),g(12,On,5,4,"p"),o(13,"p")(14,"span"),E(15,17),t(),g(16,Nn,2,4)(17,mn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),E(20,18),t(),g(21,Mn,2,3)(22,Pn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),E(25,19),t(),g(26,In,2,3)(27,fn,2,0,"ng-container"),t()(),o(28,"div",63)(29,"sh-chip",64),E(30,20),t(),g(31,Dn,2,0,"sh-chip",65),t(),o(32,"div",52),m(33,Rn,1,0,"ng-container",66),t()()),e&2){let n=i.$implicit,_=u(4),F=V(51);a(3),p(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),d("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),p(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),p(" ",$(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),S(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),S(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),S(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),S(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let T=_.getBackupVersionCount(n);a(4),A(T)(T),h(30),a(),S(n.Backup.ExternalID?31:-1),a(2),d("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function An(e,i){if(e&1&&w(0,$n,34,18,"div",61,J),e&2){let n=u(3);z(n.backups())}}function hn(e,i){e&1&&(O(0),E(1,23),N())}function Ln(e,i){if(e&1&&(o(0,"div",59),g(1,An,2,0)(2,hn,2,0,"ng-container"),t()),e&2){let n=u(2);a(),S(n.backups().length?1:2)}}function Hn(e,i){e&1&&(r(0,24,1),f(1),c())}function Gn(e,i){e&1&&(r(0,25,1),f(1),c())}function xn(e,i){e&1&&(r(0,26,1),f(1),c())}function kn(e,i){e&1&&(r(0,27,1),f(1),c())}function yn(e,i){e&1&&(r(0,28,1),f(1),c())}function bn(e,i){e&1&&(r(0,29,1),f(1),c())}function Bn(e,i){e&1&&(r(0,30,1),f(1),c())}function vn(e,i){if(e&1&&(s(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);p(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Xn(e,i){e&1&&(O(0),s(1,"-"),N())}function Jn(e,i){if(e&1&&(s(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);p(" ",$(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function wn(e,i){e&1&&(O(0),s(1,"-"),N())}function zn(e,i){if(e&1&&(s(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(3);p(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Vn(e,i){e&1&&(O(0),s(1,"-"),N())}function Un(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Kn(e,i){e&1&&(O(0),s(1,"-"),N())}function jn(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;p(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Wn(e,i){e&1&&(O(0),s(1,"-"),N())}function qn(e,i){e&1&&f(0)}function Qn(e,i){if(e&1&&(o(0,"tr")(1,"td"),s(2),t(),o(3,"td")(4,"sh-chip",53),C(5,"img",62),s(6),t()(),o(7,"td"),g(8,vn,2,4)(9,Xn,2,0,"ng-container"),t(),o(10,"td"),g(11,Jn,2,4)(12,wn,2,0,"ng-container"),t(),o(13,"td"),g(14,zn,2,4)(15,Vn,2,0,"ng-container"),t(),o(16,"td"),g(17,Un,2,3)(18,Kn,2,0,"ng-container"),t(),o(19,"td"),g(20,jn,2,3)(21,Wn,2,0,"ng-container"),t(),o(22,"td")(23,"span"),E(24,33),t()(),o(25,"td"),m(26,qn,1,0,"ng-container",66),t()()),e&2){let n=i.$implicit,_=u(3),F=V(51);a(2),p(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),d("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),p(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),S(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),S(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),S(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),S(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),S(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let T=_.getBackupVersionCount(n);a(4),A(T)(T),h(24),a(2),d("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function Yn(e,i){if(e&1){let n=H();o(0,"sh-table",67),Xe("sortByColumnChange",function(F){P(n);let T=u(2);return ve(T.sortByColumn,F)||(T.sortByColumn=F),I(F)}),o(1,"tr",68)(2,"th",69),r(3,24),m(4,Hn,2,0,"ng-container",70),c(),t(),o(5,"th",71),r(6,25),m(7,Gn,2,0,"ng-container",70),c(),t(),o(8,"th",72),r(9,26),m(10,xn,2,0,"ng-container",70),c(),t(),o(11,"th",73),r(12,27),m(13,kn,2,0,"ng-container",70),c(),t(),o(14,"th",74),r(15,28),m(16,yn,2,0,"ng-container",70),c(),t(),o(17,"th",75),r(18,29),m(19,bn,2,0,"ng-container",70),c(),t(),o(20,"th",76),r(21,30),m(22,Bn,2,0,"ng-container",70),c(),t(),o(23,"th"),E(24,31),t(),o(25,"th"),E(26,32),t()(),w(27,Qn,27,14,"tr",null,J),t()}if(e&2){let n=u(2),_=V(53);d("data",n.backups())("loading",n.backupsLoading()),Be("sortByColumn",n.sortByColumn),a(4),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(5),z(n.backups())}}function Zn(e,i){if(e&1&&g(0,Ln,3,1,"div",59)(1,Yn,29,10,"sh-table",60),e&2){let n=u();S(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function et(e,i){e&1&&(o(0,"div",77),C(1,"sh-progress-bar",78),o(2,"div",48)(3,"h3"),E(4,34),t()()())}function nt(e,i){e&1&&E(0,35,1)}function tt(e,i){e&1&&(o(0,"sh-icon"),s(1,"check"),t())}function it(e,i){e&1&&(o(0,"sh-icon"),s(1,"dots-three-vertical"),t())}function ot(e,i){if(e&1){let n=H();o(0,"button",79),R("click",function(){let F=P(n).$implicit,T=u();return I(T.startBackup(F.Backup.ID))}),r(1,35),C(2,"sh-icon"),g(3,nt,1,0),c(),t(),o(4,"button",80)(5,"sh-icon"),s(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,tt,2,0,"sh-icon")(10,it,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",81),s(13,"Operations"),t(),o(14,"button",82),r(15,36),C(16,"sh-icon"),c(),t(),o(17,"button",82),r(18,37),C(19,"sh-icon"),c(),t(),o(20,"button",82),r(21,38),C(22,"sh-icon"),c(),t(),C(23,"sh-divider"),o(24,"h3",81),E(25,39),t(),o(26,"button",82),r(27,40),C(28,"sh-icon"),c(),t(),o(29,"button",54),R("click",function(){let F=P(n).$implicit,T=u();return I(T.verifyFiles(F.Backup.ID))}),r(30,41),C(31,"sh-icon"),c(),t(),o(32,"button",54),R("click",function(){let F=P(n).$implicit,T=u();return I(T.compressBackup(F.Backup.ID))}),r(33,42),C(34,"sh-icon"),c(),t(),o(35,"button",82),r(36,43),C(37,"sh-icon"),c(),t(),C(38,"sh-divider"),o(39,"h3",81),E(40,44),t(),o(41,"button",82),r(42,45),C(43,"sh-icon"),c(),t(),N(),t()}if(e&2){let n=i.$implicit,_=u();L("loader",_.startingBackup()===n.Backup.ID),a(3),S(_.viewMode()==="list"?3:-1),a(),d("routerLink",D(15,un,n.Backup.ID)),a(4),L("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),S(_.successId()===n.Backup.ID?9:10),a(5),d("routerLink",D(17,Fn,n.Backup.ID)),a(3),d("routerLink",D(19,Tn,n.Backup.ID)),a(3),d("routerLink",D(21,Cn,n.Backup.ID)),a(6),d("routerLink",D(23,En,n.Backup.ID)),a(9),d("routerLink",D(25,dn,n.Backup.ID)),a(6),d("routerLink",D(27,gn,n.Backup.ID))}}function _t(e,i){e&1&&(o(0,"sh-icon",83),s(1,"funnel-simple"),t(),o(2,"sh-icon",84),s(3,"sort-ascending"),t(),o(4,"sh-icon",85),s(5,"sort-descending"),t())}var at={file:{Display:$localize`Local`,Icon:null}},Z=class e{#n=v(en);#t=v(on);#e=v(tn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Je(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return Y(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=Y(n);if(!_)return"";let F=at[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let T="http://null?"+i.split("?")[1],x=new URL(T).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=xe({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let T;T=$localize`Recover your files from any backup set.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let ae;ae=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`Externally managed`;let Fe;Fe=$localize`No backups founds`;let Te;Te=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize`Version`;let Ne;Ne=$localize`Actions`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let me;me=$localize` ${B}:ICU@@3521773141017690117: `;let Me;Me=$localize`Loading backups...`;let Pe;Pe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ie;Ie=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let De;De=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Re;Re=$localize`Advanced`;let $e;$e=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ae;Ae=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let he;he=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Le;Le=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let He;He=$localize`Reporting`;let Ge;return Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,T,U,x,k,y,ee,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Te,Ce,Ee,de,ge,Se,pe,Oe,Ne,me,Me,Pe,Ie,fe,De,Re,$e,Ae,he,Le,He,Ge,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){if(n&1){let F=H();C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),C(4,"img",47),o(5,"div",48)(6,"h3"),E(7,2),t(),o(8,"p"),E(9,3),t()(),o(10,"button",49),r(11,4),C(12,"sh-icon"),c(),t()(),o(13,"sh-card",46),C(14,"img",50),o(15,"div",48)(16,"h3"),E(17,5),t(),o(18,"p"),E(19,6),t()(),o(20,"button",49),r(21,7),C(22,"sh-icon"),c(),t()()(),o(23,"div",51)(24,"h2"),O(25),E(26,8),N(),o(27,"div",52)(28,"sh-button-group",53)(29,"button",54),R("click",function(){return P(F),I(_.viewMode.set("list"))}),r(30,9),C(31,"sh-icon"),c(),t(),o(32,"button",54),R("click",function(){return P(F),I(_.viewMode.set("details"))}),r(33,10),C(34,"sh-icon"),c(),t()(),o(35,"sh-menu",55)(36,"button",56),r(37,11),C(38,"strong")(39,"sh-icon"),c(),t(),O(40,57),o(41,"button",54),R("click",function(){return P(F),I(_.setTimeType("relative"))}),E(42,12),t(),o(43,"button",54),R("click",function(){return P(F),I(_.setTimeType("actual"))}),E(44,13),t(),N(),t(),g(45,pn,8,1,"sh-menu",55),t()(),ke(46,Zn,2,1)(47,et,5,0),ye(48,46,rn,null,47),t()(),m(50,ot,44,29,"ng-template",null,0,Q)(52,_t,6,0,"ng-template",null,1,Q)}n&2&&(a(3),d("routerLink",q(9,cn)),a(10),d("routerLink",q(10,sn)),a(16),L("active",_.viewMode()==="list"),a(3),L("active",_.viewMode()==="details"),a(7),A(_.timeType()),h(37),a(6),S(_.viewMode()==="list"?45:-1),a(3),be(!_.backupsLoading()))},dependencies:[we,an,Ke,Ue,ze,We,qe,Qe,Ve],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{Z as default};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-35ZUPRX7.js";import{a as l}from"./chunk-XTFTWEJS.js";import{za as r}from"./chunk-NXROYR6L.js";import{Rc as n,Sc as s,V as o,_ as e,ka as a,pa as t,za as d}from"./chunk-ZBK64QS2.js";var m=class i{#i=e(c);#t=e(a);#o=e(d);#e=l("darkTheme",null,!0);#s=t(this.#i.innerWidth);isMobile=n(()=>this.#s()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=s(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=s(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){r(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(h){return new(h||i)};static \u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{a as c}from"./chunk-35ZUPRX7.js";import{a as l}from"./chunk-KLODM6IK.js";import{za as r}from"./chunk-NXROYR6L.js";import{Rc as n,Sc as s,V as o,_ as e,ka as a,pa as t,za as d}from"./chunk-ZBK64QS2.js";var m=class i{#i=e(c);#t=e(a);#o=e(d);#e=l("darkTheme",null,!0);#s=t(this.#i.innerWidth);isMobile=n(()=>this.#s()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=s(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=s(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){r(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(h){return new(h||i)};static \u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};
@@ -1 +1 @@
1
- import{c as a,d as b}from"./chunk-SXFSAK5L.js";import"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import"./chunk-D7OP5FPA.js";import"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-4Z72AON4.js";import"./chunk-HVB6ARTT.js";import"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-SVQCV5AE.js";import"./chunk-TC7HZO7D.js";import"./chunk-TGNUULAU.js";import"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};
1
+ import{c as a,d as b}from"./chunk-YIMKL4H6.js";import"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import"./chunk-D7OP5FPA.js";import"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-SQSTMZR3.js";import"./chunk-HVB6ARTT.js";import"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-IEGVSOLM.js";import"./chunk-TC7HZO7D.js";import"./chunk-TGNUULAU.js";import"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};
@@ -1,3 +1,3 @@
1
- import{a as Me}from"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import"./chunk-D7OP5FPA.js";import{a as ge}from"./chunk-ACZQPL4M.js";import{h as F}from"./chunk-2CWLIRUP.js";import{a as Ee}from"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-AWXWGD4T.js";import{a as Ne}from"./chunk-MPQNBRD5.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-75C77QFK.js";import"./chunk-4Z72AON4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-POJT4MSX.js";import{b as A}from"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{a as pe,b as ue}from"./chunk-TC7HZO7D.js";import{B as me,F as _e,G as de,K as ce,O as Ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-TGNUULAU.js";import{b as j,d as H,e as q}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Ab as B,Ac as V,Bb as G,Bc as z,Cb as u,Db as a,Eb as n,Fb as r,Jb as S,Kb as T,Mb as k,Sa as m,Sc as W,Tb as f,Ub as O,Vb as c,Wb as y,Xb as v,Zb as U,_ as p,cb as D,ea as E,fa as M,kc as x,pa as L,sc as w,tc as K,uc as J,xb as R,yb as $,zb as b,zc as X}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",X("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=k();a(0,"form",12)(1,"sh-select",13)(2,"label",14),c(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),c(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),c(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),c(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),c(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),c(26,7),T(),S(27,26),B(28,fe,2,3,"sh-form-field",null,b),T(),n()(),a(30,"app-options-list",27),J("optionsChange",function(i){E(e);let C=g();return K(C.settings,i)||(C.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),U("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??z(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),G(e.standardFields.controls.filters.controls),m(2),w("options",e.settings),u("hasFreeTextSettings",!0),m(2),x("loader",e.isSubmitting()),m(2),y(e.baseCmdForm.value.command),v(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=W(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
1
+ import{a as Me}from"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import"./chunk-D7OP5FPA.js";import{a as ge}from"./chunk-ZNZH3TU5.js";import{h as F}from"./chunk-TVD2HREV.js";import{a as Ee}from"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-AWXWGD4T.js";import{a as Ne}from"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-POJT4MSX.js";import{b as A}from"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import{a as pe,b as ue}from"./chunk-TC7HZO7D.js";import{B as me,F as _e,G as de,K as ce,O as Ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-TGNUULAU.js";import{b as j,d as H,e as q}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Ab as B,Ac as V,Bb as G,Bc as z,Cb as u,Db as a,Eb as n,Fb as r,Jb as S,Kb as T,Mb as k,Sa as m,Sc as W,Tb as f,Ub as O,Vb as c,Wb as y,Xb as v,Zb as U,_ as p,cb as D,ea as E,fa as M,kc as x,pa as L,sc as w,tc as K,uc as J,xb as R,yb as $,zb as b,zc as X}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",X("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=k();a(0,"form",12)(1,"sh-select",13)(2,"label",14),c(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),c(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),c(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),c(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),c(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),c(26,7),T(),S(27,26),B(28,fe,2,3,"sh-form-field",null,b),T(),n()(),a(30,"app-options-list",27),J("optionsChange",function(i){E(e);let C=g();return K(C.settings,i)||(C.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),U("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??z(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),G(e.standardFields.controls.filters.controls),m(2),w("options",e.settings),u("hasFreeTextSettings",!0),m(2),x("loader",e.isSubmitting()),m(2),y(e.baseCmdForm.value.command),v(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=W(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
2
2
  `).filter(o=>o.length>0)??[],i=this.standardFields.value,C=i.filters??[],N=[t.command,e,...l,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...C.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-commandline"]],features:[V([F])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let C;C=$localize`Advanced options`;let N;N=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let h;return h=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,i,C,N,o,I,h,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",9)(3,"button",10),f(4,0),r(5,"sh-icon"),O(),n()(),R(6,Te,1,0,"sh-progress-bar",11)(7,Oe,35,11),n()),e&2&&(m(6),$(l.finishedLoading()?7:6))},dependencies:[re,ee,Q,Y,Z,ge,Me,Ee,se,te,ne,ie,oe,q,de,me,_e,Ce,ce,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
@@ -1 +1 @@
1
- import{a as K}from"./chunk-ACZQPL4M.js";import"./chunk-MPQNBRD5.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as V}from"./chunk-75C77QFK.js";import"./chunk-4Z72AON4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as q}from"./chunk-TC7HZO7D.js";import{B as N,C as m,F as j,K as W,u as O}from"./chunk-TGNUULAU.js";import{e as g}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as u,Ab as x,Bb as v,Bc as p,Cb as c,Cc as H,Db as n,Eb as i,Fb as r,Jb as B,Kb as J,Sa as s,Tb as l,Ub as S,Vb as a,Wb as X,Xb as z,_ as T,cb as G,ib as D,nc as C,qc as w,sb as k,tb as y,xb as R,yb as d,zb as b}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Q=()=>[m,N,O,g],U=()=>["/restore-from-files"],Y=()=>["/restore/from-config"],Z=e=>["/restore",e];function ee(e,o){if(e&1&&(n(0,"sh-card",11),r(1,"img",16),n(2,"div",13)(3,"h3"),a(4,7),i(),n(5,"p"),C(6),i()(),n(7,"button",14),l(8,8),r(9,"sh-icon"),S(),i()()),e&2){let t=o.$implicit;c("routerLink",H(4,Z,t.Backup.ID)),s(4),X(t.Backup.Name??"Backup name missing"),z(4),s(2),w(" ",(t.Backup.Metadata==null?null:t.Backup.Metadata.SourceSizeString)??"-"," / ",(t.Backup.Metadata==null?null:t.Backup.Metadata.BackupListCount)??"-"," ")}}function te(e,o){if(e&1&&x(0,ee,10,6,"sh-card",11,b),e&2){let t=u(2);v(t.backups())}}function ne(e,o){e&1&&(B(0),a(1,9),J())}function oe(e,o){if(e&1&&R(0,te,2,0)(1,ne,2,0,"ng-container"),e&2){let t=u();d(t.backups().length?0:1)}}function ie(e,o){e&1&&(n(0,"div",17),r(1,"sh-progress-bar",18),n(2,"div",13)(3,"h3"),a(4,10),i()()())}function _e(e,o){e&1&&(n(0,"sh-divider"),C(1,"Or without a local configuration"),i())}var P=class e{#e=T(V);#t=T(q);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=G({type:e,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let t;t=$localize`Direct restore from backup files`;let E;E=$localize`Point to your backup files and restore from there.`;let f;f=$localize` Start ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let M;M=$localize`Restore from configuration`;let F;F=$localize`Load destination from an exported job`;let I;I=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let h;h=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $;$=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let L;L=$localize`No backups founds`;let A;return A=$localize`Loading backups...`,[o,t,E,f,M,F,I,h,$,L,A,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["shButton",""],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,E){t&1&&(r(0,"app-status-bar"),n(1,"section")(2,"h2"),a(3,0),i(),D(4,oe,2,1)(5,ie,5,0),k(6,4,Q,null,5),R(8,_e,2,0,"sh-divider"),n(9,"sh-card",11),r(10,"img",12),n(11,"div",13)(12,"h3"),a(13,1),i(),n(14,"p"),a(15,2),i()(),n(16,"button",14),l(17,3),r(18,"sh-icon"),S(),i()(),n(19,"sh-card",11),r(20,"img",15),n(21,"div",13)(22,"h3"),a(23,4),i(),n(24,"p"),a(25,5),i()(),n(26,"button",14),l(27,6),r(28,"sh-icon"),S(),i()()()),t&2&&(s(6),y(!E.backupsLoading()),s(2),d(E.backups().length?8:-1),s(),c("routerLink",p(4,U)),s(10),c("routerLink",p(5,Y)))},dependencies:[K,m,N,j,O,W,g],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}sh-divider[_ngcontent-%COMP%]{color:var(--base-8)}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{P as default};
1
+ import{a as K}from"./chunk-ZNZH3TU5.js";import"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as V}from"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import{b as q}from"./chunk-TC7HZO7D.js";import{B as N,C as m,F as j,K as W,u as O}from"./chunk-TGNUULAU.js";import{e as g}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as u,Ab as x,Bb as v,Bc as p,Cb as c,Cc as H,Db as n,Eb as i,Fb as r,Jb as B,Kb as J,Sa as s,Tb as l,Ub as S,Vb as a,Wb as X,Xb as z,_ as T,cb as G,ib as D,nc as C,qc as w,sb as k,tb as y,xb as R,yb as d,zb as b}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Q=()=>[m,N,O,g],U=()=>["/restore-from-files"],Y=()=>["/restore/from-config"],Z=e=>["/restore",e];function ee(e,o){if(e&1&&(n(0,"sh-card",11),r(1,"img",16),n(2,"div",13)(3,"h3"),a(4,7),i(),n(5,"p"),C(6),i()(),n(7,"button",14),l(8,8),r(9,"sh-icon"),S(),i()()),e&2){let t=o.$implicit;c("routerLink",H(4,Z,t.Backup.ID)),s(4),X(t.Backup.Name??"Backup name missing"),z(4),s(2),w(" ",(t.Backup.Metadata==null?null:t.Backup.Metadata.SourceSizeString)??"-"," / ",(t.Backup.Metadata==null?null:t.Backup.Metadata.BackupListCount)??"-"," ")}}function te(e,o){if(e&1&&x(0,ee,10,6,"sh-card",11,b),e&2){let t=u(2);v(t.backups())}}function ne(e,o){e&1&&(B(0),a(1,9),J())}function oe(e,o){if(e&1&&R(0,te,2,0)(1,ne,2,0,"ng-container"),e&2){let t=u();d(t.backups().length?0:1)}}function ie(e,o){e&1&&(n(0,"div",17),r(1,"sh-progress-bar",18),n(2,"div",13)(3,"h3"),a(4,10),i()()())}function _e(e,o){e&1&&(n(0,"sh-divider"),C(1,"Or without a local configuration"),i())}var P=class e{#e=T(V);#t=T(q);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=G({type:e,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let o;o=$localize`Where do you want to restore from?`;let t;t=$localize`Direct restore from backup files`;let E;E=$localize`Point to your backup files and restore from there.`;let f;f=$localize` Start ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let M;M=$localize`Restore from configuration`;let F;F=$localize`Load destination from an exported job`;let I;I=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let h;h=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $;$=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let L;L=$localize`No backups founds`;let A;return A=$localize`Loading backups...`,[o,t,E,f,M,F,I,h,$,L,A,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["shButton",""],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,E){t&1&&(r(0,"app-status-bar"),n(1,"section")(2,"h2"),a(3,0),i(),D(4,oe,2,1)(5,ie,5,0),k(6,4,Q,null,5),R(8,_e,2,0,"sh-divider"),n(9,"sh-card",11),r(10,"img",12),n(11,"div",13)(12,"h3"),a(13,1),i(),n(14,"p"),a(15,2),i()(),n(16,"button",14),l(17,3),r(18,"sh-icon"),S(),i()(),n(19,"sh-card",11),r(20,"img",15),n(21,"div",13)(22,"h3"),a(23,4),i(),n(24,"p"),a(25,5),i()(),n(26,"button",14),l(27,6),r(28,"sh-icon"),S(),i()()()),t&2&&(s(6),y(!E.backupsLoading()),s(2),d(E.backups().length?8:-1),s(),c("routerLink",p(4,U)),s(10),c("routerLink",p(5,Y)))},dependencies:[K,m,N,j,O,W,g],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}sh-divider[_ngcontent-%COMP%]{color:var(--base-8)}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{P as default};
@@ -1 +1 @@
1
- import{g as C}from"./chunk-SXFSAK5L.js";import"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import"./chunk-D7OP5FPA.js";import{a as k}from"./chunk-ACZQPL4M.js";import{h as w}from"./chunk-2CWLIRUP.js";import"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-AWXWGD4T.js";import"./chunk-MPQNBRD5.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-75C77QFK.js";import"./chunk-4Z72AON4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-POJT4MSX.js";import{b as u}from"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import"./chunk-TC7HZO7D.js";import{L as W,Q as y}from"./chunk-TGNUULAU.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as O,Ac as L,Bc as R,Cb as _,Cc as p,Db as o,Eb as n,Fb as s,Sa as r,Sc as N,Tb as F,Ub as l,_ as c,cb as P,kc as D,pa as f,xb as E,yb as g}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=N(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&D("full-width",a.isProgressPage())},features:[L([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
1
+ import{g as C}from"./chunk-YIMKL4H6.js";import"./chunk-XRI2BFC2.js";import"./chunk-H4H72SDD.js";import"./chunk-D7OP5FPA.js";import{a as k}from"./chunk-ZNZH3TU5.js";import{h as w}from"./chunk-TVD2HREV.js";import"./chunk-5KMPTDRJ.js";import"./chunk-2DP4QU4T.js";import"./chunk-AWXWGD4T.js";import"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-POJT4MSX.js";import{b as u}from"./chunk-WJDMMKWE.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import"./chunk-TC7HZO7D.js";import{L as W,Q as y}from"./chunk-TGNUULAU.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as O,Ac as L,Bc as R,Cb as _,Cc as p,Db as o,Eb as n,Fb as s,Sa as r,Sc as N,Tb as F,Ub as l,_ as c,cb as P,kc as D,pa as f,xb as E,yb as g}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=N(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&D("full-width",a.isProgressPage())},features:[L([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
@@ -1 +1 @@
1
- import{B as h,F as M}from"./chunk-TGNUULAU.js";import{e as f}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Bc as S,Cb as u,Db as e,Eb as t,Fb as a,Sa as s,Vb as r,Zb as _,cb as E,kc as p,nc as g,pa as m}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var T=()=>["/"],d=class C{hoveringConnect=m(!1);static \u0275fac=function(o){return new(o||C)};static \u0275cmp=E({type:C,selectors:[["app-select"]],decls:21,vars:4,consts:()=>{let l;l=$localize`Connect to console`;let o;o=$localize`Consolidate all your backup reports in one place.`;let n;n=$localize`Easy connect link to console`;let i;return i=$localize`For enterprises that are onboarding many machines.`,[l,o,n,i,[1,"left"],[1,"actionables"],["shButton","","routerLink","/welcome/connect/logon",1,"connect","outlined","primary",3,"mouseenter","mouseleave"],[1,"action"],["shButton","","routerLink","/welcome/connect/link",1,"connect","outlined",3,"mouseenter","mouseleave"],[1,"space"],[1,"without-connecting",3,"routerLink"],[1,"right"],["src","/assets/images/console.avif","alt",""]]},template:function(o,n){o&1&&(e(0,"section",4)(1,"div",5)(2,"button",6),_("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(3,"div",7)(4,"h2"),r(5,0),t(),e(6,"p"),r(7,1),t()()(),e(8,"sh-divider"),g(9,"or"),t(),e(10,"button",8),_("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(11,"div",7)(12,"h2"),r(13,2),t(),e(14,"p"),r(15,3),t()()(),a(16,"div",9),e(17,"p",10),g(18,"Proceed without connecting to console"),t()()(),e(19,"section",11),a(20,"img",12),t()),o&2&&(s(17),u("routerLink",S(3,T)),s(2),p("hovering",n.hoveringConnect()))},dependencies:[f,M,h],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width: 768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width: 768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width: 768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{width:100%;height:2.5rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}"],changeDetection:0})};export{d as default};
1
+ import{B as h,F as M}from"./chunk-TGNUULAU.js";import{e as f}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Bc as S,Cb as u,Db as e,Eb as t,Fb as a,Sa as s,Vb as r,Zb as _,cb as E,kc as p,nc as g,pa as m}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var T=()=>["/"],d=class C{hoveringConnect=m(!1);static \u0275fac=function(o){return new(o||C)};static \u0275cmp=E({type:C,selectors:[["app-select"]],decls:21,vars:4,consts:()=>{let l;l=$localize`Connect to console`;let o;o=$localize`Consolidate all your backup reports in one place.`;let n;n=$localize`Easy connect link to console`;let i;return i=$localize`For enterprises that are onboarding many machines.`,[l,o,n,i,[1,"left"],[1,"actionables"],["shButton","","routerLink","/welcome/connect/logon",1,"connect","outlined","primary",3,"mouseenter","mouseleave"],[1,"action"],["shButton","","routerLink","/welcome/connect/link",1,"connect","outlined",3,"mouseenter","mouseleave"],[1,"space"],[1,"without-connecting",3,"routerLink"],[1,"right"],["src","/assets/images/console.avif","alt",""]]},template:function(o,n){o&1&&(e(0,"section",4)(1,"div",5)(2,"button",6),_("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(3,"div",7)(4,"h2"),r(5,0),t(),e(6,"p"),r(7,1),t()()(),e(8,"sh-divider"),g(9,"or"),t(),e(10,"button",8),_("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(11,"div",7)(12,"h2"),r(13,2),t(),e(14,"p"),r(15,3),t()()(),a(16,"div",9),e(17,"p",10),g(18,"Proceed without connecting to console"),t()()(),e(19,"section",11),a(20,"img",12),t()),o&2&&(s(17),u("routerLink",S(3,T)),s(2),p("hovering",n.hoveringConnect()))},dependencies:[f,M,h],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width: 768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width: 768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width: 768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{width:100%;height:2.5rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}"],changeDetection:0})};export{d as default};
@@ -1 +1 @@
1
- import{a as M}from"./chunk-ACZQPL4M.js";import"./chunk-MPQNBRD5.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-75C77QFK.js";import"./chunk-4Z72AON4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import"./chunk-TC7HZO7D.js";import{B as D,C as N,u as E}from"./chunk-TGNUULAU.js";import{e as m}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Bc as d,Cb as s,Db as e,Eb as n,Fb as o,Sa as c,Tb as r,Ub as l,Vb as i,cb as T}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,C,A,g,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,C){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),r(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),r(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(c(11),s("routerLink",d(2,f)),c(9),s("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as M}from"./chunk-ZNZH3TU5.js";import"./chunk-TX7FNDPL.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-A66RJUYO.js";import"./chunk-SQSTMZR3.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-E6DCTQ34.js";import"./chunk-QBHHGHBJ.js";import"./chunk-AE7T2DAH.js";import"./chunk-KLODM6IK.js";import"./chunk-IEGVSOLM.js";import"./chunk-TC7HZO7D.js";import{B as D,C as N,u as E}from"./chunk-TGNUULAU.js";import{e as m}from"./chunk-F3EXRAZJ.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Bc as d,Cb as s,Db as e,Eb as n,Fb as o,Sa as c,Tb as r,Ub as l,Vb as i,cb as T}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,C,A,g,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,C){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),r(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),r(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(c(11),s("routerLink",d(2,f)),c(9),s("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};