@duplicati/ngclient 0.0.93 → 0.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/spk.woff2 +0 -0
- package/{chunk-NWWH6FOD.js → chunk-2FWU7B4D.js} +1 -1
- package/{chunk-PN4QLDYL.js → chunk-3HJFVNAL.js} +1 -1
- package/chunk-3TZIEZUP.js +1 -0
- package/{chunk-X7RS746V.js → chunk-3ZLHMSKS.js} +1 -1
- package/{chunk-JBQGUGVU.js → chunk-5RLVPRCW.js} +1 -1
- package/chunk-APEDZMBI.js +1 -0
- package/{chunk-MEJJFYOP.js → chunk-AVNZ3OXK.js} +1 -1
- package/{chunk-5AD5B72M.js → chunk-DTR7JZFL.js} +1 -1
- package/chunk-DUPZCVLU.js +3 -0
- package/chunk-ECH6I3YN.js +1 -0
- package/chunk-ETPUKEDV.js +1 -0
- package/chunk-F4AVB6VB.js +1 -0
- package/chunk-FAZH6E7O.js +6 -0
- package/chunk-HWVDZXYD.js +1 -0
- package/{chunk-FXMKPZYY.js → chunk-ICOF6OY2.js} +1 -1
- package/{chunk-U4NNGRE4.js → chunk-IR7OYLKR.js} +1 -1
- package/{chunk-NKI2QDIB.js → chunk-KJ3CPTGU.js} +1 -1
- package/{chunk-L4FEHUC5.js → chunk-L4B5RE7R.js} +1 -1
- package/chunk-LFPZBC5Y.js +1 -0
- package/chunk-LVHYWUFN.js +1 -0
- package/chunk-M5YHW43W.js +6 -0
- package/chunk-MLJFOQOI.js +1 -0
- package/chunk-NU46HB6T.js +1 -0
- package/{chunk-IIXLH5ZP.js → chunk-ORA656R6.js} +1 -1
- package/chunk-P5GYPUJD.js +1 -0
- package/{chunk-G3EXCHQT.js → chunk-Q67EYU7V.js} +1 -1
- package/{chunk-MLWKZUCJ.js → chunk-QXYKZKGV.js} +1 -1
- package/{chunk-EDCLBXPN.js → chunk-R6R4GFBX.js} +1 -1
- package/chunk-RCP6EKCC.js +1 -0
- package/{chunk-LK3VCLPO.js → chunk-RDRLCN5M.js} +1 -1
- package/{chunk-HEWPPRUR.js → chunk-RHPHTHFC.js} +1 -1
- package/{chunk-GHKDRBKY.js → chunk-S5JZJBJS.js} +1 -1
- package/{chunk-72KOKABP.js → chunk-SNZ7FE6B.js} +1 -1
- package/chunk-SSXZ4GVY.js +1 -0
- package/{chunk-L5JFNWJY.js → chunk-TBPNAHEA.js} +1 -1
- package/{chunk-CZYVLZJY.js → chunk-TLNQL27Q.js} +1 -1
- package/chunk-TX5R4CFB.js +1 -0
- package/{chunk-OQEGPSC6.js → chunk-TYO44G6M.js} +1 -1
- package/{chunk-2F746EVW.js → chunk-VFLEQIHL.js} +1 -1
- package/{chunk-H2BQFBR7.js → chunk-VS2WUXLN.js} +1 -1
- package/{chunk-C5K65UWU.js → chunk-WNQBKJ3M.js} +1 -1
- package/chunk-WYXI4BXE.js +1 -0
- package/{chunk-BRABR4TV.js → chunk-XL5J65PI.js} +1 -1
- package/chunk-XQXYPXR7.js +1 -0
- package/{chunk-MEN7LF3Z.js → chunk-YKB6KLXM.js} +1 -1
- package/{chunk-5QXJ72T7.js → chunk-ZHWVTLKA.js} +1 -1
- package/index.html +2 -2
- package/{main-BFHA4U62.js → main-ZZ5NOUMD.js} +1 -1
- package/package.json +1 -1
- package/{styles-XKGGAPZF.css → styles-IOWRSZHV.css} +1 -1
- package/chunk-6CBLVQF7.js +0 -1
- package/chunk-72TEDEJQ.js +0 -1
- package/chunk-ADUML4PZ.js +0 -1
- package/chunk-BMGRMZMS.js +0 -1
- package/chunk-CRREGVJC.js +0 -1
- package/chunk-G7WA55U2.js +0 -1
- package/chunk-GPGZVGAS.js +0 -1
- package/chunk-HE7XNGM2.js +0 -3
- package/chunk-IWVXUCAK.js +0 -6
- package/chunk-LHHHM7NL.js +0 -1
- package/chunk-LZN3T7CR.js +0 -1
- package/chunk-OTABKUUH.js +0 -1
- package/chunk-PJ3V44DO.js +0 -1
- package/chunk-PU3VZLC6.js +0 -1
- package/chunk-R3DRARWT.js +0 -1
- package/chunk-RB3QECD4.js +0 -6
- package/chunk-XGR5AA4N.js +0 -1
package/chunk-RB3QECD4.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as je}from"./chunk-PN4QLDYL.js";import{a as Le}from"./chunk-G3EXCHQT.js";import{a as At,b as qt}from"./chunk-DNHLTHLR.js";import{a as z}from"./chunk-N5K6ODRA.js";import{a as ct}from"./chunk-CRREGVJC.js";import{a as tt}from"./chunk-CK5N2PPF.js";import{a as be,b as ce,c as he,d as me,e as De,f as mt,g as jt,h as Ee,i as Ge,l as ut,m as ye,n as Ve,o as Wt,p as Pe,q as ne,r as _t,s as Ne}from"./chunk-4IJQ7AAQ.js";import{b as Xe}from"./chunk-KLIPTMVG.js";import{a as Te,c as ae}from"./chunk-AIOUSVMR.js";import{a as se,b as st,d as Xt,e as Ht,g as Re,l as le,n as lt,o as pt,r as pe,w as ve,x as He}from"./chunk-R3DRARWT.js";import{c as zt}from"./chunk-V5GVLIPJ.js";import{ia as at}from"./chunk-2HS3CYRN.js";import{A as ht,Ab as s,Bb as r,Cb as u,D as Ye,Db as H,Eb as j,Fb as Be,Gb as k,Lc as B,Mb as C,Mc as rt,Nb as f,Ob as x,Pb as Ze,Qa as l,Qb as Je,R as we,Rb as ke,Sb as D,Tb as p,Wb as X,X as $,Xa as Ce,Yb as W,Zb as U,ca as S,cc as fe,da as T,db as re,dc as Se,ec as Y,fc as _,gc as yt,ha as bt,hc as M,ib as d,ic as Gt,kc as Vt,l as Tt,lc as Lt,mc as Ut,nc as Pt,oa as Dt,oc as Nt,p as Qe,pa as Et,pc as Ot,rb as c,rc as Bt,sa as A,sc as Ke,tb as Ae,tc as Kt,uc as et,wb as F,xb as J,yb as ee,yc as $e,zb as te}from"./chunk-DTPZU6NP.js";import{a as O,c as vt}from"./chunk-C6Q5SG76.js";var dt=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=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=class e{#e=$(Xe);s3Providers=z(this.getS3Config("Providers"));s3Regions=z(this.getS3Config("Regions"));s3RegionHosts=z(this.getS3Config("RegionHosts"));s3StorageClasses=z(this.getS3Config("StorageClasses"));storjSatellites=z(this.getStorjConfig("Satellites"));storjAuthenticationMethods=z(this.getStorjConfig("AuthenticationMethods"));openstackProviders=z(this.getOpenstackConfig("Providers"));openstackVersions=z(this.getOpenstackConfig("Versions"));gcsLocations=z(this.getGcsConfig("Locations"));gcsStorageClasses=z(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Qe(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(Qe(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Qe(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Qe(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=we({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ue(e){return e==null?"":":"+e.toString()}function oe(e){return e==null?"":e.startsWith("/")?e:"/"+e}function w(e,n){let t={},o={};return n.searchParams.forEach((i,a)=>{Ie.find(m=>m.key===e)?.dynamicFields?.includes(a)?o[a]=decodeURIComponent(i):t[a]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function R(e,n=!1){let t=e.map(([i,a])=>`${i}=${a?encodeURIComponent(a.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function Ft(e){let n=e.destinationType,t=Ie.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function kt(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return Ie.find(a=>a.customKey===t||a.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let a=new URL(i);return Ie.find(m=>m.customKey===t||m.key===t)?.mapper.from(t,a,e)}catch(a){console.error("Error while parsing target path",a)}if(!n)throw new Error("Invalid target path");return null}var h=new ne,Ie=[{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=>h.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],a=i.startsWith("%"),g=i.slice(1).startsWith(":\\")||a?i:"/"+i;return O({destinationType:e,custom:{path:g}},w(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>h.control(e??"",[he.required,he.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.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+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(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=>h.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).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(Oe).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+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},w(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=>h.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Oe).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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>A([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>h.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)=>{let o=n.pathname.replace(/^\//,"");return O({destinationType:e,custom:{server:n.hostname,path:o}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>h.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+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},w(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=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>h.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+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.control(e??"",[he.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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)=>O({destinationType:e,custom:{path:n.hostname+n.pathname}},w(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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+Ue(t)+oe(i)+n}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(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(([a])=>!["rclone-remote-repository","rclone-remote-path"].includes(a)),i=R([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=w(e,n);return O({destinationType:e,dynamic:O({"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=>h.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Oe).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Oe).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)=>O({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},w(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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"],a=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([m])=>m!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Ue(n)+oe(o)+a}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.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(([a])=>a!=="use-ssl")]);return`${e.destinationType}://${t+Ue(n)+oe(o)+i}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(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=>h.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+oe(t)+o}`},from:(e,n,t)=>O({destinationType:e,custom:{path:n.pathname}},w(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=>h.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)=>O({destinationType:e,custom:{path:n.pathname}},w(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=>h.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>h.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>h.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:a}=e.custom,m={"auth-username":i,"auth-password":a},g=e.dynamic["use-ssl"],P=R([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([N])=>N!=="use-ssl"),...Object.entries(m)]);return`${e.destinationType}${g?"s":""}://${t+Ue(n)+oe(o)+P}`},from:(e,n,t)=>O({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},w(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>h.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>h.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>h.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:a}=e.custom,m={"auth-username":i,"auth-password":a},g=R([...Object.entries(e.advanced),...Object.entries(m)]);return`${e.destinationType}://${t+oe(n)+oe(o)+g}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return O({destinationType:e,custom:{server:n.hostname,share:o,path:i}},w(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)=>O({destinationType:e},w(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(Oe).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)=>O({destinationType:e},w(e,n))}}];var Qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,gt=class e{generate(n,t=Qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=Qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},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)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var sn=["formRef"];function ln(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t.DisplayName," ")}}function pn(e,n){if(e&1&&u(0,"spk-progress-bar",37),e&2){let t=p(3);Ae("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function cn(e,n){e&1&&(s(0,"span",32),x(1,9),r())}function mn(e,n){e&1&&(C(0,7,1),u(1,"spk-icon"),f())}function un(e,n){e&1&&(C(0,7,2),u(1,"spk-icon"),f())}function _n(e,n){e&1&&(C(0,10,1),u(1,"spk-icon",39),f())}function dn(e,n){e&1&&(C(0,10,2),u(1,"spk-icon"),f())}function Fn(e,n){if(e&1){let t=k();s(0,"button",38),D("click",function(){S(t);let i=p(3);return T(i.copyPassword())}),C(1,10),d(2,_n,2,0)(3,dn,2,0),f(),r()}if(e&2){let t=p(3);l(2),F(t.copiedPassword()?2:3)}}function gn(e,n){e&1&&(s(0,"spk-alert",36),x(1,11),r())}function Cn(e,n){if(e&1){let t=k();s(0,"div",27)(1,"spk-form-field")(2,"label",28),C(3,6),u(4,"sup"),f(),r(),u(5,"input",29),r(),d(6,pn,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),u(8,"input",31),d(9,cn,2,0,"span",32),r(),s(10,"div",33)(11,"button",34),D("click",function(){S(t);let i=p(2);return T(i.showPassword.set(!i.showPassword()))}),C(12,7),d(13,mn,2,0)(14,un,2,0),f(),r(),s(15,"button",34),D("click",function(){S(t);let i=p(2);return T(i.generatePassword())}),C(16,8),u(17,"spk-icon"),f(),r(),d(18,Fn,4,1,"button",35),r(),d(19,gn,2,0,"spk-alert",36),r()}if(e&2){let t=p(2);l(5),c("type",t.showPassword()?"text":"password"),l(),F(t.generalForm.value.password?6:-1),l(2),c("type",t.showPassword()?"text":"password"),l(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),F(t.showPassword()?13:14),l(5),F(t.showCopyPassword()?18:-1),l(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function fn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),x(2,5),r(),u(3,"input",26),d(4,ln,1,1,"ng-template"),r(),d(5,Cn,20,7,"div",27)),e&2){let t=p();c("options",t.encryptionOptions())("isClearable",!1),l(5),F(t.encryptionFieldSignal()!==""?5:-1)}}function Sn(e,n){if(e&1&&(s(0,"button",22),C(1,12),u(2,"spk-icon"),f(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function Tn(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),C(2,13),u(3,"spk-icon"),f(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var We=new ne,Yt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>We.group({name:We.control(e.name,[he.required]),description:We.control(e.description),encryption:We.control(e.encryption,[qt()]),password:We.control(e.password,[At(n=>n?.value.encryption!=="",[he.required])]),repeatPassword:We.control(e.repeatPassword,[At(n=>n?.value.encryption!=="",[he.required])])}),xt={Key:"",DisplayName:"None"},$t=class e{#e=$(ae);#t=$(Te);#o=$(gt);#i=$(ue);#n=$(ct);formRef=Ce.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=A(!1);copiedPassword=A(!1);showCopyPassword=A(!1);encryptionEffect=rt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=B(()=>{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=[xt,...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=re({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&fe(o.formRef,sn,5),t&2&&Se()},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 a;a=$localize`Backup description`;let m;m=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let g;g=$localize`Encryption`;let P;P=$localize`Encryption`;let N;N=$localize`Password`;let G;G=$localize`Repeat password`;let b;b=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=ke(v);let L;L=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let q;q=$localize`Passwords do not match`;let Z;Z=$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:`,Z=ke(Z);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let K;return K=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,a,m,P,b,v,L,q,Z,E,y,K,["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",g,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",G,"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=k();s(0,"form",14,0),D("submit",function(){return S(i),T(o.next())}),s(2,"h3",15),x(3,1),r(),s(4,"spk-form-field")(5,"label",16),C(6,2),u(7,"sup"),f(),r(),u(8,"input",17),r(),s(9,"spk-form-field")(10,"label",18),x(11,3),r(),u(12,"textarea",19),r(),d(13,fn,6,3),s(14,"div",20)(15,"button",21),D("click",function(){return S(i),T(o.exit())}),C(16,4),u(17,"spk-icon"),f(),r(),d(18,Sn,3,1,"button",22)(19,Tn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),l(13),F(o.isNew()?13:-1),l(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Ne,Ee,ce,me,De,ye,Pe,le,pe,Re,se,pt,st,He],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 hn=["formRef"],Dn=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),En=e=>({$implicit:e});function yn(e,n){e&1&&(C(0,6,1),u(1,"spk-icon",18),f())}function Pn(e,n){e&1&&(s(0,"p",18),x(1,12),r())}function Nn(e,n){if(e&1){let t=k();C(0,9,1),s(1,"button",35,2),D("click",function(){let i=S(t).$implicit,a=p();return T(a.addNewOption(i))}),r(),f()}if(e&2){let t=n.$implicit;l(),Ze(t.name),Je(0)}}function On(e,n){e&1&&Be(0)}function An(e,n){if(e&1&&d(0,On,1,0,"ng-container",36),e&2){let t=n.$implicit,o=n.$index;p();let i=Y(34);c("ngTemplateOutlet",i)("ngTemplateOutletContext",Ke(5,En,Kt(2,Dn,o,t)))}}function kn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function $n(e,n){if(e&1&&(s(0,"app-file-tree",39)(1,"label",44),_(2),d(3,kn,3,1,"spk-tooltip",45),r(),u(4,"input",46),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function xn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function In(e,n){if(e&1&&(s(0,"app-file-tree",40)(1,"label",44),_(2),d(3,xn,3,1,"spk-tooltip",45),r(),u(4,"input",46),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function Mn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wn(e,n){e&1&&(s(0,"spk-icon",47),_(1,"link"),r())}function Rn(e,n){e&1&&(s(0,"spk-icon",47),_(1,"textbox"),r())}function vn(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),d(3,Mn,3,1,"spk-tooltip",45),r(),u(4,"input",46),d(5,wn,2,0,"spk-icon",47)(6,Rn,2,0,"spk-icon",47),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name),l(),F(o.formView.type==="Path"?5:6)}}function bn(e,n){if(e&1){let t=k();s(0,"span",51),D("click",function(){S(t);let i=p(2).$implicit,a=p();return T(a.oauthStartTokenCreation(i.formViewType))}),_(1,"AuthID"),r()}}function Gn(e,n){e&1&&(s(0,"spk-icon",47),_(1,"password"),r())}function Vn(e,n){if(e&1){let t=k();s(0,"spk-icon",52),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye "),r()}}function Ln(e,n){if(e&1){let t=k();s(0,"spk-icon",52),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye-slash "),r()}}function Un(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),r(),u(3,"input",48),d(4,bn,2,0,"span",49)(5,Gn,2,0,"spk-icon",47)(6,Vn,2,0,"spk-icon",50)(7,Ln,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),l(),F(o.oauthField===o.formView.name?4:5),l(2),F(o.formView.showPassword?6:7)}}function Bn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Kn(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function zn(e,n){if(e&1&&(s(0,"spk-select",53)(1,"label",44),_(2),d(3,Bn,3,1,"spk-tooltip",45),r(),u(4,"input",46),r(),d(5,Kn,1,1,"ng-template",null,3,$e)),e&2){let t,o=Y(6),i=p().$implicit;c("options",i.formView.options)("isClearable",!1)("optionTemplate",o),l(),U("for","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),l(),M(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),F(i.formView.longDescription?3:-1),l(),U("id","destination-",i.formGroupName,"-",i.index,"-",i.asHttpOptions?"http":"other",""),X("formControlName",i.formView.name)}}function Xn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Hn(e,n){if(e&1&&(s(0,"div",41)(1,"label",44),_(2),d(3,Xn,3,1,"spk-tooltip",45),r(),s(4,"div",54)(5,"spk-form-field"),u(6,"input",55),s(7,"spk-icon",47),_(8,"resize"),r()(),s(9,"spk-select",56),u(10,"input",21),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(3),W("id","destination-",o.formGroupName,"-",o.index,""),l(3),c("options",i.sizeOptions())("inlineSearch",!0)}}function jn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Wn(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),d(3,jn,3,1,"spk-tooltip",45),r(),u(4,"input",57),s(5,"spk-icon",47),_(6,"numpad"),r()()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function qn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Qn(e,n){if(e&1&&(s(0,"spk-toggle",42)(1,"label",44),_(2),d(3,qn,3,1,"spk-tooltip",45),r(),u(4,"input",58),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function Yn(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function Jn(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",44),_(2),d(3,Yn,3,1,"spk-tooltip",45),r(),u(4,"input",60),r(),d(5,Zn,1,1,"ng-template",null,4,$e)),e&2){let t,o=Y(6),i=p().$implicit;c("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),W("for","destination-",i.formGroupName,"-",i.index,""),l(),M(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),F(i.formView.longDescription?3:-1),l(),X("formControlName",i.formView.name)}}function eo(e,n){if(e&1&&(s(0,"spk-tooltip",45)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function to(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",44),_(2),d(3,eo,3,1,"spk-tooltip",45),r(),u(4,"input",46),r()),e&2){let t,o=p().$implicit;l(),W("for","destination-",o.formGroupName,"-",o.index,""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),W("id","destination-",o.formGroupName,"-",o.index,""),X("formControlName",o.formView.name)}}function no(e,n){if(e&1){let t=k();s(0,"div",37),H(1,38),d(2,$n,5,14,"app-file-tree",39)(3,In,5,10,"app-file-tree",40)(4,vn,7,10,"spk-form-field")(5,Un,8,11,"spk-form-field")(6,zn,7,14)(7,Hn,11,11,"div",41)(8,Wn,7,9,"spk-form-field")(9,Qn,5,9,"spk-toggle",42)(10,Jn,7,9)(11,to,5,9,"spk-form-field"),j(),s(12,"button",43),D("click",function(){let i=S(t).$implicit,a=p();return T(a.removeFormView(i.formView,0))}),s(13,"spk-icon"),_(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;l(),c("formGroupName",t.formGroupName),l(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var qe=new ne,Zt=["Bytes","KB","MB","GB","TB","PB"],oo=[{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`}],io=1024*1024*1024*2,ro=1024*1024*5,Jt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>qe.group({remoteVolumeSize:qe.group({size:qe.control(e.remoteVolumeSize),unit:qe.control(e.size)}),backupRetention:qe.control(e.backupRetention),advancedOptions:qe.group({})}),It=class e{#e=$(ue);#t=$(ae);#o=$(Te);formRef=Ce.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=A(Zt);retentionOptions=A(oo);volumeSizeSignal=z(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(ht(300))??Tt(null));volumeUnitSignal=z(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(ht(300))??Tt(null));exceededVolumeSize=B(()=>{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,Zt.indexOf(t));return o>io||o<ro});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,o){t&1&&fe(o.formRef,hn,5),t&2&&Se()},decls:42,vars:11,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 a;a=$localize`Backup retention`;let m;m=$localize` Advanced options ${"\uFFFD#25\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#26\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#27\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#26\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#28\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*30:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#26\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*30:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_MENU:`,m=ke(m);let g;g=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let N;N=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let G;return G=$localize`Select an option...`,[["formRef",""],["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["optionTemplate",""],t,o,i,a,m,g,P,N,[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,"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,"disallowToggle"],["title",""],[3,"searchable"],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"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,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",G,3,"options","inlineSearch"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"]]},template:function(t,o){if(t&1){let i=k();s(0,"form",13,0),D("submit",function(){return S(i),T(o.submit())}),s(2,"h3",14),x(3,5),r(),s(4,"div",15)(5,"div",16)(6,"spk-form-field")(7,"label",17),C(8,6),d(9,yn,2,0,"spk-icon",18),f(),r(),u(10,"input",19),r(),s(11,"spk-select",20),u(12,"input",21),r()(),d(13,Pn,2,0,"p",18),s(14,"p"),C(15,7),s(16,"a",22),u(17,"spk-icon",23),r(),f(),r()(),s(18,"spk-select",24)(19,"label",17),x(20,8),r(),u(21,"input",25),r(),s(22,"app-toggle-card",26),H(23,27),C(24,9),s(25,"spk-menu",28)(26,"button",29),u(27,"spk-icon"),r(),H(28,30),ee(29,Nn,3,1,"button",31,J),j(),r(),f(),j(),ee(31,An,1,7,"ng-container",null,J),r(),d(33,no,15,2,"ng-template",null,1,$e),s(35,"div",32)(36,"button",33),D("click",function(){return S(i),T(o.goBack())}),C(37,10),u(38,"spk-icon"),f(),r(),s(39,"button",34),C(40,11),u(41,"spk-icon"),f(),r()()()}t&2&&(c("formGroup",o.optionsForm),l(9),F(o.exceededVolumeSize()?9:-1),l(2),c("options",o.sizeOptions())("inlineSearch",!0),l(2),F(o.exceededVolumeSize()?13:-1),l(5),c("options",o.retentionOptions())("inlineSearch",!0),l(4),c("disallowToggle",!0),l(3),c("searchable",!0),l(4),te(o.nonSelectedOptions()),l(2),te(o.selectedOptions()),l(8),Ae("loader",o.isSubmitting()))},dependencies:[Ne,Ee,ce,Ge,be,me,De,ye,Pe,Ve,at,lt,Re,se,le,ve,pe,He,je,Le],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}.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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};var ao=["formRef"];function so(e,n){if(e&1){let t=k();s(0,"div",26)(1,"spk-form-field")(2,"label",27),x(3,8),r(),s(4,"input",28,1),D("focus",function(){S(t);let i=Y(5);return T(i.showPicker())}),r(),s(6,"spk-icon",29),_(7,"clock"),r()(),s(8,"spk-form-field"),u(9,"label",30),s(10,"input",31,2),D("focus",function(){S(t);let i=Y(11);return T(i.showPicker())}),r(),s(12,"spk-icon",29),_(13,"calendar"),r()()(),H(14,32),s(15,"div",33)(16,"spk-form-field")(17,"label",34),x(18,9),r(),u(19,"input",35),r(),s(20,"spk-select",36),u(21,"input",37),r()(),s(22,"app-toggle-card",38),H(23,39),x(24,10),j(),s(25,"div",40)(26,"spk-toggle",21),C(27,11),u(28,"input",41),f(),r(),s(29,"spk-toggle",21),C(30,12),u(31,"input",42),f(),r(),s(32,"spk-toggle",21),C(33,13),u(34,"input",43),f(),r(),s(35,"spk-toggle",21),C(36,14),u(37,"input",44),f(),r(),s(38,"spk-toggle",21),C(39,15),u(40,"input",45),f(),r(),s(41,"spk-toggle",21),C(42,16),u(43,"input",46),f(),r(),s(44,"spk-toggle",21),C(45,17),u(46,"input",47),f(),r()()(),j()}if(e&2){let t=p();l(20),c("options",t.unitOptions)("isClearable",!1),l(2),c("disallowToggle",!0)}}var Q=new ne,en=[{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`}],tn=(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}}})=>Q.group({autoRun:Q.control(e.autoRun),nextTime:Q.group({time:Q.control(e.nextTime.time),date:Q.control(e.nextTime.date)}),runAgain:Q.group({repeatValue:Q.control(e.runAgain.repeatValue),repeatUnit:Q.control(e.runAgain.repeatUnit),allowedDays:Q.group({mon:Q.control(e.runAgain.allowedDays.mon),tue:Q.control(e.runAgain.allowedDays.tue),wed:Q.control(e.runAgain.allowedDays.wed),thu:Q.control(e.runAgain.allowedDays.thu),fri:Q.control(e.runAgain.allowedDays.fri),sat:Q.control(e.runAgain.allowedDays.sat),sun:Q.control(e.runAgain.allowedDays.sun)})})}),Mt=class e{#e=$(ue);#t=$(ae);#o=$(Te);formRef=Ce.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=en;displayFn(n){let t=en.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=re({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&fe(o.formRef,ao,5),t&2&&Se()},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 a;a=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let m;m=$localize`Next time`;let g;g=$localize`Run again every`;let P;P=$localize`Allowed days`;let N;N=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let q;q=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let Z;return Z=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,a,m,g,P,N,G,b,v,L,q,Z,[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=k();s(0,"form",18,0),D("submit",function(){return S(i),T(o.next())}),s(2,"h3",19),x(3,3),r(),s(4,"div",20)(5,"spk-toggle",21),C(6,4),u(7,"input",22),f(),r(),s(8,"p"),x(9,5),r()(),d(10,so,47,3),s(11,"div",23)(12,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(13,6),u(14,"spk-icon"),f(),r(),s(15,"button",25),C(16,7),u(17,"spk-icon"),f(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),l(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Ne,Ee,ce,Ge,be,me,De,ye,Pe,Ve,le,ve,se,Re,pe,Le],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 lo(e,n){if(e&1){let t=k();s(0,"spk-select",0)(1,"input",4),D("ngModelChange",function(i){S(t);let a=p(2);return T(a.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);c("options",o.fileGroupOptions())("isClearable",!1),l(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function po(e,n){if(e&1){let t=k();s(0,"spk-form-field")(1,"input",4),D("ngModelChange",function(i){S(t);let a=p(2);return T(a.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);l(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function co(e,n){if(e&1){let t=k();s(0,"spk-select",0)(1,"input",1),D("ngModelChange",function(i){S(t);let a=p();return T(a.updateStateType(i))}),r()(),d(2,lo,2,3,"spk-select",0)(3,po,2,1,"spk-form-field"),s(4,"div",2),D("click",function(){S(t);let i=p();return T(i.removeFilter())}),s(5,"spk-icon",3),_(6,"x-circle"),r()()}if(e&2){let t,o,i=p();c("options",i.expressionOptions())("isClearable",!1),l(),c("ngModel",(t=i.pathState())==null?null:t.type),l(),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?2:3)}}var nn=[{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"}],mo=[{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"}],Ct=class e{path=Et.required();osType=Et();pathChange=Dt();remove=Dt();expressionOptions=A(nn);fileGroupOptions=A(mo);pathState=A(null);typeState=B(()=>{let n=this.pathState();return n?n.type:null});pathEffect=rt(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",a=i?"\\":"/",m=t.startsWith("%");return t===""?this.pathState.set({type:"-Unknown",path:"___none___",expression:""}):m&&t.endsWith(a)||i&&t.slice(2).startsWith("\\")&&t.endsWith("\\")||t.startsWith(a)&&t.endsWith(a)?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith(`*${a}`)?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith(`[^\\${a}]*]`)?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",a=i?"\\":"/",g=i&&!n.expression.startsWith("%")?n.expression.slice(2):n.expression,P=n.path.startsWith("%");if(o==="Unknown")return`${t}${n.expression}`;if(o==="Folder"){let N=P||g.startsWith(a),G=g.endsWith(a);return G&&N?`${t}${n.expression}`:G?`${t}${n.expression}${a}`:N?`${t}${a}${n.expression}`:`${t}${a}${n.expression}${a}`}return o==="FolderNameIncludes"?`${t}*${n.expression}*${a}`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\${a}]*]`: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=nn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({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&&d(0,co,7,4),t&2&&F(o.pathState()?0:-1)},dependencies:[_t,ce,me,jt,se,le,pe],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 uo=["formRef"];function _o(e,n){if(e&1){let t=k();s(0,"app-filter",42),D("pathChange",function(i){let a=S(t).$index,m=p(2);return T(m.patchPathAt(i,a))})("remove",function(){let i=S(t).$index,a=p(2);return T(a.removePathAt(i))}),r()}if(e&2){let t,o=n.$implicit,i=p(2);c("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function Fo(e,n){if(e&1&&ee(0,_o,1,2,"app-filter",41,J),e&2){let t=p();te(t.pathArray())}}function go(e,n){if(e&1&&(s(0,"div",40)(1,"spk-form-field"),u(2,"input",43),r(),s(3,"spk-select",44),u(4,"input",45),r()()),e&2){let t=p();l(3),c("options",t.sizeOptions())("isClearable",!1)}}var Me=new ne,Co=["Bytes","KB","MB","GB","TB","PB"],on=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Me.group({path:Me.control(e.path),excludes:Me.group({hidden:Me.control(e.excludes.hidden),system:Me.control(e.excludes.system),temporary:Me.control(e.excludes.temporary),filesLargerThan:Me.group({size:Me.control(null),unit:Me.control(null)})})}),wt=class e{#e=$(ue);#t=$(ae);#o=$(Te);formRef=Ce.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new mt("");filesLargerThan=B(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=A(Co);osType=this.#e.osType;pathSignal=z(this.sourceDataForm.controls.path.valueChanges);pathArray=B(()=>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(m=>!m.startsWith("-")&&!m.startsWith("+")).join("\0"),a=this.pathArray().map((m,g)=>g===t?`${n}`:`${m}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${a}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(a=>!a.startsWith("-")&&!a.startsWith("+")).join("\0"),i=this.pathArray().filter((a,m)=>m!==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;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),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=re({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&fe(o.formRef,uo,5),t&2&&Se()},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 a;a=$localize`Temporary files`;let m;m=$localize`Source Data`;let g;g=$localize`Folder path`;let P;P=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let G;G=$localize`Source Data`;let b;b=$localize`Add Path`;let v;v=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let q;q=$localize`Customize your filters.`;let Z;Z=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let K;K=$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 ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let Fe;Fe=$localize` Files larger than `;let _e;return _e=$localize`Select an option...`,[["formRef",""],m,g,P,N,G,b,v,L,q,Z,E,y,K,I,ie,Fe,[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",a,"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",_e]]},template:function(t,o){if(t&1){let i=k();s(0,"form",17,0),D("submit",function(){return S(i),T(o.next())}),s(2,"div",18)(3,"h3",19),x(4,1),r(),s(5,"app-file-tree",20)(6,"label",21),x(7,2),r(),u(8,"input",22),r(),s(9,"div",23)(10,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(11,3),u(12,"spk-icon"),f(),r(),s(13,"button",25),C(14,4),u(15,"spk-icon"),f(),r()()(),s(16,"div",26)(17,"h3",19),x(18,5),r(),s(19,"app-toggle-card",27),H(20,28),x(21,6),j(),s(22,"p",29),x(23,7),r(),s(24,"div",30)(25,"spk-form-field"),u(26,"input",31),r(),s(27,"button",32),D("click",function(){return S(i),T(o.addNewPath())}),s(28,"spk-icon"),_(29,"plus"),r()()()(),s(30,"app-toggle-card",27),H(31,28),x(32,8),j(),s(33,"p",29),x(34,9),r(),s(35,"button",33),D("click",function(){return S(i),T(o.addFilter())}),x(36,10),r(),d(37,Fo,2,0),r(),s(38,"app-toggle-card",34),H(39,28),x(40,11),j(),s(41,"p",29),x(42,12),r(),s(43,"spk-toggle",35),C(44,13),u(45,"input",36),f(),r(),s(46,"spk-toggle",35),C(47,14),u(48,"input",37),f(),r(),s(49,"spk-toggle",35),C(50,15),u(51,"input",38),f(),r(),s(52,"spk-toggle",39),D("click",function(){return S(i),T(o.toggleFilesLargerThan())}),x(53,16),r(),d(54,go,5,2,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),l(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(14),c("disallowToggle",!0),l(7),c("formControl",o.newPathCtrl),l(4),c("disallowToggle",!0),l(7),F((i=o.pathSignal())!=null&&i.length?37:-1),l(),c("disallowToggle",!0),l(14),Ae("active",o.filesLargerThan()),l(2),F(o.filesLargerThan()?54:-1)}},dependencies:[_t,Ee,ce,Ge,be,me,De,Ne,ut,ye,Pe,Ve,le,se,Re,ve,pe,je,Le,Ct],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 de=new ne,ue=class e{#e=$(ae);#t=$(ct);#o=$(Xe);#i=$(dt);generalForm=Yt();sourceDataForm=on();scheduleForm=tn();destinationForm=rn();optionsForm=Jt();isDraft=A(!1);backupId=A(null);isSubmitting=A(!1);finishedLoading=A(!1);backupDefaults=A(null);isNew=B(()=>this.backupId()==="new");osType=B(()=>this.#t.systemInfo()?.OSType);selectedOptions=A([]);selectedAdvancedFormPair=A([]);destinationFormPair=A({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=B(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=A([]);notSelectedHttpOptions=B(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=z(this.sourceDataForm.valueChanges);destinationFormSignal=z(this.destinationForm.valueChanges);generalFormSignal=z(this.generalForm.valueChanges);encryptionFieldSignal=z(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=z(this.scheduleForm.valueChanges);destinationOptions=B(()=>this.#t.backendModules()??[]);httpOptions=B(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=B(()=>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=B(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[xt,...n]});nonSelectedOptions=B(()=>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(a=>a.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(a=>a.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,a=o??n.defaultValue;this.createFormField(i,n,a),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,a=o??n.defaultValue;this.createFormField(i,n,a),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(a=>a.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(a=>a.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(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ye(()=>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(N=>`${N.Include?"":"-"}${N.Expression}`)??[],i=n.Settings?.find(N=>N.Name==="--exclude-files-attributes")?.Value??"",a=n.Settings?.find(N=>N.Name==="--skip-files-larger-than")??null,m=a?.Value.replace(/[0-9]/g,"")??null,g=a?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:m&&g?{size:parseInt(g),unit:m.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?kt(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=kt(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(a=>a.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=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let a=i.Value?.replace(/[^0-9]/g,""),m=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:a?parseInt(a):null,unit:m?m.toUpperCase():null})}if(i.Name&&i.Value){let a=o.find(m=>m.name===i.Name);if(!a)return;this.addOptionToFormGroup(a,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,m=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],g=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(g=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([L,q])=>q).map(([L,q])=>L):[],N=i.path?.split("\0")??[],G=this.mapFormsToSettings(),b=Object.entries(i.excludes??{}).filter(([L,q])=>q&&L!=="filesLargerThan").map(([L])=>L),v=i.excludes?.filesLargerThan;return b.length&&G.push({Name:"--exclude-files-attributes",Value:b.join(",")}),v&&v.size!==null&&v.unit!==null&&G.push({Name:"--skip-files-larger-than",Value:`${v.size}${v.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:m[0]??null,Sources:N.filter(L=>!L.startsWith("-")),Settings:G,Filters:N.filter(L=>L.startsWith("-")).map((L,q)=>({Order:q,Include:!1,Expression:L.slice(1)}))},Schedule:o.autoRun?{Repeat:g,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let a=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},m=Object.entries(t.advancedOptions??{}).filter(([g,P])=>g&&P).map(([g,P])=>{let N=n.find(G=>G.name===g);return N?.type==="Size"?{Name:g,Value:`${P.size}${P.unit.toLowerCase()}`}:N?.type==="Integer"?{Name:g,Value:P.toString()}:N?.type==="Boolean"?{Name:g,Value:P.toString()}:{Name:g,Value:P}});return[...i,a,...m]}#a(n){return n.controls.map(t=>Ft(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,a=O({name:n,type:"String",defaultValue:t},o);this.createFormField(i,a,t),this.selectedOptions.update(m=>(m.push(a),m))}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,de.control(o));return}if(t.type==="Size"){let i=(o??"").replace(/[0-9]/g,""),a=(o??"").replace(/[^0-9]/g,"");n.addControl(t.name,de.group({size:de.control(a?parseInt(a):50),unit:de.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,de.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,de.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,de.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,de.control(o,[he.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=Ie.find(E=>E.customKey===n||E.key===n),a=i?.key,m=this.destinationOptions().find(E=>E.Key===a),g=this.httpOptions();if(!m||!m.Options)return;let P=i&&i.oauthField?i.oauthField:null,N=i&&i.customFields?i.customFields:{},G=i&&i.dynamicFields?i.dynamicFields:[],b=i&&i.advancedFields?i.advancedFields:[],v=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let L=de.group({}),q=de.group({}),Z=de.group({});N&&Object.entries(N).forEach(([E,y],K)=>{let Fe=y,{formElement:I}=Fe,ie=vt(Fe,["formElement"]);L.addControl(E,I(t?.custom[E])),this.destinationFormPair.update(_e=>(_e.custom.push(O({order:900+K},ie)),_e))});for(let E=0;E<m.Options.length;E++){let y=m.Options[E];if(y.Deprecated)continue;let K=G.find(I=>I===y.Name||I.name===y.Name);if(K){let I=K&&typeof K!="string",ie=I?K?.defaultValue??y.DefaultValue:y.DefaultValue,Fe={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},_e=I?O(O({},Fe),K):Fe,it=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(q,_e,it),this.destinationFormPair.update(ze=>(ze.dynamic.push(_e),ze))}else{if(v.find(ge=>ge===y.Name))continue;let ie=b.find(ge=>ge===y.Name||ge.name===y.Name),Fe=ie&&typeof ie!="string",_e=t?.advanced[y.Name],V=_e??y.DefaultValue,it={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:V,order:900+E},ze=Fe?O(O({},it),ie):it;o&&_e&&(this.createFormField(Z,ze,V),this.selectedAdvancedFormPair.update(ge=>(ge.push(ze),ge))),this.destinationFormPair.update(ge=>(ge.advanced.push(ze),ge))}}for(let E=0;E<g.length;E++){let y=g[E],K=t?.advanced[y.name],I=K??y.defaultValue;o&&K&&(this.createFormField(Z,y,I),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,K)=>y.order-K.order),dynamic:E.dynamic.sort((y,K)=>y.order-K.order),advanced:E.advanced.sort((y,K)=>y.order-K.order)})),this.destinationForm.controls.destinations.push(an({key:i?.customKey??n,customGroup:L,dynamicGroup:q,advancedGroup:Z}))}#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=we({token:e,factory:e.\u0275fac,providedIn:"root"})};var fo=["formRef"],So=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),St=e=>({$implicit:e}),To=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),ho=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Do=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),Eo=()=>({maxWidth:"700px",width:"100%"});function yo(e,n){e&1&&(C(0,5,2),u(1,"spk-icon"),f())}function Po(e,n){e&1&&x(0,5,3)}function No(e,n){if(e&1){let t=k();C(0,5,1),s(1,"button",21),D("click",function(){S(t);let i=p();return T(i.testDestination())}),d(2,yo,2,0)(3,Po,1,0),r(),f()}if(e&2){let t=p();l(),Ae("success",t.successfulTest()),l(),F(t.successfulTest()?2:3)}}function Oo(e,n){if(e&1){let t=k();s(0,"p",27),D("click",function(){S(t);let i=p();return T(i.removeDestinationFormGroup(i.destinationCount()-1))}),C(1,8),u(2,"span",28),f(),r()}}function Ao(e,n){if(e&1){let t=k();s(0,"div",34),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addDestinationFormGroup(i.key))}),s(1,"h3"),_(2),r(),s(3,"p"),_(4),r()()}if(e&2){let t=n.$implicit;l(2),yt(t.displayName),l(2),yt(t.description)}}function ko(e,n){if(e&1){let t=k();s(0,"button",35,1),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addDestinationFormGroup(i.key))}),_(2),r()}if(e&2){let t=n.$implicit;l(2),M(" ",t.displayName," ")}}function $o(e,n){if(e&1&&(s(0,"div",29),ee(1,Ao,5,2,"div",30,J),r(),s(3,"spk-menu",31)(4,"button",32),x(5,9),r(),H(6,20),ee(7,ko,3,1,"button",33,J),j(),r()),e&2){let t=p();l(),te(t.destinationTypeOptionsFocused()),l(2),c("searchable",!0),l(4),te(t.destinationTypeOptionsNotFocused())}}function xo(e,n){e&1&&Be(0)}function Io(e,n){if(e&1&&d(0,xo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,So,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Mo(e,n){e&1&&Be(0)}function wo(e,n){if(e&1&&d(0,Mo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,To,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Ro(e,n){if(e&1){let t=k();C(0,10,1),s(1,"button",35,1),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addAdvancedFormPair(i,0))}),r(),f()}if(e&2){let t=n.$implicit;l(),Ze(t.name),Je(0)}}function vo(e,n){e&1&&Be(0)}function bo(e,n){if(e&1&&d(0,vo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,ho,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Go(e,n){if(e&1){let t=k();C(0,11,1),s(1,"button",35,1),D("click",function(){let i=S(t).$implicit,a=p(2);return T(a.addHttpOption(i,0))}),r(),f()}if(e&2){let t=n.$implicit;l(),Ze(t.name),Je(0)}}function Vo(e,n){e&1&&Be(0)}function Lo(e,n){if(e&1&&d(0,Vo,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;p();let a=Y(29),m=p();c("ngTemplateOutlet",a)("ngTemplateOutletContext",Ke(7,St,et(2,Do,i,o,(t=m.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,m.destinationFormPair().oauthField)))}}function Uo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Bo(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),_(2),d(3,Uo,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function Ko(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function zo(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),_(2),d(3,Ko,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),e&2){let t,o=p().$implicit,i=p(2);c("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function Xo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ho(e,n){e&1&&(s(0,"spk-icon",51),_(1,"link"),r())}function jo(e,n){e&1&&(s(0,"spk-icon",51),_(1,"envelope"),r())}function Wo(e,n){e&1&&(s(0,"spk-icon",51),_(1,"textbox"),r())}function qo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),d(3,Xo,3,1,"spk-tooltip",48),r(),u(4,"input",50),d(5,Ho,2,0,"spk-icon",51)(6,jo,2,0,"spk-icon",51)(7,Wo,2,0,"spk-icon",51),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),l(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function Qo(e,n){if(e&1){let t=k();s(0,"span",55),D("click",function(){S(t);let i=p(2).$implicit,a=p(2);return T(a.oauthStartTokenCreation(i.destinationType))}),_(1,"AuthID"),r()}}function Yo(e,n){e&1&&(s(0,"spk-icon",51),_(1,"password"),r())}function Zo(e,n){if(e&1){let t=k();s(0,"spk-icon",56),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye "),r()}}function Jo(e,n){if(e&1){let t=k();s(0,"spk-icon",56),D("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),_(1," eye-slash "),r()}}function ei(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),r(),u(3,"input",52),d(4,Qo,2,0,"span",53)(5,Yo,2,0,"spk-icon",51)(6,Zo,2,0,"spk-icon",54)(7,Jo,2,0,"spk-icon",54),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),l(),F(o.oauthField===o.formView.name?4:5),l(2),F(o.formView.showPassword?6:7)}}function ti(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function ni(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function oi(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),_(2),d(3,ti,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),d(5,ni,1,1,"ng-template",null,3,$e)),e&2){let t,o=Y(6);p();let i=Ot(0),a=p().$implicit;c("options",i)("isClearable",!1)("optionTemplate",o),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),M(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),l(),F(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),X("formControlName",a.formView.name)}}function ii(e,n){if(e&1&&(Pt(0),d(1,oi,7,14)),e&2){let t=p().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);l(),F(o?1:-1)}}function ri(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(3).$implicit;c("message",t.formView.longDescription)}}function ai(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;Gt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function si(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),_(2),d(3,ri,3,1,"spk-tooltip",48),r(),u(4,"input",49),r(),d(5,ai,1,2,"ng-template",null,4,$e)),e&2){let t,o=Y(6);p();let i=Ot(0),a=p().$implicit;c("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),U("for","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),l(),M(" ",(t=a.formView.shortDescription)!==null&&t!==void 0?t:a.formView.name," "),l(),F(a.formView.longDescription?3:-1),l(),U("id","destination-",a.formGroupName,"-",a.index,"-",a.asHttpOptions?"http":"other",""),X("formControlName",a.formView.name)}}function li(e,n){e&1&&u(0,"spk-progress-bar",58)}function pi(e,n){if(e&1&&(Pt(0),d(1,si,7,15)(2,li,1,0,"spk-progress-bar",58)),e&2){let t=p().$implicit,o=Nt(t.formView.loadOptions?t.formView.loadOptions(p(2).injector)():t.formView.options);l(),F(o?1:2)}}function ci(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function mi(e,n){if(e&1&&(s(0,"div",45)(1,"label",47),_(2),d(3,ci,3,1,"spk-tooltip",48),r(),s(4,"div",60)(5,"spk-form-field"),u(6,"input",61),s(7,"spk-icon",51),_(8,"resize"),r()(),s(9,"spk-select",62),u(10,"input",63),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(3),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(3),c("options",i.sizeOptions())("inlineSearch",!0)}}function ui(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function _i(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),d(3,ui,3,1,"spk-tooltip",48),r(),u(4,"input",64),s(5,"spk-icon",51),_(6,"numpad"),r()()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function di(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Fi(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),_(2),d(3,di,3,1,"spk-tooltip",48),r(),u(4,"input",65),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function gi(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ci(e,n){if(e&1&&_(0),e&2){let t=n.$implicit;M(" ",t," ")}}function fi(e,n){if(e&1&&(s(0,"spk-select",66)(1,"label",47),_(2),d(3,gi,3,1,"spk-tooltip",48),r(),u(4,"input",67),r(),d(5,Ci,1,1,"ng-template",null,4,$e)),e&2){let t,o=Y(6),i=p().$implicit;c("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),W("for","destination-",i.formGroupName,"-",i.index,""),l(),M(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),F(i.formView.longDescription?3:-1),l(),X("formControlName",i.formView.name)}}function Si(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),_(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ti(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),_(2),d(3,Si,3,1,"spk-tooltip",48),r(),u(4,"input",49),r()),e&2){let t,o=p().$implicit;l(),U("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),M(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),F(o.formView.longDescription?3:-1),l(),U("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),X("formControlName",o.formView.name)}}function hi(e,n){if(e&1){let t=k();s(0,"button",68),D("click",function(){S(t);let i=p().$implicit,a=p(2);return T(a.removeFormView(i.formView,0))}),s(1,"spk-icon"),_(2,"x-circle"),r()()}}function Di(e,n){if(e&1&&(s(0,"div",41),H(1,42),d(2,Bo,5,17,"app-file-tree",43)(3,zo,5,13,"app-file-tree",44)(4,qo,8,13,"spk-form-field")(5,ei,8,13,"spk-form-field")(6,ii,2,2)(7,pi,3,2)(8,mi,11,13,"div",45)(9,_i,7,11,"spk-form-field")(10,Fi,5,11,"spk-toggle",46)(11,fi,7,9)(12,Ti,5,11,"spk-form-field"),j(),d(13,hi,3,0,"button",32),r()),e&2){let t=n.$implicit;Ae("single-field",t.formGroupName!=="advanced"),l(),c("formGroupName",t.formGroupName),l(),F(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"?12:-1),l(11),F(t.formGroupName==="advanced"?13:-1)}}function Ei(e,n){if(e&1&&(H(0,22)(1,36),ee(2,Io,1,9,"ng-container",null,J),ee(4,wo,1,9,"ng-container",null,J),s(6,"app-toggle-card",37),H(7,38),C(8,10),s(9,"spk-menu",31)(10,"button",39),u(11,"spk-icon"),r(),H(12,20),ee(13,Ro,3,1,"button",33,J),j(),r(),f(),j(),ee(15,bo,1,9,"ng-container",null,J),r(),s(17,"app-toggle-card",37),H(18,38),C(19,11),s(20,"spk-menu",31)(21,"button",39),u(22,"spk-icon"),r(),H(23,20),ee(24,Go,3,1,"button",33,J),j(),r(),f(),j(),ee(26,Lo,1,9,"ng-container",null,J),r(),d(28,Di,14,5,"ng-template",null,2,$e),j()()),e&2){let t=p();l(2),te(t.destinationFormPair().custom),l(2),te(t.destinationFormPair().dynamic),l(2),c("disallowToggle",!0),l(3),c("searchable",!0),l(),c("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),te(t.notSelectedAdvancedFormPair()),l(2),te(t.selectedAdvancedFormPair()),l(2),c("disallowToggle",!0),l(3),c("searchable",!0),l(),c("disabled",t.notSelectedHttpOptions().length===0),l(3),te(t.notSelectedHttpOptions()),l(2),te(t.selectedHttpOptions())}}function yi(e,n){if(e&1){let t=k();s(0,"spk-dialog",69),Ut("isOpenChange",function(i){S(t);let a=p();return Lt(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),T(i)}),s(1,"header",70)(2,"h2"),x(3,12),r(),s(4,"spk-alert",71),x(5,13),r()(),s(6,"div",72)(7,"spk-form-field"),u(8,"textarea",73),r()(),s(9,"footer",74)(10,"button",24),D("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!1))}),_(11,"Cancel"),r(),s(12,"button",75),D("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!0))}),C(13,14),u(14,"spk-icon"),f(),r()()()}if(e&2){let t=p();Vt("isOpen",t.targetUrlDialogOpen),c("options",Bt(3,Eo)),l(8),c("formControl",t.targetUrlCtrl)}}var Pi=["Bytes","KB","MB","GB","TB","PB"],ft=new ne,rn=(e={destinations:[]})=>ft.group({destinations:ft.array(e.destinations)}),an=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>ft.group({destinationType:ft.control(e),custom:n,dynamic:t,advanced:o}),Rt=class e{#e=$(ae);#t=$(Te);#o=$(zt);#i=$(Xe);#n=$(ue);#r=$(Ht);injector=$(bt);formRef=Ce.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=B(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=A(Pi);successfulTest=A(!1);destinationTypeOptionsInFocus=A(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=A(Ie.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=B(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=B(()=>{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=B(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new mt;targetUrlInitial=A(null);targetUrlDialogOpen=A(!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 a=i.error.error.Error;if(a==="missing-folder"&&this.#r.open(tt,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:m=>{m&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),a.startsWith("incorrect-cert:")){let m=a.split("incorrect-cert:")[1];this.#r.open(tt,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
-
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
-
The server reported the certificate hash: ${m}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:g=>{g&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",m)}})}if(a.startsWith("incorrect-host-key:")){let m=a.split('incorrect-host-key:"')[1].split('",')[0],g=a.split('accepted-host-key:"')[1].split('",')[0];g?this.#r.open(tt,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
-
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
-
Do you want to REPLACE your CURRENT host key ${g}
|
|
6
|
-
with the REPORTED host key: ${m}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,m)}}):this.#r.open(tt,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${m}`,confirmText:"Approve",cancelText:"Cancel"},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,m)}})}}})}mapToTargetUrl(n){return Ft(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=A("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=A(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=A(!1);#p=A(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),a=screen.width/2-t/2,m=screen.height/2-o/2,g=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+a+",top="+m);g?.addEventListener("blur",P=>{console.log("event blur",P)}),g?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ye(()=>this.#a.set(!1))).subscribe({next:N=>{console.log("res",N),N?.authid&&this.#p.set(N.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=re({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&fe(o.formRef,fo,5),t&2&&Se()},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=ke(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 a;a=$localize`Other destinations`;let m;m=$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:`,m=ke(m);let g;g=$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:`,g=ke(g);let P;P=$localize`Select an option...`;let N;N=$localize`Edit target URL`;let G;G=$localize` Be careful, this will overwrite everything you have in your destination. `;let b;return b=$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,a,m,g,N,G,b,[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"],[1,"form-column",3,"formGroupName"],[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"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["placeholder",P,3,"options","inlineSearch"],["type","text","formControlName","unit"],["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=k();s(0,"form",15,0),D("submit",function(){return S(i),T(o.next())}),s(2,"header")(3,"h3",16),C(4,5),s(5,"div",17),d(6,No,4,3,"button",18),s(7,"spk-menu")(8,"button",19),u(9,"spk-icon"),r(),H(10,20),s(11,"button",21),D("click",function(){return S(i),T(o.openTargetUrlDialog())}),u(12,"spk-icon"),r(),j(),r()(),f(),r(),d(13,Oo,3,0,"p"),r(),d(14,$o,9,1)(15,Ei,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),D("click",function(){return S(i),T(o.goBack())}),C(18,6),u(19,"spk-icon"),f(),r(),s(20,"button",25),C(21,7),u(22,"spk-icon"),f(),r()()(),d(23,yi,15,4,"spk-dialog",26)}if(t&2){let i;c("formGroup",o.destinationForm),l(6),F(o.destinationCount()>0?6:-1),l(7),F(o.destinationCount()>0?13:-1),l(),F(o.destinationCount()===0?14:-1),l(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Ne,Ee,ce,Ge,be,me,De,ut,ye,Pe,Ve,Wt,at,le,lt,se,ve,He,Xt,st,pe,pt,Le,je],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{Ft as a,Ie as b,rn as c,an as d,Rt as e,Yt as f,xt as g,$t as h,Jt as i,It as j,tn as k,Mt as l,on as m,wt as n,ue as o};
|
package/chunk-XGR5AA4N.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as b}from"./chunk-RB3QECD4.js";import"./chunk-PN4QLDYL.js";import"./chunk-G3EXCHQT.js";import"./chunk-DNHLTHLR.js";import"./chunk-N5K6ODRA.js";import"./chunk-CRREGVJC.js";import"./chunk-CK5N2PPF.js";import"./chunk-4IJQ7AAQ.js";import"./chunk-KLIPTMVG.js";import"./chunk-AIOUSVMR.js";import"./chunk-THUAAYGA.js";import"./chunk-R3DRARWT.js";import"./chunk-V5GVLIPJ.js";import"./chunk-2HS3CYRN.js";import"./chunk-DTPZU6NP.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
|