@duplicati/ngclient 0.0.160 → 0.0.161
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/sh.woff2 +0 -0
- package/{chunk-F6ME3VE6.js → chunk-2KU5X7TN.js} +1 -1
- package/{chunk-JTSI7UN4.js → chunk-2MIEBBFN.js} +1 -1
- package/{chunk-EKL66TNH.js → chunk-2PUCHKOK.js} +1 -1
- package/{chunk-4NBLWONL.js → chunk-2YGOHGD2.js} +1 -1
- package/{chunk-EWLAEWGN.js → chunk-3S7YCGEK.js} +1 -1
- package/{chunk-LVTEOKA4.js → chunk-3V4DGTSM.js} +1 -1
- package/{chunk-SDXU6VMB.js → chunk-4FWCJIJ4.js} +1 -1
- package/{chunk-NM7WJRU7.js → chunk-4KEA3KF7.js} +1 -1
- package/chunk-4NOWNXOS.js +1 -0
- package/{chunk-4XH2XMUL.js → chunk-5CTM5KYC.js} +1 -1
- package/{chunk-XLDVUBTQ.js → chunk-5LX6M65H.js} +1 -1
- package/{chunk-GCCJSS4C.js → chunk-6XI3IP27.js} +1 -1
- package/{chunk-4IXUXIXV.js → chunk-A366Q7F5.js} +1 -1
- package/{chunk-TX6PGD4I.js → chunk-AUR4SBGD.js} +1 -1
- package/chunk-AVTEJPQ4.js +1 -0
- package/{chunk-PHQBBCUL.js → chunk-B32YSHV5.js} +1 -1
- package/{chunk-PULERFBI.js → chunk-BF2IYOUB.js} +1 -1
- package/{chunk-CCKT2GLS.js → chunk-BK2MSH26.js} +1 -1
- package/{chunk-72QJ345F.js → chunk-BZ2XGEV5.js} +1 -1
- package/{chunk-2J4H7C6W.js → chunk-C7EUC34O.js} +1 -1
- package/{chunk-GOVVHVP2.js → chunk-CSL7HCLZ.js} +1 -1
- package/{chunk-SWD3HS57.js → chunk-CTAP3SAA.js} +1 -1
- package/{chunk-TIGMPMCF.js → chunk-DJQOPNQJ.js} +1 -1
- package/{chunk-UTOT5S6Z.js → chunk-DUCPSWRQ.js} +1 -1
- package/{chunk-DUHMJQLC.js → chunk-E6H2XELA.js} +1 -1
- package/chunk-EYFTFGJS.js +1 -0
- package/{chunk-ERFIISF6.js → chunk-F5Z5ZAIL.js} +1 -1
- package/{chunk-C6F6FP4R.js → chunk-FSG362SU.js} +1 -1
- package/{chunk-D4F7SID5.js → chunk-G6VJHFTW.js} +1 -1
- package/{chunk-UST7PIBI.js → chunk-GMUNZKVL.js} +1 -1
- package/{chunk-66TRUOH6.js → chunk-H44BDPZE.js} +1 -1
- package/{chunk-YHUSOICR.js → chunk-H7ZKBS2Q.js} +1 -1
- package/{chunk-ZBVBVQO7.js → chunk-HHU5JW5J.js} +1 -1
- package/{chunk-IXN3WMCO.js → chunk-HJBNADRP.js} +1 -1
- package/{chunk-USYSNGYO.js → chunk-HYQ6MPYI.js} +1 -1
- package/chunk-IUK3B6GX.js +1 -0
- package/{chunk-5WDKKAXO.js → chunk-K2BANUEJ.js} +1 -1
- package/{chunk-RFQCUMV5.js → chunk-KIIJBHZE.js} +1 -1
- package/{chunk-7RM3VKDO.js → chunk-KXJZEADJ.js} +1 -1
- package/chunk-MBYGBVHF.js +1 -0
- package/{chunk-6YGURBW6.js → chunk-MHPSC3FM.js} +1 -1
- package/chunk-MTNOIKEK.js +1 -0
- package/{chunk-V4JPJPZI.js → chunk-MWXDEOZO.js} +1 -1
- package/{chunk-DQGMVICD.js → chunk-NCDXMDW5.js} +1 -1
- package/{chunk-QX3IRESN.js → chunk-NSAY2K7E.js} +1 -1
- package/{chunk-MBRRLME5.js → chunk-NSPJ3ZXL.js} +1 -1
- package/{chunk-2QJVTZ56.js → chunk-OJ3H3ZRA.js} +1 -1
- package/chunk-P6IZFXXC.js +1 -0
- package/{chunk-4OBQWIWP.js → chunk-PFZASYQH.js} +1 -1
- package/chunk-QF5WMLMJ.js +1 -0
- package/chunk-QWNOIRT4.js +1 -0
- package/{chunk-TZAOQANG.js → chunk-R2FAS2C3.js} +1 -1
- package/chunk-RPUPXDQE.js +1 -0
- package/{chunk-7LYN2XHO.js → chunk-S4OFJD2F.js} +1 -1
- package/{chunk-TDJOG66Y.js → chunk-SPMSFKWG.js} +1 -1
- package/{chunk-V7LUGECS.js → chunk-SWAQMTBY.js} +1 -1
- package/{chunk-EMRD3UKA.js → chunk-TI6AQ6OL.js} +1 -1
- package/chunk-U562AGPC.js +1 -0
- package/chunk-U7GOWS7E.js +1 -0
- package/chunk-XJ7KXQWK.js +1 -0
- package/{chunk-5EOS64VG.js → chunk-XXVFRNSP.js} +1 -1
- package/{chunk-3NFAL4U4.js → chunk-YCORZV4Z.js} +1 -1
- package/{chunk-ZMTLDG46.js → chunk-YPJRYB54.js} +1 -1
- package/{chunk-RZVBW5HI.js → chunk-YYJFEUNT.js} +1 -1
- package/{chunk-KXM6LF3X.js → chunk-Z7WHLTVV.js} +1 -1
- package/index.html +2 -2
- package/main-L6FT73U5.js +1 -0
- package/package.json +1 -1
- package/styles-FD7LUDV4.css +1 -0
- package/chunk-GNKFIYOX.js +0 -1
- package/chunk-GZ4YKLCY.js +0 -1
- package/chunk-H3UUJ5EW.js +0 -1
- package/chunk-K6V2N3GS.js +0 -1
- package/chunk-KATY4JFV.js +0 -1
- package/chunk-OQ3CIW34.js +0 -1
- package/chunk-OXKNUQ4S.js +0 -1
- package/chunk-Q65KFDJ5.js +0 -1
- package/chunk-QF4DQYEP.js +0 -1
- package/chunk-TYUEMPMP.js +0 -1
- package/chunk-UZVZ7QY6.js +0 -1
- package/chunk-WXTYJ7CH.js +0 -1
- package/chunk-YX7ZJ2VA.js +0 -1
- package/main-OUD7GLNU.js +0 -1
- package/styles-DYNNLJCR.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as k,r as w}from"./chunk-QF4DQYEP.js";import{h as U}from"./chunk-2QJVTZ56.js";import{H as C,Qc as R,V as E,_ as A,pa as z,r as S}from"./chunk-QONLYWYC.js";import{a as i,b as D}from"./chunk-EUDKD2JW.js";var h=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(C(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var g=class e{#e=A(U);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#s=new h(()=>this.getS3Config("StorageClasses"));#i=R(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(S(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(S(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(S(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(S(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new w,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},V={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return i({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},G=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return i({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[k.required,k.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"amazon aws spaces cloud mycloudyplace impossible scaleway hosteurope dunkel dreamhost dincloud poli systems ibm cos storadera wasabi infomaniak infomaniak \u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 seagate lyve digitalocean backblaze b2 cloudian minio linode bunnycdn microsoft azure google storage ibm oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[k.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return v(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{server:a,path:u}=m(t);return i({destinationType:e,dynamic:i({"rclone-remote-repository":a,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return v(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],i({destinationType:e,custom:{path:d(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,M(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),a=n.split("/")[0],u=n.split("/").slice(1).join("/");return i({destinationType:e,custom:{server:r,share:a,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:V.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${F([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)}}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${F([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)}}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],i({destinationType:e,custom:{path:d(t),bucket:n}},r)}}}],le={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function c(e,t,o,r){return v(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function v(e,t,o,r,n){let a=F(n),u=encodeURIComponent(j(t)),$=u==""?"":u+B(o),y=r??"",O=y.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,f=M($,I(y));return`${O}${f}${a}`}function N(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function M(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function I(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new URL(e)}catch{return""}return decodeURIComponent(e.hostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function j(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function B(e){return e==null||e===""?"":":"+e.toString()}function b(e){return G.find(o=>o.key===e||o.customKey===e)??G.find(o=>`${o.key}s`===e)??null??i({key:e,displayName:e},V)}function m(e){return{server:decodeURIComponent(e.hostname),port:e.port,path:N(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=b(e);return t.searchParams.forEach((a,u)=>{n?.dynamicFields?.some(y=>y===u||y?.name===u)?r[u]=decodeURIComponent(a):o[u]=decodeURIComponent(a)}),{advanced:o,dynamic:r}}function F(e,t=!1){let o=e.map(([n,a])=>`${n}=${a?encodeURIComponent(a.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function me(e){let t=e.destinationType??"";return b(t)?.mapper.to(e)??""}function de(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return b(t).mapper.from(t,new URL("http://localhost"),e);let n=b(t),a="";`${n.key}s`===t&&(a+=r.indexOf("?")===-1?"?":"&",a+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(a+=a.indexOf("?")===-1?"?":"&",a+=o.split("?")[1]??"");try{let u=new URL(r+a);if(u.host==="undefined")return null;let $=o.split("?")[0].split("/")[0],y=!isNaN(Number(u.host.replaceAll(".",""))),P=$.split("."),O=P.length===4&&P.every(f=>f.length&&f.length<=3&&!isNaN(Number(f))&&parseInt(f)<=255);return y&&!O?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",u),null}}function L(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
1
|
+
import{d as k,r as w}from"./chunk-RPUPXDQE.js";import{i as U}from"./chunk-OJ3H3ZRA.js";import{H as C,Qc as R,V as E,_ as A,pa as z,r as S}from"./chunk-QONLYWYC.js";import{a as i,b as D}from"./chunk-EUDKD2JW.js";var h=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(C(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var g=class e{#e=A(U);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#s=new h(()=>this.getS3Config("StorageClasses"));#i=R(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(S(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(S(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(S(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(S(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new w,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},V={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return i({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},G=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return i({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[k.required,k.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"amazon aws spaces cloud mycloudyplace impossible scaleway hosteurope dunkel dreamhost dincloud poli systems ibm cos storadera wasabi infomaniak infomaniak \u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 seagate lyve digitalocean backblaze b2 cloudian minio linode bunnycdn microsoft azure google storage ibm oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[k.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return v(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{server:a,path:u}=m(t);return i({destinationType:e,dynamic:i({"rclone-remote-repository":a,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return i({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return v(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],i({destinationType:e,custom:{path:d(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return i({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,M(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),a=n.split("/")[0],u=n.split("/").slice(1).join("/");return i({destinationType:e,custom:{server:r,share:a,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:V.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>i({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${F([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)}}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${F([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],i({destinationType:e},r)}}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(i({},e),{advanced:D(i({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],i({destinationType:e,custom:{path:d(t),bucket:n}},r)}}}],le={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function c(e,t,o,r){return v(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function v(e,t,o,r,n){let a=F(n),u=encodeURIComponent(j(t)),$=u==""?"":u+B(o),y=r??"",O=y.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,f=M($,I(y));return`${O}${f}${a}`}function N(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function M(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function I(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new URL(e)}catch{return""}return decodeURIComponent(e.hostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function j(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function B(e){return e==null||e===""?"":":"+e.toString()}function b(e){return G.find(o=>o.key===e||o.customKey===e)??G.find(o=>`${o.key}s`===e)??null??i({key:e,displayName:e},V)}function m(e){return{server:decodeURIComponent(e.hostname),port:e.port,path:N(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=b(e);return t.searchParams.forEach((a,u)=>{n?.dynamicFields?.some(y=>y===u||y?.name===u)?r[u]=decodeURIComponent(a):o[u]=decodeURIComponent(a)}),{advanced:o,dynamic:r}}function F(e,t=!1){let o=e.map(([n,a])=>`${n}=${a?encodeURIComponent(a.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function me(e){let t=e.destinationType??"";return b(t)?.mapper.to(e)??""}function de(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return b(t).mapper.from(t,new URL("http://localhost"),e);let n=b(t),a="";`${n.key}s`===t&&(a+=r.indexOf("?")===-1?"?":"&",a+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(a+=a.indexOf("?")===-1?"?":"&",a+=o.split("?")[1]??"");try{let u=new URL(r+a);if(u.host==="undefined")return null;let $=o.split("?")[0].split("/")[0],y=!isNaN(Number(u.host.replaceAll(".",""))),P=$.split("."),O=P.length===4&&P.every(f=>f.length&&f.length<=3&&!isNaN(Number(f))&&parseInt(f)<=255);return y&&!O?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",u),null}}function L(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
2
2
|
`).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function he(e){return L(e).map(([t,o])=>({Name:t,Value:o}))}function ge(e){return Object.fromEntries(L(e))}export{b as a,me as b,de as c,he as d,ge as e,le as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-S4OFJD2F.js";import{za as l}from"./chunk-5ZSBXGHQ.js";import{Qc as r,Rc as o,V as s,Y as n,_ as e,ka as a,pa as t,za as d}from"./chunk-QONLYWYC.js";var m=new n("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});var h=class i{#i=e(m);#t=e(a);#s=e(d);#e=c("darkTheme",null,!0);#o=t(this.#i.innerWidth);isMobile=r(()=>this.#o()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=o(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=o(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){l(this.#s)&&this.#i?.addEventListener("resize",()=>{this.#o.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(f){return new(f||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Re,c as fe,d as B}from"./chunk-4VY6SMSL.js";import{b as he}from"./chunk-Z27IQRKV.js";import{a as Ne}from"./chunk-4NBLWONL.js";import"./chunk-CCKT2GLS.js";import"./chunk-6Q6SSTBK.js";import"./chunk-XLDVUBTQ.js";import"./chunk-7LYN2XHO.js";import"./chunk-GCCJSS4C.js";import{b as te,d as ne,e as ie}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{A as Ce,B as Ee,G as Pe,K as Se,V as me,X as ge,b as re,c as se,d as g,e as ae,f as _e,j as le,o as ce,q as pe,r as Fe,t as de,u as ue,w as Te}from"./chunk-QF4DQYEP.js";import{c as oe,h as Oe}from"./chunk-2QJVTZ56.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as u,Bc as ee,Cb as P,Db as a,Eb as r,Fb as l,H as A,Mb as M,P as Q,Qc as $,Rc as G,Sa as s,Tb as c,Ub as p,Vb as S,Wb as y,Xb as L,Yb as X,Zb as m,_ as C,cb as W,ea as w,fa as D,kc as h,nc as x,oc as Y,pa as E,qc as Z,xb as F,yb as d}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Ie=()=>["/"];function we(t,o){t&1&&(a(0,"sh-toggle",23),c(1,5),l(2,"input",26),p(),r())}function De(t,o){t&1&&(a(0,"span",29),S(1,9),r())}function xe(t,o){if(t&1&&(a(0,"span",29),S(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),L(1)}}function $e(t,o){if(t&1&&l(0,"sh-progress-bar",36),t&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ae(t,o){t&1&&(a(0,"span",29),S(1,11),r())}function Me(t,o){t&1&&(a(0,"span",29),S(1,12),r())}function ye(t,o){if(t&1&&(a(0,"span",29),S(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),L(1)}}function Le(t,o){t&1&&(c(0,7,1),l(1,"sh-icon"),p())}function Xe(t,o){t&1&&(c(0,7,2),l(1,"sh-icon"),p())}function Ge(t,o){t&1&&(c(0,14,1),l(1,"sh-icon",38),p())}function Be(t,o){t&1&&(c(0,14,2),l(1,"sh-icon"),p())}function be(t,o){if(t&1){let e=M();a(0,"button",37),m("click",function(){w(e);let i=u(2);return D(i.copyPassword())}),c(1,14),F(2,Ge,2,0)(3,Be,2,0),p(),r()}if(t&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(t,o){t&1&&(a(0,"sh-alert",35),S(1,15),r())}function ke(t,o){if(t&1){let e=M();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),l(4,"sup"),p(),r(),l(5,"input",28),F(6,De,2,0,"span",29)(7,xe,2,1,"span",29),r(),F(8,$e,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),l(10,"input",31),F(11,Ae,2,0,"span",29)(12,Me,2,0,"span",29)(13,ye,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){w(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Le,2,0)(18,Xe,2,0),p(),r(),a(19,"button",33),m("click",function(){w(e);let i=u();return D(i.generatePassword())}),c(20,8),l(21,"sh-icon"),p(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"sh-alert",35),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ue(t,o){if(t&1&&(a(0,"div",25)(1,"code"),x(2),r()()),t&2){let e=u();s(2),Y(e.exportedCmd())}}var R=new Fe,b=class t{#o=C(Re);#t=C(Oe);#e=C(te);#n=C(ne);#i=C(oe);#r=C(Ne);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=R.group({exportPasswords:R.control(!0),encryption:R.control(!1,[g.required,fe()]),password:R.control("",[B("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:R.control("",[B("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=he(this.exportForm.valueChanges);encryptionFieldSignal=$(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=$(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=$(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=G(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=G(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=i=>{let O=Object.entries(i);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),A(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(A(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=W({type:t,selectors:[["app-export"]],decls:26,vars:15,consts:()=>{let o;o=$localize`Remember to copy the password`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;n=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let i;i=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let O;O=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let N;N=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let T;T=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let v;v=$localize`Password`;let k;k=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let f;f=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,f=X(f);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let z;z=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let H;H=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let I;I=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=X(I);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[e,n,i,O,N,T,U,f,K,J,z,H,V,q,I,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","","shTooltip",o,1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",v,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",k,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),x(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),l(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return n.submit()}),c(8,1),l(9,"sh-icon"),p(),r()()(),a(10,"p"),x(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return n.exportType.set("cmd")}),c(15,2),l(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return n.exportType.set("file")}),c(18,3),l(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),l(22,"input",22),p(),r(),F(23,we,3,0,"sh-toggle",23),F(24,ke,24,8,"div",24),F(25,Ue,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",ee(14,Ie)),s(3),h("loading",n.isExporting()),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),s(4),Z("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",n.exportForm),s(2),h("active",n.exportType()==="cmd"),s(3),h("active",n.exportType()==="file"),s(6),d(n.exportType()==="file"?23:-1),s(),d(n.encryptionFieldSignal()?24:-1),s(),d(n.exportedCmd()?25:-1)}},dependencies:[de,le,se,re,ae,_e,ce,pe,ie,Ce,me,ue,Pe,Ee,Te,Se,ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{b as default};
|
|
1
|
+
import{a as Re,c as fe,d as B}from"./chunk-4VY6SMSL.js";import{b as he}from"./chunk-Z27IQRKV.js";import{a as Ne}from"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import"./chunk-S4OFJD2F.js";import"./chunk-6XI3IP27.js";import{b as te,d as ne,e as ie}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{A as Ce,B as Ee,G as Pe,K as Se,V as me,X as ge,b as re,c as se,d as g,e as ae,f as _e,j as le,o as ce,q as pe,r as Fe,t as de,u as ue,w as Te}from"./chunk-RPUPXDQE.js";import{d as oe,i as Oe}from"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as u,Bc as ee,Cb as P,Db as a,Eb as r,Fb as l,H as A,Mb as M,P as Q,Qc as $,Rc as G,Sa as s,Tb as c,Ub as p,Vb as S,Wb as y,Xb as L,Yb as X,Zb as m,_ as C,cb as W,ea as w,fa as D,kc as h,nc as x,oc as Y,pa as E,qc as Z,xb as F,yb as d}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Ie=()=>["/"];function we(t,o){t&1&&(a(0,"sh-toggle",23),c(1,5),l(2,"input",26),p(),r())}function De(t,o){t&1&&(a(0,"span",29),S(1,9),r())}function xe(t,o){if(t&1&&(a(0,"span",29),S(1,10),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),L(1)}}function $e(t,o){if(t&1&&l(0,"sh-progress-bar",36),t&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function Ae(t,o){t&1&&(a(0,"span",29),S(1,11),r())}function Me(t,o){t&1&&(a(0,"span",29),S(1,12),r())}function ye(t,o){if(t&1&&(a(0,"span",29),S(1,13),r()),t&2){let e=u(2);s(),y(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),L(1)}}function Le(t,o){t&1&&(c(0,7,1),l(1,"sh-icon"),p())}function Xe(t,o){t&1&&(c(0,7,2),l(1,"sh-icon"),p())}function Ge(t,o){t&1&&(c(0,14,1),l(1,"sh-icon",38),p())}function Be(t,o){t&1&&(c(0,14,2),l(1,"sh-icon"),p())}function be(t,o){if(t&1){let e=M();a(0,"button",37),m("click",function(){w(e);let i=u(2);return D(i.copyPassword())}),c(1,14),F(2,Ge,2,0)(3,Be,2,0),p(),r()}if(t&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function ve(t,o){t&1&&(a(0,"sh-alert",35),S(1,15),r())}function ke(t,o){if(t&1){let e=M();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),l(4,"sup"),p(),r(),l(5,"input",28),F(6,De,2,0,"span",29)(7,xe,2,1,"span",29),r(),F(8,$e,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),l(10,"input",31),F(11,Ae,2,0,"span",29)(12,Me,2,0,"span",29)(13,ye,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){w(e);let i=u();return D(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Le,2,0)(18,Xe,2,0),p(),r(),a(19,"button",33),m("click",function(){w(e);let i=u();return D(i.generatePassword())}),c(20,8),l(21,"sh-icon"),p(),r(),F(22,be,4,1,"button",34),r(),F(23,ve,2,0,"sh-alert",35),r()}if(t&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Ue(t,o){if(t&1&&(a(0,"div",25)(1,"code"),x(2),r()()),t&2){let e=u();s(2),Y(e.exportedCmd())}}var R=new Fe,b=class t{#o=C(Re);#t=C(Oe);#e=C(te);#n=C(ne);#i=C(oe);#r=C(Ne);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=R.group({exportPasswords:R.control(!0),encryption:R.control(!1,[g.required,fe()]),password:R.control("",[B("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:R.control("",[B("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=he(this.exportForm.valueChanges);encryptionFieldSignal=$(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=$(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=$(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=G(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=G(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=i=>{let O=Object.entries(i);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0;return this.#i.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob"})}),A(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(A(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=W({type:t,selectors:[["app-export"]],decls:26,vars:15,consts:()=>{let o;o=$localize`Remember to copy the password`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;n=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let i;i=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let O;O=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let N;N=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let T;T=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let v;v=$localize`Password`;let k;k=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let f;f=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,f=X(f);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let z;z=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let H;H=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let I;I=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=X(I);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[e,n,i,O,N,T,U,f,K,J,z,H,V,q,I,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","","shTooltip",o,1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",v,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",k,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(a(0,"header")(1,"h3"),x(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),l(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return n.submit()}),c(8,1),l(9,"sh-icon"),p(),r()()(),a(10,"p"),x(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return n.exportType.set("cmd")}),c(15,2),l(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return n.exportType.set("file")}),c(18,3),l(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),l(22,"input",22),p(),r(),F(23,we,3,0,"sh-toggle",23),F(24,ke,24,8,"div",24),F(25,Ue,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",ee(14,Ie)),s(3),h("loading",n.isExporting()),P("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),s(4),Z("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",n.exportForm),s(2),h("active",n.exportType()==="cmd"),s(3),h("active",n.exportType()==="file"),s(6),d(n.exportType()==="file"?23:-1),s(),d(n.encryptionFieldSignal()?24:-1),s(),d(n.exportedCmd()?25:-1)}},dependencies:[de,le,se,re,ae,_e,ce,pe,ie,Ce,me,ue,Pe,Ee,Te,Se,ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
1
|
+
import{a as A}from"./chunk-KXJZEADJ.js";import"./chunk-H7ZKBS2Q.js";import"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import"./chunk-LN26XMBJ.js";import"./chunk-S4OFJD2F.js";import"./chunk-6XI3IP27.js";import{c as u,e as N,f as c}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{T as S}from"./chunk-RPUPXDQE.js";import"./chunk-OJ3H3ZRA.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{Db as e,Eb as t,Fb as T,Vb as n,cb as g}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=g({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(T(0,"app-status-bar"),e(1,"div",7)(2,"sh-tabs",8)(3,"button",9),n(4,0),t(),e(5,"button",10),n(6,1),t(),e(7,"button",11),n(8,2),t(),e(9,"button",12),n(10,3),t(),e(11,"button",13),n(12,4),t(),e(13,"button",14),n(14,5),t(),e(15,"button",15),n(16,6),t()(),e(17,"section"),T(18,"router-outlet"),t()())},dependencies:[A,S,u,N,c],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"],changeDetection:0})};export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
1
|
+
import{a as B}from"./chunk-2YGOHGD2.js";import{a as z}from"./chunk-BK2MSH26.js";import{a as $}from"./chunk-3V4DGTSM.js";import{a as b}from"./chunk-5LX6M65H.js";import{a as R}from"./chunk-LN26XMBJ.js";import{z as S}from"./chunk-RPUPXDQE.js";import{i as P}from"./chunk-OJ3H3ZRA.js";import{H as u,P as k,Qc as c,Rc as f,V as m,_ as s,n as d,pa as n,r as h}from"./chunk-QONLYWYC.js";import{a,b as r}from"./chunk-EUDKD2JW.js";var F={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Complete:$localize`Backup complete!`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Restore_Complete:$localize`Restore complete!`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,Error:$localize`Error!`},_=class g{#i=s(R);#t=s(P);#o=s(B);#e=s(z);#c=s(S);#g=s(b);#s=n(!1);#a=n(null);statusData=this.#a.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(a({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");isResuming=n(!1);isFetching=this.#s.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#f=f(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#d=f(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#l(r(a({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#r()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#r()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(u(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open($,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#r(){this.#s.set(!0),this.#t.getApiV1Progressstate().pipe(k(e=>{let i=e.TaskID??null;return i===null?d(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(h(t=>r(a({},e),{task:t??null})))}),u(()=>this.#s.set(!1))).subscribe({next:e=>{this.#l(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#l(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#a.set(r(a({},e),{progress:this.#p(e),statusText:this.#u(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.OverallProgress>0&&(i=e.OverallProgress);return i}#n(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?F[e.Phase]:"Running \u2026",e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,v=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",p=this.#n(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${p}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${p}`:i=`${v}${o} files (${this.#i.transform(l)}) to go ${p}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#n(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}}return i}static \u0275fac=function(i){return new(i||g)};static \u0275prov=m({token:g,factory:g.\u0275fac,providedIn:"root"})};export{_ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as j,J as U,a as L,c as w,e as V,i as x,k as z,s as G}from"./chunk-
|
|
1
|
+
import{G as j,J as U,a as L,c as w,e as V,i as x,k as z,s as G}from"./chunk-RPUPXDQE.js";import{$b as I,Ab as S,Ac as R,Bb as O,Cb as u,Db as p,Eb as a,Jb as b,Kb as P,Mb as v,Qc as m,Rc as T,Sa as i,Vb as c,Wb as g,Wc as h,Xb as _,Zb as y,ac as D,bc as d,cb as f,ea as C,fa as M,pa as r,sc as F,tc as A,ub as E,uc as $,zb as N}from"./chunk-QONLYWYC.js";var k=[[["label"]],[["","prefix",""]],[["","suffix",""]]],B=["label","[prefix]","[suffix]"];function J(o,e){if(o&1){let t=v();p(0,"button",7),y("click",function(){let s=C(t).$implicit,l=I();return M(l.updateUnit(s.value))}),c(1,1),a()}if(o&2){let t=e.$implicit;i(),g(t.label),_(1)}}var X=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Y=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],H=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],W=class o{customId=h();inputType=h();timespan=r(0);#e="D";unit=r(this.#e);unitLabel=m(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=m(()=>{let e=this.inputType();return e&&H.includes(e.replace("--",""))});timeOptions=m(()=>this.isShortTime()?X:Y);readonly=r(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=T(()=>{this.onChange(this.getValue())});inputTypeEffect=T(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,s=e.match(n);s?(this.timespan.set(parseInt(s[1],10)),this.unit.set(s[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=f({type:o,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[R([{provide:L,useExisting:o,multi:!0}])],ngContentSelectors:B,decls:11,vars:6,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(D(k),d(0,0,["ngProjectAs","label",5,["label"]]),p(1,"sh-form-field")(2,"input",2),$("ngModelChange",function(l){return A(n.timespan,l)||(n.timespan=l),l}),a(),d(3,1),d(4,2),a(),p(5,"sh-menu",3)(6,"button",4),c(7,0),a(),b(8,5),S(9,J,2,1,"button",6,N),P(),a()),t&2&&(i(),E("readonly",n.readonly()||void 0),i(),u("id",n.customId()),F("ngModel",n.timespan),u("disabled",n.readonly()),i(3),u("openIndicator",!0),i(2),g(n.unitLabel()),_(7),i(2),O(n.timeOptions()))},dependencies:[U,j,G,w,z,V,x],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{W as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y,f as tn}from"./chunk-C6F6FP4R.js";import{a as on}from"./chunk-7RM3VKDO.js";import{a as nn}from"./chunk-YHUSOICR.js";import{a as en}from"./chunk-4NBLWONL.js";import"./chunk-CCKT2GLS.js";import"./chunk-LVTEOKA4.js";import"./chunk-6Q6SSTBK.js";import"./chunk-XLDVUBTQ.js";import"./chunk-LN26XMBJ.js";import{a as Ze}from"./chunk-7LYN2XHO.js";import"./chunk-GCCJSS4C.js";import{e as Xe}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{A as we,B as ze,C as Ve,E as Ue,F as je,J as Ke,K as We,R as qe,S as Qe,u as Je}from"./chunk-QF4DQYEP.js";import{h as Ye}from"./chunk-2QJVTZ56.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{$b as u,Ab as w,Bb as z,Bc as q,Cb as E,Cc as D,Db as o,Eb as t,Fb as T,Fc as M,Gc as G,H as j,Hc as R,Jb as O,Jc as Q,Kb as m,Lb as f,Mb as H,Pa as K,Rc as ve,Sa as a,Tb as c,Ub as s,Vb as d,Wb as h,Xb as A,Yb as W,Zb as $,_ as v,cb as He,ea as P,fa as I,hb as N,ib as Ge,ic as V,kc as L,nc as r,pa as X,pc as S,sb as xe,sc as ye,tb as ke,tc as Be,uc as be,xb as g,yb as p,zb as J}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-SR4YENFS.js").then(e=>e.NgTemplateOutlet),Ue,Qe,qe,import("./chunk-WNJSKJGQ.js").then(e=>e.DurationFormatPipe),import("./chunk-FIOBQPE7.js").then(e=>e.BytesPipe),import("./chunk-M7QQEZOU.js").then(e=>e.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],_n=e=>({$implicit:e}),cn=e=>["/backup",e],sn=e=>["/restore",e],un=e=>["/backup",e,"export"],Fn=e=>["/backup",e,"delete"],Cn=e=>["/backup",e,"database"],Tn=e=>["/backup",e,"commandline"],En=e=>["/backup",e,"log"];function dn(e,i){if(e&1){let n=H();o(0,"button",52),$("click",function(){let F=P(n).$implicit,C=u(2);return I(C.sortByColumn.set(F.value))}),d(1,15),t()}if(e&2){let n=i.$implicit,_=u(2);L("active",_.orderBy()===n.value),a(),h(n.label),A(1)}}function gn(e,i){if(e&1&&(o(0,"sh-menu",53)(1,"button",54),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,55),w(6,dn,2,3,"button",56,J),m(),t()),e&2){let n=u();a(4),h(n.orderBy()),A(2),a(2),z(n.sortOrderOptions())}}function pn(e,i){if(e&1&&(o(0,"p")(1,"span"),d(2,21),t(),r(3),M(4,"relativeTime"),t()),e&2){let n=u().$implicit,_=u(4);a(3),S(" ",R(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Sn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(4);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function On(e,i){e&1&&(O(0),r(1,"-"),m())}function mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Nn(e,i){e&1&&(O(0),r(1,"-"),m())}function Mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Pn(e,i){e&1&&(O(0),r(1,"-"),m())}function In(e,i){e&1&&(o(0,"sh-chip",63),d(1,22),t())}function fn(e,i){e&1&&f(0)}function Dn(e,i){if(e&1&&(o(0,"div",59)(1,"div",46)(2,"h3"),r(3),o(4,"sh-chip"),T(5,"img",60),r(6),t()(),o(7,"p")(8,"span"),d(9,16),t(),r(10),M(11,"relativeTime"),t(),g(12,pn,5,4,"p"),o(13,"p")(14,"span"),d(15,17),t(),g(16,Sn,2,4)(17,On,2,0,"ng-container"),t(),o(18,"p")(19,"span"),d(20,18),t(),g(21,mn,2,3)(22,Nn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),d(25,19),t(),g(26,Mn,2,3)(27,Pn,2,0,"ng-container"),t()(),o(28,"div",61)(29,"sh-chip",62),d(30,20),t(),g(31,In,2,0,"sh-chip",63),t(),o(32,"div",50),N(33,fn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(4),F=V(51);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),K),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",R(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let C=_.getBackupVersionCount(n);a(4),h(C)(C),A(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,_n,n))}}function $n(e,i){if(e&1&&w(0,Dn,34,18,"div",59,J),e&2){let n=u(3);z(n.backups())}}function Rn(e,i){e&1&&(O(0),d(1,23),m())}function hn(e,i){if(e&1&&(o(0,"div",57),g(1,$n,2,0)(2,Rn,2,0,"ng-container"),t()),e&2){let n=u(2);a(),p(n.backups().length?1:2)}}function An(e,i){e&1&&(c(0,24,1),f(1),s())}function Ln(e,i){e&1&&(c(0,25,1),f(1),s())}function Hn(e,i){e&1&&(c(0,26,1),f(1),s())}function Gn(e,i){e&1&&(c(0,27,1),f(1),s())}function xn(e,i){e&1&&(c(0,28,1),f(1),s())}function kn(e,i){e&1&&(c(0,29,1),f(1),s())}function yn(e,i){e&1&&(c(0,30,1),f(1),s())}function Bn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function bn(e,i){e&1&&(O(0),r(1,"-"),m())}function vn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Xn(e,i){e&1&&(O(0),r(1,"-"),m())}function Jn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function wn(e,i){e&1&&(O(0),r(1,"-"),m())}function zn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Vn(e,i){e&1&&(O(0),r(1,"-"),m())}function Un(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function jn(e,i){e&1&&(O(0),r(1,"-"),m())}function Kn(e,i){e&1&&f(0)}function Wn(e,i){if(e&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td")(4,"sh-chip",51),T(5,"img",60),r(6),t()(),o(7,"td"),g(8,Bn,2,4)(9,bn,2,0,"ng-container"),t(),o(10,"td"),g(11,vn,2,4)(12,Xn,2,0,"ng-container"),t(),o(13,"td"),g(14,Jn,2,4)(15,wn,2,0,"ng-container"),t(),o(16,"td"),g(17,zn,2,3)(18,Vn,2,0,"ng-container"),t(),o(19,"td"),g(20,Un,2,3)(21,jn,2,0,"ng-container"),t(),o(22,"td")(23,"span"),d(24,33),t()(),o(25,"td"),N(26,Kn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(3),F=V(51);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),K),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let C=_.getBackupVersionCount(n);a(4),h(C)(C),A(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,_n,n))}}function qn(e,i){if(e&1){let n=H();o(0,"sh-table",65),be("sortByColumnChange",function(F){P(n);let C=u(2);return Be(C.sortByColumn,F)||(C.sortByColumn=F),I(F)}),o(1,"tr",66)(2,"th",67),c(3,24),N(4,An,2,0,"ng-container",68),s(),t(),o(5,"th",69),c(6,25),N(7,Ln,2,0,"ng-container",68),s(),t(),o(8,"th",70),c(9,26),N(10,Hn,2,0,"ng-container",68),s(),t(),o(11,"th",71),c(12,27),N(13,Gn,2,0,"ng-container",68),s(),t(),o(14,"th",72),c(15,28),N(16,xn,2,0,"ng-container",68),s(),t(),o(17,"th",73),c(18,29),N(19,kn,2,0,"ng-container",68),s(),t(),o(20,"th",74),c(21,30),N(22,yn,2,0,"ng-container",68),s(),t(),o(23,"th"),d(24,31),t(),o(25,"th"),d(26,32),t()(),w(27,Wn,27,14,"tr",null,J),t()}if(e&2){let n=u(2),_=V(53);E("data",n.backups())("loading",n.backupsLoading()),ye("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),z(n.backups())}}function Qn(e,i){if(e&1&&g(0,hn,3,1,"div",57)(1,qn,29,10,"sh-table",58),e&2){let n=u();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function Yn(e,i){e&1&&(o(0,"div",75),T(1,"sh-progress-bar",76),o(2,"div",46)(3,"h3"),d(4,34),t()()())}function Zn(e,i){e&1&&d(0,35,1)}function et(e,i){e&1&&(o(0,"sh-icon"),r(1,"check"),t())}function nt(e,i){e&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function tt(e,i){if(e&1){let n=H();o(0,"button",77),$("click",function(){let F=P(n).$implicit,C=u();return I(C.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,Zn,1,0),s(),t(),o(4,"button",78)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",47),g(9,et,2,0,"sh-icon")(10,nt,2,0,"sh-icon"),t(),O(11,55),o(12,"h3",79),r(13,"Operations"),t(),o(14,"button",80),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",80),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",80),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",79),r(25,"Advanced"),t(),o(26,"button",80),c(27,39),T(28,"sh-icon"),s(),t(),o(29,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.verifyFiles(F.Backup.ID))}),c(30,40),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.compressBackup(F.Backup.ID))}),c(33,41),T(34,"sh-icon"),s(),t(),o(35,"button",80),c(36,42),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",79),r(40,"Reporting"),t(),o(41,"button",80),c(42,43),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=u();L("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,cn,n.Backup.ID)),a(4),L("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,sn,n.Backup.ID)),a(3),E("routerLink",D(19,un,n.Backup.ID)),a(3),E("routerLink",D(21,Fn,n.Backup.ID)),a(6),E("routerLink",D(23,Cn,n.Backup.ID)),a(9),E("routerLink",D(25,Tn,n.Backup.ID)),a(6),E("routerLink",D(27,En,n.Backup.ID))}}function it(e,i){e&1&&(o(0,"sh-icon",81),r(1,"funnel-simple"),t(),o(2,"sh-icon",82),r(3,"sort-ascending"),t(),o(4,"sh-icon",83),r(5,"sort-descending"),t())}var ot={file:{Display:$localize`Local`,Icon:null}},Z=class e{#n=v(Ye);#t=v(nn);#e=v(en);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Ze("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return Y(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=Y(n);if(!_)return"";let F=ot[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let C="http://null?"+i.split("?")[1],x=new URL(C).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(tn))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=He({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let C;C=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let ae;ae=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${B}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`Externally managed`;let Fe;Fe=$localize`No backups founds`;let Ce;Ce=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize`Version`;let me;me=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${b}:ICU@@3521773141017690117: `;let Me;Me=$localize`Loading backups...`;let Pe;Pe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ie;Ie=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let De;De=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let $e;$e=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Re;Re=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let he;he=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Le;return Le=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,C,U,x,k,y,ee,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Pe,Ie,fe,De,$e,Re,he,Ae,Le,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){if(n&1){let F=H();T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",44),T(4,"img",45),o(5,"div",46)(6,"h3"),d(7,2),t(),o(8,"p"),d(9,3),t()(),o(10,"button",47),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",44),T(14,"img",48),o(15,"div",46)(16,"h3"),d(17,5),t(),o(18,"p"),d(19,6),t()(),o(20,"button",47),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",49)(24,"h2"),O(25),d(26,8),m(),o(27,"div",50)(28,"sh-button-group",51)(29,"button",52),$("click",function(){return P(F),I(_.viewMode.set("list"))}),c(30,9),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){return P(F),I(_.viewMode.set("details"))}),c(33,10),T(34,"sh-icon"),s(),t()(),o(35,"sh-menu",53)(36,"button",54),c(37,11),T(38,"strong")(39,"sh-icon"),s(),t(),O(40,55),o(41,"button",52),$("click",function(){return P(F),I(_.setTimeType("relative"))}),d(42,12),t(),o(43,"button",52),$("click",function(){return P(F),I(_.setTimeType("actual"))}),d(44,13),t(),m(),t(),g(45,gn,8,1,"sh-menu",53),t()(),Ge(46,Qn,2,1)(47,Yn,5,0),xe(48,46,an,null,47),t()(),N(50,tt,44,29,"ng-template",null,0,Q)(52,it,6,0,"ng-template",null,1,Q)}n&2&&(a(3),E("routerLink",q(9,ln)),a(10),E("routerLink",q(10,rn)),a(16),L("active",_.viewMode()==="list"),a(3),L("active",_.viewMode()==="details"),a(7),h(_.timeType()),A(37),a(6),p(_.viewMode()==="list"?45:-1),a(3),ke(!_.backupsLoading()))},dependencies:[Xe,on,Ve,ze,Je,je,Ke,We,we],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{Z as default};
|
|
1
|
+
import{a as Y,f as tn}from"./chunk-FSG362SU.js";import{a as on}from"./chunk-KXJZEADJ.js";import{a as nn}from"./chunk-H7ZKBS2Q.js";import{a as en}from"./chunk-2YGOHGD2.js";import"./chunk-BK2MSH26.js";import"./chunk-3V4DGTSM.js";import"./chunk-6Q6SSTBK.js";import"./chunk-5LX6M65H.js";import"./chunk-LN26XMBJ.js";import{a as Ze}from"./chunk-S4OFJD2F.js";import"./chunk-6XI3IP27.js";import{e as Xe}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{A as we,B as ze,C as Ve,E as Ue,F as je,J as Ke,K as We,R as qe,S as Qe,u as Je}from"./chunk-RPUPXDQE.js";import{i as Ye}from"./chunk-OJ3H3ZRA.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{$b as u,Ab as w,Bb as z,Bc as q,Cb as E,Cc as D,Db as o,Eb as t,Fb as T,Fc as M,Gc as G,H as j,Hc as R,Jb as O,Jc as Q,Kb as m,Lb as f,Mb as H,Pa as K,Rc as ve,Sa as a,Tb as c,Ub as s,Vb as d,Wb as h,Xb as A,Yb as W,Zb as $,_ as v,cb as He,ea as P,fa as I,hb as N,ib as Ge,ic as V,kc as L,nc as r,pa as X,pc as S,sb as xe,sc as ye,tb as ke,tc as Be,uc as be,xb as g,yb as p,zb as J}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-SR4YENFS.js").then(e=>e.NgTemplateOutlet),Ue,Qe,qe,import("./chunk-WNJSKJGQ.js").then(e=>e.DurationFormatPipe),import("./chunk-FIOBQPE7.js").then(e=>e.BytesPipe),import("./chunk-M7QQEZOU.js").then(e=>e.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],_n=e=>({$implicit:e}),cn=e=>["/backup",e],sn=e=>["/restore",e],un=e=>["/backup",e,"export"],Fn=e=>["/backup",e,"delete"],Cn=e=>["/backup",e,"database"],Tn=e=>["/backup",e,"commandline"],En=e=>["/backup",e,"log"];function dn(e,i){if(e&1){let n=H();o(0,"button",52),$("click",function(){let F=P(n).$implicit,C=u(2);return I(C.sortByColumn.set(F.value))}),d(1,15),t()}if(e&2){let n=i.$implicit,_=u(2);L("active",_.orderBy()===n.value),a(),h(n.label),A(1)}}function gn(e,i){if(e&1&&(o(0,"sh-menu",53)(1,"button",54),c(2,14),T(3,"strong")(4,"sh-icon"),s(),t(),O(5,55),w(6,dn,2,3,"button",56,J),m(),t()),e&2){let n=u();a(4),h(n.orderBy()),A(2),a(2),z(n.sortOrderOptions())}}function pn(e,i){if(e&1&&(o(0,"p")(1,"span"),d(2,21),t(),r(3),M(4,"relativeTime"),t()),e&2){let n=u().$implicit,_=u(4);a(3),S(" ",R(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Sn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(4);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function On(e,i){e&1&&(O(0),r(1,"-"),m())}function mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Nn(e,i){e&1&&(O(0),r(1,"-"),m())}function Mn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Pn(e,i){e&1&&(O(0),r(1,"-"),m())}function In(e,i){e&1&&(o(0,"sh-chip",63),d(1,22),t())}function fn(e,i){e&1&&f(0)}function Dn(e,i){if(e&1&&(o(0,"div",59)(1,"div",46)(2,"h3"),r(3),o(4,"sh-chip"),T(5,"img",60),r(6),t()(),o(7,"p")(8,"span"),d(9,16),t(),r(10),M(11,"relativeTime"),t(),g(12,pn,5,4,"p"),o(13,"p")(14,"span"),d(15,17),t(),g(16,Sn,2,4)(17,On,2,0,"ng-container"),t(),o(18,"p")(19,"span"),d(20,18),t(),g(21,mn,2,3)(22,Nn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),d(25,19),t(),g(26,Mn,2,3)(27,Pn,2,0,"ng-container"),t()(),o(28,"div",61)(29,"sh-chip",62),d(30,20),t(),g(31,In,2,0,"sh-chip",63),t(),o(32,"div",50),N(33,fn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(4),F=V(51);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),K),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",R(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let C=_.getBackupVersionCount(n);a(4),h(C)(C),A(30),a(),p(n.Backup.ExternalID?31:-1),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,_n,n))}}function $n(e,i){if(e&1&&w(0,Dn,34,18,"div",59,J),e&2){let n=u(3);z(n.backups())}}function Rn(e,i){e&1&&(O(0),d(1,23),m())}function hn(e,i){if(e&1&&(o(0,"div",57),g(1,$n,2,0)(2,Rn,2,0,"ng-container"),t()),e&2){let n=u(2);a(),p(n.backups().length?1:2)}}function An(e,i){e&1&&(c(0,24,1),f(1),s())}function Ln(e,i){e&1&&(c(0,25,1),f(1),s())}function Hn(e,i){e&1&&(c(0,26,1),f(1),s())}function Gn(e,i){e&1&&(c(0,27,1),f(1),s())}function xn(e,i){e&1&&(c(0,28,1),f(1),s())}function kn(e,i){e&1&&(c(0,29,1),f(1),s())}function yn(e,i){e&1&&(c(0,30,1),f(1),s())}function Bn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function bn(e,i){e&1&&(O(0),r(1,"-"),m())}function vn(e,i){if(e&1&&(r(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Xn(e,i){e&1&&(O(0),r(1,"-"),m())}function Jn(e,i){if(e&1&&(r(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(3);S(" ",R(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function wn(e,i){e&1&&(O(0),r(1,"-"),m())}function zn(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Vn(e,i){e&1&&(O(0),r(1,"-"),m())}function Un(e,i){if(e&1&&(r(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function jn(e,i){e&1&&(O(0),r(1,"-"),m())}function Kn(e,i){e&1&&f(0)}function Wn(e,i){if(e&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td")(4,"sh-chip",51),T(5,"img",60),r(6),t()(),o(7,"td"),g(8,Bn,2,4)(9,bn,2,0,"ng-container"),t(),o(10,"td"),g(11,vn,2,4)(12,Xn,2,0,"ng-container"),t(),o(13,"td"),g(14,Jn,2,4)(15,wn,2,0,"ng-container"),t(),o(16,"td"),g(17,zn,2,3)(18,Vn,2,0,"ng-container"),t(),o(19,"td"),g(20,Un,2,3)(21,jn,2,0,"ng-container"),t(),o(22,"td")(23,"span"),d(24,33),t()(),o(25,"td"),N(26,Kn,1,0,"ng-container",64),t()()),e&2){let n=i.$implicit,_=u(3),F=V(51);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),K),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let C=_.getBackupVersionCount(n);a(4),h(C)(C),A(24),a(2),E("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,_n,n))}}function qn(e,i){if(e&1){let n=H();o(0,"sh-table",65),be("sortByColumnChange",function(F){P(n);let C=u(2);return Be(C.sortByColumn,F)||(C.sortByColumn=F),I(F)}),o(1,"tr",66)(2,"th",67),c(3,24),N(4,An,2,0,"ng-container",68),s(),t(),o(5,"th",69),c(6,25),N(7,Ln,2,0,"ng-container",68),s(),t(),o(8,"th",70),c(9,26),N(10,Hn,2,0,"ng-container",68),s(),t(),o(11,"th",71),c(12,27),N(13,Gn,2,0,"ng-container",68),s(),t(),o(14,"th",72),c(15,28),N(16,xn,2,0,"ng-container",68),s(),t(),o(17,"th",73),c(18,29),N(19,kn,2,0,"ng-container",68),s(),t(),o(20,"th",74),c(21,30),N(22,yn,2,0,"ng-container",68),s(),t(),o(23,"th"),d(24,31),t(),o(25,"th"),d(26,32),t()(),w(27,Wn,27,14,"tr",null,J),t()}if(e&2){let n=u(2),_=V(53);E("data",n.backups())("loading",n.backupsLoading()),ye("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),z(n.backups())}}function Qn(e,i){if(e&1&&g(0,hn,3,1,"div",57)(1,qn,29,10,"sh-table",58),e&2){let n=u();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function Yn(e,i){e&1&&(o(0,"div",75),T(1,"sh-progress-bar",76),o(2,"div",46)(3,"h3"),d(4,34),t()()())}function Zn(e,i){e&1&&d(0,35,1)}function et(e,i){e&1&&(o(0,"sh-icon"),r(1,"check"),t())}function nt(e,i){e&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function tt(e,i){if(e&1){let n=H();o(0,"button",77),$("click",function(){let F=P(n).$implicit,C=u();return I(C.startBackup(F.Backup.ID))}),c(1,35),T(2,"sh-icon"),g(3,Zn,1,0),s(),t(),o(4,"button",78)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",47),g(9,et,2,0,"sh-icon")(10,nt,2,0,"sh-icon"),t(),O(11,55),o(12,"h3",79),r(13,"Operations"),t(),o(14,"button",80),c(15,36),T(16,"sh-icon"),s(),t(),o(17,"button",80),c(18,37),T(19,"sh-icon"),s(),t(),o(20,"button",80),c(21,38),T(22,"sh-icon"),s(),t(),T(23,"sh-divider"),o(24,"h3",79),r(25,"Advanced"),t(),o(26,"button",80),c(27,39),T(28,"sh-icon"),s(),t(),o(29,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.verifyFiles(F.Backup.ID))}),c(30,40),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){let F=P(n).$implicit,C=u();return I(C.compressBackup(F.Backup.ID))}),c(33,41),T(34,"sh-icon"),s(),t(),o(35,"button",80),c(36,42),T(37,"sh-icon"),s(),t(),T(38,"sh-divider"),o(39,"h3",79),r(40,"Reporting"),t(),o(41,"button",80),c(42,43),T(43,"sh-icon"),s(),t(),m(),t()}if(e&2){let n=i.$implicit,_=u();L("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),E("routerLink",D(15,cn,n.Backup.ID)),a(4),L("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",D(17,sn,n.Backup.ID)),a(3),E("routerLink",D(19,un,n.Backup.ID)),a(3),E("routerLink",D(21,Fn,n.Backup.ID)),a(6),E("routerLink",D(23,Cn,n.Backup.ID)),a(9),E("routerLink",D(25,Tn,n.Backup.ID)),a(6),E("routerLink",D(27,En,n.Backup.ID))}}function it(e,i){e&1&&(o(0,"sh-icon",81),r(1,"funnel-simple"),t(),o(2,"sh-icon",82),r(3,"sort-ascending"),t(),o(4,"sh-icon",83),r(5,"sort-descending"),t())}var ot={file:{Display:$localize`Local`,Icon:null}},Z=class e{#n=v(Ye);#t=v(nn);#e=v(en);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Ze("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return Y(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=Y(n);if(!_)return"";let F=ot[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let C="http://null?"+i.split("?")[1],x=new URL(C).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(tn))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=He({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Backups are stored in the cloud and can be restored at any time.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let C;C=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let ae;ae=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${B}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`Externally managed`;let Fe;Fe=$localize`No backups founds`;let Ce;Ce=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize`Version`;let me;me=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ne;Ne=$localize` ${b}:ICU@@3521773141017690117: `;let Me;Me=$localize`Loading backups...`;let Pe;Pe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ie;Ie=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let De;De=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let $e;$e=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Re;Re=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let he;he=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let Le;return Le=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,C,U,x,k,y,ee,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,me,Ne,Me,Pe,Ie,fe,De,$e,Re,he,Ae,Le,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){if(n&1){let F=H();T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",44),T(4,"img",45),o(5,"div",46)(6,"h3"),d(7,2),t(),o(8,"p"),d(9,3),t()(),o(10,"button",47),c(11,4),T(12,"sh-icon"),s(),t()(),o(13,"sh-card",44),T(14,"img",48),o(15,"div",46)(16,"h3"),d(17,5),t(),o(18,"p"),d(19,6),t()(),o(20,"button",47),c(21,7),T(22,"sh-icon"),s(),t()()(),o(23,"div",49)(24,"h2"),O(25),d(26,8),m(),o(27,"div",50)(28,"sh-button-group",51)(29,"button",52),$("click",function(){return P(F),I(_.viewMode.set("list"))}),c(30,9),T(31,"sh-icon"),s(),t(),o(32,"button",52),$("click",function(){return P(F),I(_.viewMode.set("details"))}),c(33,10),T(34,"sh-icon"),s(),t()(),o(35,"sh-menu",53)(36,"button",54),c(37,11),T(38,"strong")(39,"sh-icon"),s(),t(),O(40,55),o(41,"button",52),$("click",function(){return P(F),I(_.setTimeType("relative"))}),d(42,12),t(),o(43,"button",52),$("click",function(){return P(F),I(_.setTimeType("actual"))}),d(44,13),t(),m(),t(),g(45,gn,8,1,"sh-menu",53),t()(),Ge(46,Qn,2,1)(47,Yn,5,0),xe(48,46,an,null,47),t()(),N(50,tt,44,29,"ng-template",null,0,Q)(52,it,6,0,"ng-template",null,1,Q)}n&2&&(a(3),E("routerLink",q(9,ln)),a(10),E("routerLink",q(10,rn)),a(16),L("active",_.viewMode()==="list"),a(3),L("active",_.viewMode()==="details"),a(7),h(_.timeType()),A(37),a(6),p(_.viewMode()==="list"?45:-1),a(3),ke(!_.backupsLoading()))},dependencies:[Xe,on,Ve,ze,Je,je,Ke,We,we],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{Z as default};
|