@duplicati/ngclient 0.0.99 → 0.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-GNTO7EKM.js → chunk-2VHTET54.js} +1 -1
- package/{chunk-X4FOF7ZO.js → chunk-4DZRXRA3.js} +1 -1
- package/chunk-5SLAQVCB.js +3 -0
- package/chunk-6UVVDGKQ.js +8 -0
- package/{chunk-7NPADQLG.js → chunk-7QUJNAXH.js} +1 -1
- package/{chunk-22CSSCKZ.js → chunk-BA7NYTFR.js} +1 -1
- package/chunk-CQTSWNP2.js +8 -0
- package/chunk-LBZ753XE.js +1 -0
- package/chunk-LHTAXP73.js +1 -0
- package/chunk-MM22YS5Z.js +1 -0
- package/{chunk-ASEBN4DE.js → chunk-NEZX7ARK.js} +1 -1
- package/{chunk-EKIFJPZJ.js → chunk-ONSJL7VA.js} +1 -1
- package/chunk-PWLZT57L.js +1 -0
- package/chunk-QFKEUN2J.js +1 -0
- package/{chunk-47OESBLR.js → chunk-RQSCZC6C.js} +1 -1
- package/chunk-TLY4PQBT.js +1 -0
- package/chunk-TUR6D3AC.js +1 -0
- package/{chunk-EQCQL7A4.js → chunk-UH6BCOA6.js} +1 -1
- package/chunk-ULTH3Z7H.js +1 -0
- package/chunk-VDQCSHBX.js +1 -0
- package/{chunk-WVVXCHHS.js → chunk-YBLCACKN.js} +1 -1
- package/{chunk-ZDBNCA7O.js → chunk-YOTPPWSO.js} +1 -1
- package/{chunk-H6IX2D2G.js → chunk-YTJB3DGU.js} +1 -1
- package/index.html +1 -1
- package/{main-73DNRGWN.js → main-CVAZAPFI.js} +1 -1
- package/package.json +1 -1
- package/chunk-23KHTRDM.js +0 -1
- package/chunk-2ZK7AAG4.js +0 -1
- package/chunk-AKXOFDEQ.js +0 -8
- package/chunk-AMJ2CM2Q.js +0 -1
- package/chunk-JIPY2BNJ.js +0 -1
- package/chunk-LU4LP7JL.js +0 -3
- package/chunk-PX6A6XCQ.js +0 -1
- package/chunk-QMMXH5TN.js +0 -1
- package/chunk-QRVYPTC6.js +0 -8
- package/chunk-VP44CSPI.js +0 -1
- package/chunk-XITZBHPE.js +0 -1
package/chunk-AKXOFDEQ.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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};
|
package/chunk-AMJ2CM2Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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};
|
package/chunk-JIPY2BNJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as b}from"./chunk-AKXOFDEQ.js";import"./chunk-ISRMJKPG.js";import"./chunk-DNHLTHLR.js";import"./chunk-3V622MYY.js";import"./chunk-23KHTRDM.js";import"./chunk-XH2A67YP.js";import"./chunk-WCLOWI5G.js";import"./chunk-PX6A6XCQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-JJQARMUD.js";import"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import"./chunk-XQKR67WI.js";import"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-M7VDIUGU.js";import"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";export{a as createScheduleForm,b as default};
|
package/chunk-LU4LP7JL.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as k}from"./chunk-AKXOFDEQ.js";import{a as Se}from"./chunk-ISRMJKPG.js";import"./chunk-DNHLTHLR.js";import{a as I}from"./chunk-3V622MYY.js";import{c as Ee}from"./chunk-23KHTRDM.js";import"./chunk-XH2A67YP.js";import"./chunk-WCLOWI5G.js";import"./chunk-PX6A6XCQ.js";import{a as fe}from"./chunk-SFWQDWHT.js";import"./chunk-ZP273LXY.js";import"./chunk-D5WIWFNP.js";import"./chunk-WSLU6K4D.js";import"./chunk-UJZB6UQE.js";import"./chunk-RHW5QVAY.js";import{c as se,e as me,f as _e,i as pe,j as de,m as ce,n as ue,o as Ce,q as Ne,r as Me,t as ge}from"./chunk-JJQARMUD.js";import"./chunk-3UJUWE5B.js";import{b as J,d as Q,e as Y}from"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import{a as ne,g as oe,k as ie,l as ae,p as re,t as le}from"./chunk-XQKR67WI.js";import{a as ee,b as te}from"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-O6GWHO26.js";import"./chunk-M7VDIUGU.js";import"./chunk-BWYJMRKB.js";import{Db as g,Eb as f,Fb as u,Gb as w,Hb as z,Jb as X,Kb as S,Na as l,Ob as V,W as C,Za as R,ba as E,bc as W,ca as A,cb as B,cc as j,dc as H,hc as q,ic as T,kb as c,mb as y,pb as v,qb as G,ra as F,rb as x,sb as U,tb as a,ub as n,vb as r,wb as O,xb as P,yc as Z,zb as K}from"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";var Ae=()=>[],Fe=()=>["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function Oe(m,t){m&1&&r(0,"spk-progress-bar",13)}function Pe(m,t){if(m&1&&(a(0,"spk-form-field"),r(1,"input",39),n()),m&2){let e=t.$implicit,o=t.$index;l(),V("id","filter-",o,""),c("formControl",e)}}function Te(m,t){if(m&1){let e=K();a(0,"form",14)(1,"spk-select",15)(2,"label",16),u(3,1),n(),r(4,"input",17),n(),a(5,"spk-form-field")(6,"label",18),u(7,2),n(),r(8,"textarea",19),n(),a(9,"spk-form-field")(10,"label",20),u(11,3),n(),r(12,"textarea",21),n()(),a(13,"spk-divider"),u(14,4),n(),a(15,"form",14)(16,"spk-form-field")(17,"label",22),u(18,5),n(),r(19,"input",23),n(),a(20,"spk-form-field")(21,"label",24),u(22,6),n(),r(23,"input",25),n(),a(24,"app-toggle-card",26),O(25,27),u(26,7),P(),O(27,28),x(28,Pe,2,3,"spk-form-field",null,G),P(),n()(),a(30,"form",14)(31,"div",29)(32,"div",30)(33,"spk-form-field")(34,"label",31),u(35,8),n(),r(36,"input",32),n(),a(37,"spk-select",33),r(38,"input",34),n()(),a(39,"p"),g(40,9),r(41,"a",35),f(),n()(),a(42,"app-options-list",36),H("optionsChange",function(_){E(e);let p=S();return j(p.settings,_)||(p.settings=_),A(_)}),n(),a(43,"div",37)(44,"button",38),X("click",function(){E(e);let _=S();return A(_.submit())}),g(45,10),r(46,"spk-icon"),f(),n()()()}if(m&2){let e,o=S();c("formGroup",o.baseCmdForm),l(),c("options",(e=o.commandOptions())!==null&&e!==void 0?e:T(14,Ae))("inlineSearch",!0),l(14),c("formGroup",o.standardFields),l(9),c("disallowToggle",!0),l(4),U(o.standardFields.controls.filters.controls),l(2),c("formGroup",o.optionsForm),l(7),c("options",o.sizeOptions())("inlineSearch",!0),l(5),W("options",o.settings),c("hasFreeTextSettings",!0)("hiddenOptions",T(15,Fe)),l(2),y("loader",o.isSubmitting()),l(2),w(o.baseCmdForm.value.command),z(45)}}var d=new Me,Ie=["Bytes","KB","MB","GB","TB","PB"],D=class m{#e=C(k);#t=C(te);#n=C(Q);#o=C(J);#i=C(ee);#a=I(this.#o.params);commandOptions=I(this.#i.getApiV1Commandline());sizeOptions=F(Ie);isSubmitting=F(!1);standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});optionsForm=this.#e.optionsForm;finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#r=Z(()=>{let t=this.#a()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=this.optionsForm.value,o=t.targetUrl??"",_=t.arguments?.split(`
|
|
2
|
-
`)??[],p=this.standardFields.value,N=p.filters??[],M=[t.command,o,..._,`--backup-name=${p["backup-name"]}`,`--dbpath=${p.dbpath}`,`--backup-id=${p["backup-id"]}`,...N.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>i.Name.startsWith("--")?`${i.Name}=${i.Value}`:`--${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:M}).subscribe(i=>{i.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",i.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
|
-
`)??""})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=R({type:m,selectors:[["app-commandline"]],features:[q([k])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Select an option...`;let o;o=$localize`Command`;let _;_=$localize`TargetUrl`;let p;p=$localize`Commandline Arguments`;let N;N=$localize`Advanced options`;let M;M=$localize`Backup ID`;let i;i=$localize`Backup Name`;let L;L=$localize`Filters`;let $;$=$localize`Remote volume size`;let h;h=$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#41\uFFFD"}:START_LINK:Read more${"\uFFFD/#41\uFFFD"}:CLOSE_LINK:`;let b;return b=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,o,_,p,N,M,i,L,$,h,b,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["placeholder",e,3,"options","inlineSearch"],["type","text","formControlName","unit"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,o){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",11)(3,"button",12),g(4,0),r(5,"spk-icon"),f(),n()(),B(6,Oe,1,0,"spk-progress-bar",13)(7,Te,47,16),n()),e&2&&(l(6),v(o.finishedLoading()?7:6))},dependencies:[fe,Ee,Se,ge,pe,se,de,me,_e,ce,ue,Ne,Ce,Y,ae,oe,ie,le,re,ne],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.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}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.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}"],changeDetection:0})};export{D as default};
|
package/chunk-PX6A6XCQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Jb as x,Kb as l,Na as n,Yb as r,Za as T,Zb as m,ba as f,ca as _,cb as C,na as g,oa as D,pb as s,tb as i,ub as o,xc as b,zb as u}from"./chunk-XGARKXE4.js";import{a as p}from"./chunk-7CGTOI24.js";function v(e,a){if(e&1&&(i(0,"p"),r(1),o()),e&2){let t=l();n(),m(t._data().message)}}function y(e,a){if(e&1){let t=u();i(0,"button",5),x("click",function(){f(t);let d=l();return _(d.close("cancel"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().cancelText)}}function h(e,a){if(e&1){let t=u();i(0,"button",6),x("click",function(){f(t);let d=l();return _(d.close("confirm"))}),r(1),o()}if(e&2){let t=l();n(),m(t._data().confirmText)}}var w={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},k=class e{data=D();_data=b(()=>p(p({},w),this.data()));closed=g();close(a="confirm"){this.closed.emit(a==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=T({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:8,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,""],["spk-button","",1,"raised","primary"],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(t,c){t&1&&(i(0,"header",0)(1,"h3"),r(2),o()(),i(3,"div",1),C(4,v,2,1,"p"),o(),i(5,"footer",2),C(6,y,2,1,"button",3)(7,h,2,1,"button",4),o()),t&2&&(n(2),m(c._data().title),n(2),s(c._data().message?4:-1),n(2),s(c._data().cancelText?6:-1),n(),s(c._data().confirmText?-1:7))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{k as a};
|
package/chunk-QMMXH5TN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a}from"./chunk-23KHTRDM.js";import"./chunk-XH2A67YP.js";import"./chunk-WCLOWI5G.js";import"./chunk-JJQARMUD.js";import"./chunk-XQKR67WI.js";import"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-M7VDIUGU.js";import"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";export{a as OptionsListComponent};
|
package/chunk-QRVYPTC6.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{g as Yt}from"./chunk-22CSSCKZ.js";import{a as Qt,b as Jt,o as tt}from"./chunk-AKXOFDEQ.js";import{a as jt}from"./chunk-ISRMJKPG.js";import"./chunk-DNHLTHLR.js";import"./chunk-3V622MYY.js";import{a as Xt,b as qt}from"./chunk-23KHTRDM.js";import{a as zt}from"./chunk-XH2A67YP.js";import"./chunk-WCLOWI5G.js";import{a as U}from"./chunk-PX6A6XCQ.js";import"./chunk-ZP273LXY.js";import"./chunk-D5WIWFNP.js";import"./chunk-WSLU6K4D.js";import"./chunk-UJZB6UQE.js";import"./chunk-RHW5QVAY.js";import{b as wt,c as At,e as vt,f as Pt,g as Vt,i as bt,j as Mt,m as Gt,n as Bt,o as Lt,p as Ut,q as Ht,r as Kt,t as Wt}from"./chunk-JJQARMUD.js";import"./chunk-3UJUWE5B.js";import{b as ft,d as Dt}from"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import{A as $t,a as Et,b as Ot,d as xt,e as kt,l as Rt,o as Nt,p as ht,t as yt,z as It}from"./chunk-XQKR67WI.js";import{b as St}from"./chunk-CEOO3F5U.js";import{c as gt}from"./chunk-K3CYM6ID.js";import{i as Ct}from"./chunk-M7VDIUGU.js";import{$b as _t,D as it,Db as O,Eb as x,Fb as M,Gb as q,Hb as j,Ib as H,Jb as f,Kb as p,Na as o,Nb as N,Pb as lt,Qb as T,Ua as at,Vb as st,W as y,Wb as pt,Xb as P,Yb as _,Za as rt,Zb as Q,_b as D,ba as C,bc as ct,ca as g,cb as m,cc as mt,dc as Ft,ec as J,fc as Y,ga as ot,gc as Z,hc as ut,ic as dt,jc as G,kb as c,lc as B,mb as X,pb as u,pc as L,qb as I,ra as R,rb as $,sb as w,tb as s,ub as r,vb as d,wb as A,xb as v,xc as K,yb as b,yc as Tt,zb as S}from"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";var Zt=["formRef"],te=(n,i,t,e)=>({index:n,formView:i,formGroupName:"custom",destinationType:t,oauthField:e}),z=n=>({$implicit:n}),ee=(n,i,t,e)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:t,oauthField:e}),ne=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",destinationType:t,oauthField:e}),ie=(n,i,t,e)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:e}),oe=()=>({maxWidth:"700px",width:"100%"});function ae(n,i){n&1&&(O(0,5,2),d(1,"spk-icon"),x())}function re(n,i){n&1&&M(0,5,3)}function le(n,i){if(n&1){let t=S();O(0,5,1),s(1,"button",21),f("click",function(){C(t);let a=p();return g(a.testDestination())}),m(2,ae,2,0)(3,re,1,0),r(),x()}if(n&2){let t=p();o(),X("success",t.successfulTest()),o(),u(t.successfulTest()?2:3)}}function se(n,i){if(n&1){let t=S();s(0,"p",27),f("click",function(){C(t);let a=p();return g(a.removeDestinationFormGroup(a.destinationCount()-1))}),O(1,8),d(2,"span",28),x(),r()}}function pe(n,i){if(n&1){let t=S();s(0,"div",34),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addDestinationFormGroup(a.key))}),s(1,"h3"),_(2),r(),s(3,"p"),_(4),r()()}if(n&2){let t=i.$implicit;o(2),Q(t.displayName),o(2),Q(t.description)}}function _e(n,i){if(n&1){let t=S();s(0,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addDestinationFormGroup(a.key))}),_(2),r()}if(n&2){let t=i.$implicit;o(2),D(" ",t.displayName," ")}}function ce(n,i){if(n&1&&(s(0,"div",29),$(1,pe,5,2,"div",30,I),r(),s(3,"spk-menu",31)(4,"button",32),M(5,9),r(),A(6,20),$(7,_e,3,1,"button",33,I),v(),r()),n&2){let t=p();o(),w(t.destinationTypeOptionsFocused()),o(2),c("searchable",!0),o(4),w(t.destinationTypeOptionsNotFocused())}}function me(n,i){n&1&&b(0)}function Fe(n,i){if(n&1&&m(0,me,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",G(7,z,B(2,te,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function ue(n,i){n&1&&b(0)}function de(n,i){if(n&1&&m(0,ue,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",G(7,z,B(2,ee,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Te(n,i){if(n&1){let t=S();O(0,10,1),s(1,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addAdvancedFormPair(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function Ce(n,i){n&1&&b(0)}function ge(n,i){if(n&1&&m(0,Ce,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",G(7,z,B(2,ne,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function fe(n,i){if(n&1){let t=S();O(0,11,1),s(1,"button",35,1),f("click",function(){let a=C(t).$implicit,l=p(2);return g(l.addHttpOption(a,0))}),r(),x()}if(n&2){let t=i.$implicit;o(),q(t.name),j(0)}}function De(n,i){n&1&&b(0)}function Se(n,i){if(n&1&&m(0,De,1,0,"ng-container",40),n&2){let t,e=i.$implicit,a=i.$index;p();let l=P(29),F=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",G(7,z,B(2,ie,a,e,(t=F.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,F.destinationFormPair().oauthField)))}}function Ee(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Oe(n,i){if(n&1&&(s(0,"app-file-tree",43)(1,"label",47),_(2),m(3,Ee,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);c("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name))("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function xe(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ke(n,i){if(n&1&&(s(0,"app-file-tree",44)(1,"label",47),_(2),m(3,xe,3,1,"spk-tooltip",48),r(),d(4,"input",49),r()),n&2){let t,e=p().$implicit,a=p(2);c("hideShortcuts",!0)("startingPath",a.getFormFieldValue(0,e.formGroupName,e.formView.name)),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function Re(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ne(n,i){n&1&&(s(0,"spk-icon",51),_(1,"link"),r())}function he(n,i){n&1&&(s(0,"spk-icon",51),_(1,"envelope"),r())}function ye(n,i){n&1&&(s(0,"spk-icon",51),_(1,"textbox"),r())}function Ie(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),_(2),m(3,Re,3,1,"spk-tooltip",48),r(),d(4,"input",50),m(5,Ne,2,0,"spk-icon",51)(6,he,2,0,"spk-icon",51)(7,ye,2,0,"spk-icon",51),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name),c("type",e.formView.type==="Email"?"email":"text"),o(),u(e.formView.type==="Path"?5:e.formView.type==="Email"?6:7)}}function $e(n,i){if(n&1){let t=S();s(0,"span",55),f("click",function(){C(t);let a=p(2).$implicit,l=p(2);return g(l.oauthStartTokenCreation(a.destinationType))}),_(1,"AuthID"),r()}}function we(n,i){n&1&&(s(0,"spk-icon",51),_(1,"password"),r())}function Ae(n,i){if(n&1){let t=S();s(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),_(1," eye "),r()}}function ve(n,i){if(n&1){let t=S();s(0,"spk-icon",56),f("click",function(){C(t);let a=p(2).$implicit;return g(a.formView.showPassword=!a.formView.showPassword)}),_(1," eye-slash "),r()}}function Pe(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),_(2),r(),d(3,"input",52),m(4,$e,2,0,"span",53)(5,we,2,0,"spk-icon",51)(6,Ae,2,0,"spk-icon",54)(7,ve,2,0,"spk-icon",54),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name),c("type",e.formView.showPassword?"text":"password"),o(),u(e.oauthField===e.formView.name?4:5),o(2),u(e.formView.showPassword?6:7)}}function Ve(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function be(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Me(n,i){if(n&1&&(s(0,"spk-select",57)(1,"label",47),_(2),m(3,Ve,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,be,1,1,"ng-template",null,3,L)),n&2){let t,e=P(6);p();let a=Z(0),l=p().$implicit;c("options",a)("isClearable",!1)("optionTemplate",e),o(),T("for","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),o(),D(" ",(t=l.formView.shortDescription)!==null&&t!==void 0?t:l.formView.name," "),o(),u(l.formView.longDescription?3:-1),o(),T("id","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),N("formControlName",l.formView.name)}}function Ge(n,i){if(n&1&&(J(0),m(1,Me,7,14)),n&2){let t=p().$implicit,e=Y(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:-1)}}function Be(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function Le(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;_t(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Ue(n,i){if(n&1&&(s(0,"spk-select",59)(1,"label",47),_(2),m(3,Be,3,1,"spk-tooltip",48),r(),d(4,"input",49),r(),m(5,Le,1,2,"ng-template",null,4,L)),n&2){let t,e=P(6);p();let a=Z(0),l=p().$implicit;c("options",a)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),o(),T("for","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),o(),D(" ",(t=l.formView.shortDescription)!==null&&t!==void 0?t:l.formView.name," "),o(),u(l.formView.longDescription?3:-1),o(),T("id","destination-",l.formGroupName,"-",l.index,"-",l.asHttpOptions?"http":"other",""),N("formControlName",l.formView.name)}}function He(n,i){n&1&&d(0,"spk-progress-bar",58)}function Ke(n,i){if(n&1&&(J(0),m(1,Ue,7,15)(2,He,1,0,"spk-progress-bar",58)),n&2){let t=p().$implicit,e=Y(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);o(),u(e?1:2)}}function We(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ze(n,i){if(n&1&&(s(0,"app-size",45)(1,"label",47),_(2),m(3,We,3,1,"spk-tooltip",48),r()()),n&2){let t,e=p().$implicit;c("inputType",e.Name)("formControlName",e.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
|
|
2
|
-
item.asHttpOptions ? 'http' : 'other'
|
|
3
|
-
}}`),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1)}}function Xe(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function qe(n,i){if(n&1&&(s(0,"spk-form-field")(1,"label",47),_(2),m(3,Xe,3,1,"spk-tooltip",48),r(),d(4,"input",60),s(5,"spk-icon",51),_(6,"numpad"),r()()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function je(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qe(n,i){if(n&1&&(s(0,"spk-toggle",46)(1,"label",47),_(2),m(3,je,3,1,"spk-tooltip",48),r(),d(4,"input",61),r()),n&2){let t,e=p().$implicit;o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1),o(),T("id","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),N("formControlName",e.formView.name)}}function Je(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ye(n,i){if(n&1&&_(0),n&2){let t=i.$implicit;D(" ",t," ")}}function Ze(n,i){if(n&1&&(s(0,"spk-select",62)(1,"label",47),_(2),m(3,Je,3,1,"spk-tooltip",48),r(),d(4,"input",63),r(),m(5,Ye,1,1,"ng-template",null,4,L)),n&2){let t,e=P(6),a=p().$implicit;c("options",a.formView.options)("selectMultiple",!0)("optionTemplate",e),o(),lt("for","destination-",a.formGroupName,"-",a.index,""),o(),D(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),o(),u(a.formView.longDescription?3:-1),o(),N("formControlName",a.formView.name)}}function tn(n,i){if(n&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),n&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function en(n,i){if(n&1&&(s(0,"app-timespan",45)(1,"label",47),_(2),m(3,tn,3,1,"spk-tooltip",48),r()()),n&2){let t,e=p().$implicit;c("inputType",e.formView.name)("formControlName",e.formView.name)("customId","destination-"+e.formGroupName+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),o(),T("for","destination-",e.formGroupName,"-",e.index,"-",e.asHttpOptions?"http":"other",""),o(),D(" ",(t=e.formView.shortDescription)!==null&&t!==void 0?t:e.formView.name," "),o(),u(e.formView.longDescription?3:-1)}}function nn(n,i){if(n&1){let t=S();s(0,"button",64),f("click",function(){C(t);let a=p().$implicit,l=p(2);return g(l.removeFormView(a.formView,0))}),s(1,"spk-icon"),_(2,"x-circle"),r()()}}function on(n,i){if(n&1&&(s(0,"div",41),A(1,42),m(2,Oe,5,17,"app-file-tree",43)(3,ke,5,13,"app-file-tree",44)(4,Ie,8,13,"spk-form-field")(5,Pe,8,13,"spk-form-field")(6,Ge,2,2)(7,Ke,3,2)(8,ze,4,9,"app-size",45)(9,qe,7,11,"spk-form-field")(10,Qe,5,11,"spk-toggle",46)(11,Ze,7,9)(12,en,4,9,"app-timespan",45),v(),m(13,nn,3,0,"button",32),r()),n&2){let t=i.$implicit;X("single-field",t.formGroupName!=="advanced"),o(),c("formGroupName",t.formGroupName),o(),u(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),o(11),u(t.formGroupName==="advanced"?13:-1)}}function an(n,i){if(n&1&&(A(0,22)(1,36),$(2,Fe,1,9,"ng-container",null,I),$(4,de,1,9,"ng-container",null,I),s(6,"app-toggle-card",37),A(7,38),O(8,10),s(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),r(),A(12,20),$(13,Te,3,1,"button",33,I),v(),r(),x(),v(),$(15,ge,1,9,"ng-container",null,I),r(),s(17,"app-toggle-card",37),A(18,38),O(19,11),s(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),r(),A(23,20),$(24,fe,3,1,"button",33,I),v(),r(),x(),v(),$(26,Se,1,9,"ng-container",null,I),r(),m(28,on,14,5,"ng-template",null,2,L),v()()),n&2){let t=p();o(2),w(t.destinationFormPair().custom),o(2),w(t.destinationFormPair().dynamic),o(2),c("disallowToggle",!0),o(3),c("searchable",!0),o(),c("disabled",t.notSelectedAdvancedFormPair().length===0),o(3),w(t.notSelectedAdvancedFormPair()),o(2),w(t.selectedAdvancedFormPair()),o(2),c("disallowToggle",!0),o(3),c("searchable",!0),o(),c("disabled",t.notSelectedHttpOptions().length===0),o(3),w(t.notSelectedHttpOptions()),o(2),w(t.selectedHttpOptions())}}function rn(n,i){if(n&1){let t=S();s(0,"spk-dialog",65),Ft("isOpenChange",function(a){C(t);let l=p();return mt(l.targetUrlDialogOpen,a)||(l.targetUrlDialogOpen=a),g(a)}),s(1,"header",66)(2,"h2"),M(3,12),r(),s(4,"spk-alert",67),M(5,13),r()(),s(6,"div",68)(7,"spk-form-field"),d(8,"textarea",69),r()(),s(9,"footer",70)(10,"button",24),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),s(12,"button",71),f("click",function(){C(t);let a=p();return g(a.closeTargetUrlDialog(!0))}),O(13,14),d(14,"spk-icon"),x(),r()()()}if(n&2){let t=p();ct("isOpen",t.targetUrlDialogOpen),c("options",dt(3,oe)),o(8),c("formControl",t.targetUrlCtrl)}}var W=new Kt,An=(n={destinations:[]})=>W.group({destinations:W.array(n.destinations)}),vn=({key:n,customGroup:i,dynamicGroup:t,advancedGroup:e})=>W.group({destinationType:W.control(n),custom:i,dynamic:t,advanced:e}),et=class n{#l=y(Dt);#s=y(ft);#p=y(gt);#t=y(tt);#i=y(St);#e=y(kt);#n=y(Yt);injector=y(ot);formRef=at.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=R(!1);destinationTypeOptionsInFocus=R(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=R(Jt.map(i=>({key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description})));destinationTypeOptionsFocused=K(()=>{let i=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return i.map(e=>t.find(a=>a.key===e))});destinationTypeOptionsNotFocused=K(()=>{let i=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(e=>!i.includes(e.key))});targetUrlEffect=Tt(()=>{if(this.destinationFormSignal(),this.destinationForm.valid){let i=this.#t.getCurrentTargetUrl();this.#n.updateTargetUrl(i[0])}else this.#n.updateTargetUrl(null)});ngOnInit(){let i=this.#n.destinationTargetUrl();i&&this.#t.updateFieldsFromTargetUrl(i)}getFormFieldValue(i,t,e){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[t]).controls[e].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,t){this.#t.addAdvancedFormPair(i,t)}removeFormView(i,t){this.#t.removeAdvancedFormPair(i,t)}addHttpOption(i,t){this.#t.addHttpOption(i,t)}targetUrlCtrl=new Vt;targetUrlInitial=R(null);targetUrlDialogOpen=R(!1);openTargetUrlDialog(){let t=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,e=this.targetUrlInitial();!i||t===e||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let e=this.#t.getCurrentTargetUrl()[i];e&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:e}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:a=>{let l=a.error.error.Error;if(l==="missing-folder"&&this.#e.open(U,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:F=>{F&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe()}}),l.startsWith("incorrect-cert:")){let F=l.split("incorrect-cert:")[1];this.#e.open(U,{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: ${F}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:E=>{E&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",F)}})}if(l.startsWith("incorrect-host-key:")){let F=l.split('incorrect-host-key:"')[1].split('",')[0],E=l.split('accepted-host-key:"')[1].split('",')[0];E?this.#e.open(U,{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 ${E}
|
|
8
|
-
with the REPORTED host key: ${F}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:k=>{k&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,F)}}):this.#e.open(U,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${F}`,confirmText:"Approve",cancelText:"Cancel"},closed:k=>{k&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,F)}})}}})}mapToTargetUrl(i){return Qt(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let t=this.destinationOptions().find(e=>e.Key===i);return t?`${t.DisplayName}`:""}goBack(){this.#n.exit()}next(){this.#l.navigate(["encryption"],{relativeTo:this.#s.parent})}#o=R("https://duplicati-oauth-handler.appspot.com/").asReadonly();#a=R(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#r=R(!1);#_=R(null);keyCreation(){}oauthStartTokenCreation(i){this.#r.set(!0);let t=450,e=600,a=this.#o()+"?type="+i+"&token="+this.#a(),l=screen.width/2-t/2,F=screen.height/2-e/2,E=window.open(a,"_blank","height="+e+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+F);E?.addEventListener("blur",k=>{console.log("event blur",k)}),E?.addEventListener("beforeunload",k=>{console.log("event beforeunload",k),this.#p.get(this.#o()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#a()}}).pipe(it(()=>this.#r.set(!1))).subscribe({next:V=>{console.log("res",V),V?.authid&&this.#_.set(V.authid)}})})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=rt({type:n,selectors:[["app-restore-destination"]],viewQuery:function(t,e){t&1&&st(e.formRef,Zt,5),t&2&&pt()},features:[ut([tt])],decls:24,vars:6,consts:()=>{let i;i=$localize` Backup placement ${"\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:`,i=H(i);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let e;e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let a;a=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`Other destinations`;let F;F=$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:`,F=H(F);let E;E=$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:`,E=H(E);let k;k=$localize`Edit target URL`;let V;V=$localize` Be careful, this will overwrite everything you have in your destination. `;let nt;return nt=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],i,t,e,a,l,F,E,k,V,nt,[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,e){if(t&1){let a=S();s(0,"form",15,0),f("submit",function(){return C(a),g(e.next())}),s(2,"header")(3,"h3",16),O(4,5),s(5,"div",17),m(6,le,4,3,"button",18),s(7,"spk-menu")(8,"button",19),d(9,"spk-icon"),r(),A(10,20),s(11,"button",21),f("click",function(){return C(a),g(e.openTargetUrlDialog())}),d(12,"spk-icon"),r(),v(),r()(),x(),r(),m(13,se,3,0,"p"),r(),m(14,ce,9,1)(15,an,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),f("click",function(){return C(a),g(e.goBack())}),O(18,6),d(19,"spk-icon"),x(),r(),s(20,"button",25),O(21,7),d(22,"spk-icon"),x(),r()()(),m(23,rn,15,4,"spk-dialog",26)}if(t&2){let a;c("formGroup",e.destinationForm),o(6),u(e.destinationCount()>0?6:-1),o(7),u(e.destinationCount()>0?13:-1),o(),u(e.destinationCount()===0?14:-1),o(),u(!((a=e.destinationFormSignal())==null||a.destinations==null)&&a.destinations.length?15:-1),o(8),u(e.targetUrlDialogOpen()?23:-1)}},dependencies:[Wt,bt,At,Mt,wt,vt,Pt,Gt,Bt,Ht,Lt,Ut,Ct,Rt,Nt,Et,It,$t,xt,Ot,yt,ht,qt,Xt,jt,zt],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}.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}"],changeDetection:0})};export{An as createDestinationForm,vn as createDestinationFormGroup,et as default};
|
package/chunk-VP44CSPI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as a,j as b}from"./chunk-AKXOFDEQ.js";import"./chunk-ISRMJKPG.js";import"./chunk-DNHLTHLR.js";import"./chunk-3V622MYY.js";import"./chunk-23KHTRDM.js";import"./chunk-XH2A67YP.js";import"./chunk-WCLOWI5G.js";import"./chunk-PX6A6XCQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-JJQARMUD.js";import"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import"./chunk-XQKR67WI.js";import"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-M7VDIUGU.js";import"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";export{a as createOptionsForm,b as default};
|
package/chunk-XITZBHPE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as _e}from"./chunk-AKXOFDEQ.js";import"./chunk-ISRMJKPG.js";import"./chunk-DNHLTHLR.js";import{a as oe}from"./chunk-3V622MYY.js";import"./chunk-23KHTRDM.js";import"./chunk-XH2A67YP.js";import{a as Mt}from"./chunk-DJWNLIDJ.js";import{a as J}from"./chunk-WCLOWI5G.js";import{a as ft}from"./chunk-FKTH6XCB.js";import"./chunk-PX6A6XCQ.js";import{a as Nt}from"./chunk-SFWQDWHT.js";import"./chunk-ZP273LXY.js";import"./chunk-D5WIWFNP.js";import"./chunk-WSLU6K4D.js";import"./chunk-UJZB6UQE.js";import"./chunk-RHW5QVAY.js";import{c as Y,e as ee,f as St,h as te,i as gt,l as Tt,n as ut,o as mt,q as Ct,r as Et,s as ne,t as ie}from"./chunk-JJQARMUD.js";import{a as st}from"./chunk-3UJUWE5B.js";import"./chunk-I3TLRILF.js";import"./chunk-2SGDSXNW.js";import{A as pt,a as j,b as K,g as Q,k as at,l as Z,p as rt,q as lt,r as _t,t as ct,z as dt}from"./chunk-XQKR67WI.js";import{b as A}from"./chunk-CEOO3F5U.js";import"./chunk-K3CYM6ID.js";import"./chunk-O6GWHO26.js";import"./chunk-M7VDIUGU.js";import"./chunk-BWYJMRKB.js";import{A as je,D as R,Db as B,Eb as H,Fb as r,Gb as re,Hb as le,Ib as et,Jb as S,Ka as Qe,Kb as p,N as Ke,Na as l,Nb as tt,Q as U,Ua as Ze,Vb as nt,W as u,Wb as it,Yb as I,Za as w,Zb as q,_b as W,ba as m,bc as y,c as We,ca as C,cb as E,cc as G,dc as v,hb as Je,hc as ot,ib as Ye,ic as D,kb as P,l as $,mb as f,pb as T,ra as c,tb as i,ub as o,vb as N,xc as k,y as b,yc as L,zb as O}from"./chunk-XGARKXE4.js";import"./chunk-7CGTOI24.js";var F=class s{#e=u(A);#i=oe(this.#e.getApiV1Serversettings());#t=c(void 0);serverSettings=k(()=>this.#t()||this.#i());refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:t=>{this.#t.set(t)}})}withRefresh(){return We(R(()=>this.refreshServerSettings()))}static \u0275fac=function(e){return new(e||s)};static \u0275prov=U({token:s,factory:s.\u0275fac,providedIn:"root"})};var Ot=["formRef"],Rt=()=>[import("./chunk-QMMXH5TN.js").then(s=>s.OptionsListComponent)],It=()=>["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function yt(s,t){s&1&&(i(0,"spk-alert",3),r(1,1),o())}function Gt(s,t){if(s&1){let e=O();i(0,"app-options-list",5),v("optionsChange",function(a){m(e);let d=p();return G(d.settings,a)||(d.settings=a),C(a)}),o()}if(s&2){let e=p();y("options",e.settings),P("hasFreeTextSettings",!0)("hiddenOptions",D(3,It))}}var vt=["Bytes","KB","MB","GB","TB","PB"],X=class s{#e=u(_e);#i=u(F);#t=u(A);formRef=Ze.required("formRef");optionsForm=this.#e.optionsForm;settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(vt);lastRecievedServerSettings=c({});serverSettingsEffect=L(()=>{let t=this.#i.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],d)=>{if(n.startsWith("--")){let M=n.replace("--","");this.settings.update(g=>(g.some(h=>h.Name===M)||g.push({Name:M,Value:a}),g))}d===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(g=>g.Name),d=Object.keys(e).filter(g=>!n.includes(g.replace("--",""))),M=t.reduce((g,h)=>(g[`--${h.Name}`]=h.Value,g),{});d.forEach(g=>{M[g]=null}),this.#t.patchApiV1Serversettings({requestBody:M}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#i.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&nt(n.formRef,Ot,5),e&2&&it()},features:[ot([_e])],decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings","hiddenOptions"]]},template:function(e,n){e&1&&(i(0,"div",2),E(1,yt,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),B(3,0),N(4,"spk-icon"),H(),o()(),E(5,Gt,1,4),Je(6,5,Rt)),e&2&&(l(),T(n.saved()?1:-1),l(),f("loader",n.isSubmitting()),l(4),Ye(!n.isLoadingOptions()))},dependencies:[ie,Q,j,K],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-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}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.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}"],changeDetection:0})};var x=class s{#e=u(A);#i=u(J);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=k(()=>{let t=this.state();return t==="enabled"?"Remote control is enabled but not connected":t==="connected"?"Remote control is connected":t==="registering"?"Registering machine...":t==="registeringfaulted"?"Registration failed":t==="registered"?"Registered, waiting for accept":t==="disabled"?"Remote control is configured but not enabled":t==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=L(()=>{let t=this.#i.systemInfo();t&&this.registerUrl.set(t.RemoteControlRegistrationUrl??"")});#t(t){t.RegistrationUrl&&this.claimUrl.set(t.RegistrationUrl),t.IsConnected?this.state.set("connected"):t.IsEnabled?this.state.set("enabled"):t.CanEnable?this.state.set("disabled"):t.IsRegisteringFaulted?this.state.set("registeringfaulted"):t.IsRegistering?t.RegistrationUrl!=null&&t.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let e=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),e==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(e==="enabled"||e==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),t.IsRegistering&&t.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(t){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:t=>this.#t(t),error:t=>this.#n(t)})}deleteRemoteControl(){let t=this;confirm("Are you sure you want to delete the remote control registration?")&&t.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:e=>t.#t(e),error:e=>t.#n(e)})}static \u0275fac=function(e){return new(e||s)};static \u0275prov=U({token:s,factory:s.\u0275fac,providedIn:"root"})};function $t(s,t){if(s&1){let e=O();i(0,"spk-form-field",10)(1,"input",11),v("ngModelChange",function(a){m(e);let d=p(2);return G(d.registerUrl,a)||(d.registerUrl=a),C(a)}),o()(),i(2,"button",12),S("click",function(){m(e);let a=p(2);return C(a.register())}),r(3,0),o()}if(s&2){let e=p(2);l(),y("ngModel",e.registerUrl)}}function bt(s,t){if(s&1&&(i(0,"div",8)(1,"label"),r(2,1),o(),i(3,"a",13),I(4),o()()),s&2){let e=p(2);l(3),tt("href",e.claimUrl(),Qe),l(),q(e.claimUrl())}}function wt(s,t){s&1&&(i(0,"div",8)(1,"label"),r(2,2),o()())}function kt(s,t){if(s&1){let e=O();i(0,"button",12),S("click",function(){m(e);let a=p(2);return C(a.cancel())}),r(1,3),o()}}function Lt(s,t){if(s&1){let e=O();i(0,"button",12),S("click",function(){m(e);let a=p(2);return C(a.disable())}),r(1,4),o()}}function Ft(s,t){if(s&1){let e=O();i(0,"button",12),S("click",function(){m(e);let a=p(2);return C(a.enable())}),r(1,5),o(),i(2,"button",14),S("click",function(){m(e);let a=p(2);return C(a.delete())}),r(3,6),o()}}function xt(s,t){if(s&1&&(i(0,"div",7),E(1,$t,4,1)(2,bt,5,2,"div",8)(3,wt,3,0,"div",8)(4,kt,2,0,"button",9)(5,Lt,2,0,"button",9)(6,Ft,4,0),o()),s&2){let e=p();l(),T(e.state()==="inactive"?1:-1),l(),T(e.state()==="registered"?2:-1),l(),T(e.state()==="registering"?3:-1),l(),T(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),T(e.state()==="connected"||e.state()==="enabled"?5:-1),l(),T(e.state()==="disabled"?6:-1)}}var ae=class s{#e=u(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register for remote control`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let d;d=$localize`Disable remote control`;let M;M=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[t,e,n,a,d,M,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(e,n){e&1&&E(0,xt,7,6,"div",7),e&2&&T(n.state()!=="unknown"?0:-1)},dependencies:[ne,Y,ee,te,Z],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};var Pt=()=>({standalone:!0});function Dt(s,t){s&1&&(i(0,"spk-icon",73),I(1,"check"),o())}function Xt(s,t){s&1&&(i(0,"spk-icon",74),I(1,"prohibit"),o())}function zt(s,t){if(s&1){let e=O();i(0,"button",78),S("click",function(){m(e);let a=p(2);return C(a.updatePassphrase())}),r(1,36),o()}if(s&2){let e=p(2);f("loader",e.isUpdating())}}function Vt(s,t){if(s&1){let e=O();i(0,"spk-tooltip",77)(1,"button",79),S("click",function(){m(e);let a=p(2);return C(a.updatePassphrase())}),r(2,37),o()()}if(s&2){let e=p(2);l(),f("loader",e.isUpdating()),P("disabled",!0)}}function Ut(s,t){if(s&1){let e=O();i(0,"spk-form-field")(1,"label",69),r(2,33),o(),i(3,"input",70),v("ngModelChange",function(a){m(e);let d=p();return G(d.passphrase,a)||(d.passphrase=a),C(a)}),o()(),i(4,"spk-form-field")(5,"label",71),r(6,34),o(),i(7,"input",72),v("ngModelChange",function(a){m(e);let d=p();return G(d.repeatPassphrase,a)||(d.repeatPassphrase=a),C(a)}),o(),E(8,Dt,2,0,"spk-icon",73)(9,Xt,2,0,"spk-icon",74),o(),i(10,"div",50)(11,"button",75),S("click",function(){m(e);let a=p();return C(a.cancelPasswordChange())}),r(12,35),o(),E(13,zt,2,2,"button",76)(14,Vt,3,3,"spk-tooltip",77),o()}if(s&2){let e=p();l(3),y("ngModel",e.passphrase),l(4),P("disabled",e.passphrase().length===0),y("ngModel",e.repeatPassphrase),l(),T(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),f("loader",e.isUpdating()),l(2),T(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function Bt(s,t){s&1&&(i(0,"spk-icon",80),I(1,"check"),o())}function Ht(s,t){if(s&1){let e=O();i(0,"div",50)(1,"button",75),S("click",function(){m(e);let a=p();return C(a.openPassphraseForm())}),r(2,38),o(),E(3,Bt,2,0,"spk-icon",80),o()}if(s&2){let e=p();l(3),T(e.passwordUpdated()?3:-1)}}function qt(s,t){if(s&1){let e=O();i(0,"spk-form-field")(1,"label",81),r(2,39),o(),i(3,"textarea",82),v("ngModelChange",function(a){m(e);let d=p();return G(d.allowedHostnames,a)||(d.allowedHostnames=a),C(a)}),o()(),i(4,"spk-alert",83),r(5,40),o(),i(6,"button",78),S("click",function(){m(e);let a=p();return C(a.updateAllowedHostnames())}),r(7,41),o()}if(s&2){let e=p();l(3),y("ngModel",e.allowedHostnames),l(3),f("loader",e.updatingAllowedHosts())}}function Wt(s,t){s&1&&N(0,"spk-progress-bar",55)}function jt(s,t){if(s&1&&I(0),s&2){let e,n=p();W(" ",(e=n.sysinfo())==null?null:e.ServerVersion," ")}}function Kt(s,t){s&1&&N(0,"spk-progress-bar",55)}function Qt(s,t){if(s&1&&I(0),s&2){let e=t.$implicit;W(" ",e.label," ")}}function Zt(s,t){if(s&1&&I(0),s&2){let e=t.$implicit;W(" ",e.label," ")}}var z=new Et,Jt=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Yt=[{value:"",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],en=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (decending)`},{value:"-name",label:$localize`Backup name (decending)`},{value:"-lastrun",label:$localize`Last run time (decending)`},{value:"-nextrun",label:$localize`Next run time (decending)`},{value:"-schedule",label:$localize`Is scheduled (decending)`},{value:"-backend",label:$localize`Destination type (decending)`},{value:"-sourcesize",label:$localize`Source size (decending)`},{value:"-destinationsize",label:$localize`Destination size (decending)`},{value:"-duration",label:$localize`Duration (decending)`}],ce=class s{#e=u(ft);#i=u(J);#t=u(A);#n=u(F);#a=u(x);#o=u(st);#s=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#s;langCtrl=c(this.#s);sortOrderCtrl=c("");remoteControlStatus=this.#a.status;settingsForm=z.group({pauseSettings:z.group({time:z.control(0),timeType:z.control("s")}),usageStatistics:z.control("")});ngOnInit(){this.settingsForm.controls.pauseSettings.valueChanges.pipe(je(300),Ke(()=>this.updateStartupDelay())).subscribe()}updatingChannel=c(!1);updateChannel=c("");prevSortOrder=c("");updatingSortOrder=c(!1);setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(this.#n.withRefresh(),R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(e),$(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(this.#n.withRefresh(),R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(t),$(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(this.#n.withRefresh(),R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(t),$(null)))).subscribe()}updateSortOrder(t){let n=t[0]?.value??"";if(!n||n===""||n===this.prevSortOrder())return;let a=this.prevSortOrder();this.updatingSortOrder.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"backup-list-sort-order":n}}).pipe(this.#n.withRefresh(),R(()=>this.updatingSortOrder.set(!1)),b(()=>(this.sortOrderCtrl.set(a),$(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(this.#n.withRefresh(),R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(t),$(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(this.#n.withRefresh(),R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}get pauseSettings(){return this.settingsForm.controls.pauseSettings}sortOptions=c(en);languageOptions=c(Mt);usageStatisticsOptions=c(Yt);timeTypeOptions=c(Jt);timeTypeSignal=oe(this.pauseSettings.controls.timeType.valueChanges);timeRange=k(()=>this.timeTypeSignal()==="h"?[0,24]:[0,60]);updateLocale(t){let n=t[0]?.value??"";!n||n===""||n===this.previousLang||(this.#o.setItem("locale",n),window.location.reload())}updateStartupDelay(){let t=this.pauseSettings.value,e=`${t.time}${t.timeType}`;this.#t.patchApiV1Serversettings({requestBody:{"startup-delay":e==="0s"?"":e}}).pipe(this.#n.withRefresh()).subscribe()}updateUsageStatistics(){this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value}}).pipe(this.#n.withRefresh()).subscribe()}serverSettingsEffect=L(()=>{let t=this.#n.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),a=e.slice(0,-1),d=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.prevSortOrder.set(t["backup-list-sort-order"]),this.sortOrderCtrl.set(this.prevSortOrder()),queueMicrotask(()=>{this.settingsForm.patchValue({pauseSettings:{time:parseInt(a==""?"0":a),timeType:d.includes(n)?n:"s"},usageStatistics:t["usage-reporter-level"]??""})})});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:142,vars:45,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let d;d=$localize`Customize your application theme`;let M;M=$localize`Passwords`;let g;g=$localize`Change server passphrase`;let h;h=$localize`Language`;let de;de=$localize`Select a language for the platform`;let pe;pe=$localize`Allow remote access (requires restart)`;let Se;Se=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ge;ge=$localize`Allow remote access`;let Te;Te=$localize`Prevent tray icon automatic log-in`;let ue;ue=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let me;me=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize`Backup list sort order`;let Ee;Ee=$localize`Choose the order to display backups on the starting page in`;let fe;fe=$localize`Update channel`;let Ne;Ne=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Me;Me=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$localize`Stable`;let Pe;Pe=$localize`Official releases`;let Oe;Oe=$localize`Beta`;let Re;Re=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Ie;Ie=$localize` Experimental `;let ye;ye=$localize`Specific builds for developers only. Not for use with important data.`;let Ge;Ge=$localize`Canary`;let ve;ve=$localize`Individual builds for developers only. Not for use with important data.`;let Ae;Ae=$localize`Pause after startup or hibernation`;let $e;$e=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let be;be=$localize`Usage statistics`;let V;V=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#129\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#129\uFFFD"}:CLOSE_LINK:${"[\uFFFD#130\uFFFD\uFFFD/#130\uFFFD|\uFFFD#131\uFFFD\uFFFD/#131\uFFFD]"}:LINE_BREAK:${"[\uFFFD#130\uFFFD\uFFFD/#130\uFFFD|\uFFFD#131\uFFFD\uFFFD/#131\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,V=et(V);let we;we=$localize`Advanced options`;let ke;ke=$localize`Enter new password`;let Le;Le=$localize`Repeat password`;let Fe;Fe=$localize`Password have to be filled and have to match`;let xe;xe=$localize`Passphrase`;let De;De=$localize`Repeat passphrase`;let Xe;Xe=$localize`Cancel`;let ze;ze=$localize` Update passphrase `;let Ve;Ve=$localize` Update passphrase `;let Ue;Ue=$localize`Change password`;let Be;Be=$localize`Allowed hostnames`;let He;He=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let qe;return qe=$localize` Update allowed hostnames `,[t,e,n,a,d,M,g,h,de,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,ve,Ae,$e,be,V,we,xe,De,Xe,ze,Ve,Ue,Be,He,qe,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"selectedOptionsChange","options","isClearable","inlineSearch"],["type","text",3,"ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"content",3,"formGroup"],["formGroupName","pauseSettings",1,"field-row"],[1,"raised","primary",3,"unit"],["type","range","formControlName","time",3,"min","max"],["label","label","value","value",3,"options","isClearable"],["type","text","formControlName","timeType"],["href","#"],["label","label","value","value",3,"selectedOptionsChange","options"],["type","text","formControlName","usageStatistics"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ke,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",Le,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["message",Fe,1,"primary"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","",1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(e,n){if(e&1&&(N(0,"app-status-bar"),i(1,"div",42)(2,"header")(3,"div",43)(4,"h2"),r(5,0),o(),i(6,"p"),r(7,1),o()()(),i(8,"section")(9,"div",44)(10,"h3"),r(11,2),o(),i(12,"p"),I(13),o()(),i(14,"div",45),N(15,"app-remote-control"),o()(),i(16,"section")(17,"div",44)(18,"h3"),r(19,3),o(),i(20,"p"),r(21,4),o()(),i(22,"div",45)(23,"div",46)(24,"img",47),S("click",function(){return n.setLightMode()}),o(),i(25,"img",48),S("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",44)(28,"h3"),r(29,5),o(),i(30,"p"),r(31,6),o()(),i(32,"div",49),E(33,Ut,15,7)(34,Ht,4,1,"div",50),o()(),i(35,"section")(36,"div",44)(37,"h3"),r(38,7),o(),i(39,"p"),r(40,8),o()(),i(41,"div",45)(42,"spk-select",51),S("selectedOptionsChange",function(d){return n.updateLocale(d)}),N(43,"input",52),o()()(),i(44,"section")(45,"div",44)(46,"h3"),r(47,9),o(),i(48,"p"),r(49,10),o()(),i(50,"div",53)(51,"spk-toggle",54),S("click",function(){return n.updateRemoteAccess()}),i(52,"label"),r(53,11),o()(),E(54,qt,8,3),o()(),i(55,"section")(56,"div",44)(57,"h3"),r(58,12),o(),i(59,"p"),r(60,13),o()(),i(61,"div",45)(62,"spk-toggle",54),S("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),r(64,14),o()()()(),i(65,"section")(66,"div",44)(67,"h3"),r(68,15),o(),i(69,"p"),r(70,16),o(),E(71,Wt,1,0,"spk-progress-bar",55),o(),i(72,"div",45)(73,"spk-select",51),S("selectedOptionsChange",function(d){return n.updateSortOrder(d)}),N(74,"input",52),o()()(),i(75,"section")(76,"div",44)(77,"h3"),r(78,17),o(),i(79,"p"),E(80,jt,1,1),o(),E(81,Kt,1,0,"spk-progress-bar",55),o(),i(82,"div",56)(83,"div",57),S("click",function(){return n.setNewChannel("")}),i(84,"spk-radio",58),r(85,18),o(),i(86,"p"),r(87,19),o()(),i(88,"div",57),S("click",function(){return n.setNewChannel("stable")}),i(89,"spk-radio",58),r(90,20),o(),i(91,"p"),r(92,21),o()(),i(93,"div",57),S("click",function(){return n.setNewChannel("beta")}),i(94,"spk-radio",58),r(95,22),o(),i(96,"p"),r(97,23),o()(),i(98,"div",57),S("click",function(){return n.setNewChannel("experimental")}),i(99,"spk-radio",58),r(100,24),o(),i(101,"p"),r(102,25),o()(),i(103,"div",57),S("click",function(){return n.setNewChannel("canary")}),i(104,"spk-radio",58),r(105,26),o(),i(106,"p"),r(107,27),o()()()()(),N(108,"spk-divider"),i(109,"form",59)(110,"section")(111,"div",44)(112,"h3"),r(113,28),o(),i(114,"p"),r(115,29),o()(),i(116,"div",45)(117,"div",60)(118,"spk-range-slider",61),N(119,"input",62),o(),i(120,"spk-select",63),N(121,"input",64),E(122,Qt,1,1,"ng-template"),o()()()(),i(123,"section")(124,"div",44)(125,"h3"),r(126,30),o(),i(127,"p"),B(128,31),N(129,"a",65)(130,"br")(131,"br"),H(),o()(),i(132,"div",45)(133,"spk-select",66),S("selectedOptionsChange",function(){return n.updateUsageStatistics()}),N(134,"input",67),E(135,Zt,1,1,"ng-template"),o()()()(),i(136,"div",42)(137,"section")(138,"div",68)(139,"h3"),r(140,32),o(),N(141,"app-advanced-options-settings"),o()()()),e&2){let a,d,M,g;l(13),q(n.remoteControlStatus()),l(11),f("active",!n.isDarkMode()),l(),f("active",n.isDarkMode()),l(8),T(n.showPassphraseForm()?33:34),l(9),P("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),P("ngModel",n.langCtrl())("ngModelOptions",D(43,Pt)),l(8),f("active",n.allowRemoteAccess()),l(3),T(n.allowRemoteAccess()?54:-1),l(8),f("active",n.disableTrayIconLogin()),l(9),T(n.updatingSortOrder()?71:-1),l(2),P("options",n.sortOptions())("isClearable",!1)("inlineSearch",!0),l(),P("ngModel",n.sortOrderCtrl())("ngModelOptions",D(44,Pt)),l(6),T(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?80:-1),l(),T(n.updatingChannel()?81:-1),l(3),f("active",n.updateChannel()===""),l(),re((d=n.sysinfo())==null?null:d.DefaultUpdateChannel),le(85),l(2),re((M=n.sysinfo())==null?null:M.ServerVersionType),le(87),l(2),f("active",n.updateChannel()==="stable"),l(5),f("active",n.updateChannel()==="beta"),l(5),f("active",n.updateChannel()==="experimental"),l(5),f("active",n.updateChannel()==="canary"),l(5),P("formGroup",n.settingsForm),l(9),P("unit",(g=n.timeTypeSignal())!==null&&g!==void 0?g:""),l(),P("min",n.timeRange()[0])("max",n.timeRange()[1]),l(),P("options",n.timeTypeOptions())("isClearable",!1),l(13),P("options",n.usageStatisticsOptions())}},dependencies:[ne,gt,Y,Tt,ee,St,te,ie,ut,Ct,mt,Nt,ae,X,Q,lt,_t,rt,dt,pt,Z,j,at,K,ct],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-level-10);z-index:1000;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-level-40)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{ce as default};
|