@duplicati/ngclient 0.0.97 → 0.0.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/spk.woff2 +0 -0
- package/chunk-22CSSCKZ.js +1 -0
- package/chunk-23KHTRDM.js +1 -0
- package/chunk-2SGDSXNW.js +1 -0
- package/chunk-2ZK7AAG4.js +1 -0
- package/chunk-36ZZ3COU.js +1 -0
- package/{chunk-QPO2N2OR.js → chunk-3IZBE2NA.js} +1 -1
- package/chunk-3NDOYD25.js +1 -0
- package/chunk-3UJUWE5B.js +1 -0
- package/chunk-3V622MYY.js +1 -0
- package/chunk-436ZVGPO.js +1 -0
- package/chunk-47OESBLR.js +1 -0
- package/{chunk-LO4MUZS2.js → chunk-4FF7PF7J.js} +1 -1
- package/chunk-54SNAQYD.js +1 -0
- package/chunk-7NPADQLG.js +1 -0
- package/chunk-AKXOFDEQ.js +8 -0
- package/chunk-AMJ2CM2Q.js +1 -0
- package/chunk-ASEBN4DE.js +1 -0
- package/chunk-BKWTKAB4.js +1 -0
- package/{chunk-CHZ7TMI7.js → chunk-BWYJMRKB.js} +1 -1
- package/chunk-CEOO3F5U.js +1 -0
- package/chunk-D5WIWFNP.js +1 -0
- package/{chunk-W5YK2JJZ.js → chunk-DJWNLIDJ.js} +1 -1
- package/chunk-DRBDCRHV.js +1 -0
- package/{chunk-MJUYFS7O.js → chunk-E2LHQGCK.js} +1 -1
- package/chunk-EKIFJPZJ.js +1 -0
- package/chunk-EO2PLY2Q.js +1 -0
- package/chunk-EQCQL7A4.js +1 -0
- package/{chunk-6LVGSIUU.js → chunk-FDMBNUIK.js} +1 -1
- package/{chunk-7NEOVOUN.js → chunk-FKTH6XCB.js} +1 -1
- package/chunk-FQPH5MIV.js +2 -0
- package/chunk-FRXAEGHW.js +1 -0
- package/chunk-GNTO7EKM.js +1 -0
- package/chunk-H6IX2D2G.js +1 -0
- package/chunk-I3TLRILF.js +1 -0
- package/chunk-I457VUEG.js +1 -0
- package/{chunk-XC6KYSRC.js → chunk-ISRMJKPG.js} +1 -1
- package/chunk-J6XKFGF5.js +2 -0
- package/chunk-JIPY2BNJ.js +1 -0
- package/{chunk-LHSJLKCF.js → chunk-JJQARMUD.js} +1 -1
- package/{chunk-4XPN5ZGE.js → chunk-K3CYM6ID.js} +1 -1
- package/{chunk-Q6U2NFPI.js → chunk-KABJYPCP.js} +1 -1
- package/chunk-LU4LP7JL.js +3 -0
- package/chunk-M7VDIUGU.js +1 -0
- package/chunk-MEQPT4C3.js +1 -0
- package/chunk-MYK7A3PZ.js +1 -0
- package/{chunk-S5VSZG5H.js → chunk-NFME267J.js} +1 -1
- package/chunk-O6GWHO26.js +1 -0
- package/chunk-OH33D663.js +1 -0
- package/{chunk-FWWMGA32.js → chunk-PFAU4FFV.js} +1 -1
- package/chunk-PGUALKQ6.js +1 -0
- package/{chunk-OS4AAJLB.js → chunk-PX6A6XCQ.js} +1 -1
- package/chunk-QMMXH5TN.js +1 -0
- package/chunk-QRVYPTC6.js +8 -0
- package/chunk-RHW5QVAY.js +1 -0
- package/chunk-SFWQDWHT.js +1 -0
- package/chunk-UJZB6UQE.js +1 -0
- package/chunk-UXWTPWS6.js +1 -0
- package/chunk-VP44CSPI.js +1 -0
- package/chunk-VRGLHRK2.js +2 -0
- package/{chunk-CMXSHXAU.js → chunk-WCLOWI5G.js} +1 -1
- package/chunk-WSLU6K4D.js +1 -0
- package/chunk-WVVXCHHS.js +1 -0
- package/chunk-X4FOF7ZO.js +1 -0
- package/chunk-XGARKXE4.js +7 -0
- package/chunk-XH2A67YP.js +1 -0
- package/chunk-XITZBHPE.js +1 -0
- package/chunk-XQKR67WI.js +1 -0
- package/chunk-YPSSTA3J.js +1 -0
- package/chunk-ZDBNCA7O.js +1 -0
- package/chunk-ZHAXIU33.js +1 -0
- package/chunk-ZP273LXY.js +1 -0
- package/index.html +2 -2
- package/main-73DNRGWN.js +1 -0
- package/package.json +1 -1
- package/styles-2KPDWK5U.css +1 -0
- package/chunk-2SYN2ATG.js +0 -1
- package/chunk-3GK4TNUH.js +0 -1
- package/chunk-3WEATDBM.js +0 -1
- package/chunk-3WKC2CFC.js +0 -1
- package/chunk-3YOT5OAB.js +0 -1
- package/chunk-4ERW7ITN.js +0 -1
- package/chunk-4SOUVJR6.js +0 -1
- package/chunk-5COOM7FC.js +0 -6
- package/chunk-5UL3RRQI.js +0 -2
- package/chunk-7EPQLKGD.js +0 -1
- package/chunk-7JZ5LA6R.js +0 -1
- package/chunk-7XGYQRKR.js +0 -1
- package/chunk-BYMCE7VW.js +0 -1
- package/chunk-C2PMOZWR.js +0 -1
- package/chunk-CPOAOTIS.js +0 -1
- package/chunk-CR2UB7UZ.js +0 -1
- package/chunk-G3YJXHRY.js +0 -1
- package/chunk-GI6WORKU.js +0 -1
- package/chunk-HE6PHO5B.js +0 -1
- package/chunk-HGERKLOF.js +0 -1
- package/chunk-HLLAB5VQ.js +0 -3
- package/chunk-HYBV36HG.js +0 -1
- package/chunk-IAVOZTCR.js +0 -1
- package/chunk-IHYIT4I3.js +0 -1
- package/chunk-ILQK4A72.js +0 -1
- package/chunk-INK3KQF2.js +0 -1
- package/chunk-L3T52MCL.js +0 -1
- package/chunk-MJI6X5KH.js +0 -1
- package/chunk-N7UCCMLS.js +0 -1
- package/chunk-NL7QPU6R.js +0 -1
- package/chunk-NV2YMSSM.js +0 -1
- package/chunk-OL4IJVKD.js +0 -1
- package/chunk-PTC4N7TU.js +0 -7
- package/chunk-PUSUA4U7.js +0 -1
- package/chunk-Q3FF4WG3.js +0 -1
- package/chunk-QX5XWUM2.js +0 -1
- package/chunk-RIGBDLYY.js +0 -1
- package/chunk-UMUPSIIL.js +0 -1
- package/chunk-USGQSK2Z.js +0 -1
- package/chunk-V6OHLKTK.js +0 -1
- package/chunk-VYKAGJXY.js +0 -1
- package/chunk-WBNOGAKJ.js +0 -1
- package/chunk-WNWGY2FM.js +0 -1
- package/chunk-XBZX6CUW.js +0 -1
- package/chunk-YIWL3QAP.js +0 -1
- package/chunk-ZFE5M6M3.js +0 -6
- package/chunk-ZOUY24KQ.js +0 -1
- package/chunk-ZRXUUC26.js +0 -1
- package/chunk-ZTJALQGT.js +0 -1
- package/main-GMFQCDBZ.js +0 -1
- package/styles-IOWRSZHV.css +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as Be}from"./chunk-ISRMJKPG.js";import{a as kt,b as qt}from"./chunk-DNHLTHLR.js";import{a as V}from"./chunk-3V622MYY.js";import{a as Qt,b as Yt,c as Zt}from"./chunk-23KHTRDM.js";import{a as ut}from"./chunk-XH2A67YP.js";import{a as lt}from"./chunk-WCLOWI5G.js";import{a as Ve}from"./chunk-PX6A6XCQ.js";import{b as Ht}from"./chunk-RHW5QVAY.js";import{b as Ue,c as oe,d as fe,e as ie,f as Te,g as pt,h as jt,i as he,j as Re,m as ct,n as De,o as xe,p as Wt,q as Ee,r as Q,s as mt,t as ye}from"./chunk-JJQARMUD.js";import{b as Se,d as J}from"./chunk-I3TLRILF.js";import{A as st,a as ee,b as rt,d as Kt,e as zt,g as Me,l as te,o as Xt,p as at,t as ne,z as Le}from"./chunk-XQKR67WI.js";import{b as Ge}from"./chunk-CEOO3F5U.js";import{c as Bt}from"./chunk-K3CYM6ID.js";import{i as Vt}from"./chunk-M7VDIUGU.js";import{$b as Ut,A as Tt,D as He,Db as g,Eb as C,Fb as $,Gb as Et,Hb as yt,Ib as we,Jb as y,Kb as c,Na as l,Nb as Fe,Pb as Lt,Q as Ie,Qb as B,Ua as de,Vb as ge,W as k,Wb as Ce,Xb as me,Yb as S,Za as Z,Zb as Pt,_b as z,ba as f,bc as et,ca as T,cb as _,cc as tt,dc as nt,ec as At,fc as Nt,ga as Gt,gc as Ot,ic as ot,jc as We,kb as u,l as ft,lc as qe,mb as Ae,na as ht,oa as Dt,p as Xe,pb as h,pc as Qe,qb as le,ra as N,rb as pe,sb as ce,tb as s,ub as a,vb as m,wb as X,xb as H,xc as G,yb as je,yc as it,zb as x}from"./chunk-XGARKXE4.js";import{a as A,c as bt}from"./chunk-7CGTOI24.js";var _t=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var Pe=class e{#e=k(Ge);s3Providers=V(this.getS3Config("Providers"));s3Regions=V(this.getS3Config("Regions"));s3RegionHosts=V(this.getS3Config("RegionHosts"));s3StorageClasses=V(this.getS3Config("StorageClasses"));storjSatellites=V(this.getStorjConfig("Satellites"));storjAuthenticationMethods=V(this.getStorjConfig("AuthenticationMethods"));openstackProviders=V(this.getOpenstackConfig("Providers"));openstackVersions=V(this.getOpenstackConfig("Versions"));gcsLocations=V(this.getGcsConfig("Locations"));gcsStorageClasses=V(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Xe(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Xe(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Xe(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Xe(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};function ve(e){return e==null?"":":"+e.toString()}function W(e){return e==null?"":e.startsWith("/")?e:"/"+e}function M(e,n){let t={},o={};return n.searchParams.forEach((i,r)=>{Oe.find(p=>p.key===e)?.dynamicFields?.includes(r)?o[r]=decodeURIComponent(i):t[r]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function R(e,n=!1){let t=e.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function dt(e){let n=e.destinationType,t=Oe.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function $t(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return Oe.find(r=>r.customKey===t||r.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let r=new URL(i);return Oe.find(p=>p.customKey===t||p.key===t)?.mapper.from(t,r,e)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var d=new Q,Oe=[{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:e=>d.control(e??"")}},mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],r=i.startsWith("%"),F=i.slice(1).startsWith(":\\")||r?i:"/"+i;return A({destinationType:e,custom:{path:F}},M(e,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:e=>d.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>d.control(e??"",[fe.required,fe.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>d.control(e??"")}},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:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+W(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},M(e,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:e=>d.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Pe).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Pe).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},M(e,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:e=>d.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Pe).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Pe).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>N([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{server:t,path:o}=e.custom;return`${e.destinationType}://${t+W(o)+n}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return A({destinationType:e,custom:{server:n.hostname,path:o}},M(e,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:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+W(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},M(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+W(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,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:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:decodeURIComponent(n.pathname)}},M(e,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:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,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:e=>d.control(e??"",[fe.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.hostname+n.pathname}},M(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+ve(t)+W(i)+n}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},M(e,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:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=R([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=M(e,n);return A({destinationType:e,dynamic:A({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Pe).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Pe).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=R([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},M(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],r=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([p])=>p!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+ve(n)+W(o)+r}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},M(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([r])=>r!=="use-ssl")]);return`${e.destinationType}://${t+ve(n)+W(o)+i}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},M(e,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:e=>d.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+W(t)+o}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},M(e,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:e=>d.control(e??"")}},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:e=>{let n=e.custom.path,t=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>A({destinationType:e,custom:{path:n.pathname}},M(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>d.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>d.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},F=e.dynamic["use-ssl"],O=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([D])=>D!=="use-ssl"),...Object.entries(p)]);return`${e.destinationType}${F?"s":""}://${t+ve(n)+W(o)+O}`},from:(e,n,t)=>A({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},M(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>d.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>d.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},F=new Map([...Object.entries(p),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),O=R(Array.from(F));return`${e.destinationType}://${t+W(n)+W(o)+O}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return A({destinationType:e,custom:{server:n.hostname,share:o,path:i}},M(e,n))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>d.control(e??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:e=>{let{path:n,username:t,password:o}=e.custom,i={"auth-username":t,"auth-password":o},r=new Map([...Object.entries(i),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),p=R(Array.from(r));return`${e.destinationType}://${n+p}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&(o+="/"),o+n.pathname,A({destinationType:e,custom:{path:o}},M(e,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:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${R([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},M(e,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:e=>e.get(Pe).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:e=>`storj://storj.io/config?storj-auth-method=API%20key&${R([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>A({destinationType:e},M(e,n))}}];var Jt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Ft=class e{generate(n,t=Jt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=Jt){return Array.apply(null,{length:n}).map(()=>{let o;for(;;)if(o=String.fromCharCode(Ht()),t.test(o))return o},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var cn=["formRef"];function mn(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t.DisplayName," ")}}function un(e,n){if(e&1&&m(0,"spk-progress-bar",37),e&2){let t=c(3);Ae("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),u("value",t.calculatePasswordStrength()*(100/5))}}function _n(e,n){e&1&&(s(0,"span",32),$(1,9),a())}function dn(e,n){e&1&&(g(0,7,1),m(1,"spk-icon"),C())}function Fn(e,n){e&1&&(g(0,7,2),m(1,"spk-icon"),C())}function gn(e,n){e&1&&(g(0,10,1),m(1,"spk-icon",39),C())}function Cn(e,n){e&1&&(g(0,10,2),m(1,"spk-icon"),C())}function Sn(e,n){if(e&1){let t=x();s(0,"button",38),y("click",function(){f(t);let i=c(3);return T(i.copyPassword())}),g(1,10),_(2,gn,2,0)(3,Cn,2,0),C(),a()}if(e&2){let t=c(3);l(2),h(t.copiedPassword()?2:3)}}function fn(e,n){e&1&&(s(0,"spk-alert",36),$(1,11),a())}function Tn(e,n){if(e&1){let t=x();s(0,"div",27)(1,"spk-form-field")(2,"label",28),g(3,6),m(4,"sup"),C(),a(),m(5,"input",29),a(),_(6,un,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),m(8,"input",31),_(9,_n,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),y("click",function(){f(t);let i=c(2);return T(i.showPassword.set(!i.showPassword()))}),g(12,7),_(13,dn,2,0)(14,Fn,2,0),C(),a(),s(15,"button",34),y("click",function(){f(t);let i=c(2);return T(i.generatePassword())}),g(16,8),m(17,"spk-icon"),C(),a(),_(18,Sn,4,1,"button",35),a(),_(19,fn,2,0,"spk-alert",36),a()}if(e&2){let t=c(2);l(5),u("type",t.showPassword()?"text":"password"),l(),h(t.generalForm.value.password?6:-1),l(2),u("type",t.showPassword()?"text":"password"),l(),h(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),h(t.showPassword()?13:14),l(5),h(t.showCopyPassword()?18:-1),l(),h(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function hn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),$(2,5),a(),m(3,"input",26),_(4,mn,1,1,"ng-template"),a(),_(5,Tn,20,7,"div",27)),e&2){let t=c();u("options",t.encryptionOptions())("isClearable",!1),l(5),h(t.encryptionFieldSignal()!==""?5:-1)}}function Dn(e,n){if(e&1&&(s(0,"button",22),g(1,12),m(2,"spk-icon"),C(),a()),e&2){let t=c();u("disabled",t.generalForm.invalid)}}function En(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),g(2,13),m(3,"spk-icon"),C(),a()()),e&2){let t=c();u("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),u("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var Ke=new Q,en=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ke.group({name:Ke.control(e.name,[fe.required]),description:Ke.control(e.description),encryption:Ke.control(e.encryption,[qt()]),password:Ke.control(e.password,[kt(n=>n?.value.encryption!=="",[fe.required])]),repeatPassword:Ke.control(e.repeatPassword,[kt(n=>n?.value.encryption!=="",[fe.required])])}),Mt={Key:"",DisplayName:"None"},It=class e{#e=k(J);#t=k(Se);#o=k(Ft);#i=k(re);#n=k(lt);formRef=de.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=N(!1);copiedPassword=N(!1);showCopyPassword=N(!1);encryptionEffect=it(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=G(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}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 o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[Mt,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&ge(o.formRef,cn,5),t&2&&Ce()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let F;F=$localize`Encryption`;let O;O=$localize`Encryption`;let D;D=$localize`Password`;let L;L=$localize`Repeat password`;let v;v=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$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:`,w=we(w);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let ae;ae=$localize`Passwords do not match`;let q;q=$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:`,q=we(q);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let P;P=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let U;return U=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,p,O,v,w,K,ae,q,E,P,U,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"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"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",F,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",D,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"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(t,o){if(t&1){let i=x();s(0,"form",14,0),y("submit",function(){return f(i),T(o.next())}),s(2,"h3",15),$(3,1),a(),s(4,"spk-form-field")(5,"label",16),g(6,2),m(7,"sup"),C(),a(),m(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),$(11,3),a(),m(12,"textarea",19),a(),_(13,hn,6,3),s(14,"div",20)(15,"button",21),y("click",function(){return f(i),T(o.exit())}),g(16,4),m(17,"spk-icon"),C(),a(),_(18,Dn,3,1,"button",22)(19,En,4,2,"spk-tooltip",23),a()()}t&2&&(u("formGroup",o.generalForm),l(13),h(o.isNew()?13:-1),l(5),h(o.encryptionFieldSignal()===""?18:19))},dependencies:[ye,he,oe,ie,Te,De,Ee,te,ne,Me,ee,at,rt,st],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})};var yn=["formRef"],Pn=()=>["encryption-module","--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function An(e,n){e&1&&(g(0,2,1),m(1,"spk-icon",13),C())}function Nn(e,n){e&1&&(s(0,"p",13),$(1,7),a())}var ze=new Q,tn=["Bytes","KB","MB","GB","TB","PB"],On=[{value:"",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],kn=1024*1024*1024*2,$n=1024*1024*5,nn=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>ze.group({remoteVolumeSize:ze.group({size:ze.control(e.remoteVolumeSize),unit:ze.control(e.size)}),backupRetention:ze.control(e.backupRetention),advancedOptions:ze.group({})}),Rt=class e{#e=k(re);#t=k(J);#o=k(Se);formRef=de.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;sizeOptions=N(tn);retentionOptions=N(On);volumeSizeSignal=V(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Tt(300))??ft(null));volumeUnitSignal=V(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Tt(300))??ft(null));exceededVolumeSize=G(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,tn.indexOf(t));return o>kn||o<$n});goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&ge(o.formRef,yn,5),t&2&&Ce()},decls:30,vars:13,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#16\uFFFD"}:START_LINK: Read more ${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#16\uFFFD"}:CLOSE_LINK:`;let r;r=$localize`Backup retention`;let p;p=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let F;F=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let O;return O=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],t,o,i,r,p,F,O,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["placeholder",n,3,"isClearable","options","inlineSearch"],["type","text","formControlName","unit"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch"],["type","text","formControlName","backupRetention"],[3,"optionsChange","options","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(t,o){if(t&1){let i=x();s(0,"form",8,0),y("submit",function(){return f(i),T(o.submit())}),s(2,"h3",9),$(3,1),a(),s(4,"div",10)(5,"div",11)(6,"spk-form-field")(7,"label",12),g(8,2),_(9,An,2,0,"spk-icon",13),C(),a(),m(10,"input",14),a(),s(11,"spk-select",15),m(12,"input",16),a()(),_(13,Nn,2,0,"p",13),s(14,"p"),g(15,3),s(16,"a",17),m(17,"spk-icon",18),a(),C(),a()(),s(18,"spk-select",19)(19,"label",12),$(20,4),a(),m(21,"input",20),a(),s(22,"app-options-list",21),nt("optionsChange",function(p){return f(i),tt(o.settings,p)||(o.settings=p),T(p)}),a(),s(23,"div",22)(24,"button",23),y("click",function(){return f(i),T(o.goBack())}),g(25,5),m(26,"spk-icon"),C(),a(),s(27,"button",24),g(28,6),m(29,"spk-icon"),C(),a()()()}t&2&&(u("formGroup",o.optionsForm),l(9),h(o.exceededVolumeSize()?9:-1),l(2),u("isClearable",!1)("options",o.sizeOptions())("inlineSearch",!0),l(2),h(o.exceededVolumeSize()?13:-1),l(5),u("options",o.retentionOptions())("inlineSearch",!0),l(4),et("options",o.settings),u("hiddenOptions",ot(12,Pn)),l(5),Ae("loader",o.isSubmitting()))},dependencies:[ye,he,oe,Re,ie,Te,De,Ee,xe,Zt,Me,ee,te,ne],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}.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}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var In=["formRef"];function Mn(e,n){if(e&1){let t=x();s(0,"div",26)(1,"spk-form-field")(2,"label",27),$(3,8),a(),s(4,"input",28,1),y("focus",function(){f(t);let i=me(5);return T(i.showPicker())}),a(),s(6,"spk-icon",29),S(7,"clock"),a()(),s(8,"spk-form-field"),m(9,"label",30),s(10,"input",31,2),y("focus",function(){f(t);let i=me(11);return T(i.showPicker())}),a(),s(12,"spk-icon",29),S(13,"calendar"),a()()(),X(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),$(18,9),a(),m(19,"input",35),a(),s(20,"spk-select",36),m(21,"input",37),a()(),s(22,"app-toggle-card",38),X(23,39),$(24,10),H(),s(25,"div",40)(26,"spk-toggle",21),g(27,11),m(28,"input",41),C(),a(),s(29,"spk-toggle",21),g(30,12),m(31,"input",42),C(),a(),s(32,"spk-toggle",21),g(33,13),m(34,"input",43),C(),a(),s(35,"spk-toggle",21),g(36,14),m(37,"input",44),C(),a(),s(38,"spk-toggle",21),g(39,15),m(40,"input",45),C(),a(),s(41,"spk-toggle",21),g(42,16),m(43,"input",46),C(),a(),s(44,"spk-toggle",21),g(45,17),m(46,"input",47),C(),a()()(),H()}if(e&2){let t=c();l(20),u("options",t.unitOptions)("isClearable",!1),l(2),u("disallowToggle",!0)}}var j=new Q,on=[{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`}],rn=(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}}})=>j.group({autoRun:j.control(e.autoRun),nextTime:j.group({time:j.control(e.nextTime.time),date:j.control(e.nextTime.date)}),runAgain:j.group({repeatValue:j.control(e.runAgain.repeatValue),repeatUnit:j.control(e.runAgain.repeatUnit),allowedDays:j.group({mon:j.control(e.runAgain.allowedDays.mon),tue:j.control(e.runAgain.allowedDays.tue),wed:j.control(e.runAgain.allowedDays.wed),thu:j.control(e.runAgain.allowedDays.thu),fri:j.control(e.runAgain.allowedDays.fri),sat:j.control(e.runAgain.allowedDays.sat),sun:j.control(e.runAgain.allowedDays.sun)})})}),xt=class e{#e=k(re);#t=k(J);#o=k(Se);formRef=de.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=on;displayFn(n){let t=on.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&ge(o.formRef,In,5),t&2&&Ce()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let F;F=$localize`Run again every`;let O;O=$localize`Allowed days`;let D;D=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let q;return q=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,r,p,F,O,D,L,v,w,K,ae,q,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=x();s(0,"form",18,0),y("submit",function(){return f(i),T(o.next())}),s(2,"h3",19),$(3,3),a(),s(4,"div",20)(5,"spk-toggle",21),g(6,4),m(7,"input",22),C(),a(),s(8,"p"),$(9,5),a()(),_(10,Mn,47,3),s(11,"div",23)(12,"button",24),y("click",function(){return f(i),T(o.goBack())}),g(13,6),m(14,"spk-icon"),C(),a(),s(15,"button",25),g(16,7),m(17,"spk-icon"),C(),a()()()}if(t&2){let i;u("formGroup",o.scheduleForm),l(10),h((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[ye,he,oe,Re,Ue,ie,Te,De,Ee,xe,te,Le,ee,Me,ne,Be],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}.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 Rn(e,n){if(e&1){let t=x();s(0,"spk-select",0)(1,"input",4),y("ngModelChange",function(i){f(t);let r=c(2);return T(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);u("options",o.fileGroupOptions())("isClearable",!1),l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function xn(e,n){if(e&1){let t=x();s(0,"spk-form-field")(1,"input",4),y("ngModelChange",function(i){f(t);let r=c(2);return T(r.updateStateExpression(i))}),a()()}if(e&2){let t,o=c(2);l(),u("ngModel",(t=o.pathState())==null?null:t.expression)}}function vn(e,n){if(e&1){let t=x();s(0,"spk-select",0)(1,"input",1),y("ngModelChange",function(i){f(t);let r=c();return T(r.updateStateType(i))}),a()(),_(2,Rn,2,3,"spk-select",0)(3,xn,2,1,"spk-form-field"),s(4,"div",2),y("click",function(){f(t);let i=c();return T(i.removeFilter())}),s(5,"spk-icon",3),S(6,"x-circle"),a()()}if(e&2){let t,o,i=c();u("options",i.expressionOptions())("isClearable",!1),l(),u("ngModel",(t=i.pathState())==null?null:t.type),l(),h(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var an=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{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"}],wn=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],gt=class e{path=Dt.required();osType=Dt();pathChange=ht();remove=ht();expressionOptions=N(an);fileGroupOptions=N(wn);pathState=N(null);typeState=G(()=>{let n=this.pathState();return n?n.type:null});pathEffect=it(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/",p=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):p&&t.endsWith(r)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(r)&&t.endsWith(r)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${r}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${r}]*]`)?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1),i=this.osType()==="Windows",r=i?"\\":"/",F=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,O=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let D=O||F.startsWith(r),L=F.endsWith(r);return L&&D?`${t}${n.expression}`:L?`${t}${n.expression}${r}`:D?`${t}${r}${n.expression}`:`${t}${r}${n.expression}${r}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${r}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${r}]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=an.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&_(0,vn,7,4),t&2&&h(o.pathState()?0:-1)},dependencies:[mt,oe,ie,jt,ee,te,ne],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:110px}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var bn=["formRef"];function Gn(e,n){if(e&1){let t=x();s(0,"app-filter",42),y("pathChange",function(i){let r=f(t).$index,p=c(2);return T(p.patchPathAt(i,r))})("remove",function(){let i=f(t).$index,r=c(2);return T(r.removePathAt(i))}),a()}if(e&2){let t,o=n.$implicit,i=c(2);u("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function Ln(e,n){if(e&1&&pe(0,Gn,1,2,"app-filter",41,le),e&2){let t=c();ce(t.pathArray())}}function Un(e,n){if(e&1&&(s(0,"div",40)(1,"spk-form-field"),m(2,"input",43),a(),s(3,"spk-select",44),m(4,"input",45),a()()),e&2){let t=c();l(3),u("options",t.sizeOptions())("isClearable",!1)}}var ke=new Q,Vn=["Bytes","KB","MB","GB","TB","PB"],sn=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>ke.group({path:ke.control(e.path),excludes:ke.group({hidden:ke.control(e.excludes.hidden),system:ke.control(e.excludes.system),temporary:ke.control(e.excludes.temporary),filesLargerThan:ke.group({size:ke.control(null),unit:ke.control(null)})})}),vt=class e{#e=k(re);#t=k(J);#o=k(Se);formRef=de.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new pt("");filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=N(Vn);osType=this.#e.osType;pathSignal=V(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),r=this.pathArray().map((p,F)=>F===t?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}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,t=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\0${t}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&ge(o.formRef,bn,5),t&2&&Ce()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let p;p=$localize`Source Data`;let F;F=$localize`Folder path`;let O;O=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let D;D=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let L;L=$localize`Source Data`;let v;v=$localize`Add Path`;let w;w=$localize`Add a path directly from your machine.`;let K;K=$localize`Filters`;let ae;ae=$localize`Customize your filters.`;let q;q=$localize`Add filter`;let E;E=$localize`Exclude`;let P;P=$localize`Choose if there’s any files you want to exclude.`;let U;U=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let I;I=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let se;return se=$localize`Select an option...`,[["formRef",""],p,F,O,D,L,v,w,K,ae,q,E,P,U,I,Y,ue,[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,"row-inputs"],["type","text","placeholder",t,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",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",se]]},template:function(t,o){if(t&1){let i=x();s(0,"form",17,0),y("submit",function(){return f(i),T(o.next())}),s(2,"div",18)(3,"h3",19),$(4,1),a(),s(5,"app-file-tree",20)(6,"label",21),$(7,2),a(),m(8,"input",22),a(),s(9,"div",23)(10,"button",24),y("click",function(){return f(i),T(o.goBack())}),g(11,3),m(12,"spk-icon"),C(),a(),s(13,"button",25),g(14,4),m(15,"spk-icon"),C(),a()()(),s(16,"div",26)(17,"h3",19),$(18,5),a(),s(19,"app-toggle-card",27),X(20,28),$(21,6),H(),s(22,"p",29),$(23,7),a(),s(24,"div",30)(25,"spk-form-field"),m(26,"input",31),a(),s(27,"button",32),y("click",function(){return f(i),T(o.addNewPath())}),s(28,"spk-icon"),S(29,"plus"),a()()()(),s(30,"app-toggle-card",27),X(31,28),$(32,8),H(),s(33,"p",29),$(34,9),a(),s(35,"button",33),y("click",function(){return f(i),T(o.addFilter())}),$(36,10),a(),_(37,Ln,2,0),a(),s(38,"app-toggle-card",34),X(39,28),$(40,11),H(),s(41,"p",29),$(42,12),a(),s(43,"spk-toggle",35),g(44,13),m(45,"input",36),C(),a(),s(46,"spk-toggle",35),g(47,14),m(48,"input",37),C(),a(),s(49,"spk-toggle",35),g(50,15),m(51,"input",38),C(),a(),s(52,"spk-toggle",39),y("click",function(){return f(i),T(o.toggleFilesLargerThan())}),$(53,16),a(),_(54,Un,5,2,"div",40),a()()()}if(t&2){let i;u("formGroup",o.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),u("disallowToggle",!0),l(7),u("formControl",o.newPathCtrl),l(4),u("disallowToggle",!0),l(7),h((i=o.pathSignal())!=null&&i.length?37:-1),l(),u("disallowToggle",!0),l(14),Ae("active",o.filesLargerThan()),l(2),h(o.filesLargerThan()?54:-1)}},dependencies:[mt,he,oe,Re,Ue,ie,Te,ye,ct,De,Ee,xe,te,ee,Me,Le,ne,ut,Be,gt],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}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var $e=new Q,re=class e{#e=k(J);#t=k(lt);#o=k(Ge);#i=k(_t);generalForm=en();sourceDataForm=sn();scheduleForm=rn();destinationForm=ln();optionsForm=nn();settings=N([]);isDraft=N(!1);backupId=N(null);isSubmitting=N(!1);finishedLoading=N(!1);backupDefaults=N(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=N([]);selectedAdvancedFormPair=N([]);destinationFormPair=N({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=G(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=N([]);notSelectedHttpOptions=G(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=V(this.sourceDataForm.valueChanges);destinationFormSignal=V(this.destinationForm.valueChanges);generalFormSignal=V(this.generalForm.valueChanges);encryptionFieldSignal=V(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=V(this.scheduleForm.valueChanges);destinationOptions=G(()=>this.#t.backendModules()??[]);httpOptions=G(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=G(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[Mt,...n]});nonSelectedOptions=G(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(He(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(He(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){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 t=n.Sources??"",o=n.Filters?.map(F=>`${F.Include?"":"-"}${F.Expression}`)??[],i=n.Settings?.find(F=>F.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(F=>F.Name==="--skip-files-larger-than")??null,p={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:r?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(p)}mapDestinationToForm(n){let t=n.TargetURL?$t(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=$t(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(r=>r.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!1});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.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}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=n.Settings?.filter(i=>![...t,"dblock-size"].includes(i.Name));this.settings.set(o??[]),o?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(i.Name==="dblock-size"){let r=i.Value?.replace(/[^0-9]/g,""),p=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:r?parseInt(r):null,unit:p?p.toUpperCase():null})}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],p=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(p=this.#i.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let F=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([w,K])=>K).map(([w,K])=>w):[],O=o.path?.split("\0")??[],D=this.mapFormsToSettings(),L=Object.entries(o.excludes??{}).filter(([w,K])=>K&&w!=="filesLargerThan").map(([w])=>w),v=o.excludes?.filesLargerThan;return L.length&&D.push({Name:"--exclude-files-attributes",Value:L.join(",")}),v&&v.size!==null&&v.unit!==null&&D.push({Name:"--skip-files-larger-than",Value:`${v.size}${v.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:O.filter(w=>!w.startsWith("-")),Settings:D,Filters:O.filter(w=>w.startsWith("-")).map((w,K)=>({Order:K,Include:!1,Expression:w.slice(1)}))},Schedule:t.autoRun?{Repeat:p,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:F}:null}}mapFormsToSettings(n=[]){let t=this.optionsForm.value,o=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],r=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(r=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let p=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},F=[...n,...i],O=this.settings().filter(D=>!F.includes(D.Name)).map(D=>{let L=D.Value;return typeof D.Value=="number"&&(L=D.Value.toString()),typeof D.Value=="boolean"&&(L=D.Value?"True":"False"),{Name:D.Name,Value:L}});return[...r,p,...O]}#a(n){return n.controls.map(t=>dt(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}addFreeTextOption(n,t,o){let i=this.optionsForm.controls.advancedOptions,r=A({name:n,type:"String",defaultValue:t},o);this.createFormField(i,r,t),this.selectedOptions.update(p=>(p.push(r),p))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,$e.control(o));return}if(t.type==="Size"){n.addControl(t.name,$e.control(o));return}if(t.type==="Integer"){n.addControl(t.name,$e.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,$e.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,$e.control(o??""));return}if(t.type==="Timespan"||t.type==="DateTime"){n.addControl(t.name,$e.control(o,[fe.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=Oe.find(E=>E.customKey===n||E.key===n),r=i?.key,p=this.destinationOptions().find(E=>E.Key===r),F=this.httpOptions();if(!p||!p.Options)return;let O=i&&i.oauthField?i.oauthField:null,D=i&&i.customFields?i.customFields:{},L=i&&i.dynamicFields?i.dynamicFields:[],v=i&&i.advancedFields?i.advancedFields:[],w=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:O,custom:[],dynamic:[],advanced:[]});let K=$e.group({}),ae=$e.group({}),q=$e.group({});D&&Object.entries(D).forEach(([E,P],U)=>{let ue=P,{formElement:I}=ue,Y=bt(ue,["formElement"]);K.addControl(E,I(t?.custom[E])),this.destinationFormPair.update(se=>(se.custom.push(A({order:900+U},Y)),se))});for(let E=0;E<p.Options.length;E++){let P=p.Options[E];if(P.Deprecated)continue;let U=L.find(I=>I===P.Name||I.name===P.Name);if(U){let I=U&&typeof U!="string",Y=I?U?.defaultValue??P.DefaultValue:P.DefaultValue,ue={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,order:900+E},se=I?A(A({},ue),U):ue,Je=t?.dynamic[P.Name]??Y??P.DefaultValue;this.createFormField(ae,se,Je),this.destinationFormPair.update(be=>(be.dynamic.push(se),be))}else{if(w.find(_e=>_e===P.Name))continue;let Y=v.find(_e=>_e===P.Name||_e.name===P.Name),ue=Y&&typeof Y!="string",se=t?.advanced[P.Name],b=se??P.DefaultValue,Je={name:P.Name,type:P.Type,shortDescription:P.ShortDescription??void 0,longDescription:P.LongDescription??void 0,options:P.ValidValues,defaultValue:b,order:900+E},be=ue?A(A({},Je),Y):Je;o&&se&&(this.createFormField(q,be,b),this.selectedAdvancedFormPair.update(_e=>(_e.push(be),_e))),this.destinationFormPair.update(_e=>(_e.advanced.push(be),_e))}}for(let E=0;E<F.length;E++){let P=F[E],U=t?.advanced[P.name],I=U??P.defaultValue;o&&U&&(this.createFormField(q,P,I),this.selectedHttpOptions.update(Y=>(Y.push(P),Y)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((P,U)=>P.order-U.order),dynamic:E.dynamic.sort((P,U)=>P.order-U.order),advanced:E.advanced.sort((P,U)=>P.order-U.order)})),this.destinationForm.controls.destinations.push(pn({key:i?.customKey??n,customGroup:K,dynamicGroup:ae,advancedGroup:q}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ie({token:e,factory:e.\u0275fac,providedIn:"root"})};var Bn=["formRef"],Kn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),St=e=>({$implicit:e}),zn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),Xn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Hn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),jn=()=>({maxWidth:"700px",width:"100%"});function Wn(e,n){e&1&&(g(0,5,2),m(1,"spk-icon"),C())}function qn(e,n){e&1&&$(0,5,3)}function Qn(e,n){if(e&1){let t=x();g(0,5,1),s(1,"button",21),y("click",function(){f(t);let i=c();return T(i.testDestination())}),_(2,Wn,2,0)(3,qn,1,0),a(),C()}if(e&2){let t=c();l(),Ae("success",t.successfulTest()),l(),h(t.successfulTest()?2:3)}}function Yn(e,n){if(e&1){let t=x();s(0,"p",27),y("click",function(){f(t);let i=c();return T(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,8),m(2,"span",28),C(),a()}}function Zn(e,n){if(e&1){let t=x();s(0,"div",34),y("click",function(){let i=f(t).$implicit,r=c(2);return T(r.addDestinationFormGroup(i.key))}),s(1,"h3"),S(2),a(),s(3,"p"),S(4),a()()}if(e&2){let t=n.$implicit;l(2),Pt(t.displayName),l(2),Pt(t.description)}}function Jn(e,n){if(e&1){let t=x();s(0,"button",35,1),y("click",function(){let i=f(t).$implicit,r=c(2);return T(r.addDestinationFormGroup(i.key))}),S(2),a()}if(e&2){let t=n.$implicit;l(2),z(" ",t.displayName," ")}}function eo(e,n){if(e&1&&(s(0,"div",29),pe(1,Zn,5,2,"div",30,le),a(),s(3,"spk-menu",31)(4,"button",32),$(5,9),a(),X(6,20),pe(7,Jn,3,1,"button",33,le),H(),a()),e&2){let t=c();l(),ce(t.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),ce(t.destinationTypeOptionsNotFocused())}}function to(e,n){e&1&&je(0)}function no(e,n){if(e&1&&_(0,to,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",We(7,St,qe(2,Kn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function oo(e,n){e&1&&je(0)}function io(e,n){if(e&1&&_(0,oo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",We(7,St,qe(2,zn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function ro(e,n){if(e&1){let t=x();g(0,10,1),s(1,"button",35,1),y("click",function(){let i=f(t).$implicit,r=c(2);return T(r.addAdvancedFormPair(i,0))}),a(),C()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function ao(e,n){e&1&&je(0)}function so(e,n){if(e&1&&_(0,ao,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",We(7,St,qe(2,Xn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function lo(e,n){if(e&1){let t=x();g(0,11,1),s(1,"button",35,1),y("click",function(){let i=f(t).$implicit,r=c(2);return T(r.addHttpOption(i,0))}),a(),C()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function po(e,n){e&1&&je(0)}function co(e,n){if(e&1&&_(0,po,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=me(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",We(7,St,qe(2,Hn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function mo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function uo(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),S(2),_(3,mo,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),h(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),Fe("formControlName",o.formView.name)}}function _o(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Fo(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),S(2),_(3,_o,3,1,"spk-tooltip",48),a(),m(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),h(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),Fe("formControlName",o.formView.name)}}function go(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Co(e,n){e&1&&(s(0,"spk-icon",51),S(1,"link"),a())}function So(e,n){e&1&&(s(0,"spk-icon",51),S(1,"envelope"),a())}function fo(e,n){e&1&&(s(0,"spk-icon",51),S(1,"textbox"),a())}function To(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,go,3,1,"spk-tooltip",48),a(),m(4,"input",50),_(5,Co,2,0,"spk-icon",51)(6,So,2,0,"spk-icon",51)(7,fo,2,0,"spk-icon",51),a()),e&2){let t,o=c().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),h(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),Fe("formControlName",o.formView.name),u("type",o.formView.type==="Email"?"email":"text"),l(),h(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ho(e,n){if(e&1){let t=x();s(0,"span",55),y("click",function(){f(t);let i=c(2).$implicit,r=c(2);return T(r.oauthStartTokenCreation(i.destinationType))}),S(1,"AuthID"),a()}}function Do(e,n){e&1&&(s(0,"spk-icon",51),S(1,"password"),a())}function Eo(e,n){if(e&1){let t=x();s(0,"spk-icon",56),y("click",function(){f(t);let i=c(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye "),a()}}function yo(e,n){if(e&1){let t=x();s(0,"spk-icon",56),y("click",function(){f(t);let i=c(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),S(1," eye-slash "),a()}}function Po(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),a(),m(3,"input",52),_(4,ho,2,0,"span",53)(5,Do,2,0,"spk-icon",51)(6,Eo,2,0,"spk-icon",54)(7,yo,2,0,"spk-icon",54),a()),e&2){let t,o=c().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),Fe("formControlName",o.formView.name),u("type",o.formView.showPassword?"text":"password"),l(),h(o.oauthField===o.formView.name?4:5),l(2),h(o.formView.showPassword?6:7)}}function Ao(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function No(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t," ")}}function Oo(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),S(2),_(3,Ao,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),_(5,No,1,1,"ng-template",null,3,Qe)),e&2){let t,o=me(6);c();let i=Ot(0),r=c().$implicit;u("options",i)("isClearable",!1)("optionTemplate",o),l(),B("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),h(r.formView.longDescription?3:-1),l(),B("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),Fe("formControlName",r.formView.name)}}function ko(e,n){if(e&1&&(At(0),_(1,Oo,7,14)),e&2){let t=c().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),h(o?1:-1)}}function $o(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function Io(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;Ut(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Mo(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),S(2),_(3,$o,3,1,"spk-tooltip",48),a(),m(4,"input",49),a(),_(5,Io,1,2,"ng-template",null,4,Qe)),e&2){let t,o=me(6);c();let i=Ot(0),r=c().$implicit;u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),B("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),h(r.formView.longDescription?3:-1),l(),B("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),Fe("formControlName",r.formView.name)}}function Ro(e,n){e&1&&m(0,"spk-progress-bar",58)}function xo(e,n){if(e&1&&(At(0),_(1,Mo,7,15)(2,Ro,1,0,"spk-progress-bar",58)),e&2){let t=c().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),h(o?1:2)}}function vo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function wo(e,n){if(e&1&&(s(0,"app-size",45)(1,"label",47),S(2),_(3,vo,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.Name)("formControlName",o.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
2
|
+
item.asHttpOptions ? 'http' : 'other'
|
|
3
|
+
}}`),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),h(o.formView.longDescription?3:-1)}}function bo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Go(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),S(2),_(3,bo,3,1,"spk-tooltip",48),a(),m(4,"input",60),s(5,"spk-icon",51),S(6,"numpad"),a()()),e&2){let t,o=c().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),h(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),Fe("formControlName",o.formView.name)}}function Lo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Uo(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),S(2),_(3,Lo,3,1,"spk-tooltip",48),a(),m(4,"input",61),a()),e&2){let t,o=c().$implicit;l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),h(o.formView.longDescription?3:-1),l(),B("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),Fe("formControlName",o.formView.name)}}function Vo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Bo(e,n){if(e&1&&S(0),e&2){let t=n.$implicit;z(" ",t," ")}}function Ko(e,n){if(e&1&&(s(0,"spk-select",62)(1,"label",47),S(2),_(3,Vo,3,1,"spk-tooltip",48),a(),m(4,"input",63),a(),_(5,Bo,1,1,"ng-template",null,4,Qe)),e&2){let t,o=me(6),i=c().$implicit;u("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),Lt("for","destination-",i.formGroupName,"-",i.index,""),l(),z(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),h(i.formView.longDescription?3:-1),l(),Fe("formControlName",i.formView.name)}}function zo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),S(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Xo(e,n){if(e&1&&(s(0,"app-timespan",45)(1,"label",47),S(2),_(3,zo,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.formView.name)("formControlName",o.formView.name)("customId","destination-"+o.formGroupName+"-"+o.index+"-"+(o.asHttpOptions?"http":"other")),l(),B("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),h(o.formView.longDescription?3:-1)}}function Ho(e,n){if(e&1){let t=x();s(0,"button",64),y("click",function(){f(t);let i=c().$implicit,r=c(2);return T(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),S(2,"x-circle"),a()()}}function jo(e,n){if(e&1&&(s(0,"div",41),X(1,42),_(2,uo,5,17,"app-file-tree",43)(3,Fo,5,13,"app-file-tree",44)(4,To,8,13,"spk-form-field")(5,Po,8,13,"spk-form-field")(6,ko,2,2)(7,xo,3,2)(8,wo,4,9,"app-size",45)(9,Go,7,11,"spk-form-field")(10,Uo,5,11,"spk-toggle",46)(11,Ko,7,9)(12,Xo,4,9,"app-timespan",45),H(),_(13,Ho,3,0,"button",32),a()),e&2){let t=n.$implicit;Ae("single-field",t.formGroupName!=="advanced"),l(),u("formGroupName",t.formGroupName),l(),h(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"||t.formView.type==="DateTime"?12:-1),l(11),h(t.formGroupName==="advanced"?13:-1)}}function Wo(e,n){if(e&1&&(X(0,22)(1,36),pe(2,no,1,9,"ng-container",null,le),pe(4,io,1,9,"ng-container",null,le),s(6,"app-toggle-card",37),X(7,38),g(8,10),s(9,"spk-menu",31)(10,"button",39),m(11,"spk-icon"),a(),X(12,20),pe(13,ro,3,1,"button",33,le),H(),a(),C(),H(),pe(15,so,1,9,"ng-container",null,le),a(),s(17,"app-toggle-card",37),X(18,38),g(19,11),s(20,"spk-menu",31)(21,"button",39),m(22,"spk-icon"),a(),X(23,20),pe(24,lo,3,1,"button",33,le),H(),a(),C(),H(),pe(26,co,1,9,"ng-container",null,le),a(),_(28,jo,14,5,"ng-template",null,2,Qe),H()()),e&2){let t=c();l(2),ce(t.destinationFormPair().custom),l(2),ce(t.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),ce(t.notSelectedAdvancedFormPair()),l(2),ce(t.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedHttpOptions().length===0),l(3),ce(t.notSelectedHttpOptions()),l(2),ce(t.selectedHttpOptions())}}function qo(e,n){if(e&1){let t=x();s(0,"spk-dialog",65),nt("isOpenChange",function(i){f(t);let r=c();return tt(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),T(i)}),s(1,"header",66)(2,"h2"),$(3,12),a(),s(4,"spk-alert",67),$(5,13),a()(),s(6,"div",68)(7,"spk-form-field"),m(8,"textarea",69),a()(),s(9,"footer",70)(10,"button",24),y("click",function(){f(t);let i=c();return T(i.closeTargetUrlDialog(!1))}),S(11,"Cancel"),a(),s(12,"button",71),y("click",function(){f(t);let i=c();return T(i.closeTargetUrlDialog(!0))}),g(13,14),m(14,"spk-icon"),C(),a()()()}if(e&2){let t=c();et("isOpen",t.targetUrlDialogOpen),u("options",ot(3,jn)),l(8),u("formControl",t.targetUrlCtrl)}}var Ct=new Q,ln=(e={destinations:[]})=>Ct.group({destinations:Ct.array(e.destinations)}),pn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Ct.group({destinationType:Ct.control(e),custom:n,dynamic:t,advanced:o}),wt=class e{#e=k(J);#t=k(Se);#o=k(Bt);#i=k(Ge);#n=k(re);#r=k(zt);injector=k(Gt);formRef=de.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=G(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=N(!1);destinationTypeOptionsInFocus=N(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=N(Oe.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=G(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=G(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=G(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new pt;targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let r=i.error.error.Error;if(this.successfulTest.set(!1),r==="missing-folder"){this.#r.open(Ve,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:p=>{p&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}});return}if(r.startsWith("incorrect-cert:")){let p=r.split("incorrect-cert:")[1];this.#r.open(Ve,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
4
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
5
|
+
The server reported the certificate hash: ${p}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:F=>{F&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",p)}});return}if(r.startsWith("incorrect-host-key:")){let p=r.split('incorrect-host-key:"')[1].split('",')[0],F=r.split('accepted-host-key:"')[1].split('",')[0];F?this.#r.open(Ve,{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,
|
|
6
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
7
|
+
Do you want to REPLACE your CURRENT host key ${F}
|
|
8
|
+
with the REPORTED host key: ${p}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,p)}}):this.#r.open(Ve,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${p}`,confirmText:"Approve",cancelText:"Cancel"},closed:O=>{O&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,p)}});return}this.#r.open(Ve,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:r,cancelText:"OK"},closed:p=>{}})}})}mapToTargetUrl(n){return dt(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=N("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=N(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=N(!1);#p=N(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),r=screen.width/2-t/2,p=screen.height/2-o/2,F=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+r+",top="+p);F?.addEventListener("blur",O=>{console.log("event blur",O)}),F?.addEventListener("beforeunload",O=>{console.log("event beforeunload",O),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(He(()=>this.#a.set(!1))).subscribe({next:D=>{console.log("res",D),D?.authid&&this.#p.set(D.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=Z({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&ge(o.formRef,Bn,5),t&2&&Ce()},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=we(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$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 p;p=$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:`,p=we(p);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=we(F);let O;O=$localize`Edit target URL`;let D;D=$localize` Be careful, this will overwrite everything you have in your destination. `;let L;return L=$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,t,o,i,r,p,F,O,D,L,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"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(t,o){if(t&1){let i=x();s(0,"form",15,0),y("submit",function(){return f(i),T(o.next())}),s(2,"header")(3,"h3",16),g(4,5),s(5,"div",17),_(6,Qn,4,3,"button",18),s(7,"spk-menu")(8,"button",19),m(9,"spk-icon"),a(),X(10,20),s(11,"button",21),y("click",function(){return f(i),T(o.openTargetUrlDialog())}),m(12,"spk-icon"),a(),H(),a()(),C(),a(),_(13,Yn,3,0,"p"),a(),_(14,eo,9,1)(15,Wo,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),y("click",function(){return f(i),T(o.goBack())}),g(18,6),m(19,"spk-icon"),C(),a(),s(20,"button",25),g(21,7),m(22,"spk-icon"),C(),a()()(),_(23,qo,15,4,"spk-dialog",26)}if(t&2){let i;u("formGroup",o.destinationForm),l(6),h(o.destinationCount()>0?6:-1),l(7),h(o.destinationCount()>0?13:-1),l(),h(o.destinationCount()===0?14:-1),l(),h(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),h(o.targetUrlDialogOpen()?23:-1)}},dependencies:[ye,he,oe,Re,Ue,ie,Te,ct,De,Ee,xe,Wt,Vt,te,Xt,ee,Le,st,Kt,rt,ne,at,Yt,Be,ut,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{dt as a,Oe as b,ln as c,pn as d,wt as e,en as f,Mt as g,It as h,nn as i,Rt as j,rn as k,xt as l,sn as m,vt as n,re as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-X4FOF7ZO.js")},{path:"destination",loadComponent:()=>import("./chunk-ZDBNCA7O.js")},{path:"source-data",loadComponent:()=>import("./chunk-WVVXCHHS.js")},{path:"schedule",loadComponent:()=>import("./chunk-JIPY2BNJ.js")},{path:"options",loadComponent:()=>import("./chunk-VP44CSPI.js")}];export{o as default};
|