@duplicati/ngclient 0.0.178 → 0.0.179
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/assets/dest-icons/dincloud.png +0 -0
- package/assets/dest-icons/dreamhost.png +0 -0
- package/assets/dest-icons/dunkel.png +0 -0
- package/assets/dest-icons/duplicati.png +0 -0
- package/assets/dest-icons/hosteurope.png +0 -0
- package/assets/dest-icons/ibmcos.png +0 -0
- package/assets/dest-icons/impossiblecloud.png +0 -0
- package/assets/dest-icons/infomaniak.png +0 -0
- package/assets/dest-icons/polisystems.png +0 -0
- package/assets/dest-icons/rabata.png +0 -0
- package/assets/dest-icons/sakuracloud.png +0 -0
- package/assets/dest-icons/scaleway.png +0 -0
- package/assets/dest-icons/seagatelyve.png +0 -0
- package/assets/dest-icons/storadera.png +0 -0
- package/assets/dest-icons/wasabi.png +0 -0
- package/assets/sh.woff2 +0 -0
- package/chunk-2HZ7VZ3D.js +1 -0
- package/{chunk-AJMSZFGR.js → chunk-2LAZMIL4.js} +1 -1
- package/{chunk-M7SLT3MF.js → chunk-2U23BDRP.js} +1 -1
- package/chunk-3CCAGUTG.js +1 -0
- package/{chunk-MIUFEQ3S.js → chunk-4F7BBMQ2.js} +1 -1
- package/{chunk-WNOXOC4X.js → chunk-4JVBYGOM.js} +1 -1
- package/{chunk-PW55LN2T.js → chunk-55RRXYNB.js} +1 -1
- package/{chunk-Y4IW22ZU.js → chunk-6AX4L2U5.js} +1 -1
- package/chunk-6GJYSOXJ.js +1 -0
- package/{chunk-JTZ2JEV4.js → chunk-6WVN2KRC.js} +1 -1
- package/{chunk-6CYY2QG6.js → chunk-7XLQX4B6.js} +1 -1
- package/{chunk-G4FG3YUE.js → chunk-C6LHWLWL.js} +1 -1
- package/chunk-CM6KCZ6Q.js +1 -0
- package/{chunk-JTQDY6AH.js → chunk-D47P7LFF.js} +1 -1
- package/{chunk-WHLIHNEE.js → chunk-DNNNVTJK.js} +1 -1
- package/chunk-DV67LYLW.js +2 -0
- package/{chunk-YQSTMC2K.js → chunk-FEBDZE5A.js} +1 -1
- package/{chunk-NEQW3H7F.js → chunk-FHO4PDLK.js} +1 -1
- package/{chunk-PNECF7JS.js → chunk-HC6NRM4H.js} +1 -1
- package/chunk-HDM6ELAR.js +1 -0
- package/chunk-HEV3WHAH.js +1 -0
- package/{chunk-VSLN6R7K.js → chunk-HGZYRAXZ.js} +1 -1
- package/chunk-HPU4SX5Z.js +1 -0
- package/chunk-I77LGXJN.js +2 -0
- package/{chunk-76LEHUPM.js → chunk-IE7RK4YW.js} +1 -1
- package/chunk-IQI7X3JY.js +2 -0
- package/chunk-JKDYRSAH.js +1 -0
- package/{chunk-N4ADMNNU.js → chunk-JRFX5D6S.js} +1 -1
- package/chunk-JRMY6F6W.js +1 -0
- package/chunk-JSYVSJJU.js +1 -0
- package/{chunk-UT542KNO.js → chunk-L37SKX3M.js} +1 -1
- package/chunk-LVPZTSKG.js +1 -0
- package/{chunk-5HQJVUNE.js → chunk-MVPMVVRC.js} +1 -1
- package/chunk-PNYEL323.js +1 -0
- package/{chunk-AO4ZIHUL.js → chunk-QNZTEY37.js} +1 -1
- package/chunk-RIVMPP47.js +1 -0
- package/chunk-SYMBRSKN.js +7 -0
- package/{chunk-WLXOWWZB.js → chunk-T7XH5JIZ.js} +1 -1
- package/chunk-TOB4ESNO.js +1 -0
- package/{chunk-5MXXIFJM.js → chunk-U5GRFEV3.js} +1 -1
- package/chunk-UTLK72CH.js +1 -0
- package/{chunk-U4T4BSPF.js → chunk-VYIUFXYO.js} +1 -1
- package/chunk-WGXHTY3T.js +1 -0
- package/{chunk-PJLZ7V22.js → chunk-WPT4ETG3.js} +1 -1
- package/chunk-XECFWVLT.js +1 -0
- package/index.html +42 -1
- package/main-CMSRKMLS.js +1 -0
- package/package.json +1 -1
- package/assets/favicon.ico +0 -0
- package/chunk-27UON6YV.js +0 -2
- package/chunk-4IUPBI2K.js +0 -1
- package/chunk-5UXRNNTT.js +0 -1
- package/chunk-6O5DBV6Y.js +0 -1
- package/chunk-7IQ5FSGI.js +0 -1
- package/chunk-EBKB4YCL.js +0 -1
- package/chunk-F3RWB4I6.js +0 -1
- package/chunk-H6UYYWCU.js +0 -1
- package/chunk-J5LEAYPL.js +0 -1
- package/chunk-KR56GPXG.js +0 -2
- package/chunk-PCLJOXMF.js +0 -1
- package/chunk-PUOOECEB.js +0 -1
- package/chunk-QZJ7QZZ4.js +0 -1
- package/chunk-R6XDJFPE.js +0 -1
- package/chunk-SS7TCWY5.js +0 -1
- package/chunk-TXPM764C.js +0 -1
- package/chunk-WS7QWRRY.js +0 -1
- package/chunk-WWIKIIGV.js +0 -7
- package/chunk-WWIXPGSZ.js +0 -1
- package/chunk-XRXXVFJ4.js +0 -1
- package/chunk-XZZDJCRM.js +0 -1
- package/main-OOXK65IC.js +0 -1
package/chunk-WWIXPGSZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Rt}from"./chunk-OWEK4OHZ.js";import{a as Gt}from"./chunk-XRXXVFJ4.js";import{a as $t}from"./chunk-OC3JR7EH.js";import"./chunk-6CYY2QG6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import{a as ie}from"./chunk-4IUPBI2K.js";import"./chunk-AGPZBYW6.js";import{a as It}from"./chunk-WILUKPQ3.js";import{a as ht}from"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import{a as ct,b as Ct}from"./chunk-QWNOPLJC.js";import{a as X}from"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{B as J,E as pt,G as ut,H as te,L as Nt,M as mt,N as ft,P as Mt,W as Pt,Y as Ot,c as j,e as K,i as Q,m as gt,s as Y,t as Z,u as k,w as ee,z as Et}from"./chunk-RYXU2QDS.js";import{b as ne}from"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as p,Ab as o,Bb as h,E as R,Ib as f,Ma as st,Mc as w,Pa as _,Pb as G,Qb as $,Rb as l,Sb as B,Sc as St,Tb as H,Ub as W,Vb as c,W as O,Xb as d,a as nt,aa as u,b as it,c as ot,cb as x,cc as rt,dc as Tt,gc as M,hb as le,ib as at,jc as y,kc as q,l as F,la as S,lc as _e,na as D,oc as A,pb as lt,pc as v,qb as _t,qc as L,sb as C,tb as g,uc as dt,xc as V,yb as m,z as b,zb as s}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Ft=["formRef"],bt=()=>[import("./chunk-WNOXOC4X.js").then(i=>i.OptionsListComponent)];function wt(i,t){i&1&&(s(0,"sh-alert",3),l(1,1),o())}function Dt(i,t){if(i&1){let e=f();s(0,"app-options-list",5),L("optionsChange",function(a){p(e);let T=d();return v(T.settings,a)||(T.settings=a),u(a)}),o()}if(i&2){let e=d();A("options",e.settings),m("hasFreeTextSettings",!0)}}var z=class i{#e=O(X);#n=O(ne);formRef=St.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=D(()=>{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(([n,a],T)=>{if(n.startsWith("--")){let N=n.substring(2);this.settings.update(E=>(E.some(P=>P.Name===N||P.Name===n)||E.push({Name:n,Value:a}),E))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(E=>E.Name?.startsWith("--")?E.Name:`--${E.Name}`),T=Object.keys(e).filter(E=>E.startsWith("--")).filter(E=>!n.includes(E)),N=t.reduce((E,P)=>{let I=P.Name?.startsWith("--")?P.Name:`--${P.Name}`;return E[I]=P.Value,E},{});T.forEach(E=>{N[E]=null}),this.#n.patchApiV1Serversettings({requestBody:N}).pipe(R(()=>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||i)};static \u0275cmp=x({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&rt(n.formRef,Ft,5),e&2&&Tt()},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,n){e&1&&(s(0,"div",2),C(1,wt,2,0,"sh-alert",3),s(2,"button",4),c("click",function(){return n.submit()}),G(3,0),h(4,"sh-icon"),$(),o()(),at(5,Dt,1,2),lt(6,5,bt)),e&2&&(_(),g(n.saved()?1:-1),_(),M("loader",n.isSubmitting()),_(4),_t(!n.isLoadingOptions()))},dependencies:[Z,J,k,ee],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 kt(i,t){if(i&1){let e=f();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){p(e);let T=d(2);return v(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),c("click",function(){p(e);let a=d(2);return u(a.register())}),l(3,0),o()}if(i&2){let e=d(2);_(),A("ngModel",e.registerUrl)}}function Jt(i,t){if(i&1&&(s(0,"div",9)(1,"label"),l(2,1),o(),s(3,"a",15),y(4),o()()),i&2){let e=d(2);_(3),m("href",dt(e.claimUrl()),st),_(),q(e.claimUrl())}}function Xt(i,t){i&1&&(s(0,"div",9)(1,"label"),l(2,2),o()())}function Vt(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=d(2);return u(a.cancel())}),l(1,3),o()}}function zt(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=d(2);return u(a.disable())}),l(1,4),o()}}function Ut(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=d(2);return u(a.enable())}),l(1,5),o(),s(2,"button",16),c("click",function(){p(e);let a=d(2);return u(a.delete())}),l(3,6),o()}}function Bt(i,t){i&1&&(G(0,7,1),h(1,"sh-icon"),$())}function Ht(i,t){i&1&&(G(0,7,2),h(1,"sh-icon"),$())}function Wt(i,t){if(i&1){let e=f();s(0,"sh-chip",17),c("click",function(){p(e);let a=d(2);return u(a.copyReportingUrl())}),G(1,7),C(2,Bt,2,0,"sh-icon")(3,Ht,2,0,"sh-icon"),$(),o()}if(i&2){let e=d(2);_(2),g(e.copiedReportingUrl()===!0?2:3)}}function qt(i,t){if(i&1&&(s(0,"div",8),C(1,kt,4,1),C(2,Jt,5,3,"div",9),C(3,Xt,3,0,"div",9),C(4,Vt,2,0,"button",10),C(5,zt,2,0,"button",10),C(6,Ut,4,0),C(7,Wt,4,1,"sh-chip",11),o()),i&2){let e=d();_(),g(e.state()==="inactive"?1:-1),_(),g(e.state()==="registered"?2:-1),_(),g(e.state()==="registering"?3:-1),_(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),_(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),_(),g(e.state()==="disabled"?6:-1),_(),g(e.additionalReportingUrl()!==""?7:-1)}}var oe=class i{#e=O(ie);#n=O(X);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=w(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!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||i)};static \u0275cmp=x({type:i,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 n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let N;N=$localize`Enable console connection`;let E;E=$localize` Delete console connection setup `;let P;return P=$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:`,P=W(P),[t,e,n,a,T,N,E,P,[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,n){e&1&&C(0,qt,8,7,"div",8),e&2&&g(n.state()!=="unknown"?0:-1)},dependencies:[Y,j,K,Q,te,J,pt,k],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 vt(...i){let t=S(...i);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var se=()=>({standalone:!0});function jt(i,t){i&1&&(s(0,"label"),l(1,34),o())}function Kt(i,t){i&1&&(s(0,"label"),l(1,35),o())}function Qt(i,t){if(i&1){let e=f();s(0,"section")(1,"div",56)(2,"h3"),l(3,32),o(),s(4,"p"),l(5,33),o()(),s(6,"div",57)(7,"sh-toggle",67),c("click",function(){p(e);let a=d(2);return u(a.toggleConsoleControl())}),C(8,jt,2,0,"label")(9,Kt,2,0,"label"),o()()()}if(i&2){let e=d(2);_(7),M("active",!e.consoleControlDisabled()),_(),g(e.consoleControlDisabled()?8:9)}}function Yt(i,t){if(i&1&&(s(0,"section")(1,"div",56)(2,"h3"),l(3,31),o(),s(4,"p"),y(5),o()(),s(6,"div",57),h(7,"app-remote-control"),o()(),C(8,Qt,10,3,"section")),i&2){let e=d();_(5),q(e.remoteControlStatus()),_(3),g(e.remoteControlState()!="inactive"?8:-1)}}function Zt(i,t){i&1&&(s(0,"label"),l(1,38),o())}function en(i,t){i&1&&(s(0,"label"),l(1,39),o())}function tn(i,t){if(i&1){let e=f();s(0,"section")(1,"div",56)(2,"h3"),l(3,36),o(),s(4,"p"),l(5,37),o()(),s(6,"div",57)(7,"sh-toggle",67),c("click",function(){p(e);let a=d();return u(a.saveHideConsoleConnectionStatus())}),C(8,Zt,2,0,"label")(9,en,2,0,"label"),o()()()}if(i&2){let e=d();_(7),M("active",!e.hideConsoleConnectionStatus()),_(),g(e.hideConsoleConnectionStatus()?8:9)}}function nn(i,t){i&1&&(s(0,"sh-icon",82),y(1,"check"),o())}function on(i,t){i&1&&(s(0,"sh-icon",83),y(1,"prohibit"),o())}function sn(i,t){if(i&1){let e=f();s(0,"button",87),c("click",function(){p(e);let a=d(2);return u(a.updatePassphrase())}),l(1,43),o()}if(i&2){let e=d(2);M("loader",e.isUpdating())}}function an(i,t){if(i&1){let e=f();s(0,"button",88),c("click",function(){p(e);let a=d(2);return u(a.updatePassphrase())}),l(1,44),o()}if(i&2){let e=d(2);M("loader",e.isUpdating()),m("disabled",!0)}}function ln(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",78),l(2,40),o(),s(3,"input",79),L("ngModelChange",function(a){p(e);let T=d();return v(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",80),l(6,41),o(),s(7,"input",81),L("ngModelChange",function(a){p(e);let T=d();return v(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,nn,2,0,"sh-icon",82)(9,on,2,0,"sh-icon",83),o(),s(10,"div",62)(11,"button",84),c("click",function(){p(e);let a=d();return u(a.cancelPasswordChange())}),l(12,42),o(),C(13,sn,2,2,"button",85)(14,an,2,3,"button",86),o()}if(i&2){let e=d();_(3),A("ngModel",e.passphrase),_(4),m("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),_(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),_(3),M("loader",e.isUpdating()),_(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function _n(i,t){i&1&&(s(0,"sh-icon",89),y(1,"check"),o())}function rn(i,t){if(i&1){let e=f();s(0,"div",62)(1,"button",84),c("click",function(){p(e);let a=d();return u(a.openPassphraseForm())}),l(2,45),o(),C(3,_n,2,0,"sh-icon",89),o()}if(i&2){let e=d();_(3),g(e.passwordUpdated()?3:-1)}}function Tn(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",90),l(2,46),o(),s(3,"textarea",91),L("ngModelChange",function(a){p(e);let T=d();return v(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",92),l(5,47),o(),s(6,"button",87),c("click",function(){p(e);let a=d();return u(a.updateAllowedHostnames())}),l(7,48),o()}if(i&2){let e=d();_(3),A("ngModel",e.allowedHostnames),_(3),M("loader",e.updatingAllowedHosts())}}function dn(i,t){if(i&1){let e=f();s(0,"section")(1,"div",56)(2,"h3"),l(3,49),o(),s(4,"p"),l(5,50),o()(),s(6,"div",57)(7,"sh-select",93)(8,"input",64),c("ngModelChange",function(a){p(e);let T=d();return u(T.updatePowerMode(a))}),o()()()()}if(i&2){let e=d();_(7),m("options",e.powerModeOptions())("isClearable",!1),_(),m("ngModel",e.powerModeCtrl())("ngModelOptions",V(4,se))}}function Sn(i,t){if(i&1&&(s(0,"p"),l(1,51),o()),i&2){let e,n=d();_(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function cn(i,t){i&1&&h(0,"sh-progress-bar",68)}function Cn(i,t){if(i&1&&y(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function gn(i,t){if(i&1&&y(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function En(i,t){if(i&1){let e=f();s(0,"section")(1,"div",56)(2,"h3"),l(3,52),o(),s(4,"p"),G(5,53),h(6,"a",94)(7,"br")(8,"br"),$(),o()(),s(9,"div",57)(10,"sh-select",95)(11,"input",64),c("ngModelChange",function(a){p(e);let T=d();return u(T.updateUsageStatistics(a))}),o(),le(12,gn,1,1,"ng-template"),o()()()}if(i&2){let e=d();_(10),m("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),_(),m("ngModel",e.usageStatistics())("ngModelOptions",V(4,se))}}function pn(i,t,e){let n=vt(i),a=n[nt];e?.equal&&(a.equal=e.equal);let T;return n.set=N=>{clearTimeout(T),T=setTimeout(()=>it(a,N),t)},n.update=N=>{clearTimeout(T),T=setTimeout(()=>ot(a,N),t)},n}var un=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Lt=[{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`}],re=class i{#e=O(Et);#n=O(Rt);#i=O(ht);#t=O(ne);#o=O(X);#s=O(ie);#_=O(Ct);#a=O(ct);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=S("list");previousLang=this.#l;langCtrl=S(this.#l);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#_.relayIsEnabled;usageStatisticsDisabled=w(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#T=D(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=Lt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(e),F(null)))).subscribe()}allowRemoteAccess=S(!1);allowedHostnames=S("");loadedAllowedHostnames=S("");updatingRemoteAccess=S(!1);updatingAllowedHosts=S(!1);updatingConsoleControl=S(!1);consoleControlDisabled=S(!1);hideConsoleConnectionStatus=this.#o.isConsoleConnectionStatusHidden;updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(t),F(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(t),F(null)))).subscribe()}toggleConsoleControl(){let t=this.consoleControlDisabled(),e=!t;this.updatingConsoleControl.set(!0),this.consoleControlDisabled.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-console-control":e?"True":"False"}}).pipe(R(()=>this.updatingConsoleControl.set(!1)),b(()=>(this.consoleControlDisabled.set(t),F(null)))).subscribe()}updatingDisableTrayIconLogin=S(!1);disableTrayIconLogin=S(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(t),F(null)))).subscribe()}updatingHideConsoleConnectionStatus=S(!1);saveHideConsoleConnectionStatus(){let e=!this.hideConsoleConnectionStatus();this.updatingHideConsoleConnectionStatus.set(!0),this.#o.setHideConsoleConnectionStatus(e).pipe(R(()=>this.updatingHideConsoleConnectionStatus.set(!1))).subscribe()}showPassphraseForm=S(!1);isUpdating=S(!1);passphrase=S("");repeatPassphrase=S("");passwordUpdated=S(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>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=S($t);powerModeOptions=w(()=>{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=S(Lt);timeTypeOptions=S(un);timeType=S("none");timeValue=pn(0,300);timeRange=w(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=D(()=>{let t=this.timeValue(),e=this.#o.serverSettings();!e||e["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateStartupDelay(){let t=this.timeValue(),e=this.timeType(),n="";e!=="none"&&t!==0&&(n=`${t}${e}`),this.#t.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(t)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(e),F(null)))).subscribe())}updatePowerMode(t){let e=this.powerModeCtrl();e!==t&&(t==="default"&&(t=""),this.#t.patchApiV1Serversettings({requestBody:{"power-mode-provider":t||""}}).pipe(b(()=>(this.powerModeCtrl.set(e),F(null)))).subscribe())}serverSettingsEffect=D(()=>{let t=this.#o.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=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(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(a));let N=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(N)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.#e.open(It,{data:{title:$localize`Use legacy UI`,message:$localize`Are you sure you want to use the legacy user interface, not recommended unless you have a specific reason?`,confirmText:$localize`Use legacy`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(t),window.location.replace(`/${t}`))}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["app-settings"]],decls:124,vars:44,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let N;N=$localize`Change server passphrase`;let E;E=$localize`Language`;let P;P=$localize`Select a language for the platform`;let I;I=$localize`Use legacy interface`;let Te;Te=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let de;de=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#47\uFFFD"}:CLOSE_TAG_SH_ICON: Use legacy UI `;let Se;Se=$localize`Allow remote access (requires restart)`;let ce;ce=$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 ge;ge=$localize`Prevent tray icon automatic log-in`;let Ee;Ee=$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 pe;pe=$localize`Prevent tray icon automatic log-in`;let ue;ue=$localize`Update channel`;let Ne;Ne=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let me;me=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Me;Me=$localize`Official stable release.`;let Pe;Pe=$localize`Beta`;let Oe;Oe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let he;he=$localize` Experimental `;let Ie;Ie=$localize`Early previews of new features. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ge;Ge=$localize`Builds for developers and testers only. Not for use with important data.`;let $e;$e=$localize`Pause after startup or hibernation`;let ye;ye=$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 Ae;Ae=$localize`Advanced options`;let ve;ve=$localize`Connect to console`;let Le;Le=$localize`Disable console control`;let Fe;Fe=$localize` Disabling console control will disable remote access to this machine from the console, but will keep the registration intact and allow pushing settings from the console. `;let be;be=$localize`Remote control disabled`;let we;we=$localize`Remote control enabled`;let De;De=$localize`Show console connection status`;let xe;xe=$localize` By default, the console connection status is shown in the top of the application. Use this option to hide the status. `;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 Ve;Ve=$localize`Repeat password`;let ae;ae=$localize`Password have to be filled and have to match`;let ze;ze=$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 U;return U=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#6\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#6\uFFFD"}:CLOSE_LINK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK: 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. `,U=W(U),[t,e,n,a,T,N,E,P,I,Te,de,Se,ce,Ce,ge,Ee,pe,ue,Ne,me,fe,Me,Pe,Oe,he,Ie,Re,Ge,$e,ye,Ae,ve,Le,Fe,be,we,De,xe,ke,Je,ze,Ue,Be,He,We,qe,je,Ke,Qe,Ye,Ze,et,tt,U,[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"],["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"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Xe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",Ve,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",ae,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ae,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","#"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){if(e&1&&(h(0,"app-status-bar"),s(1,"div",54)(2,"header")(3,"div",55)(4,"h2"),l(5,0),o(),s(6,"p"),l(7,1),o()()(),C(8,Yt,9,2),C(9,tn,10,3,"section"),s(10,"section")(11,"div",56)(12,"h3"),l(13,2),o(),s(14,"p"),l(15,3),o()(),s(16,"div",57)(17,"div",58)(18,"img",59),c("click",function(){return n.setLightMode()}),o(),s(19,"img",60),c("click",function(){return n.setDarkMode()}),o()()()(),s(20,"section")(21,"div",56)(22,"h3"),l(23,4),o(),s(24,"p"),l(25,5),o()(),s(26,"div",61),C(27,ln,15,7)(28,rn,4,1,"div",62),o()(),s(29,"section")(30,"div",56)(31,"h3"),l(32,6),o(),s(33,"p"),l(34,7),o()(),s(35,"div",57)(36,"sh-select",63)(37,"input",64),c("ngModelChange",function(T){return n.updateLocale(T)}),o()()()(),s(38,"section")(39,"div",56)(40,"h3"),l(41,8),o(),s(42,"p"),l(43,9),o()(),s(44,"div",57)(45,"button",65),c("click",function(){return n.changeDefaultClientTo("ngclient")}),G(46,10),h(47,"sh-icon"),$(),o()()(),s(48,"section")(49,"div",56)(50,"h3"),l(51,11),o(),s(52,"p"),l(53,12),o()(),s(54,"div",66)(55,"sh-toggle",67),c("click",function(){return n.updateRemoteAccess()}),s(56,"label"),l(57,13),o()(),C(58,Tn,8,3),o()(),s(59,"section")(60,"div",56)(61,"h3"),l(62,14),o(),s(63,"p"),l(64,15),o()(),s(65,"div",57)(66,"sh-toggle",67),c("click",function(){return n.saveDisableTrayIconLogin()}),s(67,"label"),l(68,16),o()()()(),C(69,dn,9,5,"section"),s(70,"section")(71,"div",56)(72,"h3"),l(73,17),o(),C(74,Sn,2,1,"p"),C(75,cn,1,0,"sh-progress-bar",68),o(),s(76,"div",69)(77,"div",70),c("click",function(){return n.setNewChannel("")}),s(78,"sh-radio",71),l(79,18),o(),s(80,"p"),l(81,19),o()(),s(82,"div",70),c("click",function(){return n.setNewChannel("stable")}),s(83,"sh-radio",71),l(84,20),o(),s(85,"p"),l(86,21),o()(),s(87,"div",70),c("click",function(){return n.setNewChannel("beta")}),s(88,"sh-radio",71),l(89,22),o(),s(90,"p"),l(91,23),o()(),s(92,"div",70),c("click",function(){return n.setNewChannel("experimental")}),s(93,"sh-radio",71),l(94,24),o(),s(95,"p"),l(96,25),o()(),s(97,"div",70),c("click",function(){return n.setNewChannel("canary")}),s(98,"sh-radio",71),l(99,26),o(),s(100,"p"),l(101,27),o()()()(),s(102,"section")(103,"div",56)(104,"h3"),l(105,28),o(),s(106,"p"),l(107,29),o()(),s(108,"div",57)(109,"div",72)(110,"sh-range-slider",73)(111,"input",74),L("ngModelChange",function(T){return v(n.timeValue,T)||(n.timeValue=T),T}),o()(),s(112,"sh-select",75)(113,"input",76),c("ngModelChange",function(T){return n.updateTimeType(T)}),o(),le(114,Cn,1,1,"ng-template"),o()()()(),C(115,En,13,5,"section"),o(),h(116,"sh-divider"),s(117,"div",54)(118,"section")(119,"div",77)(120,"h3"),l(121,30),o(),h(122,"app-advanced-options-settings"),o()()(),h(123,"sh-divider")),e&2){let a,T,N;_(8),g(n.isUsingRelay()?-1:8),_(),g(n.isUsingRelay()?-1:9),_(9),M("active",!n.isDarkMode()),_(),M("active",n.isDarkMode()),_(8),g(n.showPassphraseForm()?27:28),_(9),m("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),_(),m("ngModel",n.langCtrl())("ngModelOptions",V(42,se)),_(18),M("active",n.allowRemoteAccess()),_(3),g(n.allowRemoteAccess()?58:-1),_(8),M("active",n.disableTrayIconLogin()),_(3),g(n.powerModeOptions().length>0?69:-1),_(5),g((a=n.sysinfo())!=null&&a.ServerVersion?74:-1),_(),g(n.updatingChannel()?75:-1),_(3),M("active",n.updateChannel()===""),_(),B((T=n.sysinfo())==null?null:T.DefaultUpdateChannel),H(79),_(2),B((N=n.sysinfo())==null?null:N.ServerVersionType),H(81),_(2),M("active",n.updateChannel()==="stable"),_(5),M("active",n.updateChannel()==="beta"),_(5),M("active",n.updateChannel()==="experimental"),_(5),M("active",n.updateChannel()==="canary"),_(12),m("unit",n.timeType()==="none"?"s":n.timeType()),_(),m("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),A("ngModel",n.timeValue),m("ngModelOptions",V(43,se)),_(),m("options",n.timeTypeOptions())("isClearable",!1),_(),m("ngModel",n.timeType()),_(2),g(n.usageStatisticsDisabled()?-1:115)}},dependencies:[Y,j,gt,K,Q,Z,Gt,oe,z,J,mt,ft,Nt,Pt,Ot,te,k,ut,ee,Mt],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)}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}"],changeDetection:0})};export{pn as debounceSignal,re as default};
|
package/chunk-XRXXVFJ4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ve}from"./chunk-6CYY2QG6.js";import{a as $e}from"./chunk-AJXTVI3H.js";import{a as he}from"./chunk-AO4ZIHUL.js";import{a as Me}from"./chunk-SS7TCWY5.js";import{a as ye}from"./chunk-4IUPBI2K.js";import{a as Le}from"./chunk-AGPZBYW6.js";import{a as Ie}from"./chunk-NEV6JB5M.js";import{b as de}from"./chunk-QWNOPLJC.js";import{a as be}from"./chunk-5UXRNNTT.js";import{B as I,D as Oe,H as Ne,L as Ae,M as De,O as Pe,P as fe,Y as Re,c as pe,e as Ce,i as ge,k as Ee,s as w,u as V,w as Fe,z as me}from"./chunk-RYXU2QDS.js";import{b as M}from"./chunk-BKANUILG.js";import{e as Se}from"./chunk-GO4NSDR6.js";import{la as ue}from"./chunk-RMOTUTEQ.js";import{$ as F,Ab as _,Bb as d,Cc as H,Dc as Te,E as U,Ec as ce,Ib as A,Mc as G,Pa as r,Pb as p,Qb as C,Qc as x,Rb as g,Sb as se,Tb as ae,Ub as v,Vb as c,W as u,Xb as E,aa as m,cb as D,fc as _e,gc as f,jc as L,la as S,lc as le,mc as re,na as te,oc as y,pc as b,qc as $,sb as O,tb as N,ub as ne,wb as ie,xb as oe,xc as X,yb as P,zb as a}from"./chunk-XYHHESIX.js";function we(o,t){if(o&1){let n=A();a(0,"sh-radio",10),c("click",function(){let i=F(n).$implicit,s=E();return m(s.pauseOption.set(i.value))}),L(1),_()}if(o&2){let n=t.$implicit,e=E();f("active",e.pauseOption()===n.value),r(),le(" ",n.label," ")}}var Ve=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],z=class o{#t=u(M);pauseOptions=S(Ve);closed=x();isSubmitting=S(!1);pauseTransfers=S(!1);pauseOption=S(void 0);submit(){this.isSubmitting.set(!0);let t=this.pauseTransfers()||null,n=this.pauseOption();this.#t.postApiV1ServerstatePause({duration:n,pauseTransfers:t}).pipe(U(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let t;t=$localize`Pause settings`;let n;n=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let s;return s=$localize` Update settings `,[t,n,e,i,s,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header",5)(1,"h3"),g(2,0),_()(),a(3,"div",6)(4,"div",7),ie(5,we,2,3,"sh-radio",8,ne),_(),a(7,"div",9)(8,"sh-checkbox",10),c("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),g(9,1),_(),a(10,"sh-alert",11),g(11,2),_()()(),a(12,"footer",12)(13,"button",13),c("click",function(){return e.closed.emit()}),g(14,3),_(),a(15,"button",14),c("click",function(){return e.submit()}),g(16,4),_()()),n&2&&(r(5),oe(e.pauseOptions()),r(3),f("active",e.pauseTransfers()),r(7),f("loader",e.isSubmitting()))},dependencies:[w,De,Oe,Fe,I],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var Ge=()=>["/connect/logon"];function ze(o,t){o&1&&(p(0,0,1),d(1,"div",9),C())}function Je(o,t){o&1&&(p(0,0,2),d(1,"div",10),C())}function Xe(o,t){if(o&1){let n=A();a(0,"div",8),c("click",function(){F(n);let i=E();return m(i.resetAndRetry())}),p(1,0),O(2,ze,2,0)(3,Je,2,0),C(),_()}if(o&2){let n=E();r(2),N(n.resetting()?2:3)}}function He(o,t){o&1&&(a(0,"div",6),p(1,1),d(2,"div",11),C(),_()),o&2&&P("routerLink",X(1,Ge))}function Ye(o,t){o&1&&(a(0,"div",6),p(1,2),d(2,"div",10),C(),_()),o&2&&P("routerLink",X(1,Ge))}function We(o,t){if(o&1){let n=A();a(0,"div",7),p(1,3),a(2,"sh-icon",12),c("click",function(){F(n);let i=E();return m(i.cancel())}),_(),a(3,"div",13),c("click",function(){F(n);let i=E();return m(i.claim())}),_(),d(4,"div",14),C(),_()}}function Ke(o,t){if(o&1){let n=A();a(0,"div",8),c("click",function(){F(n);let i=E();return m(i.openConsole())}),p(1,4),d(2,"div",15),C(),_()}}var B=class o{#t=u(Le);#e=u(ye);state=this.#e.state;resetting=S(!1);stateEffect=te(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(!1),this.#e.beginRemoteRegistration())});ngOnInit(){this.#e.refreshRemoteControlStatus()}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank")}cancel(){this.#e.cancelRemoteRegistration()}resetAndRetry(){this.resetting.set(!0),this.#e.cancelRemoteRegistration()}openConsole(){this.#t.open("https://app.duplicati.com/app/machines","_blank")}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,s=v(s);let T;return T=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,s,T,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&O(0,Xe,4,1,"div",5)(1,He,3,2,"div",6)(2,Ye,3,2,"div",6)(3,We,5,0,"div",7)(4,Ke,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",T=e.state()==="registering",l=e.state()==="registered",R=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";N(s?0:T?1:i?2:l?3:R?4:-1)}},dependencies:[Se,V,Re],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"],changeDetection:0})};var Be={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},je=["mbps","gbps"],ke=8,Z=1024,J=Z*1024,q=J*1024,Q=q*1024,Ue=Q*1024,Ze={B:1,KB:Z,MB:J,GB:q,TB:Q,PB:Ue},qe=1e3,j=qe*1e3,K=j*1e3,Qe=[{threshold:Ue,unitPrefix:"PByte"},{threshold:Q,unitPrefix:"TByte"},{threshold:q,unitPrefix:"GByte"},{threshold:J,unitPrefix:"MByte"},{threshold:Z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],k=class o{#t=u(M);closed=x();isSubmitting=S(!1);sizeOptions=S([...je]);maxUpload=S(0);maxDownload=S(0);maxUploadUnit=S("mbps");maxDownloadUnit=S("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*(Ze[n.toUpperCase()]||J)*ke;return i===0?{value:0,unit:"mbps"}:i>=K?{value:parseFloat((i/K).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/j).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*K;break;case"mbps":e=t*j;break}let i=e/ke;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:T}of Qe)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:T};return{valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#t.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),T=i[2],l=this.convertToBitsPerSecondUnits(s,T);this.maxUpload.set(l.value),this.maxUploadUnit.set(l.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),T=i[2],l=this.convertToBitsPerSecondUnits(s,T);this.maxDownload.set(l.value),this.maxDownloadUnit.set(l.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e}submit(){this.isSubmitting.set(!0);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),s=this.maxDownload()??0,T=this.maxDownloadUnit();if(e>0){let{valueForApi:l,unitPrefixForApi:R}=this.convertFromBitsPerSecondUnits(e,i),h=Be[R];h?t=`${l}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${R}. Defaulting to empty string.`)}if(s){let{valueForApi:l,unitPrefixForApi:R}=this.convertFromBitsPerSecondUnits(s,T),h=Be[R];h?n=`${l}${h}`:console.error(`Invalid unit prefix for API submission (download): ${R}. Defaulting to empty string.`)}this.#t.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(U(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:l=>{console.error("Failed to submit throttle settings:",l)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let s;s=$localize`Cancel`;let T;return T=$localize` Update settings `,[t,n,e,i,s,T,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),g(2,0),_(),a(3,"p"),g(4,1),_()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),g(9,2),_(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),$("ngModelChange",function(s){return b(e.maxUpload,s)||(e.maxUpload=s),s}),_()(),a(12,"sh-select",10)(13,"input",11),$("ngModelChange",function(s){return b(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),_()()(),a(14,"div",8)(15,"label"),g(16,3),_(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),$("ngModelChange",function(s){return b(e.maxDownload,s)||(e.maxDownload=s),s}),_()(),a(19,"sh-select",10)(20,"input",11),$("ngModelChange",function(s){return b(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),_()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),g(23,4),_(),a(24,"button",14),c("click",function(){return e.submit()}),g(25,5),_()()),n&2&&(r(11),y("ngModel",e.maxUpload),r(),P("isClearable",!1)("options",e.sizeOptions()),r(),y("ngModel",e.maxUploadUnit),r(5),y("ngModel",e.maxDownload),r(),P("isClearable",!1)("options",e.sizeOptions()),r(),y("ngModel",e.maxDownloadUnit),r(4),f("loader",e.isSubmitting()))},dependencies:[w,pe,Ee,Ce,ge,Ne,fe,I],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function et(o,t){if(o&1&&(a(0,"div"),L(1),_(),d(2,"sh-progress-bar",12)),o&2){let n=E();r(),re("",n.statusData().actionText," - ",n.statusData().statusText),r(),P("value",n.statusData().progress*100)}}function tt(o,t){if(o&1&&(a(0,"div",8),p(1,1),d(2,"sh-icon"),H(3,"relativeTime"),H(4,"date"),C(),_()),o&2){let n,e=E();r(4),se((n=e.nextBackup().backup)==null||n.Backup==null?null:n.Backup.Name)(Te(3,3,e.nextBackup().time))(ce(4,5,e.nextBackup().time,"shortTime")),ae(1)}}function nt(o,t){o&1&&(a(0,"div",8),g(1,2),_())}function it(o,t){o&1&&(a(0,"div",9),p(1,3),d(2,"sh-spinner"),C(),_()),o&2&&(r(2),_e("--spinner-size","12px")("--spinner-thickness","2px"))}function ot(o,t){o&1&&d(0,"app-remote-connectivity-status")}function st(o,t){if(o&1){let n=A();a(0,"button",11),c("click",function(){F(n);let i=E(2);return m(i.abort())}),p(1,4),d(2,"sh-icon"),C(),_()}}function at(o,t){if(o&1){let n=A();a(0,"button",11),c("click",function(){F(n);let i=E(2);return m(i.stop())}),p(1,5),d(2,"sh-icon"),C(),_()}}function _t(o,t){if(o&1&&O(0,st,3,0,"button",13)(1,at,3,0,"button",13),o&2){let n=E();N(n.isStopping()?0:1)}}function lt(o,t){o&1&&(p(0,0,1),d(1,"sh-icon"),C())}function rt(o,t){o&1&&(p(0,0,2),d(1,"sh-icon"),C())}var xe=new Date,ee=class o{#t=u(M);#e=u(ve);#n=u(me);#a=u(he);#i=u(de);#_=u(Ie);#o=u(Me);#l=u(be);minsAgo=xe.setMinutes(xe.getMinutes()-1);statusData=this.#e.statusData;serverState=this.#e.serverState;clientIsRunning=this.#e.clientIsRunning;isResuming=this.#e.isResuming;runningTask=G(()=>this.#o.serverState()?.ActiveTask?.Item1);isStopping=G(()=>this.runningTask()==this.#s());#s=S(-1);pgState=G(()=>this.#o.serverState());isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;nextBackup=G(()=>{let t=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(k,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(z,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#e.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#s.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#_.hasWebSocket()?"longpoll":"websocket";this.#e.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=D({type:o,selectors:[["app-status-bar"]],decls:16,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD*11: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/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12: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/*12:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=v(t);let n;n=$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 e;e=$localize`No scheduled tasks`;let i;i=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let s;s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let T;return T=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,i,s,T,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["shButton","",3,"click"],[1,"raised","primary",3,"value"],["shButton",""]]},template:function(n,e){if(n&1&&(a(0,"div",6)(1,"div",7),O(2,et,3,3)(3,tt,5,8,"div",8)(4,nt,2,0,"div",8)(5,it,3,4,"div",9),_(),a(6,"div",10),O(7,ot,1,0,"app-remote-connectivity-status"),O(8,_t,2,1),a(9,"button",11),c("click",function(){return e.pauseResume()}),p(10,0),O(11,lt,2,0)(12,rt,2,0),C(),_(),a(13,"button",11),c("click",function(){return e.openThrottleSettingsDialog()}),a(14,"sh-icon"),L(15,"speedometer"),_()()()()),n&2){let i;r(2),N((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),r(5),N(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?7:-1),r(),N(e.runningTask()?8:-1),r(),f("loader",e.isResuming()),r(2),N(e.clientIsRunning()?11:12)}},dependencies:[B,V,I,Pe,Ae,$e,ue],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem;flex:1 0}.current-backup-progress[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{max-width:18.75rem;width:100%}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{ee as a};
|
package/chunk-XZZDJCRM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ge,b as we,c as Ue}from"./chunk-WWIKIIGV.js";import"./chunk-T5LLH46J.js";import{a as Le}from"./chunk-27UON6YV.js";import{j as xe}from"./chunk-7IQ5FSGI.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-6Q6SSTBK.js";import{a as $}from"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{B as k,C as ye,H as v,K as Re,c as G,e as w,f as he,g as Oe,i as U,j as fe,r as Ae,s as b,u as B,w as Pe,y as Me,z as $e}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{b as Ee,d as De}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as T,Ab as r,Bb as _,Fb as Te,Gb as de,Ib as m,Ma as re,Mc as L,Pa as l,Pb as g,Qb as u,Qc as me,Rb as D,Rc as Ne,Sb as z,Sc as Ie,Tb as J,Ub as ge,Vb as p,W as I,Xb as c,Yb as ue,Zb as Ce,aa as d,cb as O,cc as pe,da as se,dc as Se,jc as f,kc as X,la as h,oc as A,pc as P,qc as M,rc as H,sb as S,sc as j,tb as F,tc as x,ub as le,uc as W,wb as ce,xb as _e,xc as Fe,yb as N,zb as s}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var ke=["*"],y=class n{destination=Ne.required();static \u0275fac=function(e){return new(e||n)};static \u0275cmp=O({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"]},ngContentSelectors:ke,decls:9,vars:6,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"description"],[1,"actions"]],template:function(e,o){if(e&1&&(ue(),s(0,"sh-card",0)(1,"div",1),_(2,"img",2),r(),s(3,"div",3),f(4),r(),s(5,"div",4),f(6),r(),s(7,"div",5),Ce(8),r()()),e&2){let t=o.destination();l(2),N("src",W(t.icon),re)("alt",W(t.displayName)),l(2),X(t.displayName),l(2),X(t.description)}},dependencies:[ye],styles:['[_nghost-%COMP%]{display:block}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};function Ke(n,i){if(n&1){let e=m();s(0,"app-destination-list-item",3)(1,"button",4),p("click",function(){let t=T(e).$implicit,a=c();return d(a.setDestination.emit(t.key))}),g(2,0),_(3,"sh-icon"),u(),r()()}if(n&2){let e=i.$implicit;N("destination",e)}}var K=class n{#i=I(we);setDestination=me();destinationSearchTerm=h("");destinationTypeOptions=this.#i.destinationTypeOptions;destinationTypeOptionsFocused=L(()=>{let i=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),o=[...i].sort((t,a)=>{let E=t.sortOrder??0,R=a.sortOrder??0;return E!==R?R-E:t.displayName.localeCompare(a.displayName)}).filter(t=>(t.sortOrder??0)>=0);return e?o.filter(t=>t.searchTerms.toLowerCase().includes(e)):o});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=O({type:n,selectors:[["app-destination-list"]],outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let i;i=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",i,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(e,o){e&1&&(s(0,"sh-form-field")(1,"input",1),M("ngModelChange",function(a){return P(o.destinationSearchTerm,a)||(o.destinationSearchTerm=a),a}),r()(),s(2,"div",2),ce(3,Ke,4,1,"app-destination-list-item",3,le),r()),e&2&&(l(),A("ngModel",o.destinationSearchTerm),l(2),_e(o.destinationTypeOptionsFocused()))},dependencies:[y,b,G,w,U,v,k,B],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var Ve=["formRef"],ze=()=>({maxWidth:"700px",width:"100%"});function Je(n,i){n&1&&D(0,4,1)}function Xe(n,i){n&1&&D(0,4,2)}function He(n,i){if(n&1){let e=m();s(0,"button",35),p("click",function(){T(e);let t=c();return d(t.testDestination(0,!0))}),g(1,4),S(2,Je,1,0)(3,Xe,1,0),u(),r()}if(n&2){let e=c();N("disabled",e.testSignal()=="testing"),l(2),F(e.testSignal()=="testing"?2:3)}}function je(n,i){if(n&1){let e=m();s(0,"button",36),p("click",function(){T(e);let t=c();return d(t.openTargetUrlDialog())}),g(1,5),_(2,"sh-icon"),u(),r()}}function We(n,i){if(n&1){let e=m();s(0,"button",36),p("click",function(){T(e);let t=c(2);return d(t.copyTargetUrl())}),g(1,7),_(2,"sh-icon"),u(),r()}}function qe(n,i){if(n&1){let e=m();s(0,"sh-menu")(1,"button",24)(2,"sh-icon"),f(3,"dots-three-vertical"),r()(),Te(4,37),s(5,"button",36),p("click",function(){T(e);let t=c();return d(t.openTargetUrlDialog())}),g(6,6),_(7,"sh-icon"),u(),r(),S(8,We,3,0,"button",24),de(),r()}if(n&2){c();let e=x(0);l(8),F(e?8:-1)}}function Qe(n,i){n&1&&(s(0,"sh-alert"),g(1,8),_(2,"sh-icon",38),u(),r())}function Ye(n,i){n&1&&(s(0,"sh-alert",25),g(1,9),_(2,"sh-icon",38),u(),r())}function Ze(n,i){if(n&1&&(s(0,"sh-alert",26),g(1,10),_(2,"sh-icon",38),u(),r()),n&2){let e=c();l(2),z(e.testErrorMessage()),J(1)}}function et(n,i){if(n&1&&(s(0,"sh-alert",27),g(1,11),_(2,"sh-icon",38),u(),r()),n&2){let e=c();l(2),z(e.testErrorMessage()),J(1)}}function tt(n,i){if(n&1){let e=m();s(0,"app-destination-list-item",28)(1,"button",31),p("click",function(){T(e);let t=c();return d(t.removeDestination())}),D(2,12),r()()}if(n&2){c();let e=x(18);N("destination",e)}}function nt(n,i){if(n&1){let e=m();s(0,"app-destination-list",39),p("setDestination",function(t){T(e);let a=c();return d(a.setDestination(t))}),r()}}function it(n,i){if(n&1){let e=m();s(0,"app-single-destination",40),M("targetUrlChange",function(t){T(e);let a=c();return P(a.targetUrlModel,t)||(a.targetUrlModel=t),d(t)}),r()}if(n&2){let e=c();A("targetUrl",e.targetUrlModel),N("useBackupState",!0)}}function ot(n,i){n&1&&(g(0,3,1),_(1,"sh-icon",33),u())}function at(n,i){n&1&&(g(0,3,2),_(1,"sh-icon"),u())}function st(n,i){n&1&&(s(0,"h2"),D(1,15),r())}function rt(n,i){n&1&&(s(0,"h2"),D(1,16),r())}function lt(n,i){if(n&1){let e=m();s(0,"sh-dialog",41),M("isOpenChange",function(t){T(e);let a=c();return P(a.targetUrlDialogOpen,t)||(a.targetUrlDialogOpen=t),d(t)}),s(1,"header",42)(2,"div",43),S(3,st,2,0,"h2")(4,rt,2,0,"h2"),s(5,"sh-alert",26),D(6,13),r()()(),s(7,"div",44)(8,"sh-form-field")(9,"textarea",45),M("ngModelChange",function(t){T(e);let a=c();return P(a.targetUrlCtrl,t)||(a.targetUrlCtrl=t),d(t)}),r()()(),s(10,"footer",46)(11,"button",31),p("click",function(){T(e);let t=c();return d(t.closeTargetUrlDialog(!1))}),f(12,"Cancel"),r(),s(13,"button",47),p("click",function(){T(e);let t=c();return d(t.closeTargetUrlDialog(!0))}),g(14,14),_(15,"sh-icon"),u(),r()()()}if(n&2){let e=c(),o=x(0);A("isOpen",e.targetUrlDialogOpen),N("options",Fe(4,ze)),l(3),F(o?4:3),l(6),A("ngModel",e.targetUrlCtrl)}}var V=new Ae,Ut=(n={destinations:[]})=>V.group({destinations:V.array(n.destinations)}),bt=({key:n,customGroup:i,dynamicGroup:e,advancedGroup:o})=>V.group({destinationType:V.control(n),custom:i,dynamic:e,advanced:o}),q=class n{#i=I(De);#o=I(Ee);#e=I(xe);#t=I($e);#a=I(Ge);injector=I(se);formRef=Ie.required("formRef");targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=h(null);targetUrlInitial=h(null);targetUrlDialogOpen=h(!1);toggleNewDestination=h(!0);testSignal=this.#e.testSignal;testErrorMessage=this.#e.testErrorMessage;selectedDestinationType=L(()=>{let i=this.targetUrlModel();if(!i)return null;let e=i.split("://")[0];return Le(e)??null});selectedDestinationTypeOption=L(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let i=this.targetUrlModel();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),o=this.targetUrlInitial();!i||e===o||!e||this.#e.setTargetUrl(e)}testDestination(i,e,o){let t=this.targetUrlModel();t&&(this.#e.setTestState("testing"),this.#a.testDestination(t,this.#e.backupId(),i,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#e.setTestState("success"),this.#e.isNew()&&(a.containsBackup===!0?(this.#e.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),e||this.#t.open($,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#e.setTestState("warning",$localize`The remote destination contains unknown files.`),e||this.#t.open($,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),o?.();return}if(this.#e.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let E=t.includes("?");a.action==="trust-cert"&&this.#e.setTargetUrl(t+`${E?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#e.setTargetUrl(t+`${E?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,e):o?.()}}))}setDestination(i){this.#e.setTargetUrl(`${i}://`,!0)}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.#e.isNew(),e=this.testSignal();if(!i){this.#n();return}if(e===""){this.#t.open($,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:o=>{o?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#t.open($,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(e!=="success"){this.#t.open($,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:o=>{o&&this.#n()}});return}this.#n()}#n(){this.#e.isNew()||this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=O({type:n,selectors:[["app-destination"]],viewQuery:function(e,o){e&1&&pe(o.formRef,Ve,5),e&2&&Se()},decls:31,vars:11,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*28:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*29:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*29:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=ge(o);let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let E;E=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let Q;Q=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let Y;Y=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let Z;Z=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ee;ee=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let te;te=$localize`Change`;let ne;ne=$localize`Be careful, this will overwrite everything you have in your destination.`;let ie;ie=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize`Set target URL`;let ae;return ae=$localize`Edit target URL`,[["formRef",""],i,e,o,t,a,E,R,Q,Y,Z,ee,te,ne,ie,oe,ae,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,o){if(e&1){let t=m();H(0),s(1,"form",17,0),p("submit",function(){return T(t),d(o.next())}),s(3,"div",18),_(4,"input",19)(5,"input",20),r(),s(6,"header")(7,"h3",21)(8,"span"),D(9,1),r(),s(10,"div",22),S(11,He,4,2,"button",23),S(12,je,3,0,"button",24)(13,qe,9,1,"sh-menu"),r()(),S(14,Qe,3,0,"sh-alert")(15,Ye,3,0,"sh-alert",25)(16,Ze,3,1,"sh-alert",26)(17,et,3,1,"sh-alert",27),H(18),S(19,tt,3,1,"app-destination-list-item",28),r(),S(20,nt,1,0,"app-destination-list"),S(21,it,1,2,"app-single-destination",29),s(22,"div",30)(23,"button",31),p("click",function(){return T(t),d(o.goBack())}),g(24,2),_(25,"sh-icon"),u(),r(),s(26,"button",32),g(27,3),S(28,ot,2,0,"sh-icon",33)(29,at,2,0,"sh-icon"),u(),r()()(),S(30,lt,16,5,"sh-dialog",34)}if(e&2){let t=j(!!o.targetUrlModel());l(11),F(t?11:-1),l(),F(t?13:12),l(2),F(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),l(4);let a=j(o.selectedDestinationTypeOption());l(),F(a?19:-1),l(),F(t?-1:20),l(),F(t?21:-1),l(5),N("disabled",o.testSignal()=="testing"||!t),l(2),F(o.testSignal()=="testing"?28:29),l(2),F(o.targetUrlDialogOpen()?30:-1)}},dependencies:[Ue,K,y,b,fe,G,w,he,U,Oe,k,v,Re,B,Me,Pe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{Ut as createDestinationForm,bt as createDestinationFormGroup,q as default};
|
package/main-OOXK65IC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as Re,c as Te}from"./chunk-OC3JR7EH.js";import{a as be}from"./chunk-Y4IW22ZU.js";import{a as Se}from"./chunk-D7TCA6E7.js";import{a as k}from"./chunk-6CYY2QG6.js";import{a as Ce}from"./chunk-AJXTVI3H.js";import{b as ve}from"./chunk-LF24JF3M.js";import"./chunk-AO4ZIHUL.js";import"./chunk-SS7TCWY5.js";import{a as P}from"./chunk-6Q6SSTBK.js";import{a as ge}from"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import{a as L}from"./chunk-NEV6JB5M.js";import"./chunk-CGKL2MHM.js";import{a as h,b as v,c as ye,d as I}from"./chunk-QWNOPLJC.js";import{v as ue,x as he}from"./chunk-RYXU2QDS.js";import{c as fe}from"./chunk-BKANUILG.js";import{c as ae,d as pe,g as ce,h as le,i as me,j as de}from"./chunk-GO4NSDR6.js";import{a as ee}from"./chunk-56FBKSBN.js";import{a as te,b as oe,c as ne,e as re,f as se,g as ie}from"./chunk-FIBRO5I3.js";import{la as Y,qa as Z}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Bb as q,E as w,I as B,Ic as X,Jc as Q,K as R,M as J,R as M,U as _,W as r,cb as z,da as $,f as W,g as j,l as U,la as d,m as F,na as K,p as S,y as x,z as G}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var E=class e{#o=r(h);#s=r(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=z({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&q(0,"router-outlet")},dependencies:[ae],encapsulation:2})};var Me={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new _("ENVIRONMENT");var A=class e{#o=r(fe);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=()=>{let e=r(I);return e.token()?!0:e.checkProxyAuthed().pipe(R(t=>t?U(!0):e.refreshToken().pipe(S(()=>!0))))},Pe=()=>{let e=r(v),t=r(k),o=r($),n=e.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return e.configLoaded===null?x(i).pipe(S(()=>n)):e.configLoaded?.pipe(R(()=>x(i)))},Ve=()=>!0,Ie={path:"connect/:typeParam",loadComponent:()=>import("./chunk-6O5DBV6Y.js")},De=()=>{let e=r(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},ke=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-WA7KEG63.js")},{path:"logout",loadComponent:()=>import("./chunk-PTSGXV6M.js")},{path:"",canActivate:[Le],children:[{path:"",canActivate:[Pe,Ve,De],children:[{path:"welcome",loadComponent:()=>import("./chunk-IH4WNUW5.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-QZJ7QZZ4.js")},Ie]},{path:"",loadComponent:()=>import("./chunk-M7SLT3MF.js"),children:[{path:"",loadComponent:()=>import("./chunk-F3RWB4I6.js")},Ie,{path:"add-backup",loadComponent:()=>import("./chunk-JTZ2JEV4.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-76LEHUPM.js")},{path:"backup/import",loadComponent:()=>import("./chunk-UT542KNO.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-PJLZ7V22.js"),loadChildren:()=>import("./chunk-TXPM764C.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-PJLZ7V22.js"),loadChildren:()=>import("./chunk-TXPM764C.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-AJMSZFGR.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-WHLIHNEE.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-JTQDY6AH.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-G4FG3YUE.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-MIUFEQ3S.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-YQSTMC2K.js")},{path:"from-config",loadComponent:()=>import("./chunk-6Y3RYZEE.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-5MXXIFJM.js"),loadChildren:()=>import("./chunk-J5LEAYPL.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-5MXXIFJM.js"),loadChildren:()=>import("./chunk-J5LEAYPL.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-5MXXIFJM.js"),loadChildren:()=>import("./chunk-J5LEAYPL.js")},{path:"settings",loadComponent:()=>import("./chunk-WWIXPGSZ.js")},{path:"about",loadComponent:()=>import("./chunk-PW55LN2T.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-WLXOWWZB.js")},{path:"changelog",loadComponent:()=>import("./chunk-CHUTAXTB.js")},{path:"libraries",loadComponent:()=>import("./chunk-GH6EHG4Z.js")},{path:"system-info",loadComponent:()=>import("./chunk-BGYXB4MY.js")},{path:"server-settings",loadComponent:()=>import("./chunk-PCLJOXMF.js")},{path:"logs",loadChildren:()=>import("./chunk-FCCYQZ63.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-6KLZAB4D.js")}]}]}]}]}]}];var V=null,Ee=(e,t)=>{let o=r(I),n=r(pe),i=r(h),l=r(f),s=i.getItem("locale"),u=r(he),p=Re(s),a=e.url==="/api/v1/auth/login",m=e.url==="/api/v1/auth/refresh",C=e.url==="/api/v1/progressstate",y=e.url==="/api/v1/remoteoperation/test",b=e.url==="/api/v1/filesystem/validate",T=e.url.startsWith("/api/v2/"),O=o.token(),D=e,H=e.headers.has("custom-proxy-check")||O===ye;if(O&&e.url.startsWith(l.baseUrl)&&!H){let c=e.headers.set("Authorization",`Bearer ${O}`);s&&s!=="en-US"&&(c=c.set("X-Ui-Language",p)),D=e.clone({headers:c})}return t(D).pipe(S(c=>{if(c.type===4&&c.status===200&&T){let g=c.body;if(g?.Success===!1)throw{status:200,message:g?.Error??"Unknown error",error:{Error:g?.Error??"Unknown error"},requestBody:g}}return c}),G(c=>{let g=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!H&&(C&&c.status===404||y||b||u.error(g),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!a&&!m&&c.status===401)?(V??=o.refreshToken().pipe(B()),V.pipe(R(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>V=null))):F(()=>({error:c,message:g}))}))};var He="1.0.0",Ae=`portal-proxy-client-${P()}`,We=1,N=class e{#o=1e3;#s=r(f);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=K(()=>{let t=this.#i(),o=this.#l(),n=this.#a();if(!n||!t||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(t){let o=Uint8Array.from(atob(t),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(t),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let s=JSON.parse(l.data);if(this.wsState()==="connect"){if(s.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${s.type}'`);return}let p={token:t,publicKey:"",clientVersion:He,protocolVersion:We},a=this.createResponse(s,"authportal",p);this.#t.set("welcome"),this.#e?.send(a)}else if(this.wsState()==="welcome"){if(s.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${s.type}'`);return}var u=JSON.parse(s.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let p=this.#p.pop();p&&this.#r[p.messageId]&&this.activateCommand(p)}}else if(this.wsState()==="authenticated"){if(s.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${s.type}'`);return}let p=this.#r[s.messageId];if(p){if(s.errorMessage){p.reject(s.errorMessage);return}else{let a=JSON.parse(s.payload??"");a.body=a?.body==null?null:this.utf8Atob(a.body),p.resolve(a)}delete this.#r[s.messageId],window.clearTimeout(p.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let i={from:Ae,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(t,o,n,i,l,s,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((p,a)=>{let m=P(),y={from:Ae,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:s})},b={resolve:p,reject:a,timer:window.setTimeout(()=>{let T=this.#r[m];T&&(delete this.#r[m],T.reject("Timeout"))},u)};this.#r[m]=b,this.#n()?this.activateCommand(y):this.#p.push(y)})}activateCommand(t){this.#e?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"})};function je(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function Ne(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let i=je(t.body),l={};t.headers.keys().forEach(a=>{l[a]=t.headers.get(a)??""});let s=t.headers.get("timeout"),u=s!==null?parseInt(s):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let p=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,i,l,u);return new W(a=>{p.then(m=>{let C=new te;l!=null&&Object.keys(l).forEach(b=>{C.set(b,l[b])});let y=new oe({body:m.body,status:m.code,statusText:"OK",headers:C});a.next(y),a.complete()}).catch(m=>{a.error(new ne({error:m??"Unknown error",status:0,statusText:m??"Unknown error"}))})})}var Oe=(e,t)=>{let o={relayconfigState:r(v),defaultTimeout:r(f).defaultTimeout,relayWebsocket:r(N)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new j;return o.relayconfigState.configLoaded.subscribe(l=>{l&&Ne(o,e,t).subscribe(i)}),i}return Ne(o,e,t)};var xe={providers:[X(),le(ke,de(),me(ce)),re(ie(),se([Oe,Ee])),h,{provide:f,useValue:Me},{provide:Q,useValue:Te()},{provide:ue,useValue:{alertVariant:"simple"}},be,k,ve,Z,ge,Y,Ce,Se]};ee(E,xe);
|