@duplicati/ngclient 0.0.36 → 0.0.37

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.
@@ -0,0 +1 @@
1
+ import{a as ze}from"./chunk-K7H3KYW7.js";import{a as Ue}from"./chunk-TW4633HQ.js";import{a as K}from"./chunk-N35HGIXN.js";import{a as z}from"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import{a as Xe}from"./chunk-DGBBEZNN.js";import"./chunk-QZCTOSPE.js";import{b as V,d as B,e as he,g as W,h as Pe,j as Ie,l as ye,m as $e,o as Ge,p as be,q as Ae,r as ve,s as j,t as De}from"./chunk-7SJHYZC5.js";import{a as Fe}from"./chunk-6M3MNJ52.js";import{g as Le,k as ke,o as we,q as xe}from"./chunk-AUUCT7OA.js";import{a as U}from"./chunk-PIDBEXSZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as N,Bb as y,Cb as $,Db as G,Eb as i,Fb as o,Gb as p,Hb as Ee,Ib as Ne,K as v,Kb as M,Kc as X,Mc as Re,Oa as Ce,Qb as O,R as ge,Ra as a,Rb as R,Sb as s,Tb as Q,Ub as Y,Vb as fe,Wb as c,X as S,Xb as d,Za as E,_b as Me,c as me,ea as g,fa as C,fb as D,ic as f,jc as b,kc as L,lb as H,mc as k,nc as w,oc as x,p as Te,rc as Oe,vb as m,xb as J}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var F=class l{#e=S(U);#i=S(z);repeatRegisterTimer=null;state=E("unknown");claimUrl=E(null);registerUrl=E("");status=X(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=Re(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();console.log("currentState: ",t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#n(t)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=ge({token:l,factory:l.\u0275fac,providedIn:"root"})};function qe(l,e){if(l&1){let t=M();i(0,"spk-form-field",10)(1,"input",11),x("ngModelChange",function(r){g(t);let u=d(2);return w(u.registerUrl,r)||(u.registerUrl=r),C(r)}),o()(),i(2,"button",12),c("click",function(){g(t);let r=d(2);return C(r.register())}),s(3,0),o()}if(l&2){let t=d(2);a(),k("ngModel",t.registerUrl)}}function He(l,e){if(l&1&&(i(0,"div",8)(1,"label"),s(2,1),o(),i(3,"a",13),f(4),o()()),l&2){let t=d(2);a(3),Me("href",t.claimUrl(),Ce),a(),b(t.claimUrl())}}function Je(l,e){l&1&&(i(0,"div",8)(1,"label"),s(2,2),o()())}function Qe(l,e){if(l&1){let t=M();i(0,"button",12),c("click",function(){g(t);let r=d(2);return C(r.cancel())}),s(1,3),o()}}function Ye(l,e){if(l&1){let t=M();i(0,"button",12),c("click",function(){g(t);let r=d(2);return C(r.disable())}),s(1,4),o()}}function Ze(l,e){if(l&1){let t=M();i(0,"button",12),c("click",function(){g(t);let r=d(2);return C(r.enable())}),s(1,5),o(),i(2,"button",14),c("click",function(){g(t);let r=d(2);return C(r.delete())}),s(3,6),o()}}function et(l,e){if(l&1&&(i(0,"div",7),H(1,qe,4,1)(2,He,5,2,"div",8)(3,Je,3,0,"div",8)(4,Qe,2,0,"button",9)(5,Ye,2,0,"button",9)(6,Ze,4,0),o()),l&2){let t=d();a(),N(t.state()==="inactive"?1:-1),a(),N(t.state()==="registered"?2:-1),a(),N(t.state()==="registering"?3:-1),a(),N(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),a(),N(t.state()==="connected"||t.state()==="enabled"?5:-1),a(),N(t.state()==="disabled"?6:-1)}}var q=class l{#e=S(F);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let r;r=$localize`Cancel registration`;let u;u=$localize`Disable remote control`;let P;P=$localize`Enable remote control`;let I;return I=$localize`Delete remote control setup`,[e,t,n,r,u,P,I,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"]]},template:function(t,n){t&1&&H(0,et,7,6,"div",7),t&2&&N(n.state()!=="unknown"?0:-1)},dependencies:[j,V,B,W,ke],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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var tt=()=>({standalone:!0});function nt(l,e){if(l&1&&(i(0,"option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t),a(),b(t)}}function it(l,e){if(l&1){let t=M();i(0,"option",52),c("click",function(){let r=g(t).$implicit,u=d();return C(u.pauseSettings.controls.timeType.setValue(r.value))}),f(1),o()}if(l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function ot(l,e){if(l&1&&(i(0,"option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function rt(l,e){if(l&1&&(i(0,"option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}var h=new ve,Be=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],We=[{value:"",label:$localize`System default (information)`},{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:"none",label:$localize`None / disabled`}],Z=class l{#e=S(Xe);#i=S(z);#t=S(U);#n=S(F);#o=S(Fe);#r=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=E("list");langCtrl=E(this.#r);remoteControlStatus=this.#n.status;settingsForm=h.group({pauseSettings:h.group({time:h.control(0),timeType:h.control("s")}),usageStatistics:h.control(""),updateChannel:h.control("")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=X(()=>{let e=this.langCtrl();return e?K.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):K});usageStatisticsOptions=E(We);timeTypeOptions=E(Be);timeOptions=ze([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],me(Te(([e,t])=>{let n=this.#l(e);return t!==null?n.filter(r=>r.toString().includes(t.toString())):n}),v([])));#l(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((n,r)=>r)}ngOnInit(){this.getServerSettings()}saveLocale(e){this.#o.setItem("locale",e),window.location.reload()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#t.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],n=t.slice(-1),r=t.slice(0,-1),u=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:u.includes(n)?n:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(){let e=this;return()=>{let t=e.langCtrl();return t?K.find(n=>n.value===t)?.label??null:null}}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:Be.find(n=>n.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:We.find(n=>n.value===t)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-settings"]],decls:107,vars:17,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Save changes`;let r;r=$localize`Remote access control`;let u;u=$localize`Pause after startup or hibernation`;let P;P=$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 I;I=$localize`Color theme`;let T;T=$localize`Customize your application theme`;let ee;ee=$localize`Language`;let te;te=$localize`Select a language for the platform`;let ne;ne=$localize`Update channel`;let ie;ie=$localize`Update channel selection is not implemented yet.`;let oe;oe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) ${"\uFFFD#66\uFFFD\uFFFD/#66\uFFFD"}:TAG_INPUT:`;let re;re=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let le;le=$localize` Stable ${"\uFFFD#72\uFFFD\uFFFD/#72\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize`Official releases`;let se;se=$localize` Beta ${"\uFFFD#78\uFFFD\uFFFD/#78\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let ue;ue=$localize` Experimental ${"\uFFFD#84\uFFFD\uFFFD/#84\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize`Specific builds for developers only. Not for use with important data.`;let pe;pe=$localize` Canary ${"\uFFFD#90\uFFFD\uFFFD/#90\uFFFD"}:TAG_INPUT:`;let de;de=$localize`Individual builds for developers only. Not for use with important data.`;let Se;Se=$localize`Usage statistics`;let A;return A=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#99\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#99\uFFFD"}:CLOSE_LINK:${"[\uFFFD#100\uFFFD\uFFFD/#100\uFFFD|\uFFFD#101\uFFFD\uFFFD/#101\uFFFD]"}:LINE_BREAK:${"[\uFFFD#100\uFFFD\uFFFD/#100\uFFFD|\uFFFD#101\uFFFD\uFFFD/#101\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. `,A=fe(A),[e,t,n,r,u,P,I,T,ee,te,ne,ie,oe,re,le,ae,se,_e,ue,ce,pe,de,Se,A,[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["options",""],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[3,"click","value"]]},template:function(t,n){if(t&1&&(p(0,"app-status-bar"),i(1,"form",24),c("submit",function(){return n.submit()}),i(2,"header")(3,"div",25)(4,"h2"),s(5,0),o(),i(6,"p"),s(7,1),o()(),i(8,"button",26),s(9,2),o()(),i(10,"section")(11,"div",27)(12,"h3"),s(13,3),o(),i(14,"p"),f(15),o()(),i(16,"div",28),p(17,"app-remote-control"),o()(),i(18,"section")(19,"div",27)(20,"h3"),s(21,4),o(),i(22,"p"),s(23,5),o()(),i(24,"div",28)(25,"div",29)(26,"spk-select",30),p(27,"input",31),$(28,nt,2,2,"option",32,y),o(),i(30,"spk-select",33),p(31,"input",34),Ee(32,35),$(33,it,2,2,"option",32,y),Ne(),o()()()(),i(35,"section")(36,"div",27)(37,"h3"),s(38,6),o(),i(39,"p"),s(40,7),o()(),i(41,"div",28)(42,"div",36)(43,"img",37),c("click",function(){return n.setLightMode()}),o(),i(44,"img",38),c("click",function(){return n.setDarkMode()}),o()()()(),i(45,"section")(46,"div",27)(47,"h3"),s(48,8),o(),i(49,"p"),s(50,9),o()(),i(51,"div",28)(52,"spk-select",39),c("change",function(u){return n.saveLocale(u)}),i(53,"input",40),x("ngModelChange",function(u){return w(n.langCtrl,u)||(n.langCtrl=u),u}),o(),$(54,ot,2,2,"option",32,y),o()()(),i(56,"section")(57,"div",27)(58,"h3"),s(59,10),o(),i(60,"p"),s(61,11),o()(),i(62,"div",41)(63,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("")}),i(64,"spk-radio",43),O(65,12),p(66,"input",44),R(),o(),i(67,"p"),s(68,13),o()(),i(69,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("stable")}),i(70,"spk-radio",43),O(71,14),p(72,"input",45),R(),o(),i(73,"p"),s(74,15),o()(),i(75,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("beta")}),i(76,"spk-radio",43),O(77,16),p(78,"input",46),R(),o(),i(79,"p"),s(80,17),o()(),i(81,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("experimental")}),i(82,"spk-radio",43),O(83,18),p(84,"input",47),R(),o(),i(85,"p"),s(86,19),o()(),i(87,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("canary")}),i(88,"spk-radio",43),O(89,20),p(90,"input",48),R(),o(),i(91,"p"),s(92,21),o()()()(),i(93,"section")(94,"div",27)(95,"h3"),s(96,22),o(),i(97,"p"),O(98,23),p(99,"a",49)(100,"br")(101,"br"),R(),o()(),i(102,"div",28)(103,"spk-select",50),p(104,"input",51),$(105,rt,2,2,"option",32,y),o()()()()),t&2){let r,u;a(),m("formGroup",n.settingsForm),a(14),b(n.remoteControlStatus()),a(11),m("hideClearButton",!0),a(2),G(n.timeOptions()),a(2),m("displayFn",n.typeDisplay())("hideClearButton",!0),a(3),G(n.timeTypeOptions()),a(10),J("active",!n.isDarkMode()),a(),J("active",n.isDarkMode()),a(8),m("displayFn",n.languageDisplay())("hideClearButton",!0),a(),k("ngModel",n.langCtrl),m("ngModelOptions",Oe(16,tt)),a(),G(n.languageOptions()),a(12),Q((r=n.sysinfo())==null?null:r.DefaultUpdateChannel),Y(65),a(2),Q((u=n.sysinfo())==null?null:u.ServerVersionType),Y(68),a(35),m("displayFn",n.usageDisplay()),a(2),G(n.usageStatisticsOptions())}},dependencies:[j,Pe,be,Ae,V,Ie,B,he,W,De,ye,Ge,$e,Ue,q,Le,we,xe],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}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-level-40)}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{Z as default};
package/index.html CHANGED
@@ -20,5 +20,5 @@
20
20
  <style>:root{--font-size:16px;font-size:var(--font-size)}html body{--sparkle-light:initial;--sparkle-dark: ;color-scheme:light dark;--primary-50:#eff6ff;--primary-rgb-50:239,246,255;--primary-contrast-50:var(--dark-primary-text);--primary-100:#dbeafe;--primary-rgb-100:219,234,254;--primary-contrast-100:var(--dark-primary-text);--primary-200:#bfdbfe;--primary-rgb-200:191,219,254;--primary-contrast-200:var(--dark-primary-text);--primary-300:#93c5fd;--primary-rgb-300:147,197,253;--primary-contrast-300:var(--dark-primary-text);--primary-400:#60a5fa;--primary-rgb-400:96,165,250;--primary-contrast-400:var(--dark-primary-text);--primary-500:#3b82f6;--primary-rgb-500:59,130,246;--primary-contrast-500:var(--light-primary-text);--primary-600:#2563eb;--primary-rgb-600:37,99,235;--primary-contrast-600:var(--light-primary-text);--primary-700:#1d4ed8;--primary-rgb-700:29,78,216;--primary-contrast-700:var(--light-primary-text);--primary-800:#1e40af;--primary-rgb-800:30,64,175;--primary-contrast-800:var(--light-primary-text);--primary-900:#1e3a8a;--primary-rgb-900:30,58,138;--primary-contrast-900:var(--light-primary-text);--primary-950:#172554;--primary-rgb-950:23,37,84;--primary-contrast-950:var(--light-primary-text);--accent-50:#f5f3ff;--accent-rgb-50:245,243,255;--accent-contrast-50:var(--dark-primary-text);--accent-100:#ede9fe;--accent-rgb-100:237,233,254;--accent-contrast-100:var(--dark-primary-text);--accent-200:#ddd6fe;--accent-rgb-200:221,214,254;--accent-contrast-200:var(--dark-primary-text);--accent-300:#c4b5fd;--accent-rgb-300:196,181,253;--accent-contrast-300:var(--dark-primary-text);--accent-400:#a78bfa;--accent-rgb-400:167,139,250;--accent-contrast-400:var(--dark-primary-text);--accent-500:#8b5cf6;--accent-rgb-500:139,92,246;--accent-contrast-500:var(--light-primary-text);--accent-600:#7c3aed;--accent-rgb-600:124,58,237;--accent-contrast-600:var(--light-primary-text);--accent-700:#6d28d9;--accent-rgb-700:109,40,217;--accent-contrast-700:var(--light-primary-text);--accent-800:#5b21b6;--accent-rgb-800:91,33,182;--accent-contrast-800:var(--light-primary-text);--accent-900:#4c1d95;--accent-rgb-900:76,29,149;--accent-contrast-900:var(--light-primary-text);--accent-950:#2e1065;--accent-rgb-950:46,16,101;--accent-contrast-950:var(--light-primary-text);--tertiary-50:#fffbeb;--tertiary-rgb-50:255,251,235;--tertiary-contrast-50:var(--dark-primary-text);--tertiary-100:#fef3c7;--tertiary-rgb-100:254,243,199;--tertiary-contrast-100:var(--dark-primary-text);--tertiary-200:#fde68a;--tertiary-rgb-200:253,230,138;--tertiary-contrast-200:var(--dark-primary-text);--tertiary-300:#fcd34d;--tertiary-rgb-300:252,211,77;--tertiary-contrast-300:var(--dark-primary-text);--tertiary-400:#fbbf24;--tertiary-rgb-400:251,191,36;--tertiary-contrast-400:var(--light-primary-text);--tertiary-500:#f59e0b;--tertiary-rgb-500:245,158,11;--tertiary-contrast-500:var(--light-primary-text);--tertiary-600:#d97706;--tertiary-rgb-600:217,119,6;--tertiary-contrast-600:var(--light-primary-text);--tertiary-700:#b45309;--tertiary-rgb-700:180,83,9;--tertiary-contrast-700:var(--light-primary-text);--tertiary-800:#92400e;--tertiary-rgb-800:146,64,14;--tertiary-contrast-800:var(--light-primary-text);--tertiary-900:#78350f;--tertiary-rgb-900:120,53,15;--tertiary-contrast-900:var(--light-primary-text);--tertiary-950:#451a03;--tertiary-rgb-950:69,26,3;--tertiary-contrast-950:var(--light-primary-text);--grey-50:#fafafa;--grey-rgb-50:250,250,250;--grey-contrast-50:var(--dark-primary-text);--grey-100:#f4f4f5;--grey-rgb-100:244,244,245;--grey-contrast-100:var(--dark-primary-text);--grey-200:#e4e4e7;--grey-rgb-200:228,228,231;--grey-contrast-200:var(--dark-primary-text);--grey-300:#d4d4d8;--grey-rgb-300:212,212,216;--grey-contrast-300:var(--dark-primary-text);--grey-400:#a1a1aa;--grey-rgb-400:161,161,170;--grey-contrast-400:var(--dark-primary-text);--grey-500:#71717a;--grey-rgb-500:113,113,122;--grey-contrast-500:var(--light-primary-text);--grey-600:#52525b;--grey-rgb-600:82,82,91;--grey-contrast-600:var(--light-primary-text);--grey-700:#3f3f46;--grey-rgb-700:63,63,70;--grey-contrast-700:var(--light-primary-text);--grey-750:#2f2f31;--grey-rgb-750:47,47,49;--grey-contrast-750:var(--light-primary-text);--grey-800:#27272a;--grey-rgb-800:39,39,42;--grey-contrast-800:var(--light-primary-text);--grey-900:#18181b;--grey-rgb-900:24,24,27;--grey-contrast-900:var(--light-primary-text);--grey-950:#09090b;--grey-rgb-950:9,9,11;--grey-contrast-950:var(--light-primary-text);--warn-50:#fef2f2;--warn-rgb-50:254,242,242;--warn-contrast-50:var(--dark-primary-text);--warn-100:#fee2e2;--warn-rgb-100:254,226,226;--warn-contrast-100:var(--dark-primary-text);--warn-200:#fecaca;--warn-rgb-200:254,202,202;--warn-contrast-200:var(--dark-primary-text);--warn-300:#fca5a5;--warn-rgb-300:252,165,165;--warn-contrast-300:var(--dark-primary-text);--warn-400:#f87171;--warn-rgb-400:248,113,113;--warn-contrast-400:var(--light-primary-text);--warn-500:#ef4444;--warn-rgb-500:239,68,68;--warn-contrast-500:var(--light-primary-text);--warn-600:#dc2626;--warn-rgb-600:220,38,38;--warn-contrast-600:var(--light-primary-text);--warn-700:#b91c1c;--warn-rgb-700:185,28,28;--warn-contrast-700:var(--light-primary-text);--warn-800:#991b1b;--warn-rgb-800:153,27,27;--warn-contrast-800:var(--light-primary-text);--warn-900:#7f1d1d;--warn-rgb-900:127,29,29;--warn-contrast-900:var(--light-primary-text);--warn-950:#450a0a;--warn-rgb-950:69,10,10;--warn-contrast-950:var(--light-primary-text);--success-50:#ecfdf5;--success-rgb-50:236,253,245;--success-contrast-50:var(--dark-primary-text);--success-100:#d1fae5;--success-rgb-100:209,250,229;--success-contrast-100:var(--dark-primary-text);--success-200:#a7f3d0;--success-rgb-200:167,243,208;--success-contrast-200:var(--dark-primary-text);--success-300:#6ee7b7;--success-rgb-300:110,231,183;--success-contrast-300:var(--dark-primary-text);--success-400:#34d399;--success-rgb-400:52,211,153;--success-contrast-400:var(--light-primary-text);--success-500:#10b981;--success-rgb-500:16,185,129;--success-contrast-500:var(--light-primary-text);--success-600:#059669;--success-rgb-600:5,150,105;--success-contrast-600:var(--light-primary-text);--success-700:#047857;--success-rgb-700:4,120,87;--success-contrast-700:var(--light-primary-text);--success-800:#065f46;--success-rgb-800:6,95,70;--success-contrast-800:var(--light-primary-text);--success-900:#064e3b;--success-rgb-900:6,78,59;--success-contrast-900:var(--light-primary-text);--success-950:#022c22;--success-rgb-950:2,44,34;--success-contrast-950:var(--light-primary-text);--display-10:600 5rem / normal Inter Tight, sans-serif;--display-20:600 4.5rem / normal Inter Tight, sans-serif;--display-30:600 4rem / normal Inter Tight, sans-serif;--display-40:600 3.5rem / normal Inter Tight, sans-serif;--display-50:600 3rem / normal Inter Tight, sans-serif;--title-10:500 2.5rem / normal Inter Tight, sans-serif;--title-20:500 2rem / normal Inter Tight, sans-serif;--title-30:500 1.5rem / normal Inter Tight, sans-serif;--title-10B:600 2.5rem / normal Inter Tight, sans-serif;--title-20B:600 2rem / normal Inter Tight, sans-serif;--title-30B:600 1.5rem / normal Inter Tight, sans-serif;--paragraph-10:500 1.125rem / normal Inter Tight, sans-serif;--paragraph-20:500 1rem / normal Inter Tight, sans-serif;--paragraph-30:500 .875rem / normal Inter Tight, sans-serif;--paragraph-40:500 .75rem / normal Inter Tight, sans-serif;--paragraph-10B:600 1.125rem / normal Inter Tight, sans-serif;--paragraph-20B:600 1rem / normal Inter Tight, sans-serif;--paragraph-30B:600 .875rem / normal Inter Tight, sans-serif;--paragraph-40B:600 .75rem / normal Inter Tight, sans-serif;--shape-1:.25rem;--shape-2:.5rem;--shape-3:.75rem;--shape-4:1rem;--shape-5:1.25rem;--box-shadow-10:0 1px 2px 0 rgba(18, 18, 23, .07);--box-shadow-20:0 1px 3px 0 rgba(18, 18, 23, .1);--box-shadow-30:0 1px 4px -1px rgba(18, 18, 23, .08);--box-shadow-35:0 4px 6px -1px rgba(18, 18, 23, .08);--box-shadow-40:0 10px 15px -3px rgba(18, 18, 23, .08);--box-shadow-50:0 20px 25px -5px rgba(18, 18, 23, .1);--box-shadow-60:0 25px 50px -12px rgba(18, 18, 23, .25);--base-level-10:var(--sparkle-light, #fff) var(--sparkle-dark, var(--grey-950));--base-level-20:var(--sparkle-light, var(--grey-50)) var(--sparkle-dark, var(--grey-900));--base-level-30:var(--sparkle-light, var(--grey-100)) var(--sparkle-dark, var(--grey-900));--base-level-30R:var(--sparkle-light, var(--grey-900)) var(--sparkle-dark, var(--grey-100));--base-level-40:var(--sparkle-light, var(--grey-200)) var(--sparkle-dark, var(--grey-700));--base-level-50:var(--sparkle-light, var(--grey-300)) var(--sparkle-dark, var(--grey-800));--base-level-60:var(--sparkle-light, var(--grey-500)) var(--sparkle-dark, var(--grey-400));--base-level-60R:var(--sparkle-light, var(--grey-400)) var(--sparkle-dark, var(--grey-500));--base-level-70:var(--sparkle-light, var(--grey-900)) var(--sparkle-dark, #fff);--base-level-70R:var(--sparkle-light, #fff) var(--sparkle-dark, var(--grey-900));--base-gradient-20:linear-gradient(180deg, var(--grey-400) 0%, var(--grey-500) 50%);--base-gradient-30:linear-gradient(180deg, var(--grey-300) 0%, var(--grey-500) 50%);--base-gradient-60:linear-gradient(180deg, var(--grey-700) 0%, var(--grey-900) 50%);--base-gradient-70:linear-gradient(180deg, var(--grey-600) 0%, var(--grey-900) 50%);--primary-level-20:var(--sparkle-light, var(--primary-50)) var(--sparkle-dark, var(--primary-950));--primary-level-30:var(--sparkle-light, var(--primary-100)) var(--sparkle-dark, var(--primary-900));--primary-level-40:var(--sparkle-light, var(--primary-200)) var(--sparkle-dark, var(--primary-800));--primary-level-50:var(--sparkle-light, var(--primary-300)) var(--sparkle-dark, var(--primary-800));--primary-level-50R:var(--sparkle-light, var(--primary-800)) var(--sparkle-dark, var(--primary-300));--primary-level-80:var(--sparkle-light, var(--primary-900)) var(--sparkle-dark, var(--primary-300));--primary-gradient-20:linear-gradient(180deg, var(--primary-400) 0%, var(--primary-500) 50%);--primary-gradient-30:linear-gradient(180deg, var(--primary-300) 0%, var(--primary-500) 50%);--accent-level-20:var(--sparkle-light, var(--accent-50)) var(--sparkle-dark, var(--accent-950));--accent-level-30:var(--sparkle-light, var(--accent-100)) var(--sparkle-dark, var(--accent-900));--accent-level-40:var(--sparkle-light, var(--accent-200)) var(--sparkle-dark, var(--accent-800));--accent-level-50:var(--sparkle-light, var(--accent-300)) var(--sparkle-dark, var(--accent-800));--accent-level-50R:var(--sparkle-light, var(--accent-800)) var(--sparkle-dark, var(--accent-300));--accent-level-80:var(--sparkle-light, var(--accent-900)) var(--sparkle-dark, var(--accent-300));--accent-gradient-20:linear-gradient(180deg, var(--accent-400) 0%, var(--accent-500) 50%);--accent-gradient-30:linear-gradient(180deg, var(--accent-300) 0%, var(--accent-500) 50%);--tertiary-level-20:var(--sparkle-light, var(--tertiary-50)) var(--sparkle-dark, var(--tertiary-950));--tertiary-level-30:var(--sparkle-light, var(--tertiary-100)) var(--sparkle-dark, var(--tertiary-900));--tertiary-level-40:var(--sparkle-light, var(--tertiary-200)) var(--sparkle-dark, var(--tertiary-800));--tertiary-level-50:var(--sparkle-light, var(--tertiary-300)) var(--sparkle-dark, var(--tertiary-800));--tertiary-level-50R:var(--sparkle-light, var(--tertiary-800)) var(--sparkle-dark, var(--tertiary-300));--tertiary-level-80:var(--sparkle-light, var(--tertiary-900)) var(--sparkle-dark, var(--tertiary-300));--tertiary-gradient-20:linear-gradient(180deg, var(--tertiary-400) 0%, var(--tertiary-500) 50%);--tertiary-gradient-30:linear-gradient(180deg, var(--tertiary-300) 0%, var(--tertiary-500) 50%);--warn-level-20:var(--sparkle-light, var(--warn-50)) var(--sparkle-dark, var(--warn-950));--warn-level-30:var(--sparkle-light, var(--warn-100)) var(--sparkle-dark, var(--warn-900));--warn-level-40:var(--sparkle-light, var(--warn-200)) var(--sparkle-dark, var(--warn-800));--warn-level-50:var(--sparkle-light, var(--warn-300)) var(--sparkle-dark, var(--warn-800));--warn-level-50R:var(--sparkle-light, var(--warn-800)) var(--sparkle-dark, var(--warn-300));--warn-level-80:var(--sparkle-light, var(--warn-900)) var(--sparkle-dark, var(--warn-300));--warn-gradient-20:linear-gradient(180deg, var(--warn-400) 0%, var(--warn-500) 50%);--warn-gradient-30:linear-gradient(180deg, var(--warn-300) 0%, var(--warn-500) 50%);--success-level-20:var(--sparkle-light, var(--success-50)) var(--sparkle-dark, var(--success-950));--success-level-30:var(--sparkle-light, var(--success-100)) var(--sparkle-dark, var(--success-900));--success-level-40:var(--sparkle-light, var(--success-200)) var(--sparkle-dark, var(--success-800));--success-level-50:var(--sparkle-light, var(--success-300)) var(--sparkle-dark, var(--success-800));--success-level-50R:var(--sparkle-light, var(--success-800)) var(--sparkle-dark, var(--success-300));--success-level-80:var(--sparkle-light, var(--success-900)) var(--sparkle-dark, var(--success-300));--success-gradient-20:linear-gradient(180deg, var(--success-400) 0%, var(--success-500) 50%);--success-gradient-30:linear-gradient(180deg, var(--success-300) 0%, var(--success-500) 50%);--dark-primary-text:var(--grey-900);--light-primary-text:#fff}*{box-sizing:border-box}html,body,app-root{width:100vw;min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--base-level-20)}body{margin:0;font:var(--paragraph-30);color:var(--base-level-70)}</style><link rel="stylesheet" href="styles-DO5TEHSB.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-DO5TEHSB.css"></noscript></head>
21
21
  <body>
22
22
  <app-root></app-root>
23
- <link rel="modulepreload" href="chunk-N35HGIXN.js"><link rel="modulepreload" href="chunk-V7APGUBT.js"><link rel="modulepreload" href="chunk-KFGIVU27.js"><link rel="modulepreload" href="chunk-SSYD4I7W.js"><link rel="modulepreload" href="chunk-6M3MNJ52.js"><link rel="modulepreload" href="chunk-AUUCT7OA.js"><link rel="modulepreload" href="chunk-PIDBEXSZ.js"><link rel="modulepreload" href="chunk-J3H4BCHI.js"><link rel="modulepreload" href="chunk-P6LV5I2K.js"><link rel="modulepreload" href="chunk-5XX7BU4I.js"><script src="polyfills-DUGKNACR.js" type="module"></script><script src="main-QY7RIEAP.js" type="module"></script></body>
23
+ <link rel="modulepreload" href="chunk-N35HGIXN.js"><link rel="modulepreload" href="chunk-V7APGUBT.js"><link rel="modulepreload" href="chunk-KFGIVU27.js"><link rel="modulepreload" href="chunk-SSYD4I7W.js"><link rel="modulepreload" href="chunk-6M3MNJ52.js"><link rel="modulepreload" href="chunk-AUUCT7OA.js"><link rel="modulepreload" href="chunk-PIDBEXSZ.js"><link rel="modulepreload" href="chunk-J3H4BCHI.js"><link rel="modulepreload" href="chunk-P6LV5I2K.js"><link rel="modulepreload" href="chunk-5XX7BU4I.js"><script src="polyfills-DUGKNACR.js" type="module"></script><script src="main-YZOCOTGC.js" type="module"></script></body>
24
24
  </html>
@@ -1 +1 @@
1
- import{b as ie,c as ae}from"./chunk-N35HGIXN.js";import{a as L}from"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import{a as M}from"./chunk-SSYD4I7W.js";import{a as b}from"./chunk-6M3MNJ52.js";import{c as re}from"./chunk-AUUCT7OA.js";import{d as ne}from"./chunk-PIDBEXSZ.js";import{H as Y,L as ee,X as I,ca as te,ma as oe}from"./chunk-J3H4BCHI.js";import{a as Q}from"./chunk-P6LV5I2K.js";import{a as B,b as q,d as _,e as X,f as Z}from"./chunk-5XX7BU4I.js";import{b as se}from"./chunk-OVIL3KMN.js";import{ua as z}from"./chunk-5ZK3D2RS.js";import{Bc as G,Cc as K,E as R,Gb as J,J as W,L as S,Mc as $,N as H,R as y,U,X as r,Za as l,d as j,fb as F,g as P,ja as D,m as E,x as O,y as N}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var d=class o{#o=l(null);#n=window.self!==window.top;config=this.#o.asReadonly();configLoaded=this.#n?new P:null;parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),n=JSON.parse(t);if(!n?.accessToken||!n?.clientId){this.#e("error:invalid-config");return}if(typeof n.clientId!="string"){this.#e("error:invalid-config");return}if(typeof n.accessToken!="string"){this.#e("error:invalid-config");return}console.info("postMessage config set"),this.#o.set(n),this.configLoaded?.next(!0)}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#i(){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||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};var T=class o{#o=r(b);#n=r(Y);#e=r(d);sub=null;ngOnInit(){this.#e.fetchConfig(),this.sub=this.#n.queryParams.subscribe(({accessToken:e,clientId:t})=>{e?.length&&t?.length&&this.#e.setConfig({accessToken:e,clientId:t})}),this.#o.clearAllNotCurrentVersion()}ngOnDestroy(){this.sub?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=F({type:o,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&J(0,"router-outlet")},dependencies:[ee],encapsulation:2})};var pe={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var u=new U("ENVIRONMENT");var v=class o{#o=r(ne);isLoaded=l(!1);webmodules=l(null);preload(e=!1){let t=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),R(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};var fe=()=>{let o=r(d),e=r(D);return o.configLoaded===null?O([e.get(L).preload(!0),e.get(v).preload(!0)]):o.configLoaded?.pipe(S(()=>O([e.get(L).preload(!0),e.get(v).preload(!0)])))},ce=[{path:"",children:[{path:"login",canActivate:[()=>r(M).token()!==null?r(I).navigate(["/"]):!0],loadComponent:()=>import("./chunk-LSBOVSYF.js")},{path:"logout",loadComponent:()=>import("./chunk-7KKPI5E4.js")},{path:"",canActivate:[fe],loadComponent:()=>import("./chunk-DAXEWTI7.js"),children:[{path:"",loadComponent:()=>import("./chunk-DFKPVTYK.js")},{path:"add-backup",loadComponent:()=>import("./chunk-XYNM2UME.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-RDUEFPJ3.js")},{path:"backup/import",loadComponent:()=>import("./chunk-EV37MCYP.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-6SKCAZOP.js"),loadChildren:()=>import("./chunk-JAY2DGID.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-6SKCAZOP.js"),loadChildren:()=>import("./chunk-JAY2DGID.js")},{path:"restore",loadComponent:()=>import("./chunk-M76F7EZP.js")},{path:"restore-flow/:id",loadComponent:()=>import("./chunk-OZQD3PLH.js"),children:[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"select-files",loadComponent:()=>import("./chunk-M4CEGBQO.js")},{path:"options",loadComponent:()=>import("./chunk-IO5IBATB.js")}]},{path:"settings",loadComponent:()=>import("./chunk-BIE2BC6X.js")},{path:"about",loadComponent:()=>import("./chunk-73OFEMRU.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-A27JK2VW.js")},{path:"changelog",loadComponent:()=>import("./chunk-ZI3FISVO.js")},{path:"libraries",loadComponent:()=>import("./chunk-DFT2UYO6.js")},{path:"system-info",loadComponent:()=>import("./chunk-443IB2NN.js")},{path:"logs",loadComponent:()=>import("./chunk-4VPUEZIU.js")}]}]}]}];var A=null,le=(o,e)=>{let t=r(M),n=r(I),c=r(b),i=r(u),f=r(re),s=c.getItem("locale"),p=ie(s),h=o;if(t.token()&&o.url.startsWith(i.baseUrl)){let a=o.headers.set("Authorization",`Bearer ${t.token()}`);s&&s!=="en-US"&&(a=a.set("X-Ui-Language",p)),h=o.clone({headers:a})}return e(h).pipe(N(a=>{if(f.error(a.message),a.status===401&&!A&&(A=t.refreshToken().pipe(W())),a.status===401)return A.pipe(S(()=>e(o.clone({headers:o.headers.set("Authorization",`Bearer ${t.token()}`)}))),N(g=>(n.navigate(["/logout"]),E(()=>g))),R(()=>A=null));let m=`Error Code: ${a.status}, Message: ${a.message}`;return E(()=>({error:a,message:m}))}))};var he="1.0.0",me="portal-proxy-client",ge=1,k=class o{#o=1e3;#n=r(u);#e=l("disconnected");#i=l(this.#o);#a=l(!1);#r=l(!1);#p=l(null);isConnectedToMachineServer=this.#r.asReadonly();wsState=this.#e.asReadonly();#c=[];#s={};#t=null;#m=new TextDecoder("utf-8");#l=null;#d=$(()=>{let e=this.#a(),t=this.#i(),n=this.#p();if(!n||!e||!t||t<this.#o){this.#l&&window.clearInterval(this.#l);return}this.#l=window.setInterval(()=>{this.connectToMachineServer(n)},t)});utf8Atob(e){let t=Uint8Array.from(atob(e),c=>c.charCodeAt(0)),n=this.#m.decode(t);return n?JSON.parse(n):null}connectToMachineServer(e,t){let n=t?.reconnect??!1;this.#t&&this.wsState()==="authenticated"&&!n||(this.#t&&this.wsState()!=="authenticated"&&this.#t.close(),this.#t=new WebSocket(this.#n.machineServerUrl),this.#t.onopen=()=>{this.#e.set("connect"),this.#r.set(!0),this.#a.set(!1),this.#p.set(null)},this.#t.onclose=()=>{this.#e.set("disconnected"),this.#r.set(!1),this.#p.set(e),this.#a.set(!0)},this.#t.onerror=()=>{this.#e.set("error")},this.#t.onmessage=c=>{let i=JSON.parse(c.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let s={token:e,publicKey:"",clientVersion:he,protocolVersion:ge},p=this.createResponse(i,"authportal",s);this.#e.set("welcome"),this.#t?.send(p)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var f=JSON.parse(i.payload??"");if(f.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#e.set("authenticated"),this.#r.set(!0);this.#c.length>0;){let s=this.#c.pop();s&&this.#s[s.messageId]&&this.activateCommand(s)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let s=this.#s[i.messageId];if(s){if(i.errorMessage){s.reject(i.errorMessage);return}else{let p=JSON.parse(i.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),s.resolve(p)}delete this.#s[i.messageId],window.clearTimeout(s.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#t?.close(),this.#t=null,this.#e.set("disconnected"),this.#r.set(!1)}createResponse(e,t,n){let c={from:me,to:e.from,type:t,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(c)}sendCommand(e,t,n,c,i,f,s=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((p,h)=>{let a=crypto.randomUUID(),g={from:me,to:t,type:"command",messageId:a,payload:JSON.stringify({method:n,path:c,body:i,headers:f})},C={resolve:p,reject:h,timer:window.setTimeout(()=>{let w=this.#s[a];w&&(delete this.#s[a],w.reject("Timeout"))},s)};this.#s[a]=C,this.#r()?this.activateCommand(g):this.#c.push(g)})}activateCommand(e){this.#t?.send(JSON.stringify(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};function ye(o){if(typeof o!="string")return null;let t=new TextEncoder().encode(o);return window.btoa(String.fromCharCode(...t))}var de=(o,e)=>{let n=r(d).config(),c=r(u);if(n===null)return e(o);let i=r(k),f=ye(o.body),s={};o.headers.keys().forEach(m=>{s[m]=o.headers.get(m)??""});let p=o.headers.get("timeout"),h=p!==null?parseInt(p):c.defaultTimeout,a=i.sendCommand(n.accessToken,n.clientId,o.method,o.url,f,s,h);return new j(m=>{a.then(g=>{let C=new B;s!=null&&Object.keys(s).forEach(V=>{C.set(V,s[V])});let w=new q({body:g.body,status:g.code,statusText:"OK",headers:C});m.next(w),m.complete()})})};var ue={providers:[G(),te(ce,oe()),_(Z(),X([de,le])),b,{provide:u,useValue:pe},{provide:K,useValue:ae()},se,z]};Q(T,ue);
1
+ import{b as ie,c as ae}from"./chunk-N35HGIXN.js";import{a as L}from"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import{a as M}from"./chunk-SSYD4I7W.js";import{a as b}from"./chunk-6M3MNJ52.js";import{c as re}from"./chunk-AUUCT7OA.js";import{d as ne}from"./chunk-PIDBEXSZ.js";import{H as Y,L as ee,X as I,ca as te,ma as oe}from"./chunk-J3H4BCHI.js";import{a as Q}from"./chunk-P6LV5I2K.js";import{a as B,b as q,d as _,e as X,f as Z}from"./chunk-5XX7BU4I.js";import{b as se}from"./chunk-OVIL3KMN.js";import{ua as z}from"./chunk-5ZK3D2RS.js";import{Bc as G,Cc as K,E as R,Gb as J,J as W,L as S,Mc as $,N as H,R as y,U,X as r,Za as l,d as j,fb as F,g as P,ja as D,m as E,x as O,y as N}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var d=class o{#o=l(null);#n=window.self!==window.top;config=this.#o.asReadonly();configLoaded=this.#n?new P:null;parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),n=JSON.parse(t);if(!n?.accessToken||!n?.clientId){this.#e("error:invalid-config");return}if(typeof n.clientId!="string"){this.#e("error:invalid-config");return}if(typeof n.accessToken!="string"){this.#e("error:invalid-config");return}console.info("postMessage config set"),this.#o.set(n),this.configLoaded?.next(!0)}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#i(){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||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};var T=class o{#o=r(b);#n=r(Y);#e=r(d);sub=null;ngOnInit(){this.#e.fetchConfig(),this.sub=this.#n.queryParams.subscribe(({accessToken:e,clientId:t})=>{e?.length&&t?.length&&this.#e.setConfig({accessToken:e,clientId:t})}),this.#o.clearAllNotCurrentVersion()}ngOnDestroy(){this.sub?.unsubscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=F({type:o,selectors:[["app-root"]],decls:1,vars:0,template:function(t,n){t&1&&J(0,"router-outlet")},dependencies:[ee],encapsulation:2})};var pe={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var u=new U("ENVIRONMENT");var v=class o{#o=r(ne);isLoaded=l(!1);webmodules=l(null);preload(e=!1){let t=this.#o.getApiV1Webmodules().pipe(H(n=>this.webmodules.set(n)),R(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};var fe=()=>{let o=r(d),e=r(D);return o.configLoaded===null?O([e.get(L).preload(!0),e.get(v).preload(!0)]):o.configLoaded?.pipe(S(()=>O([e.get(L).preload(!0),e.get(v).preload(!0)])))},ce=[{path:"",children:[{path:"login",canActivate:[()=>r(M).token()!==null?r(I).navigate(["/"]):!0],loadComponent:()=>import("./chunk-LSBOVSYF.js")},{path:"logout",loadComponent:()=>import("./chunk-7KKPI5E4.js")},{path:"",canActivate:[fe],loadComponent:()=>import("./chunk-DAXEWTI7.js"),children:[{path:"",loadComponent:()=>import("./chunk-DFKPVTYK.js")},{path:"add-backup",loadComponent:()=>import("./chunk-XYNM2UME.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-RDUEFPJ3.js")},{path:"backup/import",loadComponent:()=>import("./chunk-EV37MCYP.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-6SKCAZOP.js"),loadChildren:()=>import("./chunk-JAY2DGID.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-6SKCAZOP.js"),loadChildren:()=>import("./chunk-JAY2DGID.js")},{path:"restore",loadComponent:()=>import("./chunk-M76F7EZP.js")},{path:"restore-flow/:id",loadComponent:()=>import("./chunk-OZQD3PLH.js"),children:[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"select-files",loadComponent:()=>import("./chunk-M4CEGBQO.js")},{path:"options",loadComponent:()=>import("./chunk-IO5IBATB.js")}]},{path:"settings",loadComponent:()=>import("./chunk-JY2MTE7P.js")},{path:"about",loadComponent:()=>import("./chunk-73OFEMRU.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-A27JK2VW.js")},{path:"changelog",loadComponent:()=>import("./chunk-ZI3FISVO.js")},{path:"libraries",loadComponent:()=>import("./chunk-DFT2UYO6.js")},{path:"system-info",loadComponent:()=>import("./chunk-443IB2NN.js")},{path:"logs",loadComponent:()=>import("./chunk-4VPUEZIU.js")}]}]}]}];var A=null,le=(o,e)=>{let t=r(M),n=r(I),c=r(b),i=r(u),f=r(re),s=c.getItem("locale"),p=ie(s),h=o;if(t.token()&&o.url.startsWith(i.baseUrl)){let a=o.headers.set("Authorization",`Bearer ${t.token()}`);s&&s!=="en-US"&&(a=a.set("X-Ui-Language",p)),h=o.clone({headers:a})}return e(h).pipe(N(a=>{if(f.error(a.message),a.status===401&&!A&&(A=t.refreshToken().pipe(W())),a.status===401)return A.pipe(S(()=>e(o.clone({headers:o.headers.set("Authorization",`Bearer ${t.token()}`)}))),N(g=>(n.navigate(["/logout"]),E(()=>g))),R(()=>A=null));let m=`Error Code: ${a.status}, Message: ${a.message}`;return E(()=>({error:a,message:m}))}))};var he="1.0.0",me="portal-proxy-client",ge=1,k=class o{#o=1e3;#n=r(u);#e=l("disconnected");#i=l(this.#o);#a=l(!1);#r=l(!1);#p=l(null);isConnectedToMachineServer=this.#r.asReadonly();wsState=this.#e.asReadonly();#c=[];#s={};#t=null;#m=new TextDecoder("utf-8");#l=null;#d=$(()=>{let e=this.#a(),t=this.#i(),n=this.#p();if(!n||!e||!t||t<this.#o){this.#l&&window.clearInterval(this.#l);return}this.#l=window.setInterval(()=>{this.connectToMachineServer(n)},t)});utf8Atob(e){let t=Uint8Array.from(atob(e),c=>c.charCodeAt(0)),n=this.#m.decode(t);return n?JSON.parse(n):null}connectToMachineServer(e,t){let n=t?.reconnect??!1;this.#t&&this.wsState()==="authenticated"&&!n||(this.#t&&this.wsState()!=="authenticated"&&this.#t.close(),this.#t=new WebSocket(this.#n.machineServerUrl),this.#t.onopen=()=>{this.#e.set("connect"),this.#r.set(!0),this.#a.set(!1),this.#p.set(null)},this.#t.onclose=()=>{this.#e.set("disconnected"),this.#r.set(!1),this.#p.set(e),this.#a.set(!0)},this.#t.onerror=()=>{this.#e.set("error")},this.#t.onmessage=c=>{let i=JSON.parse(c.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let s={token:e,publicKey:"",clientVersion:he,protocolVersion:ge},p=this.createResponse(i,"authportal",s);this.#e.set("welcome"),this.#t?.send(p)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var f=JSON.parse(i.payload??"");if(f.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#e.set("authenticated"),this.#r.set(!0);this.#c.length>0;){let s=this.#c.pop();s&&this.#s[s.messageId]&&this.activateCommand(s)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let s=this.#s[i.messageId];if(s){if(i.errorMessage){s.reject(i.errorMessage);return}else{let p=JSON.parse(i.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),s.resolve(p)}delete this.#s[i.messageId],window.clearTimeout(s.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#t?.close(),this.#t=null,this.#e.set("disconnected"),this.#r.set(!1)}createResponse(e,t,n){let c={from:me,to:e.from,type:t,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(c)}sendCommand(e,t,n,c,i,f,s=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((p,h)=>{let a=crypto.randomUUID(),g={from:me,to:t,type:"command",messageId:a,payload:JSON.stringify({method:n,path:c,body:i,headers:f})},C={resolve:p,reject:h,timer:window.setTimeout(()=>{let w=this.#s[a];w&&(delete this.#s[a],w.reject("Timeout"))},s)};this.#s[a]=C,this.#r()?this.activateCommand(g):this.#c.push(g)})}activateCommand(e){this.#t?.send(JSON.stringify(e))}static \u0275fac=function(t){return new(t||o)};static \u0275prov=y({token:o,factory:o.\u0275fac,providedIn:"root"})};function ye(o){if(typeof o!="string")return null;let t=new TextEncoder().encode(o);return window.btoa(String.fromCharCode(...t))}var de=(o,e)=>{let n=r(d).config(),c=r(u);if(n===null)return e(o);let i=r(k),f=ye(o.body),s={};o.headers.keys().forEach(m=>{s[m]=o.headers.get(m)??""});let p=o.headers.get("timeout"),h=p!==null?parseInt(p):c.defaultTimeout,a=i.sendCommand(n.accessToken,n.clientId,o.method,o.url,f,s,h);return new j(m=>{a.then(g=>{let C=new B;s!=null&&Object.keys(s).forEach(V=>{C.set(V,s[V])});let w=new q({body:g.body,status:g.code,statusText:"OK",headers:C});m.next(w),m.complete()})})};var ue={providers:[G(),te(ce,oe()),_(Z(),X([de,le])),b,{provide:u,useValue:pe},{provide:K,useValue:ae()},se,z]};Q(T,ue);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.36",
2
+ "version": "0.0.37",
3
3
  "name": "@duplicati/ngclient",
4
4
  "license": "MIT",
5
5
  "contributors": [
package/chunk-BIE2BC6X.js DELETED
@@ -1 +0,0 @@
1
- import{a as Ke}from"./chunk-K7H3KYW7.js";import{a as We}from"./chunk-TW4633HQ.js";import{a as A}from"./chunk-N35HGIXN.js";import{a as Pe}from"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import{a as Be}from"./chunk-DGBBEZNN.js";import"./chunk-QZCTOSPE.js";import{b as he,d as Re,e as Ge,g as ye,h as Oe,j as $e,l as Ae,m as be,o as ve,p as De,q as ke,r as Le,s as xe,t as we}from"./chunk-7SJHYZC5.js";import{a as Me}from"./chunk-6M3MNJ52.js";import{g as Xe,k as Ue,o as ze,q as Ve}from"./chunk-AUUCT7OA.js";import{a as Ie}from"./chunk-PIDBEXSZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as g,Bb as P,Cb as h,Db as R,Eb as i,Fb as o,Gb as p,Hb as de,Ib as ce,K as y,Kb as M,Kc as fe,Mc as Fe,Oa as Se,Qb as E,Ra as s,Rb as N,Sb as _,Tb as D,Ub as k,Vb as ge,Wb as u,X as I,Xb as c,Za as C,_b as me,c as _e,ea as m,fa as T,fb as pe,ic as f,jc as O,kc as $,lb as b,mc as Te,nc as Ce,oc as Ee,p as ue,rc as Ne,vb as d,xb as v}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var He=()=>({standalone:!0});function Je(l,e){if(l&1){let t=M();i(0,"spk-form-field",63),p(1,"input",64),o(),i(2,"button",65),u("click",function(){m(t);let r=c(2);return T(r.beginRemoteRegistration())}),_(3,24),o()}}function Qe(l,e){if(l&1&&(i(0,"div",61)(1,"label"),_(2,25),o(),i(3,"a",66),f(4),o()()),l&2){let t=c(2);s(3),me("href",t.remoteControlClaimUrl(),Se),s(),O(t.remoteControlClaimUrl())}}function Ye(l,e){l&1&&(i(0,"div",61)(1,"label"),_(2,26),o()())}function Ze(l,e){if(l&1){let t=M();i(0,"button",65),u("click",function(){m(t);let r=c(2);return T(r.cancelRemoteRegistration())}),_(1,27),o()}}function et(l,e){if(l&1){let t=M();i(0,"button",65),u("click",function(){m(t);let r=c(2);return T(r.disableRemoteControl())}),_(1,28),o()}}function tt(l,e){if(l&1){let t=M();i(0,"button",65),u("click",function(){m(t);let r=c(2);return T(r.enableRemoteControl())}),_(1,29),o(),i(2,"button",67),u("click",function(){m(t);let r=c(2);return T(r.deleteRemoteControl())}),_(3,30),o()}}function nt(l,e){if(l&1&&(i(0,"div",36),b(1,Je,4,0)(2,Qe,5,2,"div",61)(3,Ye,3,0,"div",61)(4,Ze,2,0,"button",62)(5,et,2,0,"button",62)(6,tt,4,0),o()),l&2){let t=c();s(),g(t.remoteControlState()==="inactive"?1:-1),s(),g(t.remoteControlState()==="registered"?2:-1),s(),g(t.remoteControlState()==="registering"?3:-1),s(),g(t.remoteControlState()==="registering"||t.remoteControlState()==="registeringfaulted"||t.remoteControlState()==="registered"?4:-1),s(),g(t.remoteControlState()==="connected"||t.remoteControlState()==="enabled"?5:-1),s(),g(t.remoteControlState()==="disabled"?6:-1)}}function it(l,e){if(l&1&&(i(0,"option",41),f(1),o()),l&2){let t=e.$implicit;d("value",t),s(),O(t)}}function ot(l,e){if(l&1){let t=M();i(0,"option",68),u("click",function(){let r=m(t).$implicit,S=c();return T(S.pauseSettings.controls.timeType.setValue(r.value))}),f(1),o()}if(l&2){let t=e.$implicit;d("value",t.value),s(),$(" ",t.label," ")}}function rt(l,e){if(l&1&&(i(0,"option",41),f(1),o()),l&2){let t=e.$implicit;d("value",t.value),s(),$(" ",t.label," ")}}function lt(l,e){if(l&1&&(i(0,"option",41),f(1),o()),l&2){let t=e.$implicit;d("value",t.value),s(),$(" ",t.label," ")}}var F=new Le,qe=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],je=[{value:"",label:$localize`System default (information)`},{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:"none",label:$localize`None / disabled`}],L=class l{#i=I(Be);#r=I(Pe);#e=I(Ie);#o=I(Me);#l=this.#o.getItem("locale")??"en-US";sysinfo=this.#r.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=C("list");langCtrl=C(this.#l);settingsForm=F.group({pauseSettings:F.group({time:F.control(0),timeType:F.control("s")}),usageStatistics:F.control(""),updateChannel:F.control(""),remoteControlRegisterUrl:F.control("")});remoteControlState=C("unknown");remoteControlClaimUrl=C(null);sysInfoEffect=Fe(()=>{this.settingsForm.controls.remoteControlRegisterUrl.patchValue(this.sysinfo()?.RemoteControlRegistrationUrl??"")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}timeTypeOptions=C(qe);timeOptions=Ke([this.pauseSettings.controls.timeType.valueChanges.pipe(y("s")),this.pauseSettings.controls.time.valueChanges.pipe(y(null))],_e(ue(([e,t])=>{let n=this.#a(e);return t!==null?n.filter(r=>r.toString().includes(t.toString())):n}),y([])));languageOptions=fe(()=>{let e=this.langCtrl();return e?A.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):A});usageStatisticsOptions=C(je);ngOnInit(){this.refreshRemoteControlStatus(),this.getServerSettings()}saveLocale(e){this.#o.setItem("locale",e),window.location.reload()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#e.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#e.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],n=t.slice(-1),r=t.slice(0,-1),S=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:S.includes(n)?n:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(){let e=this;return()=>{let t=e.langCtrl();return t?A.find(n=>n.value===t)?.label??null:null}}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:qe.find(n=>n.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:je.find(n=>n.value===t)?.label??null}}setDarkMode(){this.#i.setDarkMode()}setLightMode(){this.#i.setLightMode()}#a(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((n,r)=>r)}repeatRegisterTimer=null;#t(e){e.RegistrationUrl&&this.remoteControlClaimUrl.set(e.RegistrationUrl),e.IsConnected?this.remoteControlState.set("connected"):e.IsEnabled?this.remoteControlState.set("enabled"):e.CanEnable?this.remoteControlState.set("disabled"):e.IsRegisteringFaulted?this.remoteControlState.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.remoteControlState.set("registered"):this.remoteControlState.set("registering"):this.remoteControlState.set("inactive");let t=this.remoteControlState();console.log("currentRemoteControlState: ",t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>{this.#t(n)},error:n=>{this.#n(n)}})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>{this.#t(n)},error:n=>{this.#n(n)}})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>{this.#t(n)}})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}beginRemoteRegistration(){this.remoteControlState.set("registering");let e=this.settingsForm.controls.remoteControlRegisterUrl.value;this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e}}).subscribe({next:t=>{this.#t(t)},error:t=>{this.#n(t)}})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>{e.#t(t)},error:t=>{e.#n(t)}})}getRemoteControlStatusText(){let e=this.remoteControlState();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=pe({type:l,selectors:[["app-settings"]],decls:107,vars:18,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Save changes`;let r;r=$localize`Remote access control`;let S;S=$localize`Pause after startup or hibernation`;let x;x=$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 w;w=$localize`Color theme`;let X;X=$localize`Customize your application theme`;let U;U=$localize`Language`;let z;z=$localize`Select a language for the platform`;let V;V=$localize`Update channel`;let B;B=$localize`Update channel selection is not implemented yet.`;let W;W=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) ${"\uFFFD#66\uFFFD\uFFFD/#66\uFFFD"}:TAG_INPUT:`;let K;K=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let q;q=$localize` Stable ${"\uFFFD#72\uFFFD\uFFFD/#72\uFFFD"}:TAG_INPUT:`;let j;j=$localize`Official releases`;let H;H=$localize` Beta ${"\uFFFD#78\uFFFD\uFFFD/#78\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Q;Q=$localize` Experimental ${"\uFFFD#84\uFFFD\uFFFD/#84\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize`Specific builds for developers only. Not for use with important data.`;let Z;Z=$localize` Canary ${"\uFFFD#90\uFFFD\uFFFD/#90\uFFFD"}:TAG_INPUT:`;let ee;ee=$localize`Individual builds for developers only. Not for use with important data.`;let te;te=$localize`Usage statistics`;let G;G=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#99\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#99\uFFFD"}:CLOSE_LINK:${"[\uFFFD#100\uFFFD\uFFFD/#100\uFFFD|\uFFFD#101\uFFFD\uFFFD/#101\uFFFD]"}:LINE_BREAK:${"[\uFFFD#100\uFFFD\uFFFD/#100\uFFFD|\uFFFD#101\uFFFD\uFFFD/#101\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. `,G=ge(G);let ne;ne=$localize` Register for remote control `;let ie;ie=$localize`Machine is now registered, open this link to add it to your account:`;let oe;oe=$localize`Registering, please wait...`;let re;re=$localize` Cancel registration `;let le;le=$localize` Disable remote control `;let ae;ae=$localize` Enable remote control `;let se;return se=$localize` Delete remote control setup `,[e,t,n,r,S,x,w,X,U,z,V,B,W,K,q,j,H,J,Q,Y,Z,ee,te,G,ne,ie,oe,re,le,ae,se,[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right","remote-control"],[1,"field-row"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["options",""],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl","formControlName","remoteControlRegisterUrl"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"],[3,"click","value"]]},template:function(t,n){if(t&1&&(p(0,"app-status-bar"),i(1,"form",31),u("submit",function(){return n.submit()}),i(2,"header")(3,"div",32)(4,"h2"),_(5,0),o(),i(6,"p"),_(7,1),o()(),i(8,"button",33),_(9,2),o()(),i(10,"section")(11,"div",34)(12,"h3"),_(13,3),o(),i(14,"p"),f(15),o()(),i(16,"div",35),b(17,nt,7,6,"div",36),o()(),i(18,"section")(19,"div",34)(20,"h3"),_(21,4),o(),i(22,"p"),_(23,5),o()(),i(24,"div",37)(25,"div",38)(26,"spk-select",39),p(27,"input",40),h(28,it,2,2,"option",41,P),o(),i(30,"spk-select",42),p(31,"input",43),de(32,44),h(33,ot,2,2,"option",41,P),ce(),o()()()(),i(35,"section")(36,"div",34)(37,"h3"),_(38,6),o(),i(39,"p"),_(40,7),o()(),i(41,"div",37)(42,"div",45)(43,"img",46),u("click",function(){return n.setLightMode()}),o(),i(44,"img",47),u("click",function(){return n.setDarkMode()}),o()()()(),i(45,"section")(46,"div",34)(47,"h3"),_(48,8),o(),i(49,"p"),_(50,9),o()(),i(51,"div",37)(52,"spk-select",48),u("change",function(S){return n.saveLocale(S)}),i(53,"input",49),Ee("ngModelChange",function(S){return Ce(n.langCtrl,S)||(n.langCtrl=S),S}),o(),h(54,rt,2,2,"option",41,P),o()()(),i(56,"section")(57,"div",34)(58,"h3"),_(59,10),o(),i(60,"p"),_(61,11),o()(),i(62,"div",50)(63,"div",51),u("click",function(){return n.settingsForm.controls.updateChannel.setValue("")}),i(64,"spk-radio",52),E(65,12),p(66,"input",53),N(),o(),i(67,"p"),_(68,13),o()(),i(69,"div",51),u("click",function(){return n.settingsForm.controls.updateChannel.setValue("stable")}),i(70,"spk-radio",52),E(71,14),p(72,"input",54),N(),o(),i(73,"p"),_(74,15),o()(),i(75,"div",51),u("click",function(){return n.settingsForm.controls.updateChannel.setValue("beta")}),i(76,"spk-radio",52),E(77,16),p(78,"input",55),N(),o(),i(79,"p"),_(80,17),o()(),i(81,"div",51),u("click",function(){return n.settingsForm.controls.updateChannel.setValue("experimental")}),i(82,"spk-radio",52),E(83,18),p(84,"input",56),N(),o(),i(85,"p"),_(86,19),o()(),i(87,"div",51),u("click",function(){return n.settingsForm.controls.updateChannel.setValue("canary")}),i(88,"spk-radio",52),E(89,20),p(90,"input",57),N(),o(),i(91,"p"),_(92,21),o()()()(),i(93,"section")(94,"div",34)(95,"h3"),_(96,22),o(),i(97,"p"),E(98,23),p(99,"a",58)(100,"br")(101,"br"),N(),o()(),i(102,"div",37)(103,"spk-select",59),p(104,"input",60),h(105,lt,2,2,"option",41,P),o()()()()),t&2){let r,S;s(),d("formGroup",n.settingsForm),s(14),O(n.getRemoteControlStatusText()),s(2),g(n.remoteControlState()!=="unknown"?17:-1),s(9),d("hideClearButton",!0),s(2),R(n.timeOptions()),s(2),d("displayFn",n.typeDisplay())("hideClearButton",!0),s(3),R(n.timeTypeOptions()),s(10),v("active",!n.isDarkMode()),s(),v("active",n.isDarkMode()),s(8),d("displayFn",n.languageDisplay())("hideClearButton",!0),s(),Te("ngModel",n.langCtrl),d("ngModelOptions",Ne(17,He)),s(),R(n.languageOptions()),s(12),D((r=n.sysinfo())==null?null:r.DefaultUpdateChannel),k(65),s(2),D((S=n.sysinfo())==null?null:S.ServerVersionType),k(68),s(35),d("displayFn",n.usageDisplay()),s(2),R(n.usageStatisticsOptions())}},dependencies:[xe,Oe,De,ke,he,$e,Re,Ge,ye,we,Ae,ve,be,We,Xe,ze,Ue,Ve],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}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-level-40)}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.remote-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0})};export{L as default};