@duplicati/ngclient 0.0.111 → 0.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-HPGYPP74.js → chunk-2JKJCHMV.js} +1 -1
- package/{chunk-SKJ6XSV3.js → chunk-2LP4DYGQ.js} +1 -1
- package/chunk-2N2WJIUS.js +1 -0
- package/{chunk-MHHVE6AV.js → chunk-3AU26GAL.js} +1 -1
- package/{chunk-P5SS3OV3.js → chunk-6JLZLD5D.js} +1 -1
- package/{chunk-65OCE2TY.js → chunk-6OAGVTHV.js} +1 -1
- package/{chunk-TJS6O6KD.js → chunk-7JUYF3HW.js} +1 -1
- package/{chunk-RQSBT3TK.js → chunk-7NFVFBIE.js} +1 -1
- package/{chunk-7S5SYCMV.js → chunk-7ROGJAJZ.js} +1 -1
- package/{chunk-HLHNKLWF.js → chunk-7RTXH4CB.js} +1 -1
- package/{chunk-QKA2VJWD.js → chunk-AX5RFEOL.js} +1 -1
- package/chunk-BVTZNGGE.js +1 -0
- package/{chunk-4RGZG24K.js → chunk-CD3DB23J.js} +1 -1
- package/{chunk-IIB7YCLW.js → chunk-CIGZ6WGG.js} +1 -1
- package/chunk-DDIVZTRS.js +1 -0
- package/chunk-DMDYUREZ.js +8 -0
- package/{chunk-DDM4R5FN.js → chunk-DMZ5CRRQ.js} +1 -1
- package/{chunk-T33TACR6.js → chunk-EP7S6KOG.js} +1 -1
- package/{chunk-CHRKPWRG.js → chunk-F4EEOSGJ.js} +1 -1
- package/{chunk-URU2SLPX.js → chunk-GJROCOAD.js} +1 -1
- package/{chunk-BOBAN442.js → chunk-H632X43F.js} +1 -1
- package/chunk-IDOYGPGZ.js +1 -0
- package/{chunk-YJNKW5ES.js → chunk-IPRTKJDE.js} +1 -1
- package/chunk-J7PTPA7J.js +1 -0
- package/chunk-JP7GZSDH.js +1 -0
- package/{chunk-3M3M4YXP.js → chunk-JPF4Y3PP.js} +1 -1
- package/{chunk-4AECHE4W.js → chunk-JSGFZ2GA.js} +1 -1
- package/{chunk-QP4QZQOW.js → chunk-KHC3VCF4.js} +1 -1
- package/{chunk-2ZVLF3KW.js → chunk-KIUU6RPZ.js} +1 -1
- package/{chunk-NP4VUDPK.js → chunk-KXLXF2JD.js} +1 -1
- package/{chunk-45RYC5NZ.js → chunk-N5ASXZEE.js} +1 -1
- package/{chunk-Z4MV4ZSL.js → chunk-NHQOHNI2.js} +1 -1
- package/{chunk-6OKAWH4X.js → chunk-NQNRR7VE.js} +1 -1
- package/{chunk-WEQQEKIH.js → chunk-OHQK4UOI.js} +1 -1
- package/{chunk-YJSWEW6C.js → chunk-ORDORLQT.js} +1 -1
- package/{chunk-GDHVQU56.js → chunk-OTLEEXAA.js} +1 -1
- package/chunk-OWDXYX4N.js +1 -0
- package/{chunk-2MCIQSK2.js → chunk-PQVEQNEN.js} +1 -1
- package/{chunk-XTWVXTYP.js → chunk-Q6GENX6C.js} +1 -1
- package/{chunk-XJAEXNPS.js → chunk-RRBU7RBN.js} +1 -1
- package/{chunk-WQLN5T4T.js → chunk-RTXTOPSU.js} +1 -1
- package/{chunk-KEAH5JAH.js → chunk-SQQMYNOF.js} +1 -1
- package/{chunk-25ZZFR2F.js → chunk-T5X5KX6A.js} +1 -1
- package/{chunk-LQ5ORNDI.js → chunk-THDYLLMU.js} +1 -1
- package/{chunk-PFE36372.js → chunk-TK4BPZWA.js} +1 -1
- package/{chunk-PN73DZ2H.js → chunk-TMD3MDHS.js} +1 -1
- package/{chunk-ZMDK6XIQ.js → chunk-TSIPKXNX.js} +1 -1
- package/{chunk-JIPJYOH5.js → chunk-VINJGSIH.js} +1 -1
- package/{chunk-CR4OKZPA.js → chunk-VZBHJ6AU.js} +1 -1
- package/chunk-WLIE4IB5.js +1 -0
- package/chunk-XL2NKFYE.js +1 -0
- package/{chunk-2KUDLHPP.js → chunk-YDR42CNA.js} +1 -1
- package/chunk-ZXWA7BUQ.js +1 -0
- package/{chunk-UMP4YQXB.js → chunk-ZYGT7OII.js} +1 -1
- package/index.html +1 -1
- package/{main-S6Q4T2BU.js → main-3OUIM37D.js} +1 -1
- package/package.json +1 -1
- package/chunk-3KSBRC3X.js +0 -1
- package/chunk-AADIFDNE.js +0 -1
- package/chunk-D3I33UIQ.js +0 -1
- package/chunk-JD54W4UA.js +0 -8
- package/chunk-LZUCVLMF.js +0 -1
- package/chunk-QJILVQSS.js +0 -1
- package/chunk-VLIGMNJX.js +0 -1
- package/chunk-W577IVOD.js +0 -1
- package/chunk-X4SAPDOB.js +0 -1
- package/chunk-X5YRWKCW.js +0 -1
- package/chunk-YD7PS7OS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-7JUYF3HW.js";import"./chunk-KIUU6RPZ.js";import"./chunk-NQNRR7VE.js";import"./chunk-OTLEEXAA.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-F4EEOSGJ.js";import"./chunk-I3C2AEHI.js";import{e as S}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{a as T,g as M,h as f}from"./chunk-WX7L7V6J.js";import"./chunk-JSGFZ2GA.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Gb as s,Hb as l,Ib as i,Qa as c,ab as D,lc as d,nb as r,wb as e,xb as n,yb as _}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-TMD3MDHS.js")},{path:"destination",loadComponent:()=>import("./chunk-2JKJCHMV.js")},{path:"source-data",loadComponent:()=>import("./chunk-6JLZLD5D.js")},{path:"schedule",loadComponent:()=>import("./chunk-3AU26GAL.js")},{path:"options",loadComponent:()=>import("./chunk-THDYLLMU.js")}];export{o as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w,w as B}from"./chunk-WX7L7V6J.js";import{h as y}from"./chunk-
|
|
1
|
+
import{a as w,w as B}from"./chunk-WX7L7V6J.js";import{h as y}from"./chunk-JSGFZ2GA.js";import{j as $}from"./chunk-CKPICCFH.js";import{$b as s,Cb as b,F as C,Ib as p,Mb as h,Nb as c,Qa as r,Y as T,ab as M,ac as g,da as E,ea as L,ec as D,fb as f,fc as N,gc as k,nb as P,ob as R,pb as G,pc as v,rc as A,sb as x,tb as S,ua as d,ub as m,vb as O,wb as o,xb as i,yb as I}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";function U(a,e){if(a&1&&(o(0,"li"),s(1),i()),a&2){let t=e.$implicit;r(),g(t)}}function X(a,e){if(a&1&&(o(0,"tr")(1,"td",10)(2,"code")(3,"ol",11),m(4,U,2,1,"li",null,S),i()()()()),a&2){let t=c().$implicit,n=c();r(),R("grid-column","1 / -1")("height","auto"),r(3),O(n.breakIntoLines(t.Exception))}}function F(a,e){if(a&1){let t=b();o(0,"tr",7),h("click",function(){let _=E(t).$index,l=c();return L(l.toggleRow(_))}),o(1,"td"),s(2),v(3,"date"),i(),o(4,"td",8),s(5),i(),o(6,"td"),s(7),i(),o(8,"td")(9,"button",9)(10,"spk-icon"),s(11,"caret-down"),i()()()(),f(12,X,6,4,"tr")}if(a&2){let t=e.$implicit,n=e.$index,_=c();r(2),g(A(3,6,t.Timestamp,"MMM dd. hh:mm")),r(3),g(t.BackupID>=0?t.BackupID:"-"),r(2),g(t.Message),r(2),G("rotated-icon",n===_.openRowIndex()),r(3),x(n===_.openRowIndex()?12:-1)}}var z=["BackupID","Timestamp","Message","actions"],u=class a{#e=T(y);displayedColumns=d(z);logsLoading=d(!0);openRowIndex=d(null);logs=d([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(C(()=>this.logsLoading.set(!1))).subscribe({next:e=>{this.logs.set(e)}})}toggleRow(e){this.openRowIndex.set(e===this.openRowIndex()?null:e)}breakIntoLines(e){return e?e.split(`
|
|
2
2
|
`):[]}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=M({type:a,selectors:[["app-logs-stored"]],decls:13,vars:2,consts:()=>{let e;e=$localize`Timestamp`;let t;t=$localize`Backup ID`;let n;n=$localize`Message`;let _;return _=$localize`No data available`,[e,t,n,_,[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]]},template:function(t,n){t&1&&(o(0,"spk-table",4),k("dataChange",function(l){return N(n.logs,l)||(n.logs=l),l}),o(1,"tr",5)(2,"th"),p(3,0),i(),o(4,"th"),p(5,1),i(),o(6,"th"),p(7,2),i(),I(8,"th"),i(),m(9,F,13,9,null,null,S),o(11,"div",6),p(12,3),i()()),t&2&&(D("data",n.logs),P("loading",n.logsLoading()),r(9),O(n.logs()))},dependencies:[B,$,w],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{u as default};
|
package/index.html
CHANGED
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
<body>
|
|
64
64
|
<app-root></app-root>
|
|
65
65
|
<div class="loading">Loading ...</div>
|
|
66
|
-
<link rel="modulepreload" href="chunk-6HTVIY6O.js"><link rel="modulepreload" href="chunk-
|
|
66
|
+
<link rel="modulepreload" href="chunk-6HTVIY6O.js"><link rel="modulepreload" href="chunk-GJROCOAD.js"><link rel="modulepreload" href="chunk-KHC3VCF4.js"><link rel="modulepreload" href="chunk-3W6M5IZL.js"><link rel="modulepreload" href="chunk-KIUU6RPZ.js"><link rel="modulepreload" href="chunk-NQNRR7VE.js"><link rel="modulepreload" href="chunk-OTLEEXAA.js"><link rel="modulepreload" href="chunk-RHW5QVAY.js"><link rel="modulepreload" href="chunk-O2YN63YI.js"><link rel="modulepreload" href="chunk-F4EEOSGJ.js"><script src="polyfills-6QHLTIIN.js" type="module"></script><script src="main-3OUIM37D.js" type="module"></script></body>
|
|
67
67
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ye,c as be}from"./chunk-6HTVIY6O.js";import{a as L}from"./chunk-
|
|
1
|
+
import{b as ye,c as be}from"./chunk-6HTVIY6O.js";import{a as L}from"./chunk-GJROCOAD.js";import{a as ue}from"./chunk-KHC3VCF4.js";import{a as ge}from"./chunk-3W6M5IZL.js";import{a as I}from"./chunk-KIUU6RPZ.js";import"./chunk-NQNRR7VE.js";import"./chunk-OTLEEXAA.js";import{a as x}from"./chunk-RHW5QVAY.js";import{a as le}from"./chunk-O2YN63YI.js";import{a as v,b as de,c as E}from"./chunk-F4EEOSGJ.js";import{a as C}from"./chunk-I3C2AEHI.js";import{c as se,d as ie,g as ae,h as pe}from"./chunk-QVIZK4WW.js";import{a as re}from"./chunk-WMTA6PZM.js";import{c as me}from"./chunk-WX7L7V6J.js";import{a as Z,b as ee,d as te,e as oe,f as ne,i as ce}from"./chunk-JSGFZ2GA.js";import{a as fe}from"./chunk-JV6DGJII.js";import{j as Q,l as Y}from"./chunk-CKPICCFH.js";import{b as he}from"./chunk-EF7JWRDC.js";import{A as N,B as F,Bc as X,F as w,L as G,N as T,P as J,S as k,V as B,Y as s,ab as K,f as W,i as j,ja as $,n as D,o as U,r as R,ua as d,uc as z,vc as q,yb as _}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var M=class t{#o=s(C);#s=s(v);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=K({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&_(0,"router-outlet")},dependencies:[se],encapsulation:2})};var ve={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new B("ENVIRONMENT");var A=class t{#o=s(ce);isLoaded=d(!1);webmodules=d(null);preload(e=!1){let o=this.#o.getApiV1Webmodules().pipe(J(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(e)return o;o.subscribe()}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ie=()=>{let t=s(E);return t.token()?!0:t.checkProxyAuthed().pipe(T(e=>e?D(!0):t.refreshToken().pipe(R(()=>!0))))},Me=()=>{let t=s(v),e=s(I),o=s($),n=t.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return t.configLoaded===null?N(i).pipe(R(()=>n)):t.configLoaded?.pipe(T(()=>N(i)))},Se=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-IPRTKJDE.js")},{path:"logout",loadComponent:()=>import("./chunk-SQQMYNOF.js")},{path:"",canActivate:[Ie],children:[{path:"",canActivate:[Me],loadComponent:()=>import("./chunk-TSIPKXNX.js"),children:[{path:"",loadComponent:()=>import("./chunk-VINJGSIH.js")},{path:"add-backup",loadComponent:()=>import("./chunk-YDR42CNA.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-JPF4Y3PP.js")},{path:"backup/import",loadComponent:()=>import("./chunk-VZBHJ6AU.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-WLIE4IB5.js"),loadChildren:()=>import("./chunk-ZXWA7BUQ.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-WLIE4IB5.js"),loadChildren:()=>import("./chunk-ZXWA7BUQ.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-7NFVFBIE.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-RRBU7RBN.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-KXLXF2JD.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-AX5RFEOL.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-RTXTOPSU.js")},{path:"from-config",loadComponent:()=>import("./chunk-EP7S6KOG.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-OHQK4UOI.js"),loadChildren:()=>import("./chunk-XL2NKFYE.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-OHQK4UOI.js"),loadChildren:()=>import("./chunk-XL2NKFYE.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-OHQK4UOI.js"),loadChildren:()=>import("./chunk-XL2NKFYE.js")},{path:"settings",loadComponent:()=>import("./chunk-T5X5KX6A.js")},{path:"about",loadComponent:()=>import("./chunk-7RTXH4CB.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-N5ASXZEE.js")},{path:"changelog",loadComponent:()=>import("./chunk-NHQOHNI2.js")},{path:"libraries",loadComponent:()=>import("./chunk-TK4BPZWA.js")},{path:"system-info",loadComponent:()=>import("./chunk-Q6GENX6C.js")},{path:"logs",loadChildren:()=>import("./chunk-JP7GZSDH.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-PQVEQNEN.js")}]}]}]}]}];var P=null,Re=(t,e)=>{let o=s(E),n=s(ie),i=s(C),l=s(h),r=i.getItem("locale"),u=s(me),a=ye(r),p=t.url==="/api/v1/auth/login",m=t.url==="/api/v1/auth/refresh",S=t.url==="/api/v1/progressstate",g=t.url==="/api/v1/remoteoperation/test",y=t.url.startsWith("/api/v2/"),b=o.token(),H=t,V=t.headers.has("custom-proxy-check")||b===de;if(b&&t.url.startsWith(l.baseUrl)&&!V){let c=t.headers.set("Authorization",`Bearer ${b}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=t.clone({headers:c})}return e(H).pipe(R(c=>{if(c.type===4&&c.status===200&&y){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),F(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!V&&(S&&c.status===404||g||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(P??=o.refreshToken().pipe(G()),P.pipe(T(()=>e(t.clone({headers:t.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>P=null))):U(()=>({error:c,message:f}))}))};var Ae="1.0.0",Te=`portal-proxy-client-${x()}`,Oe=1,O=class t{#o=1e3;#s=s(h);#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=X(()=>{let e=this.#i(),o=this.#l(),n=this.#a();if(!n||!e||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(e){let o=Uint8Array.from(atob(e),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(e,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(e),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:e,publicKey:"",clientVersion:Ae,protocolVersion:Oe},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(e=null){e&&console.error(e),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(e,o,n){let i={from:Te,to:e.from,type:o,messageId:e.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(e,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(e),new Promise((a,p)=>{let m=x(),g={from:Te,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let b=this.#r[m];b&&(delete this.#r[m],b.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(e){this.#e?.send(JSON.stringify(e))}static \u0275fac=function(o){return new(o||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){if(typeof t!="string")return null;let o=new TextEncoder().encode(t);return window.btoa(String.fromCharCode(...o))}function we(t,e,o){let n=t.relayconfigState.config();if(n===null)return o(e);let i=Ne(e.body),l={};e.headers.keys().forEach(p=>{l[p]=e.headers.get(p)??""});let r=e.headers.get("timeout"),u=r!==null?parseInt(r):t.defaultTimeout;e.url.startsWith("/api/v1/serverstate")&&e.url.includes("longpoll=true")&&(u=1e3*99);let a=t.relayWebsocket.sendCommand(n.accessToken,n.clientId,e.method,e.url,i,l,u);return new W(p=>{a.then(m=>{let S=new Z;l!=null&&Object.keys(l).forEach(y=>{S.set(y,l[y])});let g=new ee({body:m.body,status:m.code,statusText:"OK",headers:S});p.next(g),p.complete()})})}var ke=(t,e)=>{let o={relayconfigState:s(v),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new j;return o.relayconfigState.configLoaded.subscribe(l=>{l&&we(o,t,e).subscribe(i)}),i}return we(o,t,e)};var Ee={providers:[z(),ae(Se,pe()),te(ne(),oe([ke,Re])),C,{provide:h,useValue:ve},{provide:q,useValue:be()},ue,I,he,Y,le,Q,fe,ge]};re(M,Ee);
|
package/package.json
CHANGED
package/chunk-3KSBRC3X.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b}from"./chunk-X5YRWKCW.js";import"./chunk-YJSWEW6C.js";import"./chunk-VN7JM6M3.js";import"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import"./chunk-7L42EO7J.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as createEncryptionForm,b as default};
|
package/chunk-AADIFDNE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-VLIGMNJX.js";import"./chunk-6DH6O5YE.js";import"./chunk-YJSWEW6C.js";import"./chunk-URU2SLPX.js";import"./chunk-T2OUHRUV.js";import"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
|
package/chunk-D3I33UIQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-DDM4R5FN.js";import"./chunk-4RGZG24K.js";import"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as default};
|
package/chunk-JD54W4UA.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as qt,b as Yt}from"./chunk-6DH6O5YE.js";import{a as _t}from"./chunk-YJSWEW6C.js";import{a as qe}from"./chunk-VN7JM6M3.js";import{a as Xt,b as Mt,c as jt}from"./chunk-KSP3JQHY.js";import{a as j}from"./chunk-HTNYQE2B.js";import{a as Le}from"./chunk-URU2SLPX.js";import{a as J}from"./chunk-7L42EO7J.js";import{b as Ve,c as _e,d as Fe,e as ge,f as Ue,g as ut,h as Be,i as Ke,j as We,m as dt,n as ze,o as mt,p as Ht,q as He,r as Ce,s as Xe,t as je}from"./chunk-T2OUHRUV.js";import{b as Ae,d as pe}from"./chunk-QVIZK4WW.js";import{A as pt,a as ue,b as lt,d as Wt,e as ve,g as be,l as de,o as zt,p as ct,t as me,z as Ge}from"./chunk-WX7L7V6J.js";import{h as Ie}from"./chunk-4AECHE4W.js";import{i as Kt}from"./chunk-CKPICCFH.js";import{$b as m,Ab as X,Ac as b,Bb as et,Bc as st,Cb as G,F as Ze,Gb as y,Hb as A,Ib as R,Jb as At,Kb as Pt,Lb as Oe,Mb as P,Nb as p,Qa as l,Qb as ce,S as ye,Sb as Bt,Tb as W,Xa as Me,Y as O,Yb as we,Zb as Re,_b as re,ab as le,ac as xe,bc as Y,cc as Nt,da as F,ea as g,ec as U,f as at,fb as _,fc as B,gc as K,hc as kt,ic as Ot,ja as Vt,jc as $t,lc as tt,mb as Ut,mc as nt,nb as u,oc as it,pb as ke,qa as Et,r as Je,ra as yt,sb as T,sc as ot,tb as te,ua as E,ub as ne,vb as ie,wb as s,xb as a,yb as d,zb as H}from"./chunk-W2F756OF.js";import{a as h,b as Ee,c as Lt}from"./chunk-7CGTOI24.js";var Ft=class t{#n=O(Ie);#t=O(ve);#e=O(Le);testDestination(n,e,i){return this.#e.hasV2TestOperations()?this.testDestinationv2(n,e,i):this.testDestinationv1(n,e,i)}testDestinationv2(n,e,i){return new at(o=>{this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:n,AutoCreate:!1,Options:null}}).subscribe({next:r=>{if(r.Success){o.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e,anyFilesFound:!r.Data?.FolderIsEmpty,containsBackup:r.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:r.Data?.FolderContainsEncryptedBackupFiles??void 0}),o.complete();return}this.handleGenericError(o,n,e,r.Error??"Unknown error")},error:r=>{let c=r?.error?.body;if(c?.Data?.FolderExists===!1||c?.StatusCode==="missing-folder"){i?this.handleMissingFolder(o,n,e):this.handleGenericError(o,n,e,$localize`The remote destination folder does not exist.`);return}if(c?.Data?.HostCertificate){this.handleMissingCertificate(o,n,e,c.Data?.HostCertificate);return}if(c?.Data?.ReportedHostKey){this.handleIncorrectKey(o,n,e,c.Data.ReportedHostKey,c.Data.AcceptedHostKey??null);return}this.handleGenericError(o,n,e,r?.message??"Unknown error")}})})}testDestinationv1(n,e,i){return new at(o=>{this.#n.postApiV1RemoteoperationTest({requestBody:{path:n}}).subscribe({next:r=>{o.next({action:"success",targetUrl:n,testAgain:!1,destinationIndex:e}),o.complete()},error:r=>{this.handleDestinationErrorv1(r.message,n,e,i).subscribe(c=>{o.next(c)})}})})}handleMissingFolder(n,e,i){this.#t.open(J,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:o=>{o&&(this.#e.hasV2TestOperations()?this.#n.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:r=>{r.Success?this.handleFolderCreated(n,e,i):this.handleFolderCreateFailure(n,e,i,r.Error??$localize`Unknown error`)},error:r=>{this.handleFolderCreateFailure(n,e,i,r.message??$localize`Unknown error`)}}):this.#n.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(n,e,i)},error:r=>{this.handleFolderCreateFailure(n,e,i,r.message??$localize`Unknown error`)}}))}})}handleFolderCreateFailure(n,e,i,o){this.#t.open(J,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),n.complete()}})}handleFolderCreated(n,e,i){this.#t.open(J,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{n.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:i}),n.complete()}})}reportNoAction(n,e,i){n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),n.complete()}handleMissingCertificate(n,e,i,o){this.#t.open(J,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
-
The server reported the certificate hash: ${o}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(n,e,i);return}n.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:o,destinationIndex:i}),n.complete()}})}handleIncorrectKey(n,e,i,o,r){r?this.#t.open(J,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
-
Do you want to REPLACE your CURRENT host key ${r}
|
|
6
|
-
with the REPORTED host key: ${o}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(n,e,i);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),n.complete()}}):this.#t.open(J,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:c=>{if(!c){this.reportNoAction(n,e,i);return}n.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),n.complete()}})}handleGenericError(n,e,i,o){this.#t.open(J,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:r=>{n.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),n.complete()}})}handleDestinationErrorv1(n,e,i,o){return new at(r=>{if(n==="missing-folder"){o?this.handleMissingFolder(r,e,i):this.handleGenericError(r,e,i,$localize`The remote destination folder does not exist.`);return}if(n.startsWith("incorrect-cert:")){let c=n.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,i,c);return}if(n.startsWith("incorrect-host-key:")){let c=n.split('incorrect-host-key:"')[1].split('",')[0],f=n.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,i,c,f);return}this.handleGenericError(r,e,i,n)})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var gt=class t{fromString(n){if(!n)return null;let e=n.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(n,e){return`${n}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var he=class t{#n=O(Ie);s3Providers=j(this.getS3Config("Providers"));s3Regions=j(this.getS3Config("Regions"));s3RegionHosts=j(this.getS3Config("RegionHosts"));s3StorageClasses=j(this.getS3Config("StorageClasses"));storjSatellites=j(this.getStorjConfig("Satellites"));storjAuthenticationMethods=j(this.getStorjConfig("AuthenticationMethods"));openstackProviders=j(this.getOpenstackConfig("Providers"));openstackVersions=j(this.getOpenstackConfig("Versions"));gcsLocations=j(this.getGcsConfig("Locations"));gcsStorageClasses=j(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Je(e=>this.#t(e)))}createS3IamUser(n,e){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":e}})}createS3PolicyIAM(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Je(e=>this.#t(e)))}getOpenstackConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Je(e=>this.#t(e)))}getGcsConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Je(e=>this.#t(e)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([e,i])=>({key:e,value:i})))??[]}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ne(t){return t==null?"":":"+t.toString()}function Q(t){return t==null?"":t.startsWith("/")?t:"/"+t}function $(t,n){let e={},i={},o=Se.find(r=>r.key===t);return n.searchParams.forEach((r,c)=>{o?.dynamicFields?.some(N=>N===c||N?.name===c)?i[c]=decodeURIComponent(r):e[c]=decodeURIComponent(r)}),{advanced:e,dynamic:i}}function M(t,n=!1){let e=t.map(([o,r])=>`${o}=${r?encodeURIComponent(r.toString()):""}`).join("&");return e?(n?"":"?")+e:""}function Ct(t){let n=t.destinationType,e=Se.find(i=>i.customKey===n||i.key===n);if(!e)throw new Error("Invalid destination type");return e?.mapper.to(t)??""}function wt(t){let n=URL.canParse(t),e=t.split("://")[0],i=t.split("://")[1],o="http://"+i;if(i.startsWith("%")&&e==="file")return Se.find(r=>r.customKey===e||r.key===e)?.mapper.from(e,new URL("http://localhost"),t);try{let r=new URL(o);return Se.find(c=>c.customKey===e||c.key===e)?.mapper.from(e,r,t)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var C=new Ce,Se=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>C.control(t??"")}},mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>{let o=e.startsWith("file:///")?e.split("file:///")[1]:e.split("file://")[1],r=o.startsWith("%"),f=o.slice(1).startsWith(":\\")||r?o:"/"+o;return h({destinationType:t,custom:{path:f}},$(t,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>C.control(t??"",[Fe.required,Fe.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>C.control(t??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>C.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).s3StorageClasses}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},$(t,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(he).gcsStorageClasses},"authid"],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"authid",type:"Password"}],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>E([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{server:e,path:i}=t.custom;return`${t.destinationType}://${e+Q(i)+n}`},from:(t,n,e)=>{let i=n.pathname.replace(/^\//,"");return h({destinationType:t,custom:{server:n.hostname,path:i}},$(t,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{bucket:n.hostname,path:decodeURIComponent(n.pathname)}},$(t,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:t=>{let{bucket:n,path:e}=t.custom,i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{bucket:n.hostname,path:n.pathname}},$(t,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:t=>C.control(t??"",[Fe.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["authid"],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.hostname+n.pathname}},$(t,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{port:e,server:i,path:o}=t.custom;return`${t.destinationType}://${i+Ne(e)+Q(o)+n}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:t=>{let n=t.dynamic["rclone-remote-repository"],e=t.dynamic["rclone-remote-path"],i=Object.entries(t.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),o=M([...Object.entries(t.advanced),...i]);return`${t.destinationType}://${n}/${e+o}`},from:(t,n,e)=>{let{advanced:i,dynamic:o}=$(t,n);return h({destinationType:t,dynamic:h({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},o)},i)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:t=>t.get(he).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:t=>t.get(he).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:t=>{let n=M([...Object.entries(t.advanced),...Object.entries(t.dynamic)]),{bucket:e}=t.custom;return`${t.destinationType}://${e+n}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},$(t,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:i}=t.custom,o=t.dynamic["use-ssl"],r=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([c])=>c!=="use-ssl")]);return`${t.destinationType}${o?"s":""}://${e+Ne(n)+Q(i)+r}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:t=>{let{port:n,server:e,path:i}=t.custom,o=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([r])=>r!=="use-ssl")]);return`${t.destinationType}://${e+Ne(n)+Q(i)+o}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:t=>{let n=t.custom.server,e=t.dynamic["sia-targetpath"],i=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([o])=>o!=="sia-targetpath")]);return`${t.destinationType}://${n+Q(e)+i}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname}},$(t,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:t=>{let n=t.custom.path,e=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([i])=>i!=="cos-targetpath")]);return`${t.destinationType}://${n+e}`},from:(t,n,e)=>h({destinationType:t,custom:{path:n.pathname}},$(t,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:t=>{let{port:n,server:e,path:i,username:o,password:r}=t.custom,c={"auth-username":o,"auth-password":r},f=t.dynamic["use-ssl"],N=M([...Object.entries(t.advanced),...Object.entries(t.dynamic).filter(([I])=>I!=="use-ssl"),...Object.entries(c)]);return`${t.destinationType}${f?"s":""}://${e+Ne(n)+Q(i)+N}`},from:(t,n,e)=>h({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},$(t,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:t=>C.control(t??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:t=>C.control(t??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:t=>C.control(t??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:t=>{let{share:n,server:e,path:i,username:o,password:r}=t.custom,c={"auth-username":o,"auth-password":r},f=new Map([...Object.entries(c),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),N=M(Array.from(f));return`${t.destinationType}://${e+Q(n)+Q(i)+N}`},from:(t,n,e)=>{let i=n.pathname.split("/")[1],o=n.pathname.split("/").slice(2).join("/");return h({destinationType:t,custom:{server:n.hostname,share:i,path:o}},$(t,n))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:t=>C.control(t??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:t=>{let{path:n,username:e,password:i}=t.custom,o={"auth-username":e,"auth-password":i},r=new Map([...Object.entries(o),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),c=M(Array.from(r));return`${t.destinationType}://${n+c}`},from:(t,n,e)=>{let i=n.hostname??"";return n.pathname&&i!==""&&n.pathname[0]!="/"&&(i+="/"),i+=n.pathname,h({destinationType:t,custom:{path:i}},$(t,n))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:t=>C.control(t??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:t=>C.control(t??"")}],mapper:{to:t=>{let{path:n,username:e,password:i,apitoken:o}=t.custom,r=(o||"").trim()===""?{"auth-username":e,"auth-password":i}:{"api-token":o},c=new Map([...Object.entries(r),...Object.entries(t.advanced),...Object.entries(t.dynamic)]),f=M(Array.from(c));return`${t.destinationType}://${n+f}`},from:(t,n,e)=>{let i=n.hostname??"";return n.pathname&&i!==""&&n.pathname[0]!="/"&&(i+="/"),i+=n.pathname,h({destinationType:t,custom:{path:i}},$(t,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${M([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>h({destinationType:t},$(t,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:t=>t.get(he).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:t=>`storj://storj.io/config?storj-auth-method=API%20key&${M([...Object.entries(t.advanced),...Object.entries(t.dynamic)],!0)}`,from:(t,n,e)=>h({destinationType:t},$(t,n))}}];var on=["formRef"];function rn(t,n){t&1&&(s(0,"spk-alert",17),y(1,5),d(2,"spk-icon",26),A(),a())}function an(t,n){if(t&1&&m(0),t&2){let e=n.$implicit;Y(" ",e.DisplayName," ")}}function sn(t,n){if(t&1&&d(0,"spk-progress-bar",40),t&2){let e=p(3);ke("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),u("value",e.calculatePasswordStrength()*(100/5))}}function ln(t,n){t&1&&(s(0,"span",35),R(1,10),a())}function cn(t,n){t&1&&(y(0,8,1),d(1,"spk-icon"),A())}function pn(t,n){t&1&&(y(0,8,2),d(1,"spk-icon"),A())}function un(t,n){t&1&&(y(0,11,1),d(1,"spk-icon",42),A())}function dn(t,n){t&1&&(y(0,11,2),d(1,"spk-icon"),A())}function mn(t,n){if(t&1){let e=G();s(0,"button",41),P("click",function(){F(e);let o=p(3);return g(o.copyPassword())}),y(1,11),_(2,un,2,0)(3,dn,2,0),A(),a()}if(t&2){let e=p(3);l(2),T(e.copiedPassword()?2:3)}}function _n(t,n){t&1&&(s(0,"spk-alert",39),R(1,12),a())}function Fn(t,n){if(t&1){let e=G();s(0,"div",30)(1,"spk-form-field")(2,"label",31),y(3,7),d(4,"sup"),A(),a(),d(5,"input",32),a(),_(6,sn,1,9,"spk-progress-bar",33),s(7,"spk-form-field"),d(8,"input",34),_(9,ln,2,0,"span",35),a(),s(10,"div",36)(11,"button",37),P("click",function(){F(e);let o=p(2);return g(o.showPassword.set(!o.showPassword()))}),y(12,8),_(13,cn,2,0)(14,pn,2,0),A(),a(),s(15,"button",37),P("click",function(){F(e);let o=p(2);return g(o.generatePassword())}),y(16,9),d(17,"spk-icon"),A(),a(),_(18,mn,4,1,"button",38),a(),_(19,_n,2,0,"spk-alert",39),a()}if(t&2){let e=p(2);l(5),u("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.password?6:-1),l(2),u("type",e.showPassword()?"text":"password"),l(),T(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),T(e.showPassword()?13:14),l(5),T(e.showCopyPassword()?18:-1),l(),T(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function gn(t,n){if(t&1&&(s(0,"spk-select",27)(1,"label",28),R(2,6),a(),d(3,"input",29),_(4,an,1,1,"ng-template"),a(),_(5,Fn,20,7,"div",30)),t&2){let e=p();u("options",e.encryptionOptions())("isClearable",!1),l(5),T(e.encryptionFieldSignal()!==""?5:-1)}}function Cn(t,n){if(t&1&&(s(0,"button",24),y(1,13),d(2,"spk-icon"),A(),a()),t&2){let e=p();u("disabled",e.nameAndDescriptionValid()===!1)}}function hn(t,n){if(t&1&&(s(0,"spk-tooltip",25)(1,"button",24),y(2,14),d(3,"spk-icon"),A(),a()()),t&2){let e=p();u("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),u("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Ye=new Ce,Qt=(t={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ye.group({name:Ye.control(t.name,[Fe.required]),description:Ye.control(t.description),encryption:Ye.control(t.encryption,[jt()]),password:Ye.control(t.password,[Mt(n=>n?.value.encryption!=="",[Fe.required])]),repeatPassword:Ye.control(t.repeatPassword,[Mt(n=>n?.value.encryption!=="",[Fe.required])])}),xt={Key:"",DisplayName:"None"},Rt=class t{#n=O(pe);#t=O(Ae);#e=O(Xt);#i=O(fe);#o=O(Le);formRef=Me.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);encryptionEffect=st(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=b(()=>{let n=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=b(()=>{let e=this.generalFormSignal()?.password??"";return this.#e.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let i=document.createElement("textarea");i.value=n,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i)}catch(i){console.error("Failed to copy text: ",i)}}}displayFn(){let n=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let i=[xt,...n].find(o=>o.Key===e);return i?`${i.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#e.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-general"]],viewQuery:function(e,i){e&1&&we(i.formRef,on,5),e&2&&Re()},decls:21,vars:4,consts:()=>{let n;n=$localize`Your backup name`;let e;e=$localize`Your backup description`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let c;c=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let f;f=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let N;N=$localize`Encryption`;let I;I=$localize`Encryption`;let z;z=$localize`Password`;let w;w=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let V;V=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,V=Oe(V);let oe;oe=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let Z;Z=$localize`Passwords do not match`;let S;S=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,S=Oe(S);let D;D=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let L;L=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let q;return q=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,r,c,f,I,v,V,oe,Z,S,D,L,q,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",N,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",z,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,i){if(e&1){let o=G();s(0,"form",15,0),P("submit",function(){return F(o),g(i.next())}),s(2,"h3",16),R(3,1),a(),_(4,rn,3,0,"spk-alert",17),s(5,"spk-form-field")(6,"label",18),y(7,2),d(8,"sup"),A(),a(),d(9,"input",19),a(),s(10,"spk-form-field")(11,"label",20),R(12,3),a(),d(13,"textarea",21),a(),_(14,gn,6,3),s(15,"div",22)(16,"button",23),P("click",function(){return F(o),g(i.exit())}),y(17,4),d(18,"spk-icon"),A(),a(),_(19,Cn,3,1,"button",24)(20,hn,4,2,"spk-tooltip",25),a()()}if(e&2){let o;u("formGroup",i.generalForm),l(4),T(!i.isNew()&&((o=i.generalFormSignal())==null?null:o.encryption)!==""?4:-1),l(10),T(i.isNew()?14:-1),l(5),T(i.encryptionFieldSignal()===""||!i.isNew()?19:20)}},dependencies:[je,Ke,_e,ge,Ue,ze,He,de,me,be,ue,ct,lt,pt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};function fn(t,n){if(t&1){let e=G();s(0,"div",24)(1,"spk-form-field")(2,"label",25),R(3,7),a(),s(4,"input",26,0),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.nextTime().time,o)||(r.scheduleFields.nextTime().time=o),g(o)}),P("focus",function(){F(e);let o=re(5);return g(o.showPicker())}),a(),s(6,"spk-icon",27),m(7,"clock"),a()(),s(8,"spk-form-field"),d(9,"label",28),s(10,"input",29,1),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.nextTime().date,o)||(r.scheduleFields.nextTime().date=o),g(o)}),P("focus",function(){F(e);let o=re(11);return g(o.showPicker())}),a(),s(12,"spk-icon",27),m(13,"calendar"),a()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),R(17,8),a(),s(18,"input",31),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().repeatValue,o)||(r.scheduleFields.runAgain().repeatValue=o),g(o)}),a()(),s(19,"spk-select",32)(20,"input",33),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().repeatUnit,o)||(r.scheduleFields.runAgain().repeatUnit=o),g(o)}),a()()(),s(21,"app-toggle-card",34),H(22,35),R(23,9),X(),s(24,"div",36)(25,"spk-toggle",19),y(26,10),s(27,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.mon,o)||(r.scheduleFields.runAgain().allowedDays.mon=o),g(o)}),a(),A(),a(),s(28,"spk-toggle",19),y(29,11),s(30,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.tue,o)||(r.scheduleFields.runAgain().allowedDays.tue=o),g(o)}),a(),A(),a(),s(31,"spk-toggle",19),y(32,12),s(33,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.wed,o)||(r.scheduleFields.runAgain().allowedDays.wed=o),g(o)}),a(),A(),a(),s(34,"spk-toggle",19),y(35,13),s(36,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.thu,o)||(r.scheduleFields.runAgain().allowedDays.thu=o),g(o)}),a(),A(),a(),s(37,"spk-toggle",19),y(38,14),s(39,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.fri,o)||(r.scheduleFields.runAgain().allowedDays.fri=o),g(o)}),a(),A(),a(),s(40,"spk-toggle",19),y(41,15),s(42,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.sat,o)||(r.scheduleFields.runAgain().allowedDays.sat=o),g(o)}),a(),A(),a(),s(43,"spk-toggle",19),y(44,16),s(45,"input",20),K("ngModelChange",function(o){F(e);let r=p();return B(r.scheduleFields.runAgain().allowedDays.sun,o)||(r.scheduleFields.runAgain().allowedDays.sun=o),g(o)}),a(),A(),a()()()}if(t&2){let e=p();l(4),U("ngModel",e.scheduleFields.nextTime().time),l(6),U("ngModel",e.scheduleFields.nextTime().date),l(8),U("ngModel",e.scheduleFields.runAgain().repeatValue),l(),u("options",e.unitOptions)("isClearable",!1),l(),U("ngModel",e.scheduleFields.runAgain().repeatUnit),l(),u("disallowToggle",!0),l(6),U("ngModel",e.scheduleFields.runAgain().allowedDays.mon),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.tue),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.wed),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.thu),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.fri),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.sat),l(3),U("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Sn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],$e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},It=class t{#n=O(fe);#t=O(pe);#e=O(Ae);unitOptions=Sn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let i;i=$localize`If a date was missed, the job will run as soon as possible.`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let c;c=$localize`Next time`;let f;f=$localize`Run again every`;let N;N=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Z;return Z=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,e,i,o,r,c,f,N,I,z,w,v,V,oe,Z,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,i){e&1&&(s(0,"h3",17),R(1,2),a(),s(2,"div",18)(3,"spk-toggle",19),y(4,3),s(5,"input",20),K("ngModelChange",function(r){return B(i.scheduleFields.autoRun,r)||(i.scheduleFields.autoRun=r),r}),a(),A(),a(),s(6,"p"),R(7,4),a()(),_(8,fn,46,14),s(9,"div",21)(10,"button",22),P("click",function(){return i.goBack()}),y(11,5),d(12,"spk-icon"),A(),a(),s(13,"button",23),P("click",function(){return i.next()}),y(14,6),d(15,"spk-icon"),A(),a()()),e&2&&(l(5),U("ngModel",i.scheduleFields.autoRun),l(3),T(i.scheduleFields.autoRun()?8:-1))},dependencies:[Xe,_e,We,Ve,ge,Be,de,Ge,ue,be,me,qe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Tn(t,n){if(t&1&&(H(0,4),m(1),X()),t&2){let e,i=p();l(),xe((e=i.currentExpressionOption())==null?null:e.startsWith)}}function Dn(t,n){if(t&1&&(H(0,5),m(1),X()),t&2){let e,i=p();l(),xe((e=i.currentExpressionOption())==null?null:e.endsWith)}}var En=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],St=class t{path=yt.required();osType=yt();pathChange=Et();remove=Et();internalPath=E("");pathType=E("-Expression");currentExpressionOption=b(()=>{let n=this.pathType();return this.expressionOptions().find(e=>e.value===n)});expressionOptions=b(()=>{let e=this.osType()==="Windows"?"\\":"/";return En.map(i=>i.value==="-Folder"||i.value==="+Folder"?Ee(h({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?Ee(h({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?Ee(h({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?Ee(h({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?Ee(h({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?Ee(h({},i),{startsWith:"*.",endsWith:""}):Ee(h({},i),{startsWith:"",endsWith:""}))});pathEffect=st(()=>{let n=this.path(),e=n.slice(1),i=n.startsWith("-")?"-":"+",o=this.osType()==="Windows",r=o?"\\":"/";e.startsWith("%")&&e.endsWith(r)||o&&e.slice(2).startsWith(r)&&e.endsWith(r)||e.startsWith(r)&&e.endsWith(r)?(this.pathType.set(`${i}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${r}`)?(this.pathType.set(`${i}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${r}]*]`)?(this.pathType.set(`${i}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${i}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${i}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${i}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${i}Expression`),this.internalPath.set(e))});updateFilter(){let n=this.internalPath(),e=this.currentExpressionOption();n!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${n}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,i){if(e&1&&(s(0,"spk-select",0)(1,"input",1),K("ngModelChange",function(r){return B(i.pathType,r)||(i.pathType=r),r}),P("ngModelChange",function(){return i.updateFilter()}),a()(),s(2,"spk-form-field",2)(3,"input",3),K("ngModelChange",function(r){return B(i.internalPath,r)||(i.internalPath=r),r}),P("ngModelChange",function(){return i.updateFilter()}),a(),_(4,Tn,2,1,"ng-container",4)(5,Dn,2,1,"ng-container",5),a(),s(6,"div",6),P("click",function(){return i.removeFilter()}),s(7,"spk-icon",7),m(8,"x-circle"),a()()),e&2){let o,r;u("options",i.expressionOptions())("isClearable",!1),l(),U("ngModel",i.pathType),l(2),U("ngModel",i.internalPath),l(),T(!((o=i.currentExpressionOption())==null||o.startsWith==null)&&o.startsWith.length?4:-1),l(),T(!((r=i.currentExpressionOption())==null||r.endsWith==null)&&r.endsWith.length?5:-1)}},dependencies:[Xe,_e,ge,Be,me,de,ue],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-level-20)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var yn=["formRef"],Jt=()=>({standalone:!0});function An(t,n){if(t&1){let e=G();s(0,"spk-form-field",42)(1,"input",43),K("ngModelChange",function(o){F(e);let r=p(2);return B(r.editingPath,o)||(r.editingPath=o),g(o)}),a()(),s(2,"button",44),P("click",function(){F(e);let o=p(2);return g(o.updatePath())}),s(3,"spk-icon"),m(4,"floppy-disk"),a()(),s(5,"button",44),P("click",function(){F(e);let o=p(2);return g(o.cancelEditPath())}),s(6,"spk-icon"),m(7,"x-bold"),a()()}if(t&2){let e=p(2);l(),U("ngModel",e.editingPath),u("ngModelOptions",tt(2,Jt))}}function Pn(t,n){if(t&1){let e=G();s(0,"spk-form-field",42),d(1,"input",45),a(),s(2,"button",44),P("click",function(){F(e);let o=p().$implicit,r=p();return g(r.editPath(o))}),s(3,"spk-icon"),m(4,"pen"),a()(),s(5,"button",44),P("click",function(){F(e);let o=p().$implicit,r=p();return g(r.removePath(o))}),s(6,"spk-icon"),m(7,"trash-simple"),a()()}if(t&2){let e=p().$implicit;Ut("readonly",!0),l(),u("ngModel",e)("ngModelOptions",tt(3,Jt))}}function Nn(t,n){if(t&1&&(s(0,"div",30),_(1,An,8,3)(2,Pn,8,4),a()),t&2){let e=n.$implicit,i=p();l(),T(i.oldPath()===e?1:2)}}function kn(t,n){if(t&1){let e=G();s(0,"app-new-filter",47),P("pathChange",function(o){let r=F(e).$index,c=p(2);return g(c.patchPathAt(o,r))})("remove",function(){let o=F(e).$index,r=p(2);return g(r.removePathAt(o))}),a()}if(t&2){let e,i=n.$implicit,o=p(2);u("path",i)("osType",(e=o.osType())!==null&&e!==void 0?e:"")}}function On(t,n){if(t&1&&ne(0,kn,1,2,"app-new-filter",46,te),t&2){let e=p();ie(e.pathArray())}}function $n(t,n){if(t&1&&(s(0,"div",41)(1,"spk-form-field"),d(2,"input",48),a(),s(3,"spk-select",49),d(4,"input",50),a()()),t&2){let e=p();l(3),u("options",e.sizeOptions())("isClearable",!1)}}var Te=new Ce,Mn=["Bytes","KB","MB","GB","TB","PB"],Zt=(t={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Te.group({path:Te.control(t.path),excludes:Te.group({hidden:Te.control(t.excludes.hidden),system:Te.control(t.excludes.system),temporary:Te.control(t.excludes.temporary),filesLargerThan:Te.group({size:Te.control(null),unit:Te.control(null)})})}),vt=class t{#n=O(fe);#t=O(pe);#e=O(Ae);formRef=Me.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new ut("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=E(Mn);osType=this.#n.osType;pathSignal=j(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);nonFilterPaths=b(()=>this.pathSignal()?.split("\0").filter(n=>!n.startsWith("-")&&!n.startsWith("+")&&n!==""));oldPath=E(null);editingPath=E(null);addingNewPath=E(!1);editPath(n){this.oldPath.set(n),this.editingPath.set(n)}updatePath(){let n=this.oldPath(),e=this.editingPath();if(!n||!e||e===n){this.oldPath.set(null),this.editingPath.set(null);return}let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(i?.replace(n,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(n){let e=this.sourceDataForm.controls.path.value??"",i=e.indexOf(n);if(i===-1)return;let o=i===0?n:"\0"+n,r=e.replace(o,"");this.sourceDataForm.controls.path.setValue(r)}addFilter(n="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${n}`)}patchPathAt(n,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),r=this.pathArray().map((c,f)=>f===e?`${n}`:`${c}`).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${r}`)}removePathAt(n){let i=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),o=this.pathArray().filter((r,c)=>c!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#e.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#e.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-source-data"]],viewQuery:function(e,i){e&1&&we(i.formRef,yn,5),e&2&&Re()},decls:56,vars:12,consts:()=>{let n;n=$localize`Path`;let e;e=$localize`Add a direct path`;let i;i=$localize`Hidden files`;let o;o=$localize`System files`;let r;r=$localize`Temporary files`;let c;c=$localize`Source Data`;let f;f=$localize`Folder path`;let N;N=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let I;I=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let z;z=$localize`Paths`;let w;w=$localize`Add a path directly from your machine.`;let v;v=$localize`Filters`;let V;V=$localize`Customize your filters.`;let oe;oe=$localize`Add filter`;let Z;Z=$localize`Exclude`;let S;S=$localize`Choose if there’s any files you want to exclude.`;let D;D=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let L;L=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let q;q=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Files larger than `;let ae;ae=$localize`Edit path`;let se;return se=$localize`Select an option...`,[["formRef",""],c,f,N,I,z,w,v,V,oe,Z,S,D,L,q,k,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",i,"formControlName","hidden"],["type","checkbox","placeholder",o,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",ae,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",se]]},template:function(e,i){if(e&1){let o=G();s(0,"form",16,0),P("submit",function(){return F(o),g(i.next())}),s(2,"div",17)(3,"h3",18),R(4,1),a(),s(5,"app-file-tree",19)(6,"label",20),R(7,2),a(),d(8,"input",21),a(),s(9,"div",22)(10,"button",23),P("click",function(){return F(o),g(i.goBack())}),y(11,3),d(12,"spk-icon"),A(),a(),s(13,"button",24),y(14,4),d(15,"spk-icon"),A(),a()()(),s(16,"div",25)(17,"app-toggle-card",26),H(18,27),R(19,5),X(),s(20,"p",28),R(21,6),a(),s(22,"div",29),ne(23,Nn,3,1,"div",30,te),s(25,"div",31)(26,"spk-form-field"),d(27,"input",32),a(),s(28,"button",33),P("click",function(){return F(o),g(i.addNewPath())}),s(29,"spk-icon"),m(30,"plus"),a()()()()(),s(31,"app-toggle-card",26),H(32,27),R(33,7),X(),s(34,"p",28),R(35,8),a(),s(36,"button",34),P("click",function(){return F(o),g(i.addFilter())}),R(37,9),a(),_(38,On,2,0),a(),s(39,"app-toggle-card",35),H(40,27),R(41,10),X(),s(42,"p",28),R(43,11),a(),s(44,"spk-toggle",36),y(45,12),d(46,"input",37),A(),a(),s(47,"spk-toggle",36),y(48,13),d(49,"input",38),A(),a(),s(50,"spk-toggle",36),y(51,14),d(52,"input",39),A(),a(),s(53,"spk-toggle",40),P("click",function(){return F(o),g(i.toggleFilesLargerThan())}),R(54,15),a(),_(55,$n,5,2,"div",41),a()()()}if(e&2){let o;u("formGroup",i.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",i.getPath())("showFiles",!0),l(12),u("disallowToggle",!0),l(6),ie(i.nonFilterPaths()),l(4),u("formControl",i.newPathCtrl),l(4),u("disallowToggle",!0),l(7),T((o=i.pathSignal())!=null&&o.length?38:-1),l(),u("disallowToggle",!0),l(14),ke("active",i.filesLargerThan()),l(2),T(i.filesLargerThan()?55:-1)}},dependencies:[Xe,Ke,_e,We,Ve,ge,Ue,Be,je,dt,ze,He,mt,de,ue,be,Ge,me,St,_t,qe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var en="1W:1D,4W:1W,12M:1M",De=new Ce,fe=class t{#n=O(pe);#t=O(Le);#e=O(ve);#i=O(Ie);#o=O(gt);generalForm=Qt();sourceDataForm=Zt();scheduleFields={autoRun:E($e.autoRun),nextTime:E($e.nextTime),runAgain:E($e.runAgain)};destinationForm=tn();settings=E([]);optionsFields={remoteVolumeSize:E("50MB"),backupRetention:E("all"),backupRetentionTime:E(""),backupRetentionVersions:E(0),backupRetentionCustom:E("")};isDraft=E(!1);backupId=E(null);isSubmitting=E(!1);finishedLoading=E(!1);backupDefaults=E(null);isNew=b(()=>this.backupId()==="new");osType=b(()=>this.#t.systemInfo()?.OSType);selectedOptions=E([]);selectedAdvancedFormPair=E([]);destinationFormPair=E({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=b(()=>{let n=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return n.filter(i=>e.findIndex(o=>o.name===i.name)===-1)});selectedHttpOptions=E([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),e=this.selectedHttpOptions()??[];return n.filter(i=>e.findIndex(o=>o.name===i.name)===-1)});sourceDataFormSignal=j(this.sourceDataForm.valueChanges);destinationFormSignal=j(this.destinationForm.valueChanges);generalFormSignal=j(this.generalForm.valueChanges);encryptionFieldSignal=j(this.generalForm.controls.encryption.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#r)??[]);advancedOptions=b(()=>this.#t.systemInfo()?.Options?.map(this.#r)??[]);#r(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=b(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[xt,...n]});nonSelectedOptions=b(()=>this.advancedOptions().sort((n,e)=>n?.name&&e?.name?n?.name.localeCompare(e?.name):0).filter(n=>this.selectedOptions()?.findIndex(e=>e.name===n.name)===-1));addOrUpdateAdvancedFormPairByName(n,e,i){let o=this.selectedAdvancedFormPair().find(r=>r.name===n);if(o)this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.controls[o.name].setValue(i);else{let r=this.notSelectedAdvancedFormPair().find(c=>c.name===n);if(!r)return;this.addAdvancedFormPair(r,e,i)}}addAdvancedFormPairByName(n,e,i){let o=this.notSelectedAdvancedFormPair().find(r=>r.name===n);o&&this.addAdvancedFormPair(o,e,i)}addHttpOptionByName(n,e,i){let o=this.notSelectedHttpOptions().find(r=>r.name===n);o&&this.addHttpOption(o,e,i)}addAdvancedFormPair(n,e,i){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=i??n.defaultValue;this.createFormField(o,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,e,i){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,r=i??n.defaultValue;this.createFormField(o,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(o=>o.name===n.name)!==-1?this.selectedAdvancedFormPair.update(o=>(o=o.filter(r=>r.name!==n.name),o)):this.selectedHttpOptions.update(o=>(o=o.filter(r=>r.name!==n.name),o))}removeHttpOption(n,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(i=>(i=i.filter(o=>o.name!==n.name),i))}submit(){this.isSubmitting.set(!0);let n=this.#l(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{this.exit(!1)},error:i=>{}}):this.#i.putApiV1BackupById({id:e,requestBody:n}).pipe(Ze(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{this.exit(!1)},error:i=>{}})}exit(n){if(!n){this.#p(),this.#n.navigate(["/"]);return}this.#e.open(J,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#p(),this.#n.navigate(["/"]))}})}updateFieldsFromTargetUrl(n){this.#s(),setTimeout(()=>{this.#a(n)})}#s(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let e=n.Sources??"",i=n.Filters?.map(f=>`${f.Include?"":"-"}${f.Expression}`)??[],o=n.Settings?.find(f=>f.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(f=>f.Name==="--skip-files-larger-than")??null,c={path:[...e,...i].join("\0"),excludes:{hiddenFiles:o.includes("hidden"),systemFiles:o.includes("system"),tempFiles:o.includes("temporary"),filesLargerThan:r?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(n){let e=n.TargetURL?wt(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#a(n){let e=wt(n);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(n){let e=n.Settings?.find(c=>c.Name==="encryption-module"),i=n.Settings?.find(c=>c.Name==="passphrase")?.Value??"",o=e?.Value&&e.Value.length?e.Value:"",r={name:n.Name??"",description:n.Description??""};o&&o!==""&&(r.encryption=o),i&&i!==""&&(r.password=i,r.repeatPassword=i),this.generalForm.patchValue(r)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(n.Repeat)??null,i=this.#u(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(o=>h(h({},o),i)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(n){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=n.Settings?.filter(c=>!e.includes(c.Name)),o=n.Settings?.filter(c=>e.includes(c.Name));this.settings.set(i??[]),i?.forEach(c=>{if(c.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(c.Value??"")});var r="all";o?.forEach(c=>{if(c.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(c.Value??"50MB"),c.Name==="keep-time"&&(c.Value??"")!=="")return r="time",this.optionsFields.backupRetentionTime.set(c.Value??"");if(c.Name==="keep-versions"&&(c.Value??"")!=="")return r="versions",this.optionsFields.backupRetentionVersions.set(c.Value?parseInt(c.Value):null);if(c.Name==="retention-policy"&&(c.Value??"")!=="")if(c.Value===en)r="smart";else return r="custom",this.optionsFields.backupRetentionCustom.set(c.Value??"")}),this.optionsFields.backupRetention.set(r)}getCurrentTargetUrl(){return this.#c(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,e=this.getScheduleFormValue(),i=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#c(this.destinationForm.controls.destinations):[],c=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(c=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let f=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([v,V])=>V).map(([v,V])=>v):[],N=i.path?.split("\0")??[],I=this.mapFormsToSettings(),z=Object.entries(i.excludes??{}).filter(([v,V])=>V&&v!=="filesLargerThan").map(([v])=>v),w=i.excludes?.filesLargerThan;return z.length&&I.push({Name:"--exclude-files-attributes",Value:z.join(",")}),w&&w.size!==null&&w.unit!==null&&I.push({Name:"--skip-files-larger-than",Value:`${w.size}${w.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:N.filter(v=>!v.startsWith("-")),Settings:I,Filters:N.filter(v=>v.startsWith("-")).map((v,V)=>({Order:V,Include:!1,Expression:v.slice(1)}))},Schedule:e.autoRun?{Repeat:c,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:f}:null}}mapFormsToSettings(n=[]){let e=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],o=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(o=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:en});break}let c=[...n,...i],f=this.settings().filter(N=>!c.includes(N.Name)).map(N=>{let I=N.Value;return typeof N.Value=="number"&&(I=N.Value.toString()),typeof N.Value=="boolean"&&(I=N.Value?"True":"False"),{Name:N.Name,Value:I}});return[...o,...r,...f]}#c(n){return n.controls.map(e=>Ct(e.value))}#u(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let e=new Date(n);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}createFormField(n,e,i){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){n.addControl(e.name,De.control(i));return}if(e.type==="Size"){n.addControl(e.name,De.control(i));return}if(e.type==="Integer"){n.addControl(e.name,De.control(i?parseInt(i):0));return}if(e.type==="Boolean"){n.addControl(e.name,De.control(i==="true"||i==="True"));return}if(e.type==="Flags"){n.addControl(e.name,De.control(i??""));return}if(e.type==="Timespan"||e.type==="DateTime"){n.addControl(e.name,De.control(i,[Fe.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,e,i=!1){let o=Se.find(S=>S.customKey===n||S.key===n),r=o?.key,c=this.destinationOptions().find(S=>S.Key===r),f=this.httpOptions();if(!c||!c.Options)return;let N=o&&o.oauthField?o.oauthField:null,I=o&&o.customFields?o.customFields:{},z=o&&o.dynamicFields?o.dynamicFields:[],w=o&&o.advancedFields?o.advancedFields:[],v=o&&o.ignoredAdvancedFields?o.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:N,custom:[],dynamic:[],advanced:[]});let V=De.group({}),oe=De.group({}),Z=De.group({});I&&Object.entries(I).forEach(([S,D],L)=>{let ae=D,{formElement:q}=ae,k=Lt(ae,["formElement"]);V.addControl(S,q(e?.custom[S])),this.destinationFormPair.update(se=>(se.custom.push(h({order:900+L},k)),se))});for(let S=0;S<c.Options.length;S++){let D=c.Options[S];if(D.Deprecated)continue;let L=z.find(q=>q===D.Name||D.Aliases?.includes(q.name)||q.name===D.Name);if(L){let q=D.Aliases?.indexOf(L.name)??-1,k=D.Aliases&&q>-1?D.Aliases[q]:D.Name,ae=L&&typeof L!="string",se=ae?L?.defaultValue??D.DefaultValue:D.DefaultValue,x={name:k,type:D.Type,shortDescription:D.ShortDescription??void 0,longDescription:D.LongDescription??void 0,options:D.ValidValues,order:900+S},Qe=ae?h(h({},x),L):x,ee=e?.dynamic[k]??se??D.DefaultValue;this.createFormField(oe,Qe,ee),this.destinationFormPair.update(Gt=>(Gt.dynamic.push(Qe),Gt))}else{if(v.find(ee=>ee===D.Name))continue;let k=w.find(ee=>ee===D.Name||ee.name===D.Name),ae=k&&typeof k!="string",se=e?.advanced[D.Name],x=se??D.DefaultValue,Qe={name:D.Name,type:D.Type,shortDescription:D.ShortDescription??void 0,longDescription:D.LongDescription??void 0,options:D.ValidValues,defaultValue:x,order:900+S},rt=ae?h(h({},Qe),k):Qe;i&&se&&(this.createFormField(Z,rt,x),this.selectedAdvancedFormPair.update(ee=>(ee.push(rt),ee))),this.destinationFormPair.update(ee=>(ee.advanced.push(rt),ee))}}for(let S=0;S<f.length;S++){let D=f[S],L=e?.advanced[D.name],q=L??D.defaultValue;i&&L&&(this.createFormField(Z,D,q),this.selectedHttpOptions.update(k=>(k.push(D),k)))}this.destinationFormPair.update(S=>({oauthField:S.oauthField,custom:S.custom.sort((D,L)=>D.order-L.order),dynamic:S.dynamic.sort((D,L)=>D.order-L.order),advanced:S.advanced.sort((D,L)=>D.order-L.order)})),this.destinationForm.controls.destinations.push(nn({key:o?.customKey??n,customGroup:V,dynamicGroup:oe,advancedGroup:Z}))}#p(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set($e.autoRun),this.scheduleFields.nextTime.set($e.nextTime),this.scheduleFields.runAgain.set($e.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var wn=["formRef"],Rn=(t,n,e,i)=>({index:t,formView:n,formGroupName:"custom",destinationType:e,oauthField:i}),Dt=t=>({$implicit:t}),xn=(t,n,e,i)=>({index:t,formView:n,formGroupName:"dynamic",destinationType:e,oauthField:i}),In=(t,n,e,i)=>({index:t,formView:n,formGroupName:"advanced",destinationType:e,oauthField:i}),vn=(t,n,e,i)=>({index:t,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:i}),bn=()=>({maxWidth:"700px",width:"100%"});function Gn(t,n){t&1&&(y(0,5,2),d(1,"spk-icon"),A())}function Ln(t,n){t&1&&R(0,5,3)}function Vn(t,n){if(t&1){let e=G();y(0,5,1),s(1,"button",21),P("click",function(){F(e);let o=p();return g(o.testDestination())}),_(2,Gn,2,0)(3,Ln,1,0),a(),A()}if(t&2){let e=p();l(),ke("loader",e.testLoading())("success",e.successfulTest()),l(),T(e.successfulTest()?2:3)}}function Un(t,n){if(t&1){let e=G();s(0,"p",27),P("click",function(){F(e);let o=p();return g(o.removeDestinationFormGroup(o.destinationCount()-1))}),y(1,8),d(2,"span",28),A(),a()}}function Bn(t,n){if(t&1){let e=G();s(0,"div",34),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(o.key))}),s(1,"h3"),m(2),a(),s(3,"p"),m(4),a()()}if(t&2){let e=n.$implicit;l(2),xe(e.displayName),l(2),xe(e.description)}}function Kn(t,n){if(t&1){let e=G();s(0,"button",35,1),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addDestinationFormGroup(o.key))}),m(2),a()}if(t&2){let e=n.$implicit;l(2),Y(" ",e.displayName," ")}}function Wn(t,n){if(t&1&&(s(0,"div",29),ne(1,Bn,5,2,"div",30,te),a(),s(3,"spk-menu",31)(4,"button",32),R(5,9),a(),H(6,20),ne(7,Kn,3,1,"button",33,te),X(),a()),t&2){let e=p();l(),ie(e.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),ie(e.destinationTypeOptionsNotFocused())}}function zn(t,n){t&1&&et(0)}function Hn(t,n){if(t&1&&_(0,zn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,Rn,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Xn(t,n){t&1&&et(0)}function jn(t,n){if(t&1&&_(0,Xn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,xn,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function qn(t,n){if(t&1){let e=G();y(0,10,1),s(1,"button",35,1),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addAdvancedFormPair(o,0))}),a(),A()}if(t&2){let e=n.$implicit;l(),At(e.name),Pt(0)}}function Yn(t,n){t&1&&et(0)}function Qn(t,n){if(t&1&&_(0,Yn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,In,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function Jn(t,n){if(t&1){let e=G();y(0,11,1),s(1,"button",35,1),P("click",function(){let o=F(e).$implicit,r=p(2);return g(r.addHttpOption(o,0))}),a(),A()}if(t&2){let e=n.$implicit;l(),At(e.name),Pt(0)}}function Zn(t,n){t&1&&et(0)}function ei(t,n){if(t&1&&_(0,Zn,1,0,"ng-container",40),t&2){let e,i=n.$implicit,o=n.$index;p();let r=re(29),c=p();u("ngTemplateOutlet",r)("ngTemplateOutletContext",nt(7,Dt,it(2,vn,o,i,(e=c.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,c.destinationFormPair().oauthField)))}}function ti(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function ni(t,n){if(t&1&&(s(0,"app-file-tree",43)(1,"label",47),m(2),_(3,ti,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),t&2){let e,i=p().$implicit,o=p(2);u("startingPath",o.getFormFieldValue(0,i.formGroupName,i.formView.name))("accepts",i.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function ii(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function oi(t,n){if(t&1&&(s(0,"app-file-tree",44)(1,"label",47),m(2),_(3,ii,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),t&2){let e,i=p().$implicit,o=p(2);u("hideShortcuts",!0)("startingPath",o.getFormFieldValue(0,i.formGroupName,i.formView.name)),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function ri(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function ai(t,n){t&1&&(s(0,"spk-icon",51),m(1,"link"),a())}function si(t,n){t&1&&(s(0,"spk-icon",51),m(1,"envelope"),a())}function li(t,n){t&1&&(s(0,"spk-icon",51),m(1,"textbox"),a())}function ci(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),m(2),_(3,ri,3,1,"spk-tooltip",48),a(),d(4,"input",50),_(5,ai,2,0,"spk-icon",51)(6,si,2,0,"spk-icon",51)(7,li,2,0,"spk-icon",51),a()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name),u("type",i.formView.type==="Email"?"email":"text"),l(),T(i.formView.type==="Path"?5:i.formView.type==="Email"?6:7)}}function pi(t,n){if(t&1){let e=G();s(0,"span",55),P("click",function(){F(e);let o=p(2).$implicit,r=p(2);return g(r.oauthStartTokenCreation(o.destinationType,o))}),m(1," AuthID "),a()}}function ui(t,n){t&1&&(s(0,"spk-icon",51),m(1,"password"),a())}function di(t,n){if(t&1){let e=G();s(0,"spk-icon",56),P("click",function(){F(e);let o=p(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),m(1," eye "),a()}}function mi(t,n){if(t&1){let e=G();s(0,"spk-icon",56),P("click",function(){F(e);let o=p(2).$implicit;return g(o.formView.showPassword=!o.formView.showPassword)}),m(1," eye-slash "),a()}}function _i(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),m(2),a(),d(3,"input",52),_(4,pi,2,0,"span",53)(5,ui,2,0,"spk-icon",51)(6,di,2,0,"spk-icon",54)(7,mi,2,0,"spk-icon",54),a()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name),u("type",i.formView.showPassword?"text":"password"),l(),T(i.oauthField===i.formView.name?4:5),l(2),T(i.formView.showPassword?6:7)}}function Fi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(3).$implicit;u("message",e.formView.longDescription)}}function gi(t,n){if(t&1&&m(0),t&2){let e=p().$implicit;Nt(" ",e==null?null:e.key," (",e==null?null:e.value,") ")}}function Ci(t,n){if(t&1&&m(0),t&2){let e=p().$implicit;Y(" ",e," ")}}function hi(t,n){if(t&1&&_(0,gi,1,2)(1,Ci,1,1),t&2){let e=p(3).$implicit;T(e.formView.loadOptions?0:1)}}function fi(t,n){if(t&1&&(s(0,"spk-select",57)(1,"label",47),m(2),_(3,Fi,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),_(5,hi,2,1,"ng-template",null,3,ot)),t&2){let e,i=re(6);p();let o=$t(0),r=p().$implicit;u("options",o)("isClearable",!1)("optionTemplate",i),l(),W("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),Y(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),W("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),ce("formControlName",r.formView.name)}}function Si(t,n){if(t&1&&(kt(0),_(1,fi,7,14)),t&2){let e=p().$implicit,i=Ot(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),T(i?1:-1)}}function Ti(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(3).$implicit;u("message",e.formView.longDescription)}}function Di(t,n){if(t&1&&m(0),t&2){let e=n.$implicit;Nt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function Ei(t,n){if(t&1&&(s(0,"spk-select",59)(1,"label",47),m(2),_(3,Ti,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),_(5,Di,1,2,"ng-template",null,4,ot)),t&2){let e,i=re(6);p();let o=$t(0),r=p().$implicit;u("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",i),l(),W("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),Y(" ",(e=r.formView.shortDescription)!==null&&e!==void 0?e:r.formView.name," "),l(),T(r.formView.longDescription?3:-1),l(),W("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),ce("formControlName",r.formView.name)}}function yi(t,n){t&1&&d(0,"spk-progress-bar",58)}function Ai(t,n){if(t&1&&(kt(0),_(1,Ei,7,15)(2,yi,1,0,"spk-progress-bar",58)),t&2){let e=p().$implicit,i=Ot(e.formView.loadOptions?e.formView.loadOptions(p(2).injector)():e.formView.options);l(),T(i?1:2)}}function Pi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Ni(t,n){if(t&1&&(s(0,"app-size",45)(1,"label",47),m(2),_(3,Pi,3,1,"spk-tooltip",48),a()()),t&2){let e,i=p().$implicit;u("inputType",i.Name)("formControlName",i.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
7
|
-
item.asHttpOptions ? 'http' : 'other'
|
|
8
|
-
}}`),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1)}}function ki(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Oi(t,n){if(t&1&&(s(0,"spk-form-field")(1,"label",47),m(2),_(3,ki,3,1,"spk-tooltip",48),a(),d(4,"input",60),s(5,"spk-icon",51),m(6,"numpad"),a()()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function $i(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Mi(t,n){if(t&1&&(s(0,"spk-toggle",46)(1,"label",47),m(2),_(3,$i,3,1,"spk-tooltip",48),a(),d(4,"input",61),a()),t&2){let e,i=p().$implicit;l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1),l(),W("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),ce("formControlName",i.formView.name)}}function wi(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function Ri(t,n){if(t&1&&m(0),t&2){let e=n.$implicit;Y(" ",e," ")}}function xi(t,n){if(t&1&&(s(0,"spk-select",62)(1,"label",47),m(2),_(3,wi,3,1,"spk-tooltip",48),a(),d(4,"input",63),a(),_(5,Ri,1,1,"ng-template",null,4,ot)),t&2){let e,i=re(6),o=p().$implicit;u("options",o.formView.options)("selectMultiple",!0)("optionTemplate",i),l(),Bt("for","destination-",o.formGroupName,"-",o.index,""),l(),Y(" ",(e=o.formView.shortDescription)!==null&&e!==void 0?e:o.formView.name," "),l(),T(o.formView.longDescription?3:-1),l(),ce("formControlName",o.formView.name)}}function Ii(t,n){if(t&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),t&2){let e=p(2).$implicit;u("message",e.formView.longDescription)}}function vi(t,n){if(t&1&&(s(0,"app-timespan",45)(1,"label",47),m(2),_(3,Ii,3,1,"spk-tooltip",48),a()()),t&2){let e,i=p().$implicit;u("inputType",i.formView.name)("formControlName",i.formView.name)("customId","destination-"+i.formGroupName+"-"+i.index+"-"+(i.asHttpOptions?"http":"other")),l(),W("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),Y(" ",(e=i.formView.shortDescription)!==null&&e!==void 0?e:i.formView.name," "),l(),T(i.formView.longDescription?3:-1)}}function bi(t,n){if(t&1){let e=G();s(0,"button",64),P("click",function(){F(e);let o=p().$implicit,r=p(2);return g(r.removeFormView(o.formView,0))}),s(1,"spk-icon"),m(2,"x-circle"),a()()}}function Gi(t,n){if(t&1&&(s(0,"div",41),H(1,42),_(2,ni,5,17,"app-file-tree",43)(3,oi,5,13,"app-file-tree",44)(4,ci,8,13,"spk-form-field")(5,_i,8,13,"spk-form-field")(6,Si,2,2)(7,Ai,3,2)(8,Ni,4,9,"app-size",45)(9,Oi,7,11,"spk-form-field")(10,Mi,5,11,"spk-toggle",46)(11,xi,7,9)(12,vi,4,9,"app-timespan",45),X(),_(13,bi,3,0,"button",32),a()),t&2){let e=n.$implicit;ke("single-field",e.formGroupName!=="advanced"),l(),u("formGroupName",e.formGroupName),l(),T(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"||e.formView.type==="DateTime"?12:-1),l(11),T(e.formGroupName==="advanced"?13:-1)}}function Li(t,n){if(t&1&&(H(0,22)(1,36),ne(2,Hn,1,9,"ng-container",null,te),ne(4,jn,1,9,"ng-container",null,te),s(6,"app-toggle-card",37),H(7,38),y(8,10),s(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),a(),H(12,20),ne(13,qn,3,1,"button",33,te),X(),a(),A(),X(),ne(15,Qn,1,9,"ng-container",null,te),a(),s(17,"app-toggle-card",37),H(18,38),y(19,11),s(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),a(),H(23,20),ne(24,Jn,3,1,"button",33,te),X(),a(),A(),X(),ne(26,ei,1,9,"ng-container",null,te),a(),_(28,Gi,14,5,"ng-template",null,2,ot),X()()),t&2){let e=p();l(2),ie(e.destinationFormPair().custom),l(2),ie(e.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),ie(e.notSelectedAdvancedFormPair()),l(2),ie(e.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",e.notSelectedHttpOptions().length===0),l(3),ie(e.notSelectedHttpOptions()),l(2),ie(e.selectedHttpOptions())}}function Vi(t,n){if(t&1){let e=G();s(0,"spk-dialog",65),K("isOpenChange",function(o){F(e);let r=p();return B(r.targetUrlDialogOpen,o)||(r.targetUrlDialogOpen=o),g(o)}),s(1,"header",66)(2,"h2"),R(3,12),a(),s(4,"spk-alert",67),R(5,13),a()(),s(6,"div",68)(7,"spk-form-field"),d(8,"textarea",69),a()(),s(9,"footer",70)(10,"button",24),P("click",function(){F(e);let o=p();return g(o.closeTargetUrlDialog(!1))}),m(11,"Cancel"),a(),s(12,"button",71),P("click",function(){F(e);let o=p();return g(o.closeTargetUrlDialog(!0))}),y(13,14),d(14,"spk-icon"),A(),a()()()}if(t&2){let e=p();U("isOpen",e.targetUrlDialogOpen),u("options",tt(3,bn)),l(8),u("formControl",e.targetUrlCtrl)}}var Tt=new Ce,tn=(t={destinations:[]})=>Tt.group({destinations:Tt.array(t.destinations)}),nn=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:i})=>Tt.group({destinationType:Tt.control(t),custom:n,dynamic:e,advanced:i}),bt=class t{#n=O(pe);#t=O(Ae);#e=O(fe);#i=O(ve);#o=O(Ft);injector=O(Vt);formRef=Me.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=b(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=E(!1);testLoading=E(!1);destinationTypeOptionsInFocus=E(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=E(Se.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),e=this.destinationTypeOptions();return n.map(i=>e.find(o=>o.key===i))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(i=>!n.includes(i.key))});getFormFieldValue(n,e,i){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[i].value}getFormControl(n,e,i){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[i]}addDestinationFormGroup(n){this.#e.addDestinationFormGroup(n)}addAdvancedFormPair(n,e){this.#e.addAdvancedFormPair(n,e)}removeFormView(n,e){this.#e.removeAdvancedFormPair(n,e)}addHttpOption(n,e){this.#e.addHttpOption(n,e)}targetUrl=b(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new ut;targetUrlInitial=E(null);targetUrlDialogOpen=E(!1);openTargetUrlDialog(){let e=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,i=this.targetUrlInitial();!n||e===i||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let i=this.#e.getCurrentTargetUrl()[n];i&&(this.testLoading.set(!0),this.#o.testDestination(i,n,!0).pipe(Ze(()=>this.testLoading.set(!1))).subscribe({next:o=>{if(o.action==="success"){this.#e.isNew()&&(o.containsBackup===!0?this.#i.open(J,{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}}):o.anyFilesFound===!0&&this.#i.open(J,{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}})),this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3);return}if(o.action==="generic-error"){this.successfulTest.set(!1);return}o.action==="trust-cert"&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",o.destinationIndex,o.certData),o.action==="approve-host-key"&&this.#e.addOrUpdateAdvancedFormPairByName("ssh-fingerprint",o.destinationIndex,o.reportedHostKey),o.testAgain&&this.testDestination(o.destinationIndex)}}))}mapToTargetUrl(n){return Ct(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(i=>i.Key===n);return e?`${e.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#r=E("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=E(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=E(!1);#l=E(null);keyCreation(){}oauthStartTokenCreation(n,e){let i=this.getFormControl(e.index,e.formGroupName,e.formView.name);this.#a.set(!0);let o=this.#s(),r=450,c=600,f=this.#r()+"?type="+n+"&token="+o,N=screen.width/2-r/2,I=screen.height/2-c/2,z=window.open(f,"_blank","height="+c+",width="+r+",menubar=0,status=0,titlebar=0,toolbar=0,left="+N+",top="+I);return window.addEventListener("message",w=>{let v=w.data.startsWith("authid:"),V=v?w.data.replace("authid:",""):null;console.log("event",w),v&&(i.setValue(V),this.#a.set(!1),z?.close())}),!1}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=le({type:t,selectors:[["app-destination"]],viewQuery:function(e,i){e&1&&we(i.formRef,wn,5),e&2&&Re()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=Oe(n);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let i;i=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let r;r=$localize`Other destinations`;let c;c=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,c=Oe(c);let f;f=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,f=Oe(f);let N;N=$localize`Edit target URL`;let I;I=$localize` Be careful, this will overwrite everything you have in your destination. `;let z;return z=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,e,i,o,r,c,f,N,I,z,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"loader","success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,i){if(e&1){let o=G();s(0,"form",15,0),P("submit",function(){return F(o),g(i.next())}),s(2,"header")(3,"h3",16),y(4,5),s(5,"div",17),_(6,Vn,4,5,"button",18),s(7,"spk-menu")(8,"button",19),d(9,"spk-icon"),a(),H(10,20),s(11,"button",21),P("click",function(){return F(o),g(i.openTargetUrlDialog())}),d(12,"spk-icon"),a(),X(),a()(),A(),a(),_(13,Un,3,0,"p"),a(),_(14,Wn,9,1)(15,Li,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),P("click",function(){return F(o),g(i.goBack())}),y(18,6),d(19,"spk-icon"),A(),a(),s(20,"button",25),y(21,7),d(22,"spk-icon"),A(),a()()(),_(23,Vi,15,4,"spk-dialog",26)}if(e&2){let o;u("formGroup",i.destinationForm),l(6),T(i.destinationCount()>0?6:-1),l(7),T(i.destinationCount()>0?13:-1),l(),T(i.destinationCount()===0?14:-1),l(),T(!((o=i.destinationFormSignal())==null||o.destinations==null)&&o.destinations.length?15:-1),l(8),T(i.targetUrlDialogOpen()?23:-1)}},dependencies:[je,Ke,_e,We,Ve,ge,Ue,dt,ze,He,mt,Ht,Kt,de,zt,ue,Ge,pt,Wt,lt,me,ct,Yt,qe,_t,qt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-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}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.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-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{Ft as a,Ct as b,Se as c,tn as d,nn as e,bt as f,Qt as g,xt as h,Rt as i,$e as j,It as k,Zt as l,vt as m,fe as n};
|
package/chunk-LZUCVLMF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as g}from"./chunk-JD54W4UA.js";import"./chunk-6DH6O5YE.js";import"./chunk-YJSWEW6C.js";import"./chunk-VN7JM6M3.js";import"./chunk-KSP3JQHY.js";import{a as k}from"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import{a as I}from"./chunk-TJS6O6KD.js";import"./chunk-7L42EO7J.js";import"./chunk-2ZVLF3KW.js";import"./chunk-6OKAWH4X.js";import{a as N}from"./chunk-GDHVQU56.js";import"./chunk-RHW5QVAY.js";import"./chunk-O2YN63YI.js";import"./chunk-T2OUHRUV.js";import"./chunk-CHRKPWRG.js";import"./chunk-I3C2AEHI.js";import{b as P,c as h,e as E,f as B}from"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import{p as $,q as M,v as b}from"./chunk-WX7L7V6J.js";import{h as O}from"./chunk-4AECHE4W.js";import"./chunk-JV6DGJII.js";import"./chunk-CKPICCFH.js";import"./chunk-EF7JWRDC.js";import{Bc as A,E as m,Gb as d,Hb as c,Qa as r,Y as l,ab as f,fb as C,kc as R,nb as u,nc as _,sb as D,wb as s,xb as p,yb as n}from"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=l(P);#e=l(g);#a=l(N);#i=l(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{T as default};
|
package/chunk-QJILVQSS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as a,f as b}from"./chunk-X5YRWKCW.js";import"./chunk-YJSWEW6C.js";import"./chunk-VN7JM6M3.js";import"./chunk-HTNYQE2B.js";import"./chunk-URU2SLPX.js";import"./chunk-7L42EO7J.js";import"./chunk-T2OUHRUV.js";import"./chunk-QVIZK4WW.js";import"./chunk-WMTA6PZM.js";import"./chunk-WX7L7V6J.js";import"./chunk-4AECHE4W.js";import"./chunk-CKPICCFH.js";import"./chunk-W2F756OF.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
package/chunk-VLIGMNJX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as le,b as pe}from"./chunk-6DH6O5YE.js";import{a as re}from"./chunk-YJSWEW6C.js";import{a as Y}from"./chunk-URU2SLPX.js";import{b as Z,c as ee,e as te,h as ie,j as ne,s as oe}from"./chunk-T2OUHRUV.js";import{A as Q,a as K,g as U,l as W,o as X,t as j,y as H,z as J}from"./chunk-WX7L7V6J.js";import{$b as m,Ab as k,Ac as R,Cb as x,Gb as $,Hb as P,Ib as q,Mb as f,Nb as s,Qa as l,Sb as g,Y as B,Za as G,_b as E,ab as z,ac as L,bc as F,da as d,ea as u,ec as v,fb as C,fc as D,gc as b,nb as _,ra as I,sb as S,sc as A,tb as V,ua as h,ub as O,vb as y,wb as p,xb as a,yb as M,zb as N}from"./chunk-W2F756OF.js";import{a as T,b as w}from"./chunk-7CGTOI24.js";function se(n,o){if(n&1){let e=x();p(0,"button",14),f("click",function(){d(e);let t=s();return u(t.addFreeTextSetting())}),$(1,5),M(2,"spk-icon"),P(),a()}}function me(n,o){if(n&1){let e=x();p(0,"button",16,0),f("click",function(){let t=d(e).$implicit,r=s(2);return u(r.addSetting(t))}),m(2),a()}if(n&2){let e=o.$implicit;l(2),L(e.name)}}function _e(n,o){if(n&1&&(p(0,"h3",7),m(1),a(),O(2,me,3,1,"button",15,V)),n&2){let e=o.$implicit;l(),L(e.displayName),l(),y(e.options)}}function ce(n,o){n&1&&(p(0,"div",12),m(1,"Add a setting above to get started."),a())}function de(n,o){if(n&1){let e=x();p(0,"div",17)(1,"label"),m(2),a(),p(3,"div",23)(4,"spk-form-field")(5,"input",24),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateFreeTextSettingName(r,t))}),a(),p(6,"spk-icon",25),m(7,"rectangle-dashed"),a()(),p(8,"spk-form-field")(9,"input",24),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a(),p(10,"spk-icon",25),m(11,"textbox"),a()()()()}if(n&2){let e=s().$implicit;l(2),F(" ",e.FormView.shortDescription," "),l(3),_("ngModel",e.Name),l(4),_("ngModel",e.Value())}}function ue(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function ge(n,o){if(n&1){let e=x();p(0,"app-file-tree",18)(1,"label",26),m(2),C(3,ue,3,1,"spk-tooltip",27),a(),p(4,"input",28),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;_("startingPath",i.Value())("accepts",i.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),g("for","destination-",i.Name,"-",t,""),l(),F(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),g("id","destination-",i.Name,"-",t,""),_("ngModel",i.Value())}}function Ce(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function xe(n,o){if(n&1){let e=x();p(0,"app-file-tree",19)(1,"label",26),m(2),C(3,Ce,3,1,"spk-tooltip",27),a(),p(4,"input",28),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;_("startingPath",i.Value()),l(),g("for","destination-",i.Name,"-",t,""),l(),F(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),g("id","destination-",i.Name,"-",t,""),_("ngModel",i.Value())}}function fe(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function Se(n,o){n&1&&(p(0,"spk-icon",25),m(1,"link"),a())}function Fe(n,o){n&1&&(p(0,"spk-icon",25),m(1,"textbox"),a())}function Te(n,o){if(n&1){let e=x();p(0,"spk-form-field")(1,"label",26),m(2),C(3,fe,3,1,"spk-tooltip",27),a(),p(4,"input",28),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a(),C(5,Se,2,0,"spk-icon",25)(6,Fe,2,0,"spk-icon",25),a()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;l(),g("for","destination-",i.Name,"-",t,""),l(),F(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),g("id","destination-",i.Name,"-",t,""),_("ngModel",i.Value()),l(),S(i.FormView.type==="Path"?5:6)}}function we(n,o){if(n&1){let e=x();p(0,"spk-icon",31),f("click",function(){d(e);let t=s(2).$implicit;return u(t.showPassword=!t.showPassword)}),m(1," eye "),a()}}function Ve(n,o){if(n&1){let e=x();p(0,"spk-icon",31),f("click",function(){d(e);let t=s(2).$implicit;return u(t.showPassword=!t.showPassword)}),m(1," eye-slash "),a()}}function Oe(n,o){if(n&1){let e=x();p(0,"spk-form-field")(1,"label",26),m(2),a(),p(3,"input",29),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a(),p(4,"spk-icon",25),m(5,"password"),a(),C(6,we,2,0,"spk-icon",30)(7,Ve,2,0,"spk-icon",30),a()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;l(),g("for","destination-",i.Name,"-",t,""),l(),F(" ",i.FormView.shortDescription," "),l(),g("id","destination-",i.Name,"-",t,""),_("type",i.showPassword?"text":"password")("ngModel",i.Value()),l(3),S(i.showPassword?6:7)}}function ye(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function ke(n,o){if(n&1&&m(0),n&2){let e=o.$implicit;F(" ",e," ")}}function Ie(n,o){if(n&1){let e=x();p(0,"spk-select",32)(1,"label",26),m(2),C(3,ye,3,1,"spk-tooltip",27),a(),p(4,"input",28),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a()(),C(5,ke,1,1,"ng-template",null,1,A)}if(n&2){let e=E(6),i=s(),t=i.$implicit,r=i.$index;_("options",t.FormView.options)("isClearable",!1)("optionTemplate",e),l(),g("for","destination-",t.Name,"-",r,""),l(),F(" ",t.FormView.shortDescription," "),l(),S(t.FormView.longDescription?3:-1),l(),g("id","destination-",t.Name,"-",r,""),_("ngModel",t.Value())}}function he(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function Me(n,o){if(n&1){let e=x();p(0,"app-size",33),b("ngModelChange",function(t){d(e);let r=s().$implicit;return D(r.Value,t)||(r.Value=t),u(t)}),p(1,"label",26),m(2),C(3,he,3,1,"spk-tooltip",27),a()()}if(n&2){let e,i=s(),t=i.$implicit,r=i.$index;_("inputType",t.Name),v("ngModel",t.Value),_("customId","destination-{{ item.Name }}-{{ $index }}"),l(),g("for","destination-",t.Name,"-",r,""),l(),F(" ",(e=t.FormView.shortDescription)!==null&&e!==void 0?e:t.FormView.name," "),l(),S(t.FormView.longDescription?3:-1)}}function Ne(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function $e(n,o){if(n&1){let e=x();p(0,"spk-form-field")(1,"label",26),m(2),C(3,Ne,3,1,"spk-tooltip",27),a(),p(4,"input",34),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a(),p(5,"spk-icon",25),m(6,"numpad"),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;l(),g("for","destination-",i.Name,"-",t,""),l(),F(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),g("id","destination-",i.Name,"-",t,""),_("ngModel",i.Value())}}function Pe(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function Ee(n,o){if(n&1){let e=x();p(0,"spk-toggle",21)(1,"label",26),m(2),C(3,Pe,3,1,"spk-tooltip",27),a(),p(4,"input",35),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a()()}if(n&2){let e=s(),i=e.$implicit,t=e.$index;l(),g("for","destination-",i.Name,"-",t,""),l(),F(" ",i.FormView.shortDescription," "),l(),S(i.FormView.longDescription?3:-1),l(),g("id","destination-",i.Name,"-",t,""),_("ngModel",i.Value())}}function Le(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function ve(n,o){if(n&1&&m(0),n&2){let e=o.$implicit;F(" ",e," ")}}function De(n,o){if(n&1){let e=x();p(0,"spk-select",36)(1,"label",26),m(2),C(3,Le,3,1,"spk-tooltip",27),a(),p(4,"input",37),f("ngModelChange",function(t){d(e);let r=s().$implicit,c=s();return u(c.updateSettingValue(r,t))}),a()(),C(5,ve,1,1,"ng-template",null,2,A)}if(n&2){let e=E(6),i=s(),t=i.$implicit,r=i.$index;_("options",t.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),g("for","destination-",t.Name,"-",r,""),l(),F(" ",t.FormView.shortDescription," "),l(),S(t.FormView.longDescription?3:-1),l(),_("ngModel",t.Value())}}function be(n,o){if(n&1&&(p(0,"spk-tooltip",27)(1,"spk-icon"),m(2,"question"),a()()),n&2){let e=s(2).$implicit;_("message",e.FormView.longDescription)}}function Ae(n,o){if(n&1){let e=x();p(0,"app-timespan",33),b("ngModelChange",function(t){d(e);let r=s().$implicit;return D(r.Value,t)||(r.Value=t),u(t)}),p(1,"label",26),m(2),C(3,be,3,1,"spk-tooltip",27),a()()}if(n&2){let e,i=s(),t=i.$implicit,r=i.$index;_("inputType",t.Name),v("ngModel",t.Value),_("customId","destination-{{ item.Name }}-{{ $index }}"),l(),g("for","destination-",t.Name,"-",r,""),l(),F(" ",(e=t.FormView.shortDescription)!==null&&e!==void 0?e:t.FormView.name," "),l(),S(t.FormView.longDescription?3:-1)}}function Re(n,o){if(n&1){let e=x();p(0,"div",13),C(1,de,12,3,"div",17)(2,ge,5,14,"app-file-tree",18)(3,xe,5,10,"app-file-tree",19)(4,Te,7,10,"spk-form-field")(5,Oe,8,10,"spk-form-field")(6,Ie,7,12)(7,Me,4,8,"app-size",20)(8,$e,7,9,"spk-form-field")(9,Ee,5,9,"spk-toggle",21)(10,De,7,9)(11,Ae,4,8,"app-timespan",20),p(12,"button",22),f("click",function(){let t=d(e).$implicit,r=s();return u(r.removeSetting(t))}),p(13,"spk-icon"),m(14,"x-bold"),a()()()}if(n&2){let e=o.$implicit;l(),S(e.FormView.type==="FreeText"?1:e.FormView.type==="FileTree"?2:e.FormView.type==="FolderTree"?3:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"?4:e.FormView.type==="Password"?5:e.FormView.type==="Enumeration"?6:e.FormView.type==="Size"?7:e.FormView.type==="Integer"?8:e.FormView.type==="Boolean"?9:e.FormView.type==="Flags"?10:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?11:-1)}}var ae=class n{#e=B(Y);options=G.required();hiddenOptions=I([]);hasFreeTextSettings=I(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=R(()=>{let o=this.hiddenOptions();return this.options().map(i=>{let t=this.allOptions().find(r=>r.name===i.Name);if(t&&!o.includes(t.name)){let r=i.Value??"";t.type==="Boolean"&&(r=r&&r.toLowerCase()==="true"||!1),t.type==="Integer"&&(r=parseInt(r)||0);let c=h(r);return w(T({},i),{Value:c,FormView:t})}else if(this.hasFreeTextSettings())return w(T({},i),{Value:h(i.Value),FormView:{name:i.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(i=>i!==null)});nonSelectedOptionsGrouped=R(()=>{let o=this.options().map(i=>i.Name),e=this.hiddenOptions();return this.allOptionsGrouped().map(i=>w(T({},i),{options:i.options.filter(t=>!o.includes(t.name)&&!e.includes(t.name))})).filter(i=>i.options.length>0)});addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(o=>[...o,{Filter:null,Name:"",Value:""}])}addSetting(o){this.options.update(e=>{let i=o.defaultValue??"";return o.type==="Boolean"&&(i=i.toLowerCase()==="true"||!1),o.type==="Integer"&&(i=parseInt(i)||0),[...e,{Name:o.name,Value:i}]})}updateSettingValue(o,e){this.options.update(i=>{let t=[...i],r=t.findIndex(c=>c.Name===o.Name);return o.FormView.type==="Boolean"?(t[r].Value=e?"True":"False",t):o.FormView.type==="Integer"?(t[r].Value=e.toString(),t):(t[r].Value=e,t)})}updateFreeTextSettingName(o,e){this.options.update(i=>{let t=[...i],r=t.findIndex(c=>c.Name===o.Name);return t[r].Name=e,t})}removeSetting(o){this.options.update(e=>e.filter(i=>i.Name!==o.Name))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"]},outputs:{options:"optionsChange"},decls:16,vars:4,consts:()=>{let o;o=$localize`Advanced options`;let e;e=$localize` Add advanced option ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let i;return i=$localize` New custom option ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:pen${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["option",""],["enumOptionTemplate",""],["optionTemplate",""],o,e,i,[3,"disallowToggle"],["title",""],[1,"actions"],["spk-button","","type","button",1,"outlined","small"],[3,"searchable"],["menu",""],[1,"placeholder"],[1,"field-row"],["spk-button","","type","button",1,"outlined","small",3,"click"],["type","button"],["type","button",3,"click"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined","remove-btn",3,"click"],[1,"form-row"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],[1,"primary",3,"message"],["type","text",3,"ngModelChange","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"]]},template:function(e,i){e&1&&(p(0,"spk-toggle-card",6),N(1,7)(2),q(3,3),k(),p(4,"div",8),C(5,se,3,0,"button",9),p(6,"spk-menu",10)(7,"button",9),$(8,4),M(9,"spk-icon"),P(),a(),N(10,11),O(11,_e,4,1,null,null,V),k(),a()(),k(),C(13,ce,2,0,"div",12),O(14,Re,15,1,"div",13,V),a()),e&2&&(_("disallowToggle",!0),l(5),S(i.hasFreeTextSettings()?5:-1),l(),_("searchable",!0),l(5),y(i.nonSelectedOptionsGrouped()),l(2),S(i.selectedSettings().length===0?13:-1),l(),y(i.selectedSettings()))},dependencies:[oe,ee,ne,Z,te,ie,re,H,W,U,X,Q,K,j,J,le,pe],styles:["[_nghost-%COMP%]{display:block}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}spk-toggle[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-level-60R);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}"],changeDetection:0})};export{ae as a};
|
package/chunk-W577IVOD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-IIB7YCLW.js")},{path:"encryption",loadComponent:()=>import("./chunk-3KSBRC3X.js")},{path:"select-files",loadComponent:()=>import("./chunk-QJILVQSS.js")},{path:"options",loadComponent:()=>import("./chunk-7S5SYCMV.js")},{path:"progress",loadComponent:()=>import("./chunk-65OCE2TY.js")}],t=o;export{t as default};
|
package/chunk-X4SAPDOB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-BOBAN442.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-UMP4YQXB.js")},{path:"live",loadComponent:()=>import("./chunk-D3I33UIQ.js")}]}],t=o;export{t as default};
|
package/chunk-X5YRWKCW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-YJSWEW6C.js";import{a as Ge}from"./chunk-VN7JM6M3.js";import{a as oe}from"./chunk-HTNYQE2B.js";import{a as J}from"./chunk-URU2SLPX.js";import{a as te}from"./chunk-7L42EO7J.js";import{b as De,c as y,e as L,f as $,h as Ae,i as b,k as ve,n as D,q as A,r as v,s as we,t as w}from"./chunk-T2OUHRUV.js";import{b as R,d as N}from"./chunk-QVIZK4WW.js";import{a as k,e as ke,g as M,l as Me,p as ye,q as Le,t as $e,z as be}from"./chunk-WX7L7V6J.js";import{h as I}from"./chunk-4AECHE4W.js";import{j as H}from"./chunk-CKPICCFH.js";import{$b as j,Ab as U,B as Fe,Bc as q,Cb as B,E as ee,F as T,Gb as u,Hb as F,Ib as E,J as me,Jb as Te,Kb as Ee,Mb as O,N as Se,Nb as x,O as X,Qa as m,S as de,Y as p,ab as h,cc as Oe,da as f,ea as C,ec as fe,fb as z,fc as Ce,gc as Re,i as _e,kc as Ne,lc as Pe,nb as S,o as ce,pb as ge,pc as he,rc as Ie,sb as Y,ua as _,wb as r,x as Z,xb as l,y as ue,yb as c,zb as K}from"./chunk-W2F756OF.js";var Be=new v,We=()=>Be.group({passphrase:Be.control("")}),ie=class a{#t=p(I);#e=p(P);#o=p(N);#n=p(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(T(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let o;return o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,o,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),O("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),E(3,0),l(),c(4,"input",5),l(),r(5,"div",6)(6,"button",7),O("click",function(){return t.back()}),u(7,1),c(8,"spk-icon"),F(),l(),r(9,"button",8),u(10,2),c(11,"spk-icon"),F(),l()()()),e&2&&S("formGroup",t.encryptionForm)},dependencies:[w,b,y,L,$,D,A,Me,k,M],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ye=()=>({standalone:!0});function Ke(a,i){a&1&&c(0,"spk-progress-bar",7)}function Ue(a,i){if(a&1&&(r(0,"div",14),j(1),he(2,"date"),l()),a&2){let e=i.$implicit;m(),Oe("",e.Version,": ",Ie(2,2,e.Time,"medium"),"")}}function je(a,i){a&1&&c(0,"spk-progress-bar",7)}function qe(a,i){if(a&1&&(r(0,"app-file-tree",13)(1,"label",15),E(2,4),l(),c(3,"input",16),l()),a&2){let e=x(2);S("rootPaths",e.rootPaths())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function He(a,i){if(a&1){let e=B();r(0,"spk-select",11),O("cleared",function(){f(e);let o=x();return C(o.abortLoading())}),r(1,"input",12),Re("ngModelChange",function(o){f(e);let n=x();return Ce(n.selectOption,o)||(n.selectOption=o),C(o)}),l(),z(2,Ue,3,5,"ng-template"),l(),z(3,je,1,0,"spk-progress-bar",7)(4,qe,4,4,"app-file-tree",13)}if(a&2){let e=x();S("options",e.versionOptions())("isClearable",!1),m(),fe("ngModel",e.selectOption),S("ngModelOptions",Pe(6,Ye)),m(2),Y(e.isDraft()||e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),m(),Y(e.showFileTree()?4:-1)}}var se=new v,Xe=()=>se.group({filesToRestore:se.control(""),passphrase:se.control(null)}),re=class a{#t=p(I);#e=p(P);#o=p(J);#n=p(N);#i=p(R);#s=p(H);#r=null;#a=null;selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);loadingRootPath=_(!1);isRepairing=_(!1);loadingEffect=q(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=q(()=>{let i=this.backupId(),e=this.isRepairing(),t=this.selectOption();if(!t||!i)return;let n=this.versionOptions()?.find(d=>d.Version===parseInt(t))?.Time??null;if(!n||e)return;let s={id:i+"",time:n};this.backupSettings.set(s),this.getRootPath(s)});repairEffect=q(()=>{let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#a===n)return;this.#a=n,this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(X(this.abortLoading$),T(()=>{this.#a=null})).subscribe(s=>{let d=s.ID;var G=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:d}).subscribe(W=>{W.Status==="Completed"&&(clearInterval(G),this.isRepairing.set(!1))})},1e3)})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#r===t||(this.#r=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#r=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}):this.#t.getApiV1BackupByIdFiles(e).pipe(X(this.abortLoading$),T(()=>{console.log("hi"),this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}))}abortLoading$=new _e;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#s.transform(t.Time,"medium")}`:""}}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#n.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-select-files"]],features:[Ne([H])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],i,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","backupSettings","multiSelect","showFiles"],[1,"custom-option"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",5,0),O("submit",function(){return f(o),C(t.next())}),r(2,"h3",6),E(3,1),l(),z(4,Ke,1,0,"spk-progress-bar",7)(5,He,5,7),r(6,"div",8)(7,"button",9),O("click",function(){return f(o),C(t.back())}),u(8,2),c(9,"spk-icon"),F(),l(),r(10,"button",10),u(11,3),c(12,"spk-icon"),F(),l()()()}e&2&&(S("formGroup",t.selectFilesForm),m(4),Y(t.versionOptionsLoading()?4:5),m(5),Te(t.isFileRestore()?"Back":"Exit"),Ee(8))},dependencies:[we,b,y,L,$,Ae,w,D,A,H,Q,M,k,$e,ye],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var P=class a{#t=p(N);#e=p(R);#o=p(J);#n=p(ke);#i=p(I);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=Xe();optionsForm=ze();encryptionForm=We();optionsFormSignal=oe(this.optionsForm.valueChanges);selectFilesFormSignal=oe(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);init(i,e=!1,t=!1){this.backupId.set(i),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(T(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.navigate(["./progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(te,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#s(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Fe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?ce(()=>t):ue(1e3).pipe(Se(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?Z([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",d=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(d=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(d=$localize`The backup storage folder was not found.`),s&&(d=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(te,{data:{title:$localize`Failed to load backup filesets`,message:d,confirmText:$localize`OK`,cancelText:void 0},closed:G=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):Z([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(me(3))]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#s(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=de({token:a,factory:a.\u0275fac,providedIn:"root"})};var V=new v,ze=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),ae=class a{#t=p(P);#e=p(N);#o=p(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let d;d=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let G;G=$localize`Permissions`;let W;W=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let le;le=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let pe;return pe=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,d,G,W,le,pe,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",12,0),O("submit",function(){return f(o),C(t.submit())}),r(2,"h3",13),E(3,1),l(),r(4,"app-toggle-card",14),K(5,15),E(6,2),U(),r(7,"spk-radio",16),u(8,3),c(9,"input",17),F(),l(),r(10,"spk-radio",16),u(11,4),c(12,"input",18),F(),l(),r(13,"app-file-tree",19)(14,"label",20),j(15,"Path"),l(),c(16,"input",21),l()(),r(17,"app-toggle-card",14),K(18,15),E(19,5),U(),r(20,"spk-radio",16),u(21,6),c(22,"input",22),F(),l(),r(23,"spk-radio",16),u(24,7),c(25,"input",23),F(),l()(),r(26,"app-toggle-card"),K(27,15),E(28,8),U(),r(29,"spk-toggle",24),u(30,9),c(31,"input",25),F(),l()(),r(32,"div",26)(33,"button",27),O("click",function(){return f(o),C(t.goBack())}),u(34,10),c(35,"spk-icon"),F(),l(),r(36,"button",28),u(37,11),c(38,"spk-icon"),F(),l()()()}if(e&2){let o;S("formGroup",t.optionsForm),m(4),S("disallowToggle",!0),m(9),S("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation"),m(4),S("disallowToggle",!0),m(19),ge("loader",t.isSubmitting())}},dependencies:[w,b,y,De,ve,L,$,D,A,Ge,Q,be,Le,M,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{ze as a,ae as b,We as c,ie as d,Xe as e,re as f,P as g};
|
package/chunk-YD7PS7OS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-PN73DZ2H.js")},{path:"destination",loadComponent:()=>import("./chunk-HPGYPP74.js")},{path:"source-data",loadComponent:()=>import("./chunk-P5SS3OV3.js")},{path:"schedule",loadComponent:()=>import("./chunk-MHHVE6AV.js")},{path:"options",loadComponent:()=>import("./chunk-LQ5ORNDI.js")}];export{o as default};
|