@duplicati/ngclient 0.0.209 → 0.0.210
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.
- package/{chunk-4NENQSXM.js → chunk-23BFPX3M.js} +1 -1
- package/{chunk-RC3UQLPB.js → chunk-2FD4SR65.js} +1 -1
- package/{chunk-QEIGUOTC.js → chunk-3ULPLOSF.js} +1 -1
- package/chunk-562BU33Q.js +1 -0
- package/{chunk-Q5WLMQD4.js → chunk-76USHURS.js} +1 -1
- package/{chunk-5ECY4LSP.js → chunk-AQWULDGL.js} +1 -1
- package/{chunk-FE3ADWR5.js → chunk-BDC5JQVQ.js} +1 -1
- package/{chunk-4QE3MT56.js → chunk-CKVJ36E5.js} +1 -1
- package/{chunk-BSYMQ4VF.js → chunk-DJAQY2GM.js} +1 -1
- package/{chunk-7J6AVYZE.js → chunk-DJJ3VITJ.js} +1 -1
- package/chunk-DKA7IP53.js +1 -0
- package/{chunk-7YLK4QIL.js → chunk-DMMZWQEZ.js} +1 -1
- package/{chunk-AZJ2P3YU.js → chunk-DWFQAX4H.js} +1 -1
- package/{chunk-47PB4WN3.js → chunk-EVMEYZB7.js} +1 -1
- package/chunk-F3TYSZ53.js +1 -0
- package/{chunk-TYEWJKJU.js → chunk-FG4GOBKA.js} +1 -1
- package/{chunk-3SSB4QCJ.js → chunk-FKYRYVJD.js} +1 -1
- package/{chunk-CNUQWXBC.js → chunk-FZQEPDIF.js} +1 -1
- package/{chunk-JW6W3ER7.js → chunk-GVXQIOKE.js} +1 -1
- package/{chunk-3WOW2XM3.js → chunk-I2BAH6NC.js} +1 -1
- package/chunk-I6Y22V2Q.js +1 -0
- package/{chunk-6HMNDYMY.js → chunk-I7U3XXJD.js} +1 -1
- package/{chunk-64IX6ISO.js → chunk-IGEX5B3E.js} +1 -1
- package/{chunk-DHOED4DH.js → chunk-INI4AJEU.js} +1 -1
- package/{chunk-HA7XREWO.js → chunk-IUJGDYFS.js} +1 -1
- package/{chunk-JKIZ6U22.js → chunk-JFUWTLM7.js} +1 -1
- package/{chunk-WZV32HLQ.js → chunk-JIJGVYNW.js} +1 -1
- package/{chunk-CNOKPOR3.js → chunk-KNB7LCAL.js} +1 -1
- package/{chunk-ODHFI4PA.js → chunk-KXBEW3N2.js} +1 -1
- package/{chunk-2V75WWT2.js → chunk-LP2DMTA7.js} +1 -1
- package/{chunk-7ZA3Q6TS.js → chunk-LSIAE7ZL.js} +1 -1
- package/{chunk-UUQWSINE.js → chunk-LTVI3WYF.js} +1 -1
- package/{chunk-AZFGZQQK.js → chunk-M3JOG5RD.js} +1 -1
- package/{chunk-2T442RZU.js → chunk-M7QNSQM2.js} +1 -1
- package/chunk-MYHC4Y56.js +1 -0
- package/{chunk-EL2UKEXS.js → chunk-NYX7YT7G.js} +1 -1
- package/{chunk-OSAM5F7M.js → chunk-PRBKV7LX.js} +1 -1
- package/{chunk-RNTBVXBV.js → chunk-PUBEHQ4W.js} +1 -1
- package/{chunk-MAKVVEKB.js → chunk-S2F2BNOG.js} +1 -1
- package/{chunk-LMZN2X5M.js → chunk-T3YMO3FB.js} +1 -1
- package/{chunk-UGEDZCTM.js → chunk-TDEVA3XM.js} +1 -1
- package/{chunk-CPI5ZQUF.js → chunk-UQLHXE6V.js} +1 -1
- package/{chunk-5KQZMHFN.js → chunk-V43VAZTT.js} +1 -1
- package/{chunk-BQEUHLSB.js → chunk-VOJGEOOO.js} +1 -1
- package/chunk-VUABEJRL.js +1 -0
- package/{chunk-I2HYK2BL.js → chunk-XHUQYWAM.js} +1 -1
- package/{chunk-2XMYVT7N.js → chunk-YE7IXREK.js} +1 -1
- package/{chunk-B35WNLRM.js → chunk-YF6ULZXZ.js} +1 -1
- package/chunk-ZOOFKMMI.js +1 -0
- package/chunk-ZVTMKBV5.js +1 -0
- package/index.html +1 -1
- package/main-IO5OKXBW.js +1 -0
- package/package.json +1 -1
- package/chunk-77ALZWIA.js +0 -1
- package/chunk-FKCZIBN3.js +0 -1
- package/chunk-G7XKFPGX.js +0 -1
- package/chunk-LO5YNFFR.js +0 -1
- package/chunk-O7MDPYFW.js +0 -1
- package/chunk-SEFBKH36.js +0 -1
- package/chunk-XHUMSL6X.js +0 -1
- package/chunk-XQTUBHIK.js +0 -1
- package/main-7RC24G3G.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as At}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import{a as $t}from"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{a as yt}from"./chunk-LGILJ5LY.js";import"./chunk-I2HYK2BL.js";import"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import{a as ee}from"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import{a as ae}from"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import{a as x}from"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import{a as Ft}from"./chunk-BEXYTIOL.js";import{a as Et,c as ut}from"./chunk-LO5YNFFR.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,v as w,w as Y,z as Nt}from"./chunk-YCLTQEU6.js";import{d as Gt}from"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as N,Bb as s,Cb as o,Db as m,E as F,Kb as P,Oa as _t,Pc as v,Ra as l,Rb as O,Sb as h,Tb as _,Ub as V,Vb as U,Wb as B,Wc as gt,Xb as d,Z as R,Zb as S,a as st,b as at,c as lt,ca as E,da as u,eb as b,ec as ct,fc as dt,ic as I,jb as oe,kb as rt,lc as $,mc as H,nc as se,oa as c,qa as k,qc as A,rb as Tt,rc as y,sb as St,sc as L,ub as C,vb as g,wc as Ct,zc as J}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-PAPOSE5G.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loading",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loading",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loading",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loading",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loading",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
1
|
+
import{a as At}from"./chunk-GVXQIOKE.js";import"./chunk-W4HWOC3K.js";import{a as $t}from"./chunk-JFUWTLM7.js";import"./chunk-CKVJ36E5.js";import{a as yt}from"./chunk-LGILJ5LY.js";import"./chunk-XHUQYWAM.js";import"./chunk-YF6ULZXZ.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import{a as ee}from"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import{a as ae}from"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import{a as x}from"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import{a as Ft}from"./chunk-BEXYTIOL.js";import{a as Et,c as ut}from"./chunk-DKA7IP53.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,v as w,w as Y,z as Nt}from"./chunk-YCLTQEU6.js";import{d as Gt}from"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as N,Bb as s,Cb as o,Db as m,E as F,Kb as P,Oa as _t,Pc as v,Ra as l,Rb as O,Sb as h,Tb as _,Ub as V,Vb as U,Wb as B,Wc as gt,Xb as d,Z as R,Zb as S,a as st,b as at,c as lt,ca as E,da as u,eb as b,ec as ct,fc as dt,ic as I,jb as oe,kb as rt,lc as $,mc as H,nc as se,oa as c,qa as k,qc as A,rb as Tt,rc as y,sb as St,sc as L,ub as C,vb as g,wc as Ct,zc as J}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-PAPOSE5G.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loading",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loading",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loading",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loading",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loading",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
2
2
|
registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=c($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(F(()=>this.updatingChannel.set(!1))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updatingConsoleControl=c(!1);consoleControlDisabled=c(!1);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;updateRemoteAccess(){let e=!this.allowRemoteAccess();this.allowRemoteAccess.set(e),this.#t.setRemoteAccessInterface(e?"any":"loopback").pipe(F(()=>this.updatingRemoteAccess.set(!1))).subscribe()}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.setRemoteAccessAllowedHostnames(t).pipe(F(()=>this.updatingAllowedHosts.set(!1))).subscribe()}toggleConsoleControl(){let e=!this.consoleControlDisabled();this.updatingConsoleControl.set(!0),this.#t.setDisableConsoleControl(e).pipe(F(()=>this.updatingConsoleControl.set(!1))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=!this.disableTrayIconLogin();this.updatingDisableTrayIconLogin.set(!0),this.#t.setDisableTrayIconLogin(e).pipe(F(()=>this.updatingDisableTrayIconLogin.set(!1))).subscribe()}updatingHideConsoleConnectionStatus=c(!1);saveHideConsoleConnectionStatus(){let e=!this.hideConsoleConnectionStatus();this.updatingHideConsoleConnectionStatus.set(!0),this.#t.setHideConsoleConnectionStatus(e).pipe(F(()=>this.updatingHideConsoleConnectionStatus.set(!1))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(F(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(yt);powerModeOptions=v(()=>{let t=this.#i.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=c(wt);timeTypeOptions=c(On);timeType=c("none");timeValue=Mn(0,300);timeRange=v(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateTimeValue(t){this.timeValue.set(t),this.#_()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_()}#o;#_(){this.#o&&clearTimeout(this.#o),this.#o=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),i=e==="none"||t===0?"":`${t}${e}`;i!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(i).subscribe()},1e3)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.setUsageReporterLevel(t).subscribe())}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe())}serverSettingsEffect=k(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],i=e.slice(-1),a=e.slice(0,-1),T=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":T.includes(i)?i:"none"),this.timeValue.set(e==""?0:parseInt(a));let f=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(f)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#e.open(ae,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#r(t))}}):this.#r(t))}openLegacyUI(){this.#e.open(ae,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank")}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t)}#S(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let i=t[e].trim();if(i.startsWith("default-client="))return i.substring(15)}return"ngclient"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-settings"]],decls:128,vars:44,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let i;i=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let f;f=$localize`Change server passphrase`;let p;p=$localize`Language`;let M;M=$localize`Select a language for the platform`;let G;G=$localize`Use legacy interface`;let _e;_e=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let re;re=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let z;z=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*50:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*50:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*51:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,z=B(z);let Te;Te=$localize`Allow remote access (requires restart)`;let Se;Se=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ce;ce=$localize`Allow remote access`;let de;de=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Ee;Ee=$localize`Update channel`;let ue;ue=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let pe;pe=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Stable`;let me;me=$localize`Official stable release.`;let fe;fe=$localize`Beta`;let Ie;Ie=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Me;Me=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let he;he=$localize`Builds for developers and testers only. Not for use with important data.`;let Re;Re=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Fe;Fe=$localize`Advanced options`;let $e;$e=$localize`Connect to console`;let Ae;Ae=$localize`Configure console control`;let ye;ye=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Le;Le=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ve;ve=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let be;be=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let we;we=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let De;De=$localize`Toggle console connection status`;let xe;xe=$localize`Toggle the visibility of the console connection status indicator.`;let ke;ke=$localize`Console connection status is hidden`;let Je;Je=$localize`Console connection status is visible`;let Xe;Xe=$localize`Enter new password`;let ze;ze=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let Ve;Ve=$localize`Passphrase`;let Ue;Ue=$localize`Repeat passphrase`;let Be;Be=$localize`Cancel`;let He;He=$localize` Update passphrase `;let We;We=$localize` Update passphrase `;let qe;qe=$localize`Change password`;let je;je=$localize`Allowed hostnames`;let Ke;Ke=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let Qe;Qe=$localize` Update allowed hostnames `;let Ye;Ye=$localize`Power mode provider`;let Ze;Ze=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let et;et=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tt;tt=$localize`Usage statistics`;let nt;nt=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let it;it=$localize`public usage statistics.`;let ot;return ot=$localize` All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,[t,e,i,a,T,f,p,M,G,_e,re,z,Te,Se,ce,de,Ce,ge,Ee,ue,pe,Ne,me,fe,Ie,Pe,Me,Oe,he,Re,Ge,Fe,$e,Ae,ye,Le,ve,be,we,De,xe,ke,Je,Ve,Ue,Be,He,We,qe,je,Ke,Qe,Ye,Ze,et,tt,nt,it,ot,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Xe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ze,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",ie,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,i){if(e&1&&(m(0,"app-status-bar"),s(1,"div",59)(2,"header")(3,"div",60)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),C(8,ln,10,2),s(9,"section")(10,"div",61)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",62)(16,"div",63)(17,"img",64),d("click",function(){return i.setLightMode()}),o(),s(18,"img",65),d("click",function(){return i.setDarkMode()}),o()()()(),s(19,"section")(20,"div",61)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",66),C(26,cn,15,7)(27,Cn,4,1,"div",67),o()(),s(28,"section")(29,"div",61)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",62)(35,"sh-select",68)(36,"input",69),d("ngModelChange",function(T){return i.updateLocale(T)}),o()()()(),s(37,"section")(38,"div",61)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",70)(44,"button",71),d("click",function(){return i.openLegacyUI()}),O(45,10),m(46,"sh-icon"),h(),o(),s(47,"button",71),d("click",function(){return i.changeDefaultClientTo(i.defaultClient()==="ngclient"?"ngax":"ngclient")}),O(48,11),m(49,"sh-icon"),C(50,gn,2,0,"span")(51,En,2,0,"span"),h(),o()()(),s(52,"section")(53,"div",61)(54,"h3"),_(55,12),o(),s(56,"p"),_(57,13),o()(),s(58,"div",72)(59,"sh-toggle",73),d("click",function(){return i.updateRemoteAccess()}),s(60,"label"),_(61,14),o()(),C(62,un,8,3),o()(),s(63,"section")(64,"div",61)(65,"h3"),_(66,15),o(),s(67,"p"),_(68,16),o()(),s(69,"div",62)(70,"sh-toggle",73),d("click",function(){return i.saveDisableTrayIconLogin()}),s(71,"label"),_(72,17),o()()()(),C(73,pn,9,5,"section"),s(74,"section")(75,"div",61)(76,"h3"),_(77,18),o(),C(78,Nn,2,1,"p"),C(79,mn,1,0,"sh-progress-bar",74),o(),s(80,"div",75)(81,"div",76),d("click",function(){return i.setNewChannel("")}),s(82,"sh-radio",77),_(83,19),o(),s(84,"p"),_(85,20),o()(),s(86,"div",76),d("click",function(){return i.setNewChannel("stable")}),s(87,"sh-radio",77),_(88,21),o(),s(89,"p"),_(90,22),o()(),s(91,"div",76),d("click",function(){return i.setNewChannel("beta")}),s(92,"sh-radio",77),_(93,23),o(),s(94,"p"),_(95,24),o()(),s(96,"div",76),d("click",function(){return i.setNewChannel("experimental")}),s(97,"sh-radio",77),_(98,25),o(),s(99,"p"),_(100,26),o()(),s(101,"div",76),d("click",function(){return i.setNewChannel("canary")}),s(102,"sh-radio",77),_(103,27),o(),s(104,"p"),_(105,28),o()()()(),s(106,"section")(107,"div",61)(108,"h3"),_(109,29),o(),s(110,"p"),_(111,30),o()(),s(112,"div",62)(113,"div",78)(114,"sh-range-slider",79)(115,"input",80),L("ngModelChange",function(T){return y(i.timeValue,T)||(i.timeValue=T),T}),d("ngModelChange",function(T){return i.updateTimeValue(T)}),o()(),s(116,"sh-select",81)(117,"input",82),d("ngModelChange",function(T){return i.updateTimeType(T)}),o(),oe(118,fn,1,1,"ng-template"),o()()()(),C(119,Pn,17,5,"section"),o(),m(120,"sh-divider"),s(121,"div",59)(122,"section")(123,"div",83)(124,"h3"),_(125,31),o(),m(126,"app-advanced-options-settings"),o()()(),m(127,"sh-divider")),e&2){let a,T,f;l(8),g(i.isUsingRelay()?-1:8),l(9),I("active",!i.isDarkMode()),l(),I("active",i.isDarkMode()),l(8),g(i.showPassphraseForm()?26:27),l(9),N("options",i.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),N("ngModel",i.langCtrl())("ngModelOptions",J(42,ne)),l(14),g(i.defaultClient()==="ngax"?50:51),l(9),I("active",i.allowRemoteAccess()),l(3),g(i.allowRemoteAccess()?62:-1),l(8),I("active",i.disableTrayIconLogin()),l(3),g(i.powerModeOptions().length>0?73:-1),l(5),g((a=i.sysinfo())!=null&&a.ServerVersion?78:-1),l(),g(i.updatingChannel()?79:-1),l(3),I("active",i.updateChannel()===""),l(),V((T=i.sysinfo())==null?null:T.DefaultUpdateChannel),U(83),l(2),V((f=i.sysinfo())==null?null:f.ServerVersionType),U(85),l(2),I("active",i.updateChannel()==="stable"),l(5),I("active",i.updateChannel()==="beta"),l(5),I("active",i.updateChannel()==="experimental"),l(5),I("active",i.updateChannel()==="canary"),l(12),N("unit",i.timeType()==="none"?"s":i.timeType()),l(),N("min",i.timeRange()[0])("max",i.timeRange()[1])("disabled",i.timeType()==="none"),A("ngModel",i.timeValue),N("ngModelOptions",J(43,ne)),l(),N("options",i.timeTypeOptions())("isClearable",!1),l(),N("ngModel",i.timeType()),l(2),g(i.usageStatisticsDisabled()?-1:119)}},dependencies:[K,W,pt,q,j,Q,At,te,X,D,Pt,Mt,It,ht,Rt,Z,w,ft,Y,Ot],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};export{Mn as debounceSignal,le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ie,c as we,d as v}from"./chunk-ITA7DTN3.js";import{a as fe}from"./chunk-B35WNLRM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-AZJ2P3YU.js";import{b as Re}from"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{A as Pe,B as Se,H as me,L as ge,W as Oe,Y as Ne,b as ae,c as le,d as g,e as _e,f as ce,j as pe,p as Fe,q as de,r as ue,t as Te,v as Ce,w as Ee}from"./chunk-YCLTQEU6.js";import{a as b,d as he}from"./chunk-2LSZ2I43.js";import{b as ie,d as re,e as se}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import{a as te,d as ne}from"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as P,Bb as a,Cb as r,Db as _,E as M,K as W,Kb as L,Pc as A,Ra as s,Rb as c,Sb as p,Tb as S,Ub as X,Vb as G,Wb as B,Xb as m,Z as C,Zb as u,ca as D,da as x,eb as Y,ic as h,lc as $,mc as Z,oa as E,oc as ee,qa as y,ub as F,vb as d,zc as oe}from"./chunk-ERITO7WM.js";import{a as Q}from"./chunk-7CGTOI24.js";var De=()=>["/"];function xe(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function $e(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function Ae(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function Me(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function ye(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Le(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function Xe(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Ge(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Be(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function be(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function ve(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function ke(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,be,2,0)(3,ve,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function Ue(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function Ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,$e,2,0,"span",29)(7,Ae,2,1,"span",29),r(),F(8,Me,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,ye,2,0,"span",29)(12,Le,2,0,"span",29)(13,Xe,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Ge,2,0)(18,Be,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,ke,4,1,"button",34),r(),F(23,Ue,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Je(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),Z(e.exportedCmd())}}var f=new ue,k=class n{#o=C(Ie);#t=C(he);#e=C(ie);#n=C(re);#i=C(ne);#r=C(fe);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,we()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=Re(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(W(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob",headers:new te(Q({},b.HEADERS??{}))})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Y({type:n,selectors:[["app-export"]],decls:26,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let T;T=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=B(I);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$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:`,w=B(w);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,t,i,R,O,U,I,K,J,H,z,V,q,w,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,xe,3,0,"sh-toggle",23),F(24,Ke,24,8,"div",24),F(25,Je,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",oe(15,De)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),ee("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[Te,pe,le,ae,_e,ce,de,Fe,se,Pe,Oe,Ce,me,Se,Ee,ge,Ne],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
|
|
1
|
+
import{a as Ie,c as we,d as v}from"./chunk-ITA7DTN3.js";import{a as fe}from"./chunk-YF6ULZXZ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-DWFQAX4H.js";import{b as Re}from"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{A as Pe,B as Se,H as me,L as ge,W as Oe,Y as Ne,b as ae,c as le,d as g,e as _e,f as ce,j as pe,p as Fe,q as de,r as ue,t as Te,v as Ce,w as Ee}from"./chunk-YCLTQEU6.js";import{a as b,d as he}from"./chunk-2LSZ2I43.js";import{b as ie,d as re,e as se}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import{a as te,d as ne}from"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as P,Bb as a,Cb as r,Db as _,E as M,K as W,Kb as L,Pc as A,Ra as s,Rb as c,Sb as p,Tb as S,Ub as X,Vb as G,Wb as B,Xb as m,Z as C,Zb as u,ca as D,da as x,eb as Y,ic as h,lc as $,mc as Z,oa as E,oc as ee,qa as y,ub as F,vb as d,zc as oe}from"./chunk-ERITO7WM.js";import{a as Q}from"./chunk-7CGTOI24.js";var De=()=>["/"];function xe(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function $e(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function Ae(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function Me(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function ye(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Le(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function Xe(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Ge(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Be(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function be(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function ve(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function ke(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,be,2,0)(3,ve,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function Ue(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function Ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,$e,2,0,"span",29)(7,Ae,2,1,"span",29),r(),F(8,Me,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,ye,2,0,"span",29)(12,Le,2,0,"span",29)(13,Xe,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Ge,2,0)(18,Be,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,ke,4,1,"button",34),r(),F(23,Ue,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Je(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),Z(e.exportedCmd())}}var f=new ue,k=class n{#o=C(Ie);#t=C(he);#e=C(ie);#n=C(re);#i=C(ne);#r=C(fe);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,we()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=Re(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(W(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob",headers:new te(Q({},b.HEADERS??{}))})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Y({type:n,selectors:[["app-export"]],decls:26,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let T;T=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=B(I);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$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:`,w=B(w);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,t,i,R,O,U,I,K,J,H,z,V,q,w,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,xe,3,0,"sh-toggle",23),F(24,Ke,24,8,"div",24),F(25,Je,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",oe(15,De)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),ee("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[Te,pe,le,ae,_e,ce,de,Fe,se,Pe,Oe,Ce,me,Se,Ee,ge,Ne],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,f as b}from"./chunk-
|
|
1
|
+
import{e as a,f as b}from"./chunk-YE7IXREK.js";import"./chunk-NBPZDFGF.js";import"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,d as b}from"./chunk-YE7IXREK.js";import"./chunk-NBPZDFGF.js";import"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-
|
|
1
|
+
import{a as T}from"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{B as f,G as M}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{d as p,e as h}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Bb as e,Cb as t,Db as _,Ra as E,Tb as r,Xb as c,Z as a,eb as u,ic as S,lc as g,oa as d}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var m=class C{#e=a(T);#n=a(p);hoveringConnect=d(!1);setWelcomeShown(){this.#e.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})}static \u0275fac=function(o){return new(o||C)};static \u0275cmp=u({type:C,selectors:[["app-select"]],decls:21,vars:2,consts:()=>{let l;l=$localize`Connect to console`;let o;o=$localize`Consolidate all your backup reports in one place.`;let n;n=$localize`Connection link`;let i;return i=$localize`For enterprises that are onboarding many machines.`,[l,o,n,i,[1,"left"],[1,"actionables"],["shButton","","routerLink","/welcome/connect/logon",1,"connect","outlined","primary",3,"mouseenter","mouseleave"],[1,"action"],["shButton","","routerLink","/welcome/connect/link",1,"connect","outlined",3,"mouseenter","mouseleave"],[1,"space"],[1,"without-connecting",3,"click"],[1,"right"],["src","/assets/images/console.avif","alt",""]]},template:function(o,n){o&1&&(e(0,"section",4)(1,"div",5)(2,"button",6),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(3,"div",7)(4,"h2"),r(5,0),t(),e(6,"p"),r(7,1),t()()(),e(8,"sh-divider"),g(9,"or"),t(),e(10,"button",8),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(11,"div",7)(12,"h2"),r(13,2),t(),e(14,"p"),r(15,3),t()()(),_(16,"div",9),e(17,"p",10),c("click",function(){return n.setWelcomeShown()}),g(18,"Proceed without connecting to console"),t()()(),e(19,"section",11),_(20,"img",12),t()),o&2&&(E(19),S("hovering",n.hoveringConnect()))},dependencies:[h,M,f],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{width:100%;height:2.5rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}"],changeDetection:0})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as M}from"./chunk-
|
|
1
|
+
import{e as M}from"./chunk-DKA7IP53.js";import{B as P}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{e as E}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{$b as m,Bb as i,Cb as a,Eb as r,Fb as l,Gb as c,Ra as C,Tb as d,Z as u,_b as h,eb as g,lc as T,ub as f,vb as O}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var L=["*",[["","footer",""]]],v=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-custom-card"]],ngContentSelectors:v,decls:11,vars:0,consts:[[1,"card"],["src","/assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","/assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(h(L),r(0,"div",0),c(1,"img",1),r(2,"header")(3,"div",2),c(4,"img",3),T(5," Duplicati "),l()(),r(6,"main"),m(7),r(8,"footer"),m(9,1),l()()(),c(10,"div",4))},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(/assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0})};function N(t,n){t&1&&(i(0,"h3"),d(1,0),a())}function y(t,n){t&1&&(i(0,"h3"),d(1,1),a(),i(2,"button",3),d(3,2),a())}var p=class t{#e=u(M);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=g({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(i(0,"app-custom-card"),f(1,N,2,0,"h3")(2,y,4,0),a()),e&2&&(C(),O(o.isLoggingOut()?1:2))},dependencies:[s,P,E],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{p as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Ee}from"./chunk-NBPZDFGF.js";import{a as Ne}from"./chunk-
|
|
1
|
+
import{a as Ee}from"./chunk-NBPZDFGF.js";import{a as Ne}from"./chunk-GVXQIOKE.js";import"./chunk-W4HWOC3K.js";import"./chunk-JFUWTLM7.js";import"./chunk-CKVJ36E5.js";import{k as Te,p as A}from"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import{b as he}from"./chunk-XHUQYWAM.js";import"./chunk-YF6ULZXZ.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import"./chunk-FKYRYVJD.js";import{b as D}from"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{B as ue,G as de,H as _e,L as pe,P as Ce,Y as ge,c as Z,e as ee,f as te,j as ne,n as oe,o as ie,p as ae,q as se,r as re,s as le,t as ce,v as me}from"./chunk-YCLTQEU6.js";import{b as Fe,d as Se}from"./chunk-2LSZ2I43.js";import{b as W,d as Q,e as Y}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as F,Bb as l,Cb as o,Db as a,Hb as I,Ib as M,Kb as v,Ra as u,Rb as p,Sb as C,Tb as O,U as b,Ub as x,Vb as w,Xb as K,Z as _,Zb as N,ca as E,da as f,eb as R,ic as J,oa as L,qa as $,qc as X,rc as q,sc as V,ub as k,vb as G,wb as B,xc as H,yb as y,yc as z,zb as U,zc as j}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var T=class s{#e=new Map;saveState(t){let e=crypto.randomUUID();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})};var Ie=()=>["backup"];function Me(s,t){s&1&&a(0,"sh-progress-bar",11)}function Oe(s,t){if(s&1&&(l(0,"sh-form-field"),a(1,"input",35),o()),s&2){let e=t.$implicit,n=t.$index;u(),F("id",H("filter-",n))("formControl",e)}}function De(s,t){if(s&1){let e=v();l(0,"form",12)(1,"sh-select",13)(2,"label",14),p(3,1),a(4,"sh-icon",15),C(),o(),a(5,"input",16),o(),l(6,"sh-form-field")(7,"label",17),p(8,2),a(9,"sh-icon",18),C(),o(),a(10,"textarea",19),o(),l(11,"sh-form-field")(12,"label",20),p(13,3),a(14,"sh-icon",21),C(),o(),a(15,"textarea",22),o()(),l(16,"sh-divider"),O(17,4),o(),l(18,"form",12)(19,"sh-form-field")(20,"label",23),p(21,5),a(22,"sh-icon",24),C(),o(),a(23,"input",25),o(),l(24,"sh-form-field")(25,"label",26),p(26,6),a(27,"sh-icon",27),C(),o(),a(28,"input",28),o(),l(29,"app-toggle-card",29),I(30,30),O(31,7),M(),I(32,31),y(33,Oe,2,3,"sh-form-field",null,B),M(),o()(),l(35,"app-options-list",32),V("optionsChange",function(r){E(e);let m=N();return q(m.settings,r)||(m.settings=r),f(r)}),o(),l(36,"div",33)(37,"button",34),K("click",function(){E(e);let r=N();return f(r.submit())}),p(38,8),a(39,"sh-icon"),C(),o()()}if(s&2){let e=N();F("formGroup",e.baseCmdForm),u(),F("options",e.commandOptions()??j(10,Ie))("inlineSearch",!0),u(17),F("formGroup",e.standardFields),u(11),F("disableToggle",!0),u(4),U(e.standardFields.controls.filters.controls),u(2),X("options",e.settings),F("hasFreeTextSettings",!0),u(2),J("loading",e.isSubmitting()),u(2),x(e.baseCmdForm.value.command),w(38)}}var c=new re,P=class s{#e=_(A);#n=_(Se);#o=_(Q);#t=_(W);#a=_(Fe);#s=_(he);#i=_(T);#r=D(this.#t.params);commandOptions=D(this.#a.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=c.group({"backup-id":c.control(""),"backup-name":c.control(""),dbpath:c.control(""),filters:c.array([])});baseCmdForm=c.group({command:c.control("backup"),targetUrl:c.control(""),arguments:c.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#c=$(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.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.applyStateFromUrl(),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(c.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#s.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",r=(e.arguments??"").split(`
|
|
2
2
|
`)??[],m=[n,...r].filter(i=>i.length>0),g=this.standardFields.value,S=g.filters??[],h=[e.command,...m,`--backup-name=${g["backup-name"]}`,`--dbpath=${g.dbpath}`,`--backup-id=${g["backup-id"]}`,...S.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>`${i.Name.startsWith("--")?"":"--"}${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#n.postApiV1Commandline({requestBody:h}).subscribe({next:i=>{i.Status==="OK"&&this.#o.navigate(["backup",this.backupId(),"commandline",i.ID],{queryParams:{state:t}})},error:()=>{this.isSubmitting.set(!1)}})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}updateUrl(){let t=this.baseCmdForm.value,e=this.standardFields.value,n=e.filters??[],r=this.settings(),m=this.#i.saveState({command:t.command,targetUrl:t.targetUrl,arguments:t.arguments,backupId:e["backup-id"],backupName:e["backup-name"],dbpath:e.dbpath,filters:n,options:r});return this.#o.navigate([],{relativeTo:this.#t,queryParams:{state:m},replaceUrl:!0}),m}applyStateFromUrl(){let e=this.#t.snapshot.queryParams.state;if(!e)return;let n=this.#i.getState(e);n&&(this.baseCmdForm.patchValue({command:n.command,targetUrl:n.targetUrl,arguments:n.arguments}),this.standardFields.patchValue({"backup-id":n.backupId,"backup-name":n.backupName,dbpath:n.dbpath}),n.filters&&(this.standardFields.controls.filters.clear(),n.filters.forEach(r=>{this.standardFields.controls.filters.push(c.control(r))})),n.options&&n.options.length>0&&this.settings.set(n.options))}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=R({type:s,selectors:[["app-commandline"]],features:[z([A])],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 ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` TargetUrl ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let r;r=$localize` Commandline Arguments ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let m;m=$localize`Advanced options`;let g;g=$localize` Backup ID ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let S;S=$localize` Backup Name ${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON:`;let h;h=$localize`Filters`;let i;return i=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,n,r,m,g,S,h,i,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["shTooltip","Choose the command to execute"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["shTooltip","Enter the URL of the backup target"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["shTooltip","Enter one argument per line without quotes (e.g., *.txt)"],["id","arguments","autocomplete","off","rows","5","formControlName","arguments","placeholder","Enter one argument per line without quotes (e.g., *.txt)",1,"arguments"],["for","backup-id"],["shTooltip","The ID of the backup configuration this run belongs to (can be empty)"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["shTooltip","The optional name of the backup"],["id","backup-name","formControlName","backup-name"],[3,"disableToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,n){e&1&&(a(0,"app-status-bar"),l(1,"section")(2,"div",9)(3,"button",10),p(4,0),a(5,"sh-icon"),C(),o()(),k(6,Me,1,0,"sh-progress-bar",11)(7,De,40,11),o()),e&2&&(u(6),G(n.finishedLoading()?7:6))},dependencies:[le,ne,Z,ee,te,Ne,Ee,Te,ce,oe,se,ae,ie,Y,_e,ue,de,Ce,pe,me,ge],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}.arguments[_ngcontent-%COMP%]{min-height:6rem;white-space:pre}"],changeDetection:0})};export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as q}from"./chunk-
|
|
1
|
+
import{b as q}from"./chunk-XHUQYWAM.js";import{a as j}from"./chunk-YF6ULZXZ.js";import{a as Q}from"./chunk-SLS3DCJP.js";import{a as H}from"./chunk-I4XRVBRQ.js";import{B as V,L as z,O as J,Y as X,v as U}from"./chunk-YCLTQEU6.js";import{ha as K}from"./chunk-OQ6BKP5N.js";import{Ab as d,Bb as a,Cb as s,Db as g,Ec as F,Fc as $,Gc as G,Ic as L,Kb as N,Pc as _,Ra as o,Rb as T,Sb as P,Tb as b,Ub as R,Vb as v,Vc as w,Xb as B,Z as C,Zb as r,ca as x,da as h,eb as O,gc as M,hc as D,ic as I,jb as k,lc as l,mc as A,nc as m,oa as S,qa as E,ub as p,vb as c,yc as y}from"./chunk-ERITO7WM.js";function Y(e,i){if(e&1&&l(0),e&2){let t=r(3);m(" ",t.statusData().actionText," - ")}}function Z(e,i){e&1&&(a(0,"sh-icon"),l(1,"check"),s())}function tt(e,i){e&1&&(a(0,"sh-icon"),l(1,"copy"),s())}function et(e,i){if(e&1){let t=N();a(0,"div",9)(1,"button",10),B("click",function(u){x(t);let f=r(4);return h(f.copyToClipboard(u,f.tooltipText()))}),p(2,Z,2,0,"sh-icon")(3,tt,2,0,"sh-icon"),l(4," Copy "),s(),a(5,"p",11),l(6),s()()}if(e&2){let t=r(4);o(),d("color",t.copied()?"success":null),o(),c(t.copied()===!0?2:3),o(4),A(t.tooltipText())}}function it(e,i){if(e&1&&(a(0,"div",8),l(1),s(),k(2,et,7,3,"ng-template",null,0,L)),e&2){let t=M(3),n=r(3);d("shTooltip",t),o(),m(" ",n.statusData().fileStatusText," ")}}function nt(e,i){if(e&1&&(a(0,"div"),p(1,Y,1,1),l(2),s(),p(3,it,4,2),g(4,"sh-progress-bar",7)),e&2){let t,n=r(2);o(),c(n.backupId()===null?1:-1),o(),m(" ",n.statusData().statusText," "),o(),c((t=n.statusData())!=null&&t.BackendFileSize?3:-1),o(),d("value",n.statusData().progress*100)}}function ot(e,i){if(e&1&&(a(0,"div",5),T(1,1),g(2,"sh-icon"),F(3,"relativeTime"),F(4,"date"),P(),s()),e&2){let t,n=r(2);o(4),R((t=n.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name)($(3,3,n.nextBackup().time))(G(4,5,n.nextBackup().time,"shortTime")),v(1)}}function at(e,i){e&1&&(a(0,"div",5),b(1,2),s())}function st(e,i){e&1&&(a(0,"div",6),T(1,3),g(2,"sh-spinner"),P(),s()),e&2&&(o(2),D("--spinner-size","12px")("--spinner-thickness","2px"))}function rt(e,i){if(e&1&&(a(0,"div",4),p(1,nt,5,4)(2,ot,5,8,"div",5)(3,at,2,0,"div",5)(4,st,3,4,"div",6),s()),e&2){let t,n=r();o(),c(n.isActive()?1:!n.backupId()&&(n.nextBackup().backup||n.nextBackup().time)?2:!n.backupId()&&!((t=n.serverState())!=null&&t.ActiveTask)?3:n.backupId()?-1:4)}}var W=class e{backupId=w(null);#t=C(q);#e=C(j);statusData=this.#t.statusData;serverState=this.#t.serverState;isActive=_(()=>this.#t.runningBackupId()!==null);isTargetRunningTask=_(()=>{let i=this.backupId();return i?String(this.#t.runningBackupId())===String(i):!0});isVisible=_(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():!1:!0);nextBackup=_(()=>{let i=this.#e.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=_(()=>{let i=this.statusData();return i?.CurrentFilename?`${i.CurrentFilename}`:""});copied=S(!1);copiedTimeout;copyToClipboard(i,t){i.stopPropagation(),navigator.clipboard.writeText(t),this.copied.set(!0),this.copiedTimeout=setTimeout(()=>{this.copied.set(!1)},2e3)}tooltipTrigger=S(!0);tooltipTriggerEffect=E(()=>{this.tooltipText(),this.tooltipTrigger.update(i=>!i),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(!1))});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=O({type:e,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(t,n){t&2&&I("is-visible",n.isVisible())},inputs:{backupId:[1,"backupId"]},features:[y([H])],decls:1,vars:1,consts:()=>{let i;i=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let t;t=$localize`No scheduled tasks`;let n;return n=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],i,t,n,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(t,n){t&1&&p(0,rt,5,1,"div",4),t&2&&c(n.isVisible()?0:-1)},dependencies:[U,V,J,z,X,Q,K],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{W as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"./chunk-
|
|
1
|
+
import{a as W}from"./chunk-GVXQIOKE.js";import"./chunk-W4HWOC3K.js";import"./chunk-JFUWTLM7.js";import"./chunk-CKVJ36E5.js";import"./chunk-XHUQYWAM.js";import{a as j}from"./chunk-YF6ULZXZ.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{B as m,C as N,G as w,L as z,v as O}from"./chunk-YCLTQEU6.js";import{d as H}from"./chunk-2LSZ2I43.js";import{e as g}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as l,Ac as X,Bb as n,Cb as o,Db as r,Ra as s,Rb as E,Sb as S,Tb as a,Ub as v,Vb as B,Z as T,Zb as u,eb as A,kb as D,lc as p,oc as J,rb as G,sb as k,ub as R,vb as d,wb as y,yb as b,zb as x,zc as C}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var q=()=>[N,m,O,g],V=()=>["/restore-from-files"],K=()=>["/restore/from-config"],Q=t=>["/restore",t];function U(t,i){if(t&1&&(n(0,"sh-card",10),r(1,"img",15),n(2,"div",12)(3,"h3"),a(4,7),o(),n(5,"p"),p(6),o()(),n(7,"button",13),E(8,8),r(9,"sh-icon"),S(),o()()),t&2){let e=i.$implicit;l("routerLink",X(4,Q,e.Backup.ID)),s(4),v(e.Backup.Name??"Backup name missing"),B(4),s(2),J(" ",(e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," ")}}function Y(t,i){if(t&1&&b(0,U,10,6,"sh-card",10,y),t&2){let e=u(2);x(e.backups())}}function Z(t,i){if(t&1&&R(0,Y,2,0),t&2){let e=u();d(e.backups().length?0:-1)}}function ee(t,i){t&1&&(n(0,"div",16),r(1,"sh-progress-bar",17),n(2,"div",12)(3,"h3"),a(4,9),o()()())}function te(t,i){t&1&&(n(0,"sh-divider"),p(1,"Or without a local configuration"),o())}var P=class t{#e=T(j);#t=T(H);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(i){this.#t.postApiV1BackupByIdRestore({id:i.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let i;i=$localize`Where do you want to restore from?`;let e;e=$localize`Direct restore from backup files`;let c;c=$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 F;F=$localize`Restore from configuration`;let M;M=$localize`Load destination from an exported job`;let h;h=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$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;return L=$localize`Loading backups...`,[i,e,c,f,F,M,h,I,$,L,[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(e,c){e&1&&(r(0,"app-status-bar"),n(1,"section")(2,"h2"),a(3,0),o(),D(4,Z,1,1)(5,ee,5,0),G(6,4,q,null,5),R(8,te,2,0,"sh-divider"),n(9,"sh-card",10),r(10,"img",11),n(11,"div",12)(12,"h3"),a(13,1),o(),n(14,"p"),a(15,2),o()(),n(16,"button",13),E(17,3),r(18,"sh-icon"),S(),o()(),n(19,"sh-card",10),r(20,"img",14),n(21,"div",12)(22,"h3"),a(23,4),o(),n(24,"p"),a(25,5),o()(),n(26,"button",13),E(27,6),r(28,"sh-icon"),S(),o()()()),e&2&&(s(6),k(!c.backupsLoading()),s(2),d(c.backups().length?8:-1),s(),l("routerLink",C(4,V)),s(10),l("routerLink",C(5,K)))},dependencies:[W,N,m,w,O,z,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{a as dn}from"./chunk-JW6W3ER7.js";import{a as Tn}from"./chunk-W4HWOC3K.js";import"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{c as te,l as Cn}from"./chunk-NXF5BMPG.js";import{b as un}from"./chunk-I2HYK2BL.js";import{a as sn}from"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import{a as Fn}from"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import{a as rn}from"./chunk-AZJ2P3YU.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{A as Ze,B as ne,C as en,E as nn,G as tn,K as on,L as _n,S as an,T as ln,v as ee,z as Ye}from"./chunk-YCLTQEU6.js";import{d as cn}from"./chunk-2LSZ2I43.js";import{e as Z}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as d,Ac as R,Bb as o,Cb as i,Db as F,E as q,Ec as D,Fc as G,Gc as A,Hb as N,Ib as M,Ic as Q,Jb as f,Kb as h,Oa as w,Pc as Y,Ra as a,Rb as r,Sb as s,Tb as T,Ub as L,Vb as H,Wb as K,Xb as I,Z as x,Zb as l,ca as m,da as O,eb as Ve,gc as j,ic as $,jb as P,kb as Ue,lc as C,nc as S,oa as k,qa as ze,qc as We,rb as Ke,rc as qe,sb as je,sc as Qe,ub as E,vb as g,wb as z,yb as V,zb as U,zc as W}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var gn=()=>[Z,import("./chunk-3A4HTZ7B.js").then(e=>e.NgTemplateOutlet),ne,ee,nn,ln,an,import("./chunk-O7MDPYFW.js").then(e=>e.BackupProgressComponent),import("./chunk-G6ZV6LAU.js").then(e=>e.DurationFormatPipe),import("./chunk-UCR4I5MD.js").then(e=>e.BytesPipe),import("./chunk-2DOT6WAE.js").then(e=>e.RelativeTimePipe)],pn=()=>["/add-backup"],Sn=()=>["/restore"],En=e=>({$implicit:e}),mn=()=>["/backup/new"],On=e=>["/backup",e],Nn=e=>["/restore",e],Mn=e=>["/backup",e,"export"],In=e=>["/backup",e,"delete"],Pn=e=>["/backup",e,"database"],Dn=e=>["/backup",e,"commandline"],fn=e=>["/backup",e,"log"];function $n(e,t){e&1&&T(0,11,1)}function Rn(e,t){e&1&&T(0,11,2)}function hn(e,t){if(e&1&&T(0,11,3),e&2){let n=l(2);L(n.timeType()),H(0)}}function An(e,t){if(e&1){let n=h();o(0,"button",59),I("click",function(){let u=m(n).$implicit,p=l(3);return O(p.sortByColumn.set(u.value))}),T(1,15),i()}if(e&2){let n=t.$implicit,_=l(3);$("active",_.orderBy()===n.value),a(),L(n.label),H(1)}}function xn(e,t){if(e&1&&(o(0,"sh-menu",60)(1,"button",61),r(2,14),F(3,"strong")(4,"sh-icon"),s(),i(),N(5,62),V(6,An,2,3,"button",63,z),M(),i()),e&2){let n=l(2);a(4),L(n.orderBy()),H(2),a(2),U(n.sortOrderOptions())}}function Ln(e,t){if(e&1){let n=h();o(0,"div",57)(1,"sh-button-group",58)(2,"button",59),I("click",function(){m(n);let u=l();return O(u.viewMode.set("list"))}),r(3,9),F(4,"sh-icon"),s(),i(),o(5,"button",59),I("click",function(){m(n);let u=l();return O(u.viewMode.set("details"))}),r(6,10),F(7,"sh-icon"),s(),i()(),o(8,"sh-menu",60)(9,"button",61),r(10,11),o(11,"strong"),E(12,$n,1,0)(13,Rn,1,0)(14,hn,1,1),i(),F(15,"sh-icon"),s(),i(),N(16,62),o(17,"button",59),I("click",function(){m(n);let u=l();return O(u.setTimeType("relative"))}),T(18,12),i(),o(19,"button",59),I("click",function(){m(n);let u=l();return O(u.setTimeType("actual"))}),T(20,13),i(),M(),i(),E(21,xn,8,1,"sh-menu",60),i()}if(e&2){let n=l();a(2),$("active",n.viewMode()==="list"),a(3),$("active",n.viewMode()==="details"),a(7),g(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),g(n.viewMode()==="list"?21:-1)}}function Hn(e,t){if(e&1){let n=h();o(0,"div",68)(1,"div",53)(2,"h3"),C(3),o(4,"sh-chip"),F(5,"img",70),C(6),i()()(),o(7,"div",71)(8,"sh-chip",72),T(9,16),i()(),o(10,"div",57)(11,"button",73),I("click",function(){m(n);let u=l().$implicit,p=l(4);return O(p.openInConsole(u))}),r(12,17),F(13,"sh-icon"),s(),i()(),F(14,"app-backup-progress",74),i()}if(e&2){let n=l().$implicit,_=l(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),d("src",_.getBackendIcon(n.Backup.TargetURL),w),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(8),d("backupId",n.Backup.ID)}}function kn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,23),i(),C(3),D(4,"relativeTime"),i()),e&2){let n=l(3).$implicit,_=l(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Gn(e,t){if(e&1&&(C(0),D(1,"durationFormat")),e&2){let n=l(3).$implicit,_=l(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function yn(e,t){e&1&&(N(0),C(1,"-"),M())}function Bn(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function bn(e,t){e&1&&(N(0),C(1,"-"),M())}function vn(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Xn(e,t){e&1&&(N(0),C(1,"-"),M())}function Jn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,19),i(),C(3),D(4,"relativeTime"),i(),E(5,kn,5,4,"p"),o(6,"p")(7,"span"),T(8,20),i(),E(9,Gn,2,4)(10,yn,2,0,"ng-container"),i(),o(11,"p")(12,"span"),T(13,21),i(),E(14,Bn,2,3)(15,bn,2,0,"ng-container"),i(),o(16,"p")(17,"span"),T(18,22),i(),E(19,vn,2,3)(20,Xn,2,0,"ng-container"),i()),e&2){let n=l(2).$implicit,_=l(4);a(3),S(" ",A(4,5,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?5:-1),a(4),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?9:10),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?14:15),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?19:20)}}function wn(e,t){if(e&1&&F(0,"app-backup-progress",74),e&2){let n=l(2).$implicit;d("backupId",n.Backup.ID)}}function zn(e,t){e&1&&(o(0,"sh-chip",72),T(1,24),i())}function Vn(e,t){e&1&&f(0)}function Un(e,t){if(e&1&&(o(0,"div",69)(1,"div",53)(2,"h3"),C(3),o(4,"sh-chip"),F(5,"img",70),C(6),i()(),E(7,Jn,21,8)(8,wn,1,1,"app-backup-progress",74),i(),o(9,"div",71)(10,"sh-chip",75),T(11,18),i(),E(12,zn,2,0,"sh-chip",72),i(),o(13,"div",57),P(14,Vn,1,0,"ng-container",76),i()()),e&2){let n=l().$implicit,_=l(4),u=j(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),d("src",_.getBackendIcon(n.Backup.TargetURL),w),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(),g(_.runningBackupId()!==n.Backup.ID?7:8);let p=_.getBackupVersionCount(n);a(4),L(p)(p),H(11),a(),g(n.Backup.ExternalID?12:-1),a(2),d("ngTemplateOutlet",u)("ngTemplateOutletContext",R(9,En,n))}}function Kn(e,t){if(e&1&&E(0,Hn,15,4,"div",68)(1,Un,15,11,"div",69),e&2){let n=t.$implicit;g(n.Backup.ExternalID?0:1)}}function jn(e,t){if(e&1&&V(0,Kn,2,1,null,null,z),e&2){let n=l(3);U(n.backups())}}function Wn(e,t){e&1&&(o(0,"div",67),r(1,25),o(2,"button",77),F(3,"sh-icon"),i(),s(),i()),e&2&&(a(2),d("routerLink",W(1,mn)))}function qn(e,t){if(e&1&&(o(0,"div",66),E(1,jn,2,0)(2,Wn,4,2,"div",67),i()),e&2){let n=l(2);$("fallback",n.backups().length===0),a(),g(n.backups().length?1:2)}}function Qn(e,t){e&1&&(r(0,26,1),f(1),s())}function Yn(e,t){e&1&&(r(0,27,1),f(1),s())}function Zn(e,t){e&1&&(r(0,28,1),f(1),s())}function et(e,t){e&1&&(r(0,29,1),f(1),s())}function nt(e,t){e&1&&(r(0,30,1),f(1),s())}function tt(e,t){e&1&&(r(0,31,1),f(1),s())}function it(e,t){e&1&&(r(0,32,1),f(1),s())}function ot(e,t){if(e&1&&(C(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function _t(e,t){e&1&&(N(0),C(1,"-"),M())}function at(e,t){if(e&1&&(C(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function lt(e,t){e&1&&(N(0),C(1,"-"),M())}function ct(e,t){if(e&1&&(C(0),D(1,"durationFormat")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function rt(e,t){e&1&&(N(0),C(1,"-"),M())}function st(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function ut(e,t){e&1&&(N(0),C(1,"-"),M())}function Ft(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Ct(e,t){e&1&&(N(0),C(1,"-"),M())}function Tt(e,t){e&1&&f(0)}function dt(e,t){if(e&1&&(o(0,"tr")(1,"td"),C(2),i(),o(3,"td")(4,"sh-chip",88),F(5,"img",70),C(6),i()(),o(7,"td"),E(8,ot,2,4)(9,_t,2,0,"ng-container"),i(),o(10,"td"),E(11,at,2,4)(12,lt,2,0,"ng-container"),i(),o(13,"td"),E(14,ct,2,4)(15,rt,2,0,"ng-container"),i(),o(16,"td"),E(17,st,2,3)(18,ut,2,0,"ng-container"),i(),o(19,"td"),E(20,Ft,2,3)(21,Ct,2,0,"ng-container"),i(),o(22,"td")(23,"span"),T(24,35),i()(),o(25,"td"),P(26,Tt,1,0,"ng-container",76),i()()),e&2){let n=t.$implicit,_=l(3),u=j(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),d("src",_.getBackendIcon(n.Backup.TargetURL),w),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let p=_.getBackupVersionCount(n);a(4),L(p)(p),H(24),a(2),d("ngTemplateOutlet",u)("ngTemplateOutletContext",R(12,En,n))}}function Et(e,t){if(e&1){let n=h();o(0,"sh-table",78),Qe("sortByColumnChange",function(u){m(n);let p=l(2);return qe(p.sortByColumn,u)||(p.sortByColumn=u),O(u)}),o(1,"tr",79)(2,"th",80),r(3,26),P(4,Qn,2,0,"ng-container",81),s(),i(),o(5,"th",82),r(6,27),P(7,Yn,2,0,"ng-container",81),s(),i(),o(8,"th",83),r(9,28),P(10,Zn,2,0,"ng-container",81),s(),i(),o(11,"th",84),r(12,29),P(13,et,2,0,"ng-container",81),s(),i(),o(14,"th",85),r(15,30),P(16,nt,2,0,"ng-container",81),s(),i(),o(17,"th",86),r(18,31),P(19,tt,2,0,"ng-container",81),s(),i(),o(20,"th",87),r(21,32),P(22,it,2,0,"ng-container",81),s(),i(),o(23,"th"),T(24,33),i(),o(25,"th"),T(26,34),i()(),V(27,dt,27,14,"tr",null,z),i()}if(e&2){let n=l(2),_=j(35);d("data",n.backups())("loading",n.backupsLoading()),We("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),U(n.backups())}}function gt(e,t){if(e&1&&E(0,qn,3,3,"div",64)(1,Et,29,10,"sh-table",65),e&2){let n=l();g(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function pt(e,t){e&1&&(o(0,"div",89),F(1,"sh-progress-bar",90),o(2,"div",53)(3,"h3"),T(4,36),i()()())}function St(e,t){if(e&1){let n=h();o(0,"button",92),I("click",function(){m(n);let u=l(3);return O(u.abort())}),r(1,38),F(2,"sh-icon"),s(),i()}if(e&2){let n=l(3);$("small",n.viewMode()==="details")}}function mt(e,t){if(e&1){let n=h();o(0,"button",92),I("click",function(){m(n);let u=l(3);return O(u.stop())}),r(1,39),F(2,"sh-icon"),s(),i()}if(e&2){let n=l(3);$("small",n.viewMode()==="details")}}function Ot(e,t){e&1&&(r(0,37,1),F(1,"sh-icon"),s())}function Nt(e,t){e&1&&(r(0,37,2),F(1,"sh-icon"),s())}function Mt(e,t){if(e&1){let n=h();E(0,St,3,2,"button",91)(1,mt,3,2,"button",91),o(2,"button",92),I("click",function(){m(n);let u=l(2);return O(u.pauseResume())}),r(3,37),E(4,Ot,2,0)(5,Nt,2,0),s(),i()}if(e&2){let n=l(2);g(n.isStopping()?0:1),a(2),$("small",n.viewMode()==="details")("loading",n.isResuming()),a(2),g(n.clientIsRunning()?4:5)}}function It(e,t){e&1&&T(0,40,1)}function Pt(e,t){e&1&&(o(0,"sh-icon"),C(1,"check"),i())}function Dt(e,t){e&1&&(o(0,"sh-icon"),C(1,"dots-three-vertical"),i())}function ft(e,t){if(e&1){let n=h();o(0,"button",92),I("click",function(){m(n);let u=l().$implicit,p=l();return O(p.startBackup(u.Backup.ID))}),r(1,40),F(2,"sh-icon"),E(3,It,1,0),s(),i(),o(4,"button",93)(5,"sh-icon"),C(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",54),E(9,Pt,2,0,"sh-icon")(10,Dt,2,0,"sh-icon"),i(),N(11,62),o(12,"h3",94),C(13,"Operations"),i(),o(14,"button",95),r(15,41),F(16,"sh-icon"),s(),i(),o(17,"button",95),r(18,42),F(19,"sh-icon"),s(),i(),o(20,"button",95),r(21,43),F(22,"sh-icon"),s(),i(),F(23,"sh-divider"),o(24,"h3",94),T(25,44),i(),o(26,"button",95),r(27,45),F(28,"sh-icon"),s(),i(),o(29,"button",59),I("click",function(){m(n);let u=l().$implicit,p=l();return O(p.verifyFiles(u.Backup.ID))}),r(30,46),F(31,"sh-icon"),s(),i(),o(32,"button",59),I("click",function(){m(n);let u=l().$implicit,p=l();return O(p.compressBackup(u.Backup.ID))}),r(33,47),F(34,"sh-icon"),s(),i(),o(35,"button",95),r(36,48),F(37,"sh-icon"),s(),i(),F(38,"sh-divider"),o(39,"h3",94),T(40,49),i(),o(41,"button",95),r(42,50),F(43,"sh-icon"),s(),i(),M(),i()}if(e&2){let n=l().$implicit,_=l();$("loading",_.startingBackup()===n.Backup.ID),a(3),g(_.viewMode()==="list"?3:-1),a(),d("routerLink",R(15,On,n.Backup.ID)),a(4),$("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),g(_.successId()===n.Backup.ID?9:10),a(5),d("routerLink",R(17,Nn,n.Backup.ID)),a(3),d("routerLink",R(19,Mn,n.Backup.ID)),a(3),d("routerLink",R(21,In,n.Backup.ID)),a(6),d("routerLink",R(23,Pn,n.Backup.ID)),a(9),d("routerLink",R(25,Dn,n.Backup.ID)),a(6),d("routerLink",R(27,fn,n.Backup.ID))}}function $t(e,t){if(e&1&&E(0,Mt,6,6)(1,ft,44,29),e&2){let n=t.$implicit,_=l();g(_.runningBackupId()===n.Backup.ID?0:1)}}function Rt(e,t){e&1&&(o(0,"sh-icon",96),C(1,"funnel-simple"),i(),o(2,"sh-icon",97),C(3,"sort-ascending"),i(),o(4,"sh-icon",98),C(5,"sort-descending"),i())}var ht={file:{Display:$localize`Local`,Icon:null}},ie=class e{#t=x(cn);#n=x(un);#e=x(sn);#o=x(Fn);#_=x(Ye);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;runningBackupId=this.#n.runningBackupId;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=Y(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=Y(()=>this.runningTask()==this.#i());#i=k(-1);viewMode=rn("viewMode","list");sortByColumn=k(this.#e.orderBy());loadingId=k(null);successId=k(null);sortEffect=ze(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#o.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t))}openPauseDialog(){this.#_.open(Tn,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#i.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}getBackendIcon(t){return t?te(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=te(t);if(!n)return"";let _=ht[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let u="http://null?"+t.split("?")[1],y=new URL(u).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,b]of Object.entries(Cn))if(y.endsWith(B))return b}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdCompact({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ve({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let u;u=$localize`Restores`;let p;p=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let B;B=$localize`My backups`;let b;b=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let oe;oe=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let _e;_e=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ae;ae=$localize`Relative time`;let le;le=$localize`Actual time`;let ce;ce=$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 re;re=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let se;se=$localize`Externally managed`;let ue;ue=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=K(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Fe;Fe=$localize` ${v}:ICU@@6502601490918455200: `;let Ce;Ce=$localize`Last successful backup:`;let Te;Te=$localize`Duration:`;let de;de=$localize`Source:`;let Ee;Ee=$localize`Destination:`;let ge;ge=$localize`Next scheduled run:`;let pe;pe=$localize`Externally managed`;let Se;Se=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let me;me=$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 Oe;Oe=$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 Ne;Ne=$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 Me;Me=$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 Ie;Ie=$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 Pe;Pe=$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 De;De=$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 fe;fe=$localize`Version`;let $e;$e=$localize`Actions`;let X;X=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,X=K(X,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Re;Re=$localize` ${X}:ICU@@3521773141017690117: `;let he;he=$localize`Loading backups...`;let J;J=$localize`${"\uFFFD*4:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,J=K(J);let Ae;Ae=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let xe;xe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Le;Le=$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 He;He=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let ke;ke=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ge;Ge=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let ye;ye=$localize`Advanced`;let Be;Be=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let be;be=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let ve;ve=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Xe;Xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Je;Je=$localize`Reporting`;let we;return we=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,u,p,y,B,b,oe,_e,ae,le,ce,re,se,ue,Fe,Ce,Te,de,Ee,ge,pe,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,$e,Re,he,J,Ae,xe,Le,He,ke,Ge,ye,Be,be,ve,Xe,Je,we,[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-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(F(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",51),F(4,"img",52),o(5,"div",53)(6,"h3"),T(7,2),i(),o(8,"p"),T(9,3),i()(),o(10,"button",54),r(11,4),F(12,"sh-icon"),s(),i()(),o(13,"sh-card",51),F(14,"img",55),o(15,"div",53)(16,"h3"),T(17,5),i(),o(18,"p"),T(19,6),i()(),o(20,"button",54),r(21,7),F(22,"sh-icon"),s(),i()()(),o(23,"div",56)(24,"h2"),N(25),T(26,8),M(),E(27,Ln,22,6,"div",57),i(),Ue(28,gt,2,1)(29,pt,5,0),Ke(30,28,gn,null,29),i()(),P(32,$t,2,1,"ng-template",null,0,Q)(34,Rt,6,0,"ng-template",null,1,Q)),n&2&&(a(3),d("routerLink",W(4,pn)),a(10),d("routerLink",W(5,Sn)),a(14),g(_.backups().length>0?27:-1),a(3),je(!_.backupsLoading()))},dependencies:[Z,dn,en,ne,ee,tn,on,_n,Ze],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}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}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}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.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)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.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{ie as default};
|
|
1
|
+
import{a as dn}from"./chunk-GVXQIOKE.js";import{a as Tn}from"./chunk-W4HWOC3K.js";import"./chunk-JFUWTLM7.js";import"./chunk-CKVJ36E5.js";import{c as te,l as Cn}from"./chunk-NXF5BMPG.js";import{b as un}from"./chunk-XHUQYWAM.js";import{a as sn}from"./chunk-YF6ULZXZ.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import{a as Fn}from"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import{a as rn}from"./chunk-DWFQAX4H.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{A as Ze,B as ne,C as en,E as nn,G as tn,K as on,L as _n,S as an,T as ln,v as ee,z as Ye}from"./chunk-YCLTQEU6.js";import{d as cn}from"./chunk-2LSZ2I43.js";import{e as Z}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as d,Ac as R,Bb as o,Cb as i,Db as F,E as q,Ec as D,Fc as G,Gc as A,Hb as N,Ib as M,Ic as Q,Jb as f,Kb as h,Oa as w,Pc as Y,Ra as a,Rb as r,Sb as s,Tb as T,Ub as L,Vb as H,Wb as K,Xb as I,Z as x,Zb as l,ca as m,da as O,eb as Ve,gc as j,ic as $,jb as P,kb as Ue,lc as C,nc as S,oa as k,qa as ze,qc as We,rb as Ke,rc as qe,sb as je,sc as Qe,ub as E,vb as g,wb as z,yb as V,zb as U,zc as W}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var gn=()=>[Z,import("./chunk-3A4HTZ7B.js").then(e=>e.NgTemplateOutlet),ne,ee,nn,ln,an,import("./chunk-MYHC4Y56.js").then(e=>e.BackupProgressComponent),import("./chunk-G6ZV6LAU.js").then(e=>e.DurationFormatPipe),import("./chunk-UCR4I5MD.js").then(e=>e.BytesPipe),import("./chunk-2DOT6WAE.js").then(e=>e.RelativeTimePipe)],pn=()=>["/add-backup"],Sn=()=>["/restore"],En=e=>({$implicit:e}),mn=()=>["/backup/new"],On=e=>["/backup",e],Nn=e=>["/restore",e],Mn=e=>["/backup",e,"export"],In=e=>["/backup",e,"delete"],Pn=e=>["/backup",e,"database"],Dn=e=>["/backup",e,"commandline"],fn=e=>["/backup",e,"log"];function $n(e,t){e&1&&T(0,11,1)}function Rn(e,t){e&1&&T(0,11,2)}function hn(e,t){if(e&1&&T(0,11,3),e&2){let n=l(2);L(n.timeType()),H(0)}}function An(e,t){if(e&1){let n=h();o(0,"button",59),I("click",function(){let u=m(n).$implicit,p=l(3);return O(p.sortByColumn.set(u.value))}),T(1,15),i()}if(e&2){let n=t.$implicit,_=l(3);$("active",_.orderBy()===n.value),a(),L(n.label),H(1)}}function xn(e,t){if(e&1&&(o(0,"sh-menu",60)(1,"button",61),r(2,14),F(3,"strong")(4,"sh-icon"),s(),i(),N(5,62),V(6,An,2,3,"button",63,z),M(),i()),e&2){let n=l(2);a(4),L(n.orderBy()),H(2),a(2),U(n.sortOrderOptions())}}function Ln(e,t){if(e&1){let n=h();o(0,"div",57)(1,"sh-button-group",58)(2,"button",59),I("click",function(){m(n);let u=l();return O(u.viewMode.set("list"))}),r(3,9),F(4,"sh-icon"),s(),i(),o(5,"button",59),I("click",function(){m(n);let u=l();return O(u.viewMode.set("details"))}),r(6,10),F(7,"sh-icon"),s(),i()(),o(8,"sh-menu",60)(9,"button",61),r(10,11),o(11,"strong"),E(12,$n,1,0)(13,Rn,1,0)(14,hn,1,1),i(),F(15,"sh-icon"),s(),i(),N(16,62),o(17,"button",59),I("click",function(){m(n);let u=l();return O(u.setTimeType("relative"))}),T(18,12),i(),o(19,"button",59),I("click",function(){m(n);let u=l();return O(u.setTimeType("actual"))}),T(20,13),i(),M(),i(),E(21,xn,8,1,"sh-menu",60),i()}if(e&2){let n=l();a(2),$("active",n.viewMode()==="list"),a(3),$("active",n.viewMode()==="details"),a(7),g(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),g(n.viewMode()==="list"?21:-1)}}function Hn(e,t){if(e&1){let n=h();o(0,"div",68)(1,"div",53)(2,"h3"),C(3),o(4,"sh-chip"),F(5,"img",70),C(6),i()()(),o(7,"div",71)(8,"sh-chip",72),T(9,16),i()(),o(10,"div",57)(11,"button",73),I("click",function(){m(n);let u=l().$implicit,p=l(4);return O(p.openInConsole(u))}),r(12,17),F(13,"sh-icon"),s(),i()(),F(14,"app-backup-progress",74),i()}if(e&2){let n=l().$implicit,_=l(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),d("src",_.getBackendIcon(n.Backup.TargetURL),w),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(8),d("backupId",n.Backup.ID)}}function kn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,23),i(),C(3),D(4,"relativeTime"),i()),e&2){let n=l(3).$implicit,_=l(4);a(3),S(" ",A(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Gn(e,t){if(e&1&&(C(0),D(1,"durationFormat")),e&2){let n=l(3).$implicit,_=l(4);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function yn(e,t){e&1&&(N(0),C(1,"-"),M())}function Bn(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function bn(e,t){e&1&&(N(0),C(1,"-"),M())}function vn(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Xn(e,t){e&1&&(N(0),C(1,"-"),M())}function Jn(e,t){if(e&1&&(o(0,"p")(1,"span"),T(2,19),i(),C(3),D(4,"relativeTime"),i(),E(5,kn,5,4,"p"),o(6,"p")(7,"span"),T(8,20),i(),E(9,Gn,2,4)(10,yn,2,0,"ng-container"),i(),o(11,"p")(12,"span"),T(13,21),i(),E(14,Bn,2,3)(15,bn,2,0,"ng-container"),i(),o(16,"p")(17,"span"),T(18,22),i(),E(19,vn,2,3)(20,Xn,2,0,"ng-container"),i()),e&2){let n=l(2).$implicit,_=l(4);a(3),S(" ",A(4,5,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?5:-1),a(4),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?9:10),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?14:15),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?19:20)}}function wn(e,t){if(e&1&&F(0,"app-backup-progress",74),e&2){let n=l(2).$implicit;d("backupId",n.Backup.ID)}}function zn(e,t){e&1&&(o(0,"sh-chip",72),T(1,24),i())}function Vn(e,t){e&1&&f(0)}function Un(e,t){if(e&1&&(o(0,"div",69)(1,"div",53)(2,"h3"),C(3),o(4,"sh-chip"),F(5,"img",70),C(6),i()(),E(7,Jn,21,8)(8,wn,1,1,"app-backup-progress",74),i(),o(9,"div",71)(10,"sh-chip",75),T(11,18),i(),E(12,zn,2,0,"sh-chip",72),i(),o(13,"div",57),P(14,Vn,1,0,"ng-container",76),i()()),e&2){let n=l().$implicit,_=l(4),u=j(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),d("src",_.getBackendIcon(n.Backup.TargetURL),w),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(),g(_.runningBackupId()!==n.Backup.ID?7:8);let p=_.getBackupVersionCount(n);a(4),L(p)(p),H(11),a(),g(n.Backup.ExternalID?12:-1),a(2),d("ngTemplateOutlet",u)("ngTemplateOutletContext",R(9,En,n))}}function Kn(e,t){if(e&1&&E(0,Hn,15,4,"div",68)(1,Un,15,11,"div",69),e&2){let n=t.$implicit;g(n.Backup.ExternalID?0:1)}}function jn(e,t){if(e&1&&V(0,Kn,2,1,null,null,z),e&2){let n=l(3);U(n.backups())}}function Wn(e,t){e&1&&(o(0,"div",67),r(1,25),o(2,"button",77),F(3,"sh-icon"),i(),s(),i()),e&2&&(a(2),d("routerLink",W(1,mn)))}function qn(e,t){if(e&1&&(o(0,"div",66),E(1,jn,2,0)(2,Wn,4,2,"div",67),i()),e&2){let n=l(2);$("fallback",n.backups().length===0),a(),g(n.backups().length?1:2)}}function Qn(e,t){e&1&&(r(0,26,1),f(1),s())}function Yn(e,t){e&1&&(r(0,27,1),f(1),s())}function Zn(e,t){e&1&&(r(0,28,1),f(1),s())}function et(e,t){e&1&&(r(0,29,1),f(1),s())}function nt(e,t){e&1&&(r(0,30,1),f(1),s())}function tt(e,t){e&1&&(r(0,31,1),f(1),s())}function it(e,t){e&1&&(r(0,32,1),f(1),s())}function ot(e,t){if(e&1&&(C(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function _t(e,t){e&1&&(N(0),C(1,"-"),M())}function at(e,t){if(e&1&&(C(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function lt(e,t){e&1&&(N(0),C(1,"-"),M())}function ct(e,t){if(e&1&&(C(0),D(1,"durationFormat")),e&2){let n=l().$implicit,_=l(3);S(" ",A(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function rt(e,t){e&1&&(N(0),C(1,"-"),M())}function st(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function ut(e,t){e&1&&(N(0),C(1,"-"),M())}function Ft(e,t){if(e&1&&(C(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Ct(e,t){e&1&&(N(0),C(1,"-"),M())}function Tt(e,t){e&1&&f(0)}function dt(e,t){if(e&1&&(o(0,"tr")(1,"td"),C(2),i(),o(3,"td")(4,"sh-chip",88),F(5,"img",70),C(6),i()(),o(7,"td"),E(8,ot,2,4)(9,_t,2,0,"ng-container"),i(),o(10,"td"),E(11,at,2,4)(12,lt,2,0,"ng-container"),i(),o(13,"td"),E(14,ct,2,4)(15,rt,2,0,"ng-container"),i(),o(16,"td"),E(17,st,2,3)(18,ut,2,0,"ng-container"),i(),o(19,"td"),E(20,Ft,2,3)(21,Ct,2,0,"ng-container"),i(),o(22,"td")(23,"span"),T(24,35),i()(),o(25,"td"),P(26,Tt,1,0,"ng-container",76),i()()),e&2){let n=t.$implicit,_=l(3),u=j(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),d("src",_.getBackendIcon(n.Backup.TargetURL),w),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),g(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let p=_.getBackupVersionCount(n);a(4),L(p)(p),H(24),a(2),d("ngTemplateOutlet",u)("ngTemplateOutletContext",R(12,En,n))}}function Et(e,t){if(e&1){let n=h();o(0,"sh-table",78),Qe("sortByColumnChange",function(u){m(n);let p=l(2);return qe(p.sortByColumn,u)||(p.sortByColumn=u),O(u)}),o(1,"tr",79)(2,"th",80),r(3,26),P(4,Qn,2,0,"ng-container",81),s(),i(),o(5,"th",82),r(6,27),P(7,Yn,2,0,"ng-container",81),s(),i(),o(8,"th",83),r(9,28),P(10,Zn,2,0,"ng-container",81),s(),i(),o(11,"th",84),r(12,29),P(13,et,2,0,"ng-container",81),s(),i(),o(14,"th",85),r(15,30),P(16,nt,2,0,"ng-container",81),s(),i(),o(17,"th",86),r(18,31),P(19,tt,2,0,"ng-container",81),s(),i(),o(20,"th",87),r(21,32),P(22,it,2,0,"ng-container",81),s(),i(),o(23,"th"),T(24,33),i(),o(25,"th"),T(26,34),i()(),V(27,dt,27,14,"tr",null,z),i()}if(e&2){let n=l(2),_=j(35);d("data",n.backups())("loading",n.backupsLoading()),We("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),U(n.backups())}}function gt(e,t){if(e&1&&E(0,qn,3,3,"div",64)(1,Et,29,10,"sh-table",65),e&2){let n=l();g(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function pt(e,t){e&1&&(o(0,"div",89),F(1,"sh-progress-bar",90),o(2,"div",53)(3,"h3"),T(4,36),i()()())}function St(e,t){if(e&1){let n=h();o(0,"button",92),I("click",function(){m(n);let u=l(3);return O(u.abort())}),r(1,38),F(2,"sh-icon"),s(),i()}if(e&2){let n=l(3);$("small",n.viewMode()==="details")}}function mt(e,t){if(e&1){let n=h();o(0,"button",92),I("click",function(){m(n);let u=l(3);return O(u.stop())}),r(1,39),F(2,"sh-icon"),s(),i()}if(e&2){let n=l(3);$("small",n.viewMode()==="details")}}function Ot(e,t){e&1&&(r(0,37,1),F(1,"sh-icon"),s())}function Nt(e,t){e&1&&(r(0,37,2),F(1,"sh-icon"),s())}function Mt(e,t){if(e&1){let n=h();E(0,St,3,2,"button",91)(1,mt,3,2,"button",91),o(2,"button",92),I("click",function(){m(n);let u=l(2);return O(u.pauseResume())}),r(3,37),E(4,Ot,2,0)(5,Nt,2,0),s(),i()}if(e&2){let n=l(2);g(n.isStopping()?0:1),a(2),$("small",n.viewMode()==="details")("loading",n.isResuming()),a(2),g(n.clientIsRunning()?4:5)}}function It(e,t){e&1&&T(0,40,1)}function Pt(e,t){e&1&&(o(0,"sh-icon"),C(1,"check"),i())}function Dt(e,t){e&1&&(o(0,"sh-icon"),C(1,"dots-three-vertical"),i())}function ft(e,t){if(e&1){let n=h();o(0,"button",92),I("click",function(){m(n);let u=l().$implicit,p=l();return O(p.startBackup(u.Backup.ID))}),r(1,40),F(2,"sh-icon"),E(3,It,1,0),s(),i(),o(4,"button",93)(5,"sh-icon"),C(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",54),E(9,Pt,2,0,"sh-icon")(10,Dt,2,0,"sh-icon"),i(),N(11,62),o(12,"h3",94),C(13,"Operations"),i(),o(14,"button",95),r(15,41),F(16,"sh-icon"),s(),i(),o(17,"button",95),r(18,42),F(19,"sh-icon"),s(),i(),o(20,"button",95),r(21,43),F(22,"sh-icon"),s(),i(),F(23,"sh-divider"),o(24,"h3",94),T(25,44),i(),o(26,"button",95),r(27,45),F(28,"sh-icon"),s(),i(),o(29,"button",59),I("click",function(){m(n);let u=l().$implicit,p=l();return O(p.verifyFiles(u.Backup.ID))}),r(30,46),F(31,"sh-icon"),s(),i(),o(32,"button",59),I("click",function(){m(n);let u=l().$implicit,p=l();return O(p.compressBackup(u.Backup.ID))}),r(33,47),F(34,"sh-icon"),s(),i(),o(35,"button",95),r(36,48),F(37,"sh-icon"),s(),i(),F(38,"sh-divider"),o(39,"h3",94),T(40,49),i(),o(41,"button",95),r(42,50),F(43,"sh-icon"),s(),i(),M(),i()}if(e&2){let n=l().$implicit,_=l();$("loading",_.startingBackup()===n.Backup.ID),a(3),g(_.viewMode()==="list"?3:-1),a(),d("routerLink",R(15,On,n.Backup.ID)),a(4),$("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),g(_.successId()===n.Backup.ID?9:10),a(5),d("routerLink",R(17,Nn,n.Backup.ID)),a(3),d("routerLink",R(19,Mn,n.Backup.ID)),a(3),d("routerLink",R(21,In,n.Backup.ID)),a(6),d("routerLink",R(23,Pn,n.Backup.ID)),a(9),d("routerLink",R(25,Dn,n.Backup.ID)),a(6),d("routerLink",R(27,fn,n.Backup.ID))}}function $t(e,t){if(e&1&&E(0,Mt,6,6)(1,ft,44,29),e&2){let n=t.$implicit,_=l();g(_.runningBackupId()===n.Backup.ID?0:1)}}function Rt(e,t){e&1&&(o(0,"sh-icon",96),C(1,"funnel-simple"),i(),o(2,"sh-icon",97),C(3,"sort-ascending"),i(),o(4,"sh-icon",98),C(5,"sort-descending"),i())}var ht={file:{Display:$localize`Local`,Icon:null}},ie=class e{#t=x(cn);#n=x(un);#e=x(sn);#o=x(Fn);#_=x(Ye);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;runningBackupId=this.#n.runningBackupId;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=Y(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=Y(()=>this.runningTask()==this.#i());#i=k(-1);viewMode=rn("viewMode","list");sortByColumn=k(this.#e.orderBy());loadingId=k(null);successId=k(null);sortEffect=ze(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#o.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t))}openPauseDialog(){this.#_.open(Tn,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#i.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}getBackendIcon(t){return t?te(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=te(t);if(!n)return"";let _=ht[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let u="http://null?"+t.split("?")[1],y=new URL(u).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,b]of Object.entries(Cn))if(y.endsWith(B))return b}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdCompact({id:t}).pipe(q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Ve({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let u;u=$localize`Restores`;let p;p=$localize`Recover your files from any backup set.`;let y;y=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let B;B=$localize`My backups`;let b;b=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let oe;oe=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let _e;_e=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ae;ae=$localize`Relative time`;let le;le=$localize`Actual time`;let ce;ce=$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 re;re=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let se;se=$localize`Externally managed`;let ue;ue=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=K(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Fe;Fe=$localize` ${v}:ICU@@6502601490918455200: `;let Ce;Ce=$localize`Last successful backup:`;let Te;Te=$localize`Duration:`;let de;de=$localize`Source:`;let Ee;Ee=$localize`Destination:`;let ge;ge=$localize`Next scheduled run:`;let pe;pe=$localize`Externally managed`;let Se;Se=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let me;me=$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 Oe;Oe=$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 Ne;Ne=$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 Me;Me=$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 Ie;Ie=$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 Pe;Pe=$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 De;De=$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 fe;fe=$localize`Version`;let $e;$e=$localize`Actions`;let X;X=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,X=K(X,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Re;Re=$localize` ${X}:ICU@@3521773141017690117: `;let he;he=$localize`Loading backups...`;let J;J=$localize`${"\uFFFD*4:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,J=K(J);let Ae;Ae=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let xe;xe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Le;Le=$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 He;He=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let ke;ke=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Ge;Ge=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let ye;ye=$localize`Advanced`;let Be;Be=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let be;be=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let ve;ve=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Xe;Xe=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Je;Je=$localize`Reporting`;let we;return we=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,u,p,y,B,b,oe,_e,ae,le,ce,re,se,ue,Fe,Ce,Te,de,Ee,ge,pe,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,$e,Re,he,J,Ae,xe,Le,He,ke,Ge,ye,Be,be,ve,Xe,Je,we,[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-b"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(F(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",51),F(4,"img",52),o(5,"div",53)(6,"h3"),T(7,2),i(),o(8,"p"),T(9,3),i()(),o(10,"button",54),r(11,4),F(12,"sh-icon"),s(),i()(),o(13,"sh-card",51),F(14,"img",55),o(15,"div",53)(16,"h3"),T(17,5),i(),o(18,"p"),T(19,6),i()(),o(20,"button",54),r(21,7),F(22,"sh-icon"),s(),i()()(),o(23,"div",56)(24,"h2"),N(25),T(26,8),M(),E(27,Ln,22,6,"div",57),i(),Ue(28,gt,2,1)(29,pt,5,0),Ke(30,28,gn,null,29),i()(),P(32,$t,2,1,"ng-template",null,0,Q)(34,Rt,6,0,"ng-template",null,1,Q)),n&2&&(a(3),d("routerLink",W(4,pn)),a(10),d("routerLink",W(5,Sn)),a(14),g(_.backups().length>0?27:-1),a(3),je(!_.backupsLoading()))},dependencies:[Z,dn,en,ne,ee,tn,on,_n,Ze],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}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}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}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.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)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.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{ie as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l,d as w}from"./chunk-2LSZ2I43.js";import{d as k}from"./chunk-BMWZYMK6.js";import{a as b,d as O}from"./chunk-NBTTYKXH.js";import{xa as v,ya as s}from"./chunk-OQ6BKP5N.js";import{C as u,E as p,I as P,M as f,U as c,Z as i,f as R,i as E,l as y,oa as a,p as m,ya as T,z as N}from"./chunk-ERITO7WM.js";import{a as A}from"./chunk-7CGTOI24.js";var g=class r{platformId=i(T);STORAGE_VERSION="v1";APP_NAME="duplicati";PERSISTED_PREFIX="persist:";getItemParsed(e,t=!1){return s(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${t?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`)??"null")}setItemParsed(e,t,o=!1){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${o?this.PERSISTED_PREFIX:""}${this.APP_NAME}:${e}`,JSON.stringify(t))}get length(){return v(this.platformId)?localStorage.length:0}getItem(e){return s(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`)??null}setItem(e,t){if(!s(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`,t)}removeItem(e){s(this.platformId)||(localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${e}`),localStorage.removeItem(`${this.STORAGE_VERSION}:${this.PERSISTED_PREFIX}${this.APP_NAME}:${e}`))}clearAllNotCurrentVersion(){if(!s(this.platformId))for(var e in localStorage)!e.startsWith(this.STORAGE_VERSION)&&e.includes(this.APP_NAME)&&localStorage.removeItem(e)}clearAll(){s(this.platformId)||localStorage.clear()}clear(){if(!s(this.platformId))for(var e in localStorage)e.includes(this.APP_NAME)&&!e.includes(this.PERSISTED_PREFIX)&&localStorage.removeItem(e)}key(e){return s(this.platformId)?null:localStorage.key(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac})};function V(){try{let r=document.querySelector('meta[name="duplicati-proxy-config"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.startsWith("/"))return e}}catch(r){console.warn("Failed to read proxy configuration from meta tag:",r)}return null}function L(){try{let r=document.querySelector('meta[name="duplicati-enable-iframe-hosting"]');if(r){let e=(r.getAttribute("content")||"").trim();if(e&&e.length>0)return e.toLowerCase()!=="true"}}catch(r){console.warn("Failed to read disable relay support configuration from meta tag:",r)}return!0}function $(){try{let r=document.querySelector('meta[name="duplicati-xsrf-config"]');if(r){let e=(r.getAttribute("data-header-name")||"").trim(),t=(r.getAttribute("data-query-name")||"").trim();if(e&&t&&e.length>0&&t.length>0){let n=new URLSearchParams(window.location.search).get(t);if(n)return{headerName:e,queryName:t,headerValue:n}}}}catch(r){console.warn("Failed to read XSRF configuration from meta tags:",r)}return null}function x(){let r=$();return r?`${r.queryName}=${encodeURIComponent(r.headerValue)}`:null}function X(){let r=V();if(r&&r.length>0){let t=r;t.startsWith("/")||(t=`/${t}`),t.endsWith("/")&&(t=t.slice(0,-1)),l.BASE=t}else l.BASE="";let e=$();e&&(l.HEADERS={[e.headerName]:e.headerValue})}var h=class r{#i=i(g);#o=a(null);#t=window.self!==window.top&&L();#r=a(this.#t);relayIsEnabled=this.#r.asReadonly();config=this.#o.asReadonly();configLoaded=this.#t?new E:null;isLoading=a(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#s(),this.#t&&(this.#r.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),o=JSON.parse(t);if(!o?.accessToken||!o?.clientId){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.clientId!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}if(typeof o.accessToken!="string"){this.#e("error:invalid-config"),this.#r.set(!1);return}let n=this.#i.getItem("locale")??"en-US",I=o.locale??"en-US";n!==I&&(this.#i.setItem("locale",I),window.location.reload()),this.#o.set(o),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#s(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#o.set(e)}clearConfig(){this.#o.set(null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};var D="PROXY_AUTHED_FAKE_TOKEN",d="refreshNonce",S="v1:persist:duplicati:refreshNonce",M=class r{#i=i(k);#o=i(O);#t=i(w);#r=i(h);#e=a(null);#s=a(!1);#a=a(!1);#l=a(x());xsrfQueryParam=this.#l.asReadonly();token=this.#e.asReadonly();isLoggingOut=this.#s.asReadonly();setRefreshNonce(e,t){if(!e){sessionStorage.removeItem(d);return}t?localStorage.setItem(S,e||""):sessionStorage.setItem(d,e||"")}getRefreshNonceBody(){let e=sessionStorage.getItem(d),t=localStorage.getItem(S),o=e||t;return{requestBody:o?{requestBody:{Nonce:o}}:void 0,local:o===t}}login(e,t){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:t}}).pipe(u(1),f(o=>{o.AccessToken?(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t)):this.#e.set(null)}))}#n=null;refreshToken(){if(this.#r.relayIsEnabled())return this.#e.set(D),new R(o=>{o.next({AccessToken:D}),o.complete()});if(this.#a())return this.#t.postApiV1AuthIssuetokenByOperation({operation:"websocket"}).pipe(u(1),f(o=>{o.Token&&this.#e.set(o.Token)}),m(o=>({AccessToken:o.Token})));if(this.#n)return this.#n;let{requestBody:e,local:t}=this.getRefreshNonceBody();return this.#n=this.#t.postApiV1AuthRefresh(e).pipe(u(1),f(o=>{o.AccessToken&&(this.#e.set(o.AccessToken),this.setRefreshNonce(o.RefreshNonce,t))}),p(()=>{this.#n=null}),P(1)),this.#n}checkProxyAuthed(){let e=new b(A({"custom-proxy-check":"true"},l.HEADERS??{})),t=l.BASE||"";return this.#o.post(`${t}/api/v1/auth/status`,null,{headers:e}).pipe(m(o=>{let n=o;return n?.authorized&&n?.socketToken?(this.#e.set(n.socketToken),this.#a.set(!0),!0):!1}),N(()=>y(!1)))}logout(){this.#s.set(!0);let{requestBody:e,local:t}=this.getRefreshNonceBody();sessionStorage.removeItem(d),t&&localStorage.removeItem(S),this.#t.postApiV1AuthRefreshLogout(e).pipe(u(1),p(()=>{this.#s.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})};export{g as a,X as b,h as c,D as d,M as e};
|