@duplicati/ngclient 0.0.60 → 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-WNGVUHIX.js → chunk-2HC23GJF.js} +1 -1
- package/{chunk-JQUPEFDH.js → chunk-2T3PBPBO.js} +1 -1
- package/chunk-34MR2IQN.js +1 -0
- package/{chunk-OKMKAFJO.js → chunk-3CXGKNYN.js} +1 -1
- package/chunk-47KLTONZ.js +1 -0
- package/chunk-4C3R2PTH.js +1 -0
- package/{chunk-FW56L7EH.js → chunk-4MGFY2JV.js} +1 -1
- package/chunk-55N3Z4WC.js +1 -0
- package/{chunk-XZ2Z3I76.js → chunk-5NMYYKKU.js} +1 -1
- package/{chunk-SGBX6SKP.js → chunk-7R4NNENA.js} +1 -1
- package/{chunk-VMEJ2INK.js → chunk-7YT4Y7C3.js} +1 -1
- package/{chunk-23D2KKGK.js → chunk-AX4MPJ65.js} +1 -1
- package/{chunk-3UJYR3C3.js → chunk-B6UDSTOM.js} +1 -1
- package/{chunk-KBOYFSOY.js → chunk-BSZZLSIX.js} +1 -1
- package/{chunk-NW7VZHBJ.js → chunk-BUARZS4A.js} +1 -1
- package/{chunk-HVNWOC2L.js → chunk-EQS5S7RI.js} +1 -1
- package/{chunk-JNHK2HQC.js → chunk-EXAIEGUA.js} +1 -1
- package/{chunk-HQ5RBM4W.js → chunk-FCXKPHH2.js} +1 -1
- package/chunk-G2NEYTH2.js +1 -0
- package/{chunk-CPSIM3A5.js → chunk-GE3T3AG3.js} +1 -1
- package/chunk-GROK2C3O.js +1 -0
- package/{chunk-4IQIYT3R.js → chunk-GRR3LTVK.js} +1 -1
- package/chunk-HLEETTI2.js +1 -0
- package/{chunk-FQKYQMUA.js → chunk-HSJMMQHL.js} +1 -1
- package/{chunk-F76JBXBH.js → chunk-HWBFYM4U.js} +1 -1
- package/chunk-I3KS7JEN.js +1 -0
- package/{chunk-XG3VY7EY.js → chunk-IHYJHBCC.js} +1 -1
- package/{chunk-ETMZA3IQ.js → chunk-INMFVRL6.js} +1 -1
- package/{chunk-T7HBYYKH.js → chunk-IQDBKRQV.js} +1 -1
- package/chunk-J6XRJHJ3.js +1 -0
- package/chunk-J76HBC5J.js +1 -0
- package/chunk-JWZZL2QQ.js +6 -0
- package/{chunk-EB76BK3U.js → chunk-KBC4N47O.js} +1 -1
- package/chunk-KWC4F7OI.js +1 -0
- package/{chunk-YZWMWYPX.js → chunk-L7W4ZJTP.js} +1 -1
- package/{chunk-3YZ3SEGY.js → chunk-LREVYYY4.js} +1 -1
- package/{chunk-XCGZAJSF.js → chunk-M27H5SJL.js} +1 -1
- package/chunk-MSK2MH2K.js +1 -0
- package/{chunk-QBFOFC2S.js → chunk-N3GBABZB.js} +1 -1
- package/{chunk-RMEEJUB4.js → chunk-N4NGBPMJ.js} +1 -1
- package/{chunk-HYRUU7RC.js → chunk-NJSJNACP.js} +1 -1
- package/{chunk-S4KMY7LU.js → chunk-O2MZ5CAQ.js} +1 -1
- package/{chunk-VPWPYB3Z.js → chunk-O53NVQ2A.js} +1 -1
- package/{chunk-GCHBD6DX.js → chunk-OIV6DYWR.js} +1 -1
- package/{chunk-DGRMASPQ.js → chunk-OROSSCXB.js} +1 -1
- package/chunk-PCWXZ2CU.js +1 -0
- package/{chunk-IQHACOOA.js → chunk-PD4M6YP7.js} +1 -1
- package/{chunk-W4Z2WCQT.js → chunk-PIVMNQL6.js} +1 -1
- package/{chunk-RT7TPOOL.js → chunk-PMCSEYJK.js} +1 -1
- package/chunk-QPLDE6B2.js +1 -0
- package/chunk-QPPVZ4KN.js +1 -0
- package/{chunk-WLAPUWZH.js → chunk-SANIFXXF.js} +1 -1
- package/{chunk-7BFB2JZ7.js → chunk-TSQCXGD7.js} +1 -1
- package/{chunk-VHPPFUTX.js → chunk-U2NGUTAO.js} +1 -1
- package/{chunk-CFESGUGK.js → chunk-VGQ6X3AL.js} +6 -6
- package/chunk-WCXAIVYX.js +1 -0
- package/{chunk-SQBOV6A2.js → chunk-YT3L2PHL.js} +1 -1
- package/chunk-ZNI74FWA.js +1 -0
- package/{chunk-BNW7MJ4U.js → chunk-ZTSITRHY.js} +1 -1
- package/chunk-ZUGIRXAF.js +1 -0
- package/index.html +1 -1
- package/main-7UWWTKQK.js +1 -0
- package/package.json +1 -1
- package/chunk-4YJMUITD.js +0 -1
- package/chunk-6FMUWDFQ.js +0 -1
- package/chunk-7CHRY23V.js +0 -6
- package/chunk-7EROSQ6G.js +0 -1
- package/chunk-7NOLIW3Y.js +0 -1
- package/chunk-CVWBR254.js +0 -1
- package/chunk-D352OHOH.js +0 -1
- package/chunk-DSHXBMXU.js +0 -1
- package/chunk-E2E7PU5Q.js +0 -1
- package/chunk-EHTLINLH.js +0 -1
- package/chunk-I4RJTDW5.js +0 -1
- package/chunk-MAMM4M4D.js +0 -1
- package/chunk-NROZTSQC.js +0 -1
- package/chunk-PQEMNH5E.js +0 -1
- package/chunk-S52BCEO2.js +0 -1
- package/chunk-V6A4XGAP.js +0 -1
- package/chunk-W572RMSD.js +0 -1
- package/chunk-XRV2G4UG.js +0 -1
- package/chunk-Z6E2ZOXY.js +0 -1
- package/main-7MZWF3BX.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as Qe}from"./chunk-5NMYYKKU.js";import{a as Be}from"./chunk-B6UDSTOM.js";import{a as At,b as Wt}from"./chunk-DNHLTHLR.js";import{b as j}from"./chunk-N3GBABZB.js";import{a as mt}from"./chunk-PD4M6YP7.js";import{a as be,b as ae,c as Ee,d as se,e as ye,f as ut,g as Kt,h as Pe,i as Ge,k as _t,l as Ne,m as Ve,n as zt,o as Ae,p as oe,q as dt,r as Oe}from"./chunk-OROSSCXB.js";import{b as We}from"./chunk-O2MZ5CAQ.js";import{a as De,c as re}from"./chunk-J76HBC5J.js";import{a as le,b as Ft,d as Xt,e as Ht,g as Le,i as gt,l as pe,n as Ct,o as jt,q as ce,r as me,w as Ue,x as qe}from"./chunk-ZTSITRHY.js";import{c as Bt}from"./chunk-NJSJNACP.js";import{ia as ct}from"./chunk-BUARZS4A.js";import{$b as H,Ab as I,B as Pt,Bb as v,Cb as a,Db as r,Eb as u,Fb as q,G as et,Gb as Q,Hb as ze,Ib as k,Kc as B,Mc as pt,Ob as g,Pb as C,Qb as M,Ra as s,Rb as nt,Sb as ot,Tb as Ie,U as Re,Ub as f,Vb as p,Ya as O,Yb as W,Za as fe,_ as $,_b as Y,eb as ne,ec as Se,fa as S,fc as Te,ga as T,gc as he,hc as m,ic as U,jc as V,ka as Rt,kb as d,kc as Nt,l as yt,mc as bt,nc as Gt,oc as Vt,q as Je,ra as tt,rc as Lt,sa as st,sc as Xe,tb as c,tc as Ut,uc as it,vb as xe,yb as F,yc as lt,zb as x}from"./chunk-VGQ6X3AL.js";import{a as N,c as wt}from"./chunk-C6Q5SG76.js";function an(e,n){if(e&1&&(a(0,"p"),m(1),r()),e&2){let t=p();s(),U(t._data().message)}}var sn={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},He=class e{data=st();_data=B(()=>N(N({},sn),this.data()));closed=tt();close(n="confirm"){this.closed.emit(n==="confirm")}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(t,o){t&1&&(a(0,"header",0)(1,"h3"),m(2),r()(),a(3,"div",1),d(4,an,2,1,"p"),r(),a(5,"footer",2)(6,"button",3),f("click",function(){return o.close("cancel")}),m(7),r(),a(8,"button",4),f("click",function(){return o.close("confirm")}),m(9),r()()),t&2&&(s(2),U(o._data().title),s(2),F(o._data().message?4:-1),s(3),U(o._data().cancelText),s(2),U(o._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var ft=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};var $e=class e{#e=$(We);s3Providers=j(this.getS3Config("Providers"));s3Regions=j(this.getS3Config("Regions"));s3RegionHosts=j(this.getS3Config("RegionHosts"));s3StorageClasses=j(this.getS3Config("StorageClasses"));storjSatellites=j(this.getStorjConfig("Satellites"));storjAuthenticationMethods=j(this.getStorjConfig("AuthenticationMethods"));openstackProviders=j(this.getOpenstackConfig("Providers"));openstackVersions=j(this.getOpenstackConfig("Versions"));gcsLocations=j(this.getGcsConfig("Locations"));gcsStorageClasses=j(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Je(t=>this.#t(t)))}createS3IamUser(n,t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Je(t=>this.#t(t)))}getOpenstackConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Je(t=>this.#t(t)))}getGcsConfig(n){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Je(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ke(e){return e==null?"":":"+e.toString()}function ue(e){return e==null?"":e.startsWith("/")?e:"/"+e}function b(e,n){let t={},o={};return n.searchParams.forEach((i,l)=>{ve.find(_=>_.key===e)?.dynamicFields?.includes(l)?o[l]=decodeURIComponent(i):t[l]=decodeURIComponent(i)}),{advanced:t,dynamic:o}}function G(e,n=!1){let t=e.map(([i,l])=>`${i}=${l?encodeURIComponent(l.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function St(e){let n=e.destinationType,t=ve.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function Ot(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return ve.find(_=>_.customKey===t||_.key===t)?.mapper.from(t,new URL("http://localhost"),e);let l=new URL(i);if(!n)throw new Error("Invalid target path");return ve.find(_=>_.customKey===t||_.key===t)?.mapper.from(t,l,e)}var D=new oe,ve=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>D.control(e??"")}},mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],_=i.startsWith("%")?i:"/"+i;return N({destinationType:e,custom:{path:_}},b(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>D.control(e??"",[Ee.required,Ee.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>D.control(e??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get($e).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get($e).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},b(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get($e).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get($e).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},b(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},b(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>D.control(e??"",[Ee.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.hostname+n.pathname}},b(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ke(t)+ue(i)+n}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([l])=>!["rclone-remote-repository","rclone-remote-path"].includes(l)),i=G([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=b(e,n);return N({destinationType:e,dynamic:N({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get($e).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get($e).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=G([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},b(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],l=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([_])=>_!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Ke(n)+ue(o)+l}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([l])=>l!=="use-ssl")]);return`${e.destinationType}://${t+Ke(n)+ue(o)+i}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+ue(t)+o}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},b(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>N({destinationType:e,custom:{path:n.pathname}},b(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>D.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>D.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>D.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>D.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>D.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:l}=e.custom,_={"auth-username":i,"auth-password":l},h=e.dynamic["use-ssl"],P=G([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([A])=>A!=="use-ssl"),...Object.entries(_)]);return`${e.destinationType}${h?"s":""}://${t+Ke(n)+ue(o)+P}`},from:(e,n,t)=>N({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},b(e,n))}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},b(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get($e).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${G([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>N({destinationType:e},b(e,n))}}];var qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Tt=class e{generate(n,t=qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=qt){let o=this;return Array.apply(null,{length:n}).map(()=>{let i;for(;;)if(i=String.fromCharCode(o.#e()),t.test(i))return i},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};var ln=["formRef"];function pn(e,n){if(e&1&&(a(0,"spk-option",27),m(1),r()),e&2){let t=n.$implicit;c("value",t.Key),s(),U(t.DisplayName)}}function cn(e,n){if(e&1&&u(0,"spk-progress-bar",38),e&2){let t=p(3);xe("warn",t.calculatePasswordStrength()===1)("tertiary",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),c("value",t.calculatePasswordStrength()*(100/5))}}function mn(e,n){e&1&&(a(0,"span",33),M(1,9),r())}function un(e,n){e&1&&(g(0,7,1),u(1,"spk-icon"),C())}function _n(e,n){e&1&&(g(0,7,2),u(1,"spk-icon"),C())}function dn(e,n){e&1&&(g(0,10,1),u(1,"spk-icon",40),C())}function Fn(e,n){e&1&&(g(0,10,2),u(1,"spk-icon"),C())}function gn(e,n){if(e&1){let t=k();a(0,"button",39),f("click",function(){S(t);let i=p(3);return T(i.copyPassword())}),g(1,10),d(2,dn,2,0)(3,Fn,2,0),C(),r()}if(e&2){let t=p(3);s(2),F(t.copiedPassword()?2:3)}}function Cn(e,n){e&1&&(a(0,"spk-alert",37),M(1,11),r())}function fn(e,n){if(e&1){let t=k();a(0,"div",28)(1,"spk-form-field")(2,"label",29),g(3,6),u(4,"sup"),C(),r(),u(5,"input",30),r(),d(6,cn,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),u(8,"input",32),d(9,mn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),f("click",function(){S(t);let i=p(2);return T(i.showPassword.set(!i.showPassword()))}),g(12,7),d(13,un,2,0)(14,_n,2,0),C(),r(),a(15,"button",35),f("click",function(){S(t);let i=p(2);return T(i.generatePassword())}),g(16,8),u(17,"spk-icon"),C(),r(),d(18,gn,4,1,"button",36),r(),d(19,Cn,2,0,"spk-alert",37),r()}if(e&2){let t=p(2);s(5),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.password?6:-1),s(2),c("type",t.showPassword()?"text":"password"),s(),F(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),s(4),F(t.showPassword()?13:14),s(5),F(t.showCopyPassword()?18:-1),s(),F(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Sn(e,n){if(e&1&&(a(0,"spk-select",24)(1,"label",25),M(2,5),r(),u(3,"input",26),I(4,pn,2,2,"spk-option",27,x),r(),d(6,fn,20,7,"div",28)),e&2){let t=p();c("displayFn",t.displayFn()),s(4),v(t.encryptionOptions()),s(2),F(t.encryptionFieldSignal()!==""?6:-1)}}function Tn(e,n){if(e&1&&(a(0,"button",22),g(1,12),u(2,"spk-icon"),C(),r()),e&2){let t=p();c("disabled",t.generalForm.invalid)}}function hn(e,n){if(e&1&&(a(0,"spk-tooltip",23)(1,"button",22),g(2,13),u(3,"spk-icon"),C(),r()()),e&2){let t=p();c("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),s(),c("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var Ze=new oe,Qt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Ze.group({name:Ze.control(e.name,[Ee.required]),description:Ze.control(e.description),encryption:Ze.control(e.encryption,[Wt()]),password:Ze.control(e.password,[At(n=>n?.value.encryption!=="",[Ee.required])]),repeatPassword:Ze.control(e.repeatPassword,[At(n=>n?.value.encryption!=="",[Ee.required])])}),$t={Key:"",DisplayName:"None"},kt=class e{#e=$(re);#t=$(De);#o=$(Tt);#i=$(_e);#n=$(mt);formRef=fe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=O(!1);copiedPassword=O(!1);showCopyPassword=O(!1);encryptionEffect=pt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=B(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#n.systemInfo()?.EncryptionModules??[];return t=>{let o=[$t,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Se(o.formRef,ln,5),t&2&&Te()},decls:20,vars:3,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let l;l=$localize`Backup description`;let _;_=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let h;h=$localize`Encryption`;let P;P=$localize`Encryption`;let A;A=$localize`Password`;let R;R=$localize`Repeat password`;let z;z=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let Z;Z=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ie(Z);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let te;te=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,te=Ie(te);let E;E=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let y;y=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let X;return X=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,l,_,P,z,Z,K,J,te,E,y,X,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",h,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",A,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",R,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",14,0),f("submit",function(){return S(i),T(o.next())}),a(2,"h3",15),M(3,1),r(),a(4,"spk-form-field")(5,"label",16),g(6,2),u(7,"sup"),C(),r(),u(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),M(11,3),r(),u(12,"textarea",19),r(),d(13,Sn,7,2),a(14,"div",20)(15,"button",21),f("click",function(){return S(i),T(o.exit())}),g(16,4),u(17,"spk-icon"),C(),r(),d(18,Tn,3,1,"button",22)(19,hn,4,2,"spk-tooltip",23),r()()}t&2&&(c("formGroup",o.generalForm),s(13),F(o.isNew()?13:-1),s(5),F(o.encryptionFieldSignal()===""?18:19))},dependencies:[Oe,Pe,ae,se,ye,Ne,Ae,pe,me,Le,le,ce,jt,Ft,qe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Dn=["formRef"],En=(e,n)=>({index:e,formView:n,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),yn=e=>({$implicit:e});function Pn(e,n){e&1&&(g(0,4,1),u(1,"spk-icon",16),C())}function Nn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function An(e,n){e&1&&(a(0,"p",16),M(1,10),r())}function On(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),U(t.name)}}function kn(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",32,2),f("click",function(){let i=S(t).$implicit,l=p();return T(l.addNewOption(i))}),r(),C()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function $n(e,n){e&1&&ze(0)}function xn(e,n){if(e&1&&d(0,$n,1,0,"ng-container",33),e&2){let t=n.$implicit,o=n.$index;p();let i=he(38);c("ngTemplateOutlet",i)("ngTemplateOutletContext",Xe(5,yn,Ut(2,En,o,t)))}}function In(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function vn(e,n){if(e&1&&(a(0,"app-file-tree",36)(1,"label",42),m(2),d(3,In,3,1,"spk-tooltip",43),r(),u(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function Mn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function wn(e,n){if(e&1&&(a(0,"app-file-tree",37)(1,"label",42),m(2),d(3,Mn,3,1,"spk-tooltip",43),r(),u(4,"input",44),r()),e&2){let t,o=p().$implicit,i=p();c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function Rn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function bn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"link"),r())}function Gn(e,n){e&1&&(a(0,"spk-icon",45),m(1,"textbox"),r())}function Vn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,Rn,3,1,"spk-tooltip",43),r(),u(4,"input",44),d(5,bn,2,0,"spk-icon",45)(6,Gn,2,0,"spk-icon",45),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name),s(),F(o.formView.type==="Path"?5:6)}}function Ln(e,n){if(e&1){let t=k();a(0,"span",49),f("click",function(){S(t);let i=p(2).$implicit,l=p();return T(l.oauthStartTokenCreation(i.formViewType))}),m(1,"AuthID"),r()}}function Un(e,n){e&1&&(a(0,"spk-icon",45),m(1,"password"),r())}function Bn(e,n){if(e&1){let t=k();a(0,"spk-icon",50),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function Kn(e,n){if(e&1){let t=k();a(0,"spk-icon",50),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function zn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),r(),u(3,"input",46),d(4,Ln,2,0,"span",47)(5,Un,2,0,"spk-icon",45)(6,Bn,2,0,"spk-icon",48)(7,Kn,2,0,"spk-icon",48),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function Xn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Hn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function jn(e,n){if(e&1&&(a(0,"spk-select")(1,"label",42),m(2),d(3,Xn,3,1,"spk-tooltip",43),r(),u(4,"input",51),I(5,Hn,2,2,"spk-option",19,x),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name),s(),v(o.formView.options)}}function Wn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function qn(e,n){if(e&1&&(a(0,"spk-option",19),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function Qn(e,n){if(e&1&&(a(0,"div",38)(1,"label",42),m(2),d(3,Wn,3,1,"spk-tooltip",43),r(),a(4,"div",52)(5,"spk-form-field"),u(6,"input",53),a(7,"spk-icon",45),m(8,"resize"),r()(),a(9,"spk-select"),u(10,"label")(11,"input",54),I(12,qn,2,2,"spk-option",19,x),r()()()),e&2){let t,o=p().$implicit,i=p();c("formGroupName",o.formView.name),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),Y("id","destination-",o.formGroupName,"-",o.index,""),s(6),v(i.sizeOptions())}}function Yn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zn(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,Yn,3,1,"spk-tooltip",43),r(),u(4,"input",55),a(5,"spk-icon",45),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function Jn(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function eo(e,n){if(e&1&&(a(0,"spk-toggle",39)(1,"label",42),m(2),d(3,Jn,3,1,"spk-tooltip",43),r(),u(4,"input",56),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function to(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function no(e,n){e&1&&(a(0,"spk-option",58),m(1,"None"),r()),e&2&&c("value","None")}function oo(e,n){if(e&1&&(a(0,"spk-option",19),m(1),u(2,"spk-checkbox",59),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function io(e,n){if(e&1&&d(0,no,2,1,"spk-option",58)(1,oo,3,2,"spk-option",19),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function ro(e,n){if(e&1&&(a(0,"spk-select",40)(1,"label",42),m(2),d(3,to,3,1,"spk-tooltip",43),r(),u(4,"input",57),I(5,io,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),W("formControlName",o.formView.name),s(),v(o.formView.options)}}function ao(e,n){if(e&1&&(a(0,"spk-tooltip",43)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function so(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",42),m(2),d(3,ao,3,1,"spk-tooltip",43),r(),u(4,"input",44),r()),e&2){let t,o=p().$implicit;s(),Y("for","destination-",o.formGroupName,"-",o.index,""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),Y("id","destination-",o.formGroupName,"-",o.index,""),W("formControlName",o.formView.name)}}function lo(e,n){if(e&1){let t=k();a(0,"div",34),q(1,35),d(2,vn,5,14,"app-file-tree",36)(3,wn,5,10,"app-file-tree",37)(4,Vn,7,10,"spk-form-field")(5,zn,8,11,"spk-form-field")(6,jn,7,9,"spk-select")(7,Qn,14,9,"div",38)(8,Zn,7,9,"spk-form-field")(9,eo,5,9,"spk-toggle",39)(10,ro,7,7,"spk-select",40)(11,so,5,9,"spk-form-field"),Q(),a(12,"button",41),f("click",function(){let i=S(t).$implicit,l=p();return T(l.removeFormView(i.formView,0))}),a(13,"spk-icon"),m(14,"x-circle"),r()()()}if(e&2){let t=n.$implicit;s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="Size"?7:t.formView.type==="Integer"?8:t.formView.type==="Boolean"?9:t.formView.type==="Flags"?10:t.formView.type==="Timespan"?11:-1)}}var Me=new oe,Yt=["Bytes","KB","MB","GB","TB","PB"],po=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],co=1024*1024*1024*2,mo=1024*1024*5,Zt=(e={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Me.group({remoteVolumeSize:Me.group({size:Me.control(e.remoteVolumeSize),unit:Me.control(e.size)}),backupRetention:Me.control(e.backupRetention),advancedOptions:Me.group({})}),Rr=(e,n)=>Me.group({name:Me.control(e),value:Me.control(n)}),xt=class e{#e=$(_e);#t=$(re);#o=$(De);formRef=fe.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=O(Yt);retentionOptions=O(po);volumeSizeSignal=j(this.optionsForm.controls.remoteVolumeSize.get("size")?.valueChanges.pipe(Pt(300))??yt(null));volumeUnitSignal=j(this.optionsForm.controls.remoteVolumeSize.get("unit")?.valueChanges.pipe(Pt(300))??yt(null));exceededVolumeSize=B(()=>{let n=this.volumeSizeSignal()??this.optionsForm.controls.remoteVolumeSize.get("size")?.value,t=this.volumeUnitSignal()??this.optionsForm.controls.remoteVolumeSize.get("unit")?.value;if(n==null||t===null||t===void 0)return!1;let o=n*Math.pow(1024,Yt.indexOf(t));return o>co||o<mo});oauthStartTokenCreation(n){}getFormFieldValue(n,t,o){return this.optionsForm.controls.advancedOptions.controls[o].value}removeFormView(n,t){this.#e.removeOptionFromFormGroup(n)}addNewOption(n){this.#e.addOptionToFormGroup(n)}retentionOptionDisplayFn(){let n=this.retentionOptions();return t=>{let o=n.find(i=>i.value===t);return o?o.name:""}}displayFn(){let n=this.#e.advancedOptions();return t=>{let o=n.find(i=>i.name===t);return o?`${o.name}`:""}}goBack(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}submit(){this.#e.submit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-options"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Dn,5),t&2&&Te()},decls:46,vars:7,consts:()=>{let n;n=$localize`Select an option...`;let t;t=$localize`Options`;let o;o=$localize` Remote volume size ${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:`;let i;i=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#18\uFFFD"}:START_LINK: Read more ${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#18\uFFFD"}:CLOSE_LINK:`;let l;l=$localize`Backup retention`;let _;_=$localize` Advanced options ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#30\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#32\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*34:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#30\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*34:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#32\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_MENU:`,_=Ie(_);let h;h=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let P;P=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let A;return A=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `,[["formRef",""],["fieldTemplate",""],["option",""],t,o,i,l,_,h,P,A,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],[1,"warning"],["type","number","id","size","formControlName","size"],["type","text","placeholder",n,"formControlName","unit"],[3,"value"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",11,0),f("submit",function(){return S(i),T(o.submit())}),a(2,"h3",12),M(3,3),r(),a(4,"div",13)(5,"div",14)(6,"spk-form-field")(7,"label",15),g(8,4),d(9,Pn,2,0,"spk-icon",16),C(),r(),u(10,"input",17),r(),a(11,"spk-select"),u(12,"input",18),I(13,Nn,2,2,"spk-option",19,x),r()(),d(15,An,2,0,"p",16),a(16,"p"),g(17,5),a(18,"a",20),u(19,"spk-icon",21),r(),C(),r()(),a(20,"spk-select",22)(21,"label",15),M(22,6),r(),u(23,"input",23),I(24,On,2,2,"spk-option",19,x),r(),a(26,"app-toggle-card",24),q(27,25),g(28,7),a(29,"spk-menu")(30,"button",26),u(31,"spk-icon"),r(),q(32,27),I(33,kn,3,1,"button",28,x),Q(),r(),C(),Q(),I(35,xn,1,7,"ng-container",null,x),r(),d(37,lo,15,2,"ng-template",null,1,lt),a(39,"div",29)(40,"button",30),f("click",function(){return S(i),T(o.goBack())}),g(41,8),u(42,"spk-icon"),C(),r(),a(43,"button",31),g(44,9),u(45,"spk-icon"),C(),r()()()}t&2&&(c("formGroup",o.optionsForm),s(9),F(o.exceededVolumeSize()?9:-1),s(4),v(o.sizeOptions()),s(2),F(o.exceededVolumeSize()?15:-1),s(5),c("displayFn",o.retentionOptionDisplayFn()),s(4),v(o.retentionOptions()),s(2),c("disallowToggle",!0),s(7),v(o.nonSelectedOptions()),s(2),v(o.selectedOptions()),s(8),xe("loader",o.isSubmitting()))},dependencies:[Oe,Pe,ae,Ge,be,se,ye,Ne,Ae,Ve,ct,Ct,me,Le,le,pe,Ue,gt,ce,qe,Qe,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var uo=["formRef"];function _o(e,n){if(e&1&&(a(0,"spk-option",38),m(1),r()),e&2){let t=n.$implicit;c("value",t.key),s(),U(t.label)}}function Fo(e,n){if(e&1){let t=k();a(0,"div",26)(1,"spk-form-field")(2,"label",27),M(3,8),r(),a(4,"input",28,1),f("focus",function(){S(t);let i=he(5);return T(i.showPicker())}),r(),a(6,"spk-icon",29),m(7,"clock"),r()(),a(8,"spk-form-field"),u(9,"label",30),a(10,"input",31,2),f("focus",function(){S(t);let i=he(11);return T(i.showPicker())}),r(),a(12,"spk-icon",29),m(13,"calendar"),r()()(),q(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),M(18,9),r(),u(19,"input",35),r(),a(20,"spk-select",36),u(21,"input",37),I(22,_o,2,2,"spk-option",38,x),r()(),a(24,"app-toggle-card",39),q(25,40),M(26,10),Q(),a(27,"div",41)(28,"spk-toggle",21),g(29,11),u(30,"input",42),C(),r(),a(31,"spk-toggle",21),g(32,12),u(33,"input",43),C(),r(),a(34,"spk-toggle",21),g(35,13),u(36,"input",44),C(),r(),a(37,"spk-toggle",21),g(38,14),u(39,"input",45),C(),r(),a(40,"spk-toggle",21),g(41,15),u(42,"input",46),C(),r(),a(43,"spk-toggle",21),g(44,16),u(45,"input",47),C(),r(),a(46,"spk-toggle",21),g(47,17),u(48,"input",48),C(),r()()(),Q()}if(e&2){let t=p();s(20),c("displayFn",t.displayFn),s(2),v(t.unitOptions),s(2),c("disallowToggle",!0)}}var ee=new oe,Jt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],en=(e={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>ee.group({autoRun:ee.control(e.autoRun),nextTime:ee.group({time:ee.control(e.nextTime.time),date:ee.control(e.nextTime.date)}),runAgain:ee.group({repeatValue:ee.control(e.runAgain.repeatValue),repeatUnit:ee.control(e.runAgain.repeatUnit),allowedDays:ee.group({mon:ee.control(e.runAgain.allowedDays.mon),tue:ee.control(e.runAgain.allowedDays.tue),wed:ee.control(e.runAgain.allowedDays.wed),thu:ee.control(e.runAgain.allowedDays.thu),fri:ee.control(e.runAgain.allowedDays.fri),sat:ee.control(e.runAgain.allowedDays.sat),sun:ee.control(e.runAgain.allowedDays.sun)})})}),It=class e{#e=$(_e);#t=$(re);#o=$(De);formRef=fe.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Jt;displayFn(n){let t=Jt.find(o=>o.key===n);return t?`${t.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-schedule"]],viewQuery:function(t,o){t&1&&Se(o.formRef,uo,5),t&2&&Te()},decls:18,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let l;l=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let h;h=$localize`Run again every`;let P;P=$localize`Allowed days`;let A;A=$localize` Monday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Tuesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let z;z=$localize` Wednesday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let Z;Z=$localize` Thursday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Saturday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let te;return te=$localize` Sunday ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],n,t,o,i,l,_,h,P,A,R,z,Z,K,J,te,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",18,0),f("submit",function(){return S(i),T(o.next())}),a(2,"h3",19),M(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),g(6,4),u(7,"input",22),C(),r(),a(8,"p"),M(9,5),r()(),d(10,Fo,49,2),a(11,"div",23)(12,"button",24),f("click",function(){return S(i),T(o.goBack())}),g(13,6),u(14,"spk-icon"),C(),r(),a(15,"button",25),g(16,7),u(17,"spk-icon"),C(),r()()()}if(t&2){let i;c("formGroup",o.scheduleForm),s(10),F((i=o.scheduleFormSignal())!=null&&i.autoRun?10:-1)}},dependencies:[Oe,Pe,ae,Ge,be,se,ye,Ne,Ae,Ve,pe,me,ce,Ue,le,Le,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function go(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),U(t.key)}}function Co(e,n){if(e&1&&(a(0,"spk-option",2),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),U(t.key)}}function fo(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",5),f("ngModelChange",function(i){S(t);let l=p(2);return T(l.updateStateExpression(i))}),r(),I(2,Co,2,2,"spk-option",2,x),r()}if(e&2){let t,o=p(2);c("hideClearButton",!0)("displayFn",o.displayFn),s(),c("ngModel",(t=o.pathState())==null?null:t.expression),s(),v(o.fileGroupOptions())}}function So(e,n){if(e&1){let t=k();a(0,"spk-form-field")(1,"input",5),f("ngModelChange",function(i){S(t);let l=p(2);return T(l.updateStateExpression(i))}),r()()}if(e&2){let t,o=p(2);s(),c("ngModel",(t=o.pathState())==null?null:t.expression)}}function To(e,n){if(e&1){let t=k();a(0,"spk-select",0)(1,"input",1),f("ngModelChange",function(i){S(t);let l=p();return T(l.updateStateType(i))}),r(),I(2,go,2,2,"spk-option",2,x),r(),d(4,fo,4,3,"spk-select",0)(5,So,2,1,"spk-form-field"),a(6,"div",3),f("click",function(){S(t);let i=p();return T(i.removeFilter())}),a(7,"spk-icon",4),m(8,"x-circle"),r()()}if(e&2){let t,o,i=p();c("hideClearButton",!0)("displayFn",i.displayFn),s(),c("ngModel",(t=i.pathState())==null?null:t.type),s(),v(i.expressionOptions()),s(2),F(((o=i.pathState())==null?null:o.type)==="-FileGroup"||((o=i.pathState())==null?null:o.type)==="+FileGroup"?4:5)}}var tn=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],ho=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],ht=class e{path=st.required();pathChange=tt();remove=tt();expressionOptions=O(tn);fileGroupOptions=O(ho);pathState=O(null);typeState=B(()=>{let n=this.pathState();return n?n.type:null});pathEffect=pt(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+";return t.startsWith("/")&&t.endsWith("/")?this.pathState.set({type:`${o}Folder`,path:t,expression:t}):t.startsWith("*")&&t.endsWith("*/")?this.pathState.set({type:`${o}FolderNameIncludes`,path:t,expression:t.slice(1,-2)}):t.startsWith("[.*")&&t.endsWith("[^\\/]*]")?this.pathState.set({type:`${o}FileNameIncludes`,path:t,expression:t.slice(3,-7)}):t.startsWith("{")&&t.endsWith("}")?this.pathState.set({type:`${o}FileGroup`,path:t,expression:t.slice(1,-1)}):t.startsWith("[")&&t.endsWith("]")?this.pathState.set({type:`${o}Regex`,path:t,expression:t.slice(1,-1)}):t.startsWith("*.")?this.pathState.set({type:`${o}Extension`,path:t,expression:t.slice(2)}):this.pathState.set({type:`${o}Expression`,path:t,expression:t})});updateStateType(n){this.pathState.update(t=>(t.type=n,t.path=this.#t(t),t)),this.#e()}updateStateExpression(n){this.pathState.update(t=>(t.expression=n,t.path=this.#t(t),t)),this.#e()}#e(){setTimeout(()=>this.pathChange.emit(this.pathState().path))}#t(n){let t=n.type.slice(0,1),o=n.type.slice(1);if(o==="Folder"){let i=n.expression.endsWith("/"),l=n.expression.startsWith("/");return i&&l?`${t}${n.expression}`:i?`${t}${n.expression}/`:l?`${t}/${n.expression}`:`${t}/${n.expression}/`}return o==="FolderNameIncludes"?`${t}*${n.expression}*/`:o==="FileNameIncludes"?`${t}[.*${n.expression}[^\\/]*]`:o==="FileGroup"?`${t}{${n.expression}}`:o==="Regex"?`${t}[${n.expression}]`:o==="Extension"?`${t}*.${n.expression}`:`${t}${n.expression}`}removeFilter(){this.remove.emit()}displayFn(n){let t=tn.find(o=>o.value===n);return t?t.key:""}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let n;return n=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(t,o){t&1&&d(0,To,9,4),t&2&&F(o.pathState()?0:-1)},dependencies:[dt,ae,se,Kt,me,ce,le,pe],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Do=["formRef"];function Eo(e,n){if(e&1){let t=k();a(0,"app-filter",42),f("pathChange",function(i){let l=S(t).$index,_=p(2);return T(_.patchPathAt(i,l))})("remove",function(){let i=S(t).$index,l=p(2);return T(l.removePathAt(i))}),r()}if(e&2){let t=n.$implicit;c("path",t)}}function yo(e,n){if(e&1&&I(0,Eo,1,1,"app-filter",41,x),e&2){let t=p();v(t.pathArray())}}function Po(e,n){if(e&1&&(a(0,"spk-option",45),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function No(e,n){if(e&1&&(a(0,"div",40)(1,"spk-form-field"),u(2,"input",43),r(),a(3,"spk-select"),u(4,"input",44),I(5,Po,2,2,"spk-option",45,x),r()()),e&2){let t=p();s(5),v(t.sizeOptions())}}var we=new oe,Ao=["Bytes","KB","MB","GB","TB","PB"],nn=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>we.group({path:we.control(e.path),excludes:we.group({hidden:we.control(e.excludes.hidden),system:we.control(e.excludes.system),temporary:we.control(e.excludes.temporary),filesLargerThan:we.group({size:we.control(null),unit:we.control(null)})})}),vt=class e{#e=$(_e);#t=$(re);#o=$(De);formRef=fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ut("");filesLargerThan=B(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=O(Ao);pathSignal=j(this.sourceDataForm.controls.path.valueChanges);pathArray=B(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+"))??[]);addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),l=this.pathArray().map((_,h)=>h===t?`${n}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${l}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(l=>!l.startsWith("-")&&!l.startsWith("+")).join("\0"),i=this.pathArray().filter((l,_)=>_!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${n}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Do,5),t&2&&Te()},decls:55,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let l;l=$localize`Temporary files`;let _;_=$localize`Source Data`;let h;h=$localize`Folder path`;let P;P=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let A;A=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let R;R=$localize`Source Data`;let z;z=$localize`Add Path`;let Z;Z=$localize`Add a path directly from your machine.`;let K;K=$localize`Filters`;let J;J=$localize`Customize your filters.`;let te;te=$localize`Add filter`;let E;E=$localize`Exclude`;let y;y=$localize`Choose if there’s any files you want to exclude.`;let X;X=$localize` Hidden files ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`;let w;w=$localize` System files ${"\uFFFD#48\uFFFD\uFFFD/#48\uFFFD"}:TAG_INPUT:`;let ie;ie=$localize` Temporary files ${"\uFFFD#51\uFFFD\uFFFD/#51\uFFFD"}:TAG_INPUT:`;let ge;ge=$localize` Files larger than `;let de;return de=$localize`Select an option...`,[["formRef",""],_,h,P,A,R,z,Z,K,J,te,E,y,X,w,ie,ge,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",l,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"path"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",de],[3,"value"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",17,0),f("submit",function(){return S(i),T(o.next())}),a(2,"div",18)(3,"h3",19),M(4,1),r(),a(5,"app-file-tree",20)(6,"label",21),M(7,2),r(),u(8,"input",22),r(),a(9,"div",23)(10,"button",24),f("click",function(){return S(i),T(o.goBack())}),g(11,3),u(12,"spk-icon"),C(),r(),a(13,"button",25),g(14,4),u(15,"spk-icon"),C(),r()()(),a(16,"div",26)(17,"h3",19),M(18,5),r(),a(19,"app-toggle-card",27),q(20,28),M(21,6),Q(),a(22,"p",29),M(23,7),r(),a(24,"div",30)(25,"spk-form-field"),u(26,"input",31),r(),a(27,"button",32),f("click",function(){return S(i),T(o.addNewPath())}),a(28,"spk-icon"),m(29,"plus"),r()()()(),a(30,"app-toggle-card",27),q(31,28),M(32,8),Q(),a(33,"p",29),M(34,9),r(),a(35,"button",33),f("click",function(){return S(i),T(o.addFilter())}),M(36,10),r(),d(37,yo,2,0),r(),a(38,"app-toggle-card",34),q(39,28),M(40,11),Q(),a(41,"p",29),M(42,12),r(),a(43,"spk-toggle",35),g(44,13),u(45,"input",36),C(),r(),a(46,"spk-toggle",35),g(47,14),u(48,"input",37),C(),r(),a(49,"spk-toggle",35),g(50,15),u(51,"input",38),C(),r(),a(52,"spk-toggle",39),f("click",function(){return S(i),T(o.toggleFilesLargerThan())}),M(53,16),r(),d(54,No,7,0,"div",40),r()()()}if(t&2){let i;c("formGroup",o.sourceDataForm),s(5),c("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),s(14),c("disallowToggle",!0),s(7),c("formControl",o.newPathCtrl),s(4),c("disallowToggle",!0),s(7),F((i=o.pathSignal())!=null&&i.length?37:-1),s(),c("disallowToggle",!0),s(14),xe("active",o.filesLargerThan()),s(2),F(o.filesLargerThan()?54:-1)}},dependencies:[dt,Pe,ae,Ge,be,se,ye,Oe,_t,Ne,Ae,Ve,pe,ce,le,Le,me,Ue,Qe,Be,ht],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var Fe=new oe,_e=class e{#e=$(re);#t=$(mt);#o=$(We);#i=$(ft);generalForm=Qt();sourceDataForm=nn();scheduleForm=en();destinationForm=on();optionsForm=Zt();isDraft=O(!1);backupId=O(null);isSubmitting=O(!1);finishedLoading=O(!1);backupDefaults=O(null);isNew=B(()=>this.backupId()==="new");selectedOptions=O([]);selectedAdvancedFormPair=O([]);destinationFormPair=O({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=B(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=O([]);notSelectedHttpOptions=B(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=j(this.sourceDataForm.valueChanges);destinationFormSignal=j(this.destinationForm.valueChanges);generalFormSignal=j(this.generalForm.valueChanges);encryptionFieldSignal=j(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=j(this.scheduleForm.valueChanges);destinationOptions=B(()=>this.#t.backendModules()??[]);httpOptions=B(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#n)??[]);advancedOptions=B(()=>this.#t.systemInfo()?.Options?.map(this.#n)??[]);#n(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=B(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[$t,...n]});nonSelectedOptions=B(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(l=>l.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(l=>l.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,l=o??n.defaultValue;this.createFormField(i,n,l),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(l=>l.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(l=>l.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(et(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(et(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{console.log("submitted res",o),this.exit()},error:o=>{console.error("submitted error",o)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(A=>`${A.Include?"":"-"}${A.Expression}`)??[],i=n.Settings?.find(A=>A.Name==="--exclude-files-attributes")?.Value??"",l=n.Settings?.find(A=>A.Name==="--skip-files-larger-than")??null,_=l?.Value.replace(/[0-9]/g,"")??null,h=l?.Value.replace(/[^0-9]/g,"")??null,P={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:_&&h?{size:parseInt(h),unit:_.toUpperCase()}:null}};this.sourceDataForm.patchValue(P)}mapDestinationToForm(n){let t=n.TargetURL?Ot(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=Ot(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(l=>l.Name==="encryption-module"),o=t?.Value&&t.Value.length?t.Value:"",i={name:n.Name??"",description:n.Description??""};o&&o!==""&&(i.encryption=o),this.generalForm.patchValue(i)}mapScheduleToForm(n){if(!n){this.scheduleForm.patchValue({autoRun:!0});return}let t=this.#i.fromString(n.Repeat)??null,i={nextTime:this.#p(n.Time),runAgain:{repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(i)}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],o=this.advancedOptions();n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"");if(!(i.Name&&t.includes(i.Name))){if(i.Name==="dblock-size"){let l=i.Value?.replace(/[^0-9]/g,""),_=i.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:l?parseInt(l):null,unit:_?_.toUpperCase():null})}if(i.Name&&i.Value){let l=o.find(_=>_.name===i.Name);if(!l)return;this.addOptionToFormGroup(l,i.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#l(){let n=this.generalForm.value,t=this.optionsForm.value,o=this.scheduleForm.value,i=this.sourceDataForm.value,_=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],h=null;o.runAgain?.repeatUnit&&o.runAgain?.repeatValue&&(h=this.#i.toString(o.runAgain.repeatValue,o.runAgain.repeatUnit));let P=o.runAgain?.allowedDays?Object.entries(o.runAgain?.allowedDays).filter(([K,J])=>J).map(([K,J])=>K):[],A=i.path?.split("\0")??[],R=this.mapFormsToSettings(),z=Object.entries(i.excludes??{}).filter(([K,J])=>J&&K!=="filesLargerThan").map(([K])=>K),Z=i.excludes?.filesLargerThan;return z.length&&R.push({Name:"--exclude-files-attributes",Value:z.join(",")}),Z&&Z.size!==null&&Z.unit!==null&&R.push({Name:"--skip-files-larger-than",Value:`${Z.size}${Z.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:_[0]??null,Sources:A.filter(K=>!K.startsWith("-")),Settings:R,Filters:A.filter(K=>K.startsWith("-")).map((K,J)=>({Order:J,Include:!1,Expression:K.slice(1)}))},Schedule:o.autoRun?{Repeat:h,Time:o.nextTime?.date?new Date(`${o.nextTime.date}T${o.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:P}:null}}mapFormsToSettings(){let n=this.advancedOptions(),t=this.optionsForm.value,o=this.generalForm.value,i=[{Name:"--no-encryption",Value:"True"}];o.encryption!==""&&(i=[{Name:"encryption-module",Value:o.encryption??null},{Name:"passphrase",Value:o.password??null}]);let l=t.remoteVolumeSize?.size?{Name:"dblock-size",Value:`${t.remoteVolumeSize.size}${t.remoteVolumeSize.unit.toLowerCase()}`}:{Name:"dblock-size",Value:"50mb"},_=Object.entries(t.advancedOptions??{}).filter(([h,P])=>h&&P).map(([h,P])=>{let A=n.find(R=>R.name===h);return A?.type==="Size"?{Name:h,Value:`${P.size}${P.unit.toLowerCase()}`}:A?.type==="Integer"?{Name:h,Value:P.toString()}:A?.type==="Boolean"?{Name:h,Value:P.toString()}:{Name:h,Value:P}});return[...i,l,..._]}#a(n){return n.controls.map(t=>St(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n),o={time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(o.date=t.toISOString().split("T")[0]),o}removeOptionFromFormGroup(n){let t=n.name;t&&(this.optionsForm.controls.advancedOptions.removeControl(t),this.selectedOptions.update(o=>(o=o.filter(i=>i.name!==t),o)))}addOptionToFormGroup(n,t){let o=this.optionsForm.controls.advancedOptions;this.createFormField(o,n,t??n.defaultValue),this.selectedOptions.update(i=>(i.push(n),i))}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Fe.control(o));return}if(t.type==="Size"){let i=o.replace(/[0-9]/g,""),l=o.replace(/[^0-9]/g,"");n.addControl(t.name,Fe.group({size:Fe.control(l?parseInt(l):50),unit:Fe.control(i?i.toUpperCase():"MB")}));return}if(t.type==="Integer"){n.addControl(t.name,Fe.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Fe.control(o==="true"));return}if(t.type==="Flags"){n.addControl(t.name,Fe.control(o??""));return}if(t.type==="Timespan"){n.addControl(t.name,Fe.control(o,[Ee.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=ve.find(E=>E.customKey===n||E.key===n),l=i?.key,_=this.destinationOptions().find(E=>E.Key===l),h=this.httpOptions();if(!_||!_.Options)return;let P=i&&i.oauthField?i.oauthField:null,A=i&&i.customFields?i.customFields:{},R=i&&i.dynamicFields?i.dynamicFields:[],z=i&&i.advancedFields?i.advancedFields:[],Z=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:P,custom:[],dynamic:[],advanced:[]});let K=Fe.group({}),J=Fe.group({}),te=Fe.group({});A&&Object.entries(A).forEach(([E,y],X)=>{let ge=y,{formElement:w}=ge,ie=wt(ge,["formElement"]);K.addControl(E,w(t?.custom[E])),this.destinationFormPair.update(de=>(de.custom.push(N({order:900+X},ie)),de))});for(let E=0;E<_.Options.length;E++){let y=_.Options[E];if(y.Deprecated)continue;let X=R.find(w=>w===y.Name||w.name===y.Name);if(X){let w=X&&typeof X!="string",ie=w?X?.defaultValue??y.DefaultValue:y.DefaultValue,ge={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,order:900+E},de=w?N(N({},ge),X):ge,at=t?.dynamic[y.Name]??ie??y.DefaultValue;this.createFormField(J,de,at),this.destinationFormPair.update(je=>(je.dynamic.push(de),je))}else{if(Z.find(Ce=>Ce===y.Name))continue;let ie=z.find(Ce=>Ce===y.Name||Ce.name===y.Name),ge=ie&&typeof ie!="string",de=t?.advanced[y.Name],L=de??y.DefaultValue,at={name:y.Name,type:y.Type,shortDescription:y.ShortDescription??void 0,longDescription:y.LongDescription??void 0,options:y.ValidValues,defaultValue:L,order:900+E},je=ge?N(N({},at),ie):at;o&&de&&(this.createFormField(te,je,L),this.selectedAdvancedFormPair.update(Ce=>(Ce.push(je),Ce))),this.destinationFormPair.update(Ce=>(Ce.advanced.push(je),Ce))}}for(let E=0;E<h.length;E++){let y=h[E],X=t?.advanced[y.name],w=X??y.defaultValue;o&&X&&(this.createFormField(te,y,w),this.selectedHttpOptions.update(ie=>(ie.push(y),ie)))}this.destinationFormPair.update(E=>({oauthField:E.oauthField,custom:E.custom.sort((y,X)=>y.order-X.order),dynamic:E.dynamic.sort((y,X)=>y.order-X.order),advanced:E.advanced.sort((y,X)=>y.order-X.order)})),this.destinationForm.controls.destinations.push(rn({key:i?.customKey??n,customGroup:K,dynamicGroup:J,advancedGroup:te}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Re({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oo=["formRef"],ko=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),Et=e=>({$implicit:e}),$o=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),xo=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),Io=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),vo=()=>({maxWidth:"700px",width:"100%"});function Mo(e,n){e&1&&(g(0,2,2),u(1,"spk-icon"),C())}function wo(e,n){e&1&&M(0,2,3)}function Ro(e,n){if(e&1){let t=k();g(0,2,1),a(1,"button",18),f("click",function(){S(t);let i=p();return T(i.testDestination())}),d(2,Mo,2,0)(3,wo,1,0),r(),C()}if(e&2){let t=p();s(),xe("success",t.successfulTest()),s(),F(t.successfulTest()?2:3)}}function bo(e,n){if(e&1){let t=k();a(0,"p",24),f("click",function(){S(t);let i=p();return T(i.removeDestinationFormGroup(i.destinationCount()-1))}),g(1,5),u(2,"span",25),C(),r()}}function Go(e,n){if(e&1){let t=k();a(0,"div",30),f("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addDestinationFormGroup(i.key))}),a(1,"h3"),m(2),r(),a(3,"p"),m(4),r()()}if(e&2){let t=n.$implicit;s(2),U(t.displayName),s(2),U(t.description)}}function Vo(e,n){if(e&1){let t=k();a(0,"button",31),f("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addDestinationFormGroup(i.key))}),m(1),r()}if(e&2){let t=n.$implicit;s(),V(" ",t.displayName," ")}}function Lo(e,n){if(e&1&&(a(0,"div",26),I(1,Go,5,2,"div",27,x),r(),a(3,"spk-menu")(4,"button",28),M(5,6),r(),q(6,17),I(7,Vo,2,1,"button",29,x),Q(),r()),e&2){let t=p();s(),v(t.destinationTypeOptionsFocused()),s(6),v(t.destinationTypeOptionsNotFocused())}}function Uo(e,n){e&1&&ze(0)}function Bo(e,n){if(e&1&&d(0,Uo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,ko,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Ko(e,n){e&1&&ze(0)}function zo(e,n){if(e&1&&d(0,Ko,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,$o,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Xo(e,n){if(e&1){let t=k();g(0,7,1),a(1,"button",31),f("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addAdvancedFormPair(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function Ho(e,n){e&1&&ze(0)}function jo(e,n){if(e&1&&d(0,Ho,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,xo,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Wo(e,n){if(e&1){let t=k();g(0,8,1),a(1,"button",31),f("click",function(){let i=S(t).$implicit,l=p(2);return T(l.addHttpOption(i,0))}),r(),C()}if(e&2){let t=n.$implicit;s(),nt(t.name),ot(0)}}function qo(e,n){e&1&&ze(0)}function Qo(e,n){if(e&1&&d(0,qo,1,0,"ng-container",36),e&2){let t,o=n.$implicit,i=n.$index;p();let l=he(29),_=p();c("ngTemplateOutlet",l)("ngTemplateOutletContext",Xe(7,Et,it(2,Io,i,o,(t=_.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,_.destinationFormPair().oauthField)))}}function Yo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Zo(e,n){if(e&1&&(a(0,"app-file-tree",39)(1,"label",46),m(2),d(3,Yo,3,1,"spk-tooltip",47),r(),u(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function Jo(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ei(e,n){if(e&1&&(a(0,"app-file-tree",40)(1,"label",46),m(2),d(3,Jo,3,1,"spk-tooltip",47),r(),u(4,"input",48),r()),e&2){let t,o=p().$implicit,i=p(2);c("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function ti(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ni(e,n){e&1&&(a(0,"spk-icon",50),m(1,"link"),r())}function oi(e,n){e&1&&(a(0,"spk-icon",50),m(1,"envelope"),r())}function ii(e,n){e&1&&(a(0,"spk-icon",50),m(1,"textbox"),r())}function ri(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,ti,3,1,"spk-tooltip",47),r(),u(4,"input",49),d(5,ni,2,0,"spk-icon",50)(6,oi,2,0,"spk-icon",50)(7,ii,2,0,"spk-icon",50),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name),c("type",o.formView.type==="Email"?"email":"text"),s(),F(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function ai(e,n){if(e&1){let t=k();a(0,"span",54),f("click",function(){S(t);let i=p(2).$implicit,l=p(2);return T(l.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),r()}}function si(e,n){e&1&&(a(0,"spk-icon",50),m(1,"password"),r())}function li(e,n){if(e&1){let t=k();a(0,"spk-icon",55),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),r()}}function pi(e,n){if(e&1){let t=k();a(0,"spk-icon",55),f("click",function(){S(t);let i=p(2).$implicit;return T(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),r()}}function ci(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),r(),u(3,"input",51),d(4,ai,2,0,"span",52)(5,si,2,0,"spk-icon",50)(6,li,2,0,"spk-icon",53)(7,pi,2,0,"spk-icon",53),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name),c("type",o.formView.showPassword?"text":"password"),s(),F(o.oauthField===o.formView.name?4:5),s(2),F(o.formView.showPassword?6:7)}}function mi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ui(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Nt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function _i(e,n){if(e&1&&I(0,ui,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function di(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function Fi(e,n){if(e&1&&I(0,di,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function gi(e,n){if(e&1&&(a(0,"spk-select",41)(1,"label",46),m(2),d(3,mi,3,1,"spk-tooltip",47),r(),u(4,"input",48),d(5,_i,2,0)(6,Fi,2,0),r()),e&2){let t,o=p().$implicit;c("hideClearButton",!0),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Ci(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function fi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t.value),s(),Nt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function Si(e,n){if(e&1&&I(0,fi,2,3,"spk-option",56,x),e&2){let t=p(2).$implicit,o=p(2);v(t.formView.loadOptions(o.injector)())}}function Ti(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function hi(e,n){if(e&1&&I(0,Ti,2,2,"spk-option",56,x),e&2){let t=p(2).$implicit;v(t.formView.options)}}function Di(e,n){if(e&1&&(a(0,"spk-select",42)(1,"label",46),m(2),d(3,Ci,3,1,"spk-tooltip",47),r(),u(4,"input",57),d(5,Si,2,0)(6,hi,2,0),r()),e&2){let t,o=p().$implicit;c("isFreeText",!0),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name),s(),F(o.formView.loadOptions?5:-1),s(),F(o.formView.options?6:-1)}}function Ei(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function yi(e,n){if(e&1&&(a(0,"spk-option",56),m(1),r()),e&2){let t=n.$implicit;c("value",t),s(),U(t)}}function Pi(e,n){if(e&1&&(a(0,"div",43)(1,"label",46),m(2),d(3,Ei,3,1,"spk-tooltip",47),r(),a(4,"div",58)(5,"spk-form-field"),u(6,"input",59),a(7,"spk-icon",50),m(8,"resize"),r()(),a(9,"spk-select"),u(10,"label")(11,"input",60),I(12,yi,2,2,"spk-option",56,x),r()()()),e&2){let t,o=p().$implicit,i=p(2);c("formGroupName",o.formView.name),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(3),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(6),v(i.sizeOptions())}}function Ni(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ai(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,Ni,3,1,"spk-tooltip",47),r(),u(4,"input",61),a(5,"spk-icon",50),m(6,"numpad"),r()()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function Oi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function ki(e,n){if(e&1&&(a(0,"spk-toggle",44)(1,"label",46),m(2),d(3,Oi,3,1,"spk-tooltip",47),r(),u(4,"input",62),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function $i(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function xi(e,n){e&1&&(a(0,"spk-option",64),m(1,"None"),r()),e&2&&c("value","None")}function Ii(e,n){if(e&1&&(a(0,"spk-option",56),m(1),u(2,"spk-checkbox",65),r()),e&2){let t=p().$implicit;c("value",t),s(),V(" ",t," ")}}function vi(e,n){if(e&1&&d(0,xi,2,1,"spk-option",64)(1,Ii,3,2,"spk-option",56),e&2){let t=n.$implicit;F(t==="None"?0:1)}}function Mi(e,n){if(e&1&&(a(0,"spk-select",45)(1,"label",46),m(2),d(3,$i,3,1,"spk-tooltip",47),r(),u(4,"input",63),I(5,vi,2,1,null,null,x),r()),e&2){let t,o=p().$implicit;c("selectMultiple",!0),s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),W("formControlName",o.formView.name),s(),v(o.formView.options)}}function wi(e,n){if(e&1&&(a(0,"spk-tooltip",47)(1,"spk-icon"),m(2,"question"),r()()),e&2){let t=p(2).$implicit;c("message",t.formView.longDescription)}}function Ri(e,n){if(e&1&&(a(0,"spk-form-field")(1,"label",46),m(2),d(3,wi,3,1,"spk-tooltip",47),r(),u(4,"input",48),r()),e&2){let t,o=p().$implicit;s(),H("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),s(),V(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),s(),F(o.formView.longDescription?3:-1),s(),H("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),W("formControlName",o.formView.name)}}function bi(e,n){if(e&1){let t=k();a(0,"button",66),f("click",function(){S(t);let i=p().$implicit,l=p(2);return T(l.removeFormView(i.formView,0))}),a(1,"spk-icon"),m(2,"x-circle"),r()()}}function Gi(e,n){if(e&1&&(a(0,"div",37),q(1,38),d(2,Zo,5,16,"app-file-tree",39)(3,ei,5,12,"app-file-tree",40)(4,ri,8,13,"spk-form-field")(5,ci,8,13,"spk-form-field")(6,gi,7,14,"spk-select",41)(7,Di,7,14,"spk-select",42)(8,Pi,14,11,"div",43)(9,Ai,7,11,"spk-form-field")(10,ki,5,11,"spk-toggle",44)(11,Mi,7,8,"spk-select",45)(12,Ri,5,11,"spk-form-field"),Q(),d(13,bi,3,0,"button",28),r()),e&2){let t=n.$implicit;xe("single-field",t.formGroupName!=="advanced"),s(),c("formGroupName",t.formGroupName),s(),F(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"?12:-1),s(11),F(t.formGroupName==="advanced"?13:-1)}}function Vi(e,n){if(e&1&&(q(0,19)(1,32),I(2,Bo,1,9,"ng-container",null,x),I(4,zo,1,9,"ng-container",null,x),a(6,"app-toggle-card",33),q(7,34),g(8,7),a(9,"spk-menu")(10,"button",35),u(11,"spk-icon"),r(),q(12,17),I(13,Xo,2,1,"button",29,x),Q(),r(),C(),Q(),I(15,jo,1,9,"ng-container",null,x),r(),a(17,"app-toggle-card",33),q(18,34),g(19,8),a(20,"spk-menu")(21,"button",35),u(22,"spk-icon"),r(),q(23,17),I(24,Wo,2,1,"button",29,x),Q(),r(),C(),Q(),I(26,Qo,1,9,"ng-container",null,x),r(),d(28,Gi,14,5,"ng-template",null,1,lt),Q()()),e&2){let t=p();s(2),v(t.destinationFormPair().custom),s(2),v(t.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedAdvancedFormPair().length===0),s(3),v(t.notSelectedAdvancedFormPair()),s(2),v(t.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",t.notSelectedHttpOptions().length===0),s(3),v(t.notSelectedHttpOptions()),s(2),v(t.selectedHttpOptions())}}function Li(e,n){if(e&1){let t=k();a(0,"spk-dialog",67),Vt("isOpenChange",function(i){S(t);let l=p();return Gt(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),T(i)}),a(1,"header",68)(2,"h2"),M(3,9),r(),a(4,"spk-alert",69),M(5,10),r()(),a(6,"div",70)(7,"spk-form-field"),u(8,"textarea",71),r()(),a(9,"footer",72)(10,"button",21),f("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),r(),a(12,"button",73),f("click",function(){S(t);let i=p();return T(i.closeTargetUrlDialog(!0))}),g(13,11),u(14,"spk-icon"),C(),r()()()}if(e&2){let t=p();bt("isOpen",t.targetUrlDialogOpen),c("options",Lt(3,vo)),s(8),c("formControl",t.targetUrlCtrl)}}var Ui=["Bytes","KB","MB","GB","TB","PB"],Dt=new oe,on=(e={destinations:[]})=>Dt.group({destinations:Dt.array(e.destinations)}),rn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>Dt.group({destinationType:Dt.control(e),custom:n,dynamic:t,advanced:o}),Mt=class e{#e=$(re);#t=$(De);#o=$(Bt);#i=$(We);#n=$(_e);#r=$(Ht);injector=$(Rt);formRef=fe.required("formRef");destinationForm=this.#n.destinationForm;destinationFormPair=this.#n.destinationFormPair;selectedAdvancedFormPair=this.#n.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#n.notSelectedAdvancedFormPair;selectedHttpOptions=this.#n.selectedHttpOptions;notSelectedHttpOptions=this.#n.notSelectedHttpOptions;destinationOptions=this.#n.destinationOptions;destinationFormSignal=this.#n.destinationFormSignal;destinationCount=B(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=O(Ui);successfulTest=O(!1);destinationTypeOptionsInFocus=O(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=O(ve.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=B(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=B(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#n.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#n.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#n.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#n.addHttpOption(n,t)}targetUrl=B(()=>this.#n.getCurrentTargetUrl()[0]);targetUrlCtrl=new ut;targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);openTargetUrlDialog(){let t=this.#n.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#n.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#n.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let l=i.error.error.Error;if(l==="missing-folder"&&this.#r.open(He,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`},closed:_=>{_&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe()}}),l.startsWith("incorrect-cert:")){let _=l.split("incorrect-cert:")[1];this.#r.open(He,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${_}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:h=>{h&&this.#n.addHttpOptionByName("accept-specified-ssl-hash",_)}})}if(l.startsWith("incorrect-host-key:")){let _=l.split('incorrect-host-key:"')[1].split('",')[0],h=l.split('accepted-host-key:"')[1].split('",')[0];h?this.#r.open(He,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${h}
|
|
6
|
+
with the REPORTED host key: ${_}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,_)}}):this.#r.open(He,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${_}`,confirmText:"Approve",cancelText:"Cancel"},closed:P=>{P&&this.#n.addAdvancedFormPairByName("ssh-fingerprint",n,_)}})}}})}mapToTargetUrl(n){return St(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=O("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=O(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=O(!1);#p=O(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),l=screen.width/2-t/2,_=screen.height/2-o/2,h=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+l+",top="+_);h?.addEventListener("blur",P=>{console.log("event blur",P)}),h?.addEventListener("beforeunload",P=>{console.log("event beforeunload",P),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(et(()=>this.#a.set(!1))).subscribe({next:A=>{console.log("res",A),A?.authid&&this.#p.set(A.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ne({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Se(o.formRef,Oo,5),t&2&&Te()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=Ie(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let l;l=$localize`Other destinations`;let _;_=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,_=Ie(_);let h;h=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,h=Ie(h);let P;P=$localize`Edit target URL`;let A;A=$localize` Be careful, this will overwrite everything you have in your destination. `;let R;return R=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["fieldTemplate",""],n,t,o,i,l,_,h,P,A,R,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],["spk-button","","type","button",1,"outlined"],["item","","type","button"],[1,"tile",3,"click"],["item","","type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"hideClearButton"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],[3,"value"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let i=k();a(0,"form",12,0),f("submit",function(){return S(i),T(o.next())}),a(2,"header")(3,"h3",13),g(4,2),a(5,"div",14),d(6,Ro,4,3,"button",15),a(7,"spk-menu")(8,"button",16),u(9,"spk-icon"),r(),q(10,17),a(11,"button",18),f("click",function(){return S(i),T(o.openTargetUrlDialog())}),u(12,"spk-icon"),r(),Q(),r()(),C(),r(),d(13,bo,3,0,"p"),r(),d(14,Lo,9,0)(15,Vi,30,4,"ng-container",19),a(16,"div",20)(17,"button",21),f("click",function(){return S(i),T(o.goBack())}),g(18,3),u(19,"spk-icon"),C(),r(),a(20,"button",22),g(21,4),u(22,"spk-icon"),C(),r()()(),d(23,Li,15,4,"spk-dialog",23)}if(t&2){let i;c("formGroup",o.destinationForm),s(6),F(o.destinationCount()>0?6:-1),s(7),F(o.destinationCount()>0?13:-1),s(),F(o.destinationCount()===0?14:-1),s(),F(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),s(8),F(o.targetUrlDialogOpen()?23:-1)}},dependencies:[Oe,Pe,ae,Ge,be,se,ye,_t,Ne,Ae,Ve,zt,ct,pe,me,Ct,gt,ce,le,Ue,qe,Xt,Ft,Be,Qe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{He as a,St as b,ve as c,on as d,rn as e,Mt as f,Qt as g,$t as h,kt as i,Zt as j,Rr as k,xt as l,en as m,It as n,nn as o,vt as p,_e as q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,d as $,e as h,h as G,l as P,o as B,p as v,r as L}from"./chunk-
|
|
1
|
+
import{b,d as $,e as h,h as G,l as P,o as B,p as v,r as L}from"./chunk-OROSSCXB.js";import{b as A}from"./chunk-O2MZ5CAQ.js";import{c as I,d as y}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as w,c as V,g as x,l as X,y as U}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import{Cb as i,Db as r,Eb as _,G as g,O as T,Ob as C,Pb as O,Qb as f,Ra as F,Tb as N,Ub as m,Ya as p,_ as u,eb as R,hc as M,kb as S,rc as k,tb as c,vb as D,yb as E}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var j=()=>["/"];function z(l,e){l&1&&(i(0,"spk-form-field")(1,"label",11),f(2,2),r(),_(3,"input",12),r())}var a=new v,d=class l{#t=u(V);#e=u(A);#o=u(I);isRestoring=p(!1);isSecureFile=p(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=p(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>this.#e.postApiV1Backups({requestBody:e.data,temporary:!0})),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{console.log("/restore-draft",e.ID),this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=N(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(i(0,"header")(1,"h3"),C(2,0),i(3,"div",3)(4,"button",4),_(5,"spk-icon"),r(),i(6,"button",5),m("click",function(){return t.submit()}),_(7,"spk-icon"),r()(),O(),r()(),i(8,"form",6)(9,"spk-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),i(10,"label",8),f(11,1),r(),i(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),r(),i(13,"spk-icon",10),M(14,"upload"),r()(),S(15,z,4,0,"spk-form-field"),r()),o&2&&(F(4),c("routerLink",k(6,j)),F(2),D("loader",t.isRestoring()),c("disabled",t.isRestoring()),F(2),c("formGroup",t.importForm),F(7),E(t.isSecureFile()?15:-1))},dependencies:[L,G,b,$,h,P,B,y,U,X,w,x],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}"],changeDetection:0})};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as R,b as te}from"./chunk-DNHLTHLR.js";import{b as oe}from"./chunk-N3GBABZB.js";import{a as ee}from"./chunk-GE3T3AG3.js";import{a as G,b as L,c as S,d as K,e as U,h as z,l as j,o as V,p as q,r as H}from"./chunk-OROSSCXB.js";import{b as v}from"./chunk-O2MZ5CAQ.js";import{a as b,c as w,d as B}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as Q,f as W,g as J,l as Y,w as Z}from"./chunk-ZTSITRHY.js";import{c as h}from"./chunk-NJSJNACP.js";import"./chunk-BUARZS4A.js";import{Cb as r,Db as n,Eb as a,G as E,Kc as O,O as M,Ob as l,Pb as c,Qb as f,Ra as s,Ub as P,Ya as g,_,eb as I,hc as k,kb as x,kc as y,rc as X,tb as C,vb as T,yb as D}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var ne=()=>["/"];function ie(d,e){d&1&&(r(0,"spk-form-field")(1,"label",17),f(2,6),n(),a(3,"input",18),n(),r(4,"spk-form-field")(5,"label",19),f(6,7),n(),a(7,"input",20),n())}var u=new q,N=class d{#o=_(v);#e=_(b);#t=_(w);#n=_(h);#i=_(ee);isExporting=g(!1);exportType=g("file");exportedCmd=g(null);exportForm=u.group({exportPasswords:u.control(!0),encryption:u.control(!1,[S.required,te()]),password:u.control("",[R(e=>e?.value.encryption,[S.required])]),repeatPassword:u.control("",[R(e=>e?.value.encryption,[S.required])])});exportFormSignal=oe(this.exportForm.valueChanges);encryptionFieldSignal=O(()=>this.exportFormSignal()?.encryption??!1);activeBackup=O(()=>this.#i.backups().find(e=>e.Backup?.ID===this.#e.snapshot.params.id));submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#o.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(M(e=>{let i=t=>{let o=Object.entries(t);return o?"?"+o.map(([F,m])=>`${F}=${m}`).join("&"):""};return this.#n.get(`/api/v1/backup/${this.#e.snapshot.params.id}/export${i({exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0,token:e.Token})}`,{responseType:"blob"})}),E(()=>this.isExporting.set(!1))).subscribe({next:e=>{let t=this.activeBackup()?.Backup?.Name??"Backup",o=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(e,`${t}.${o}`),this.#t.navigate(["/"])},error:e=>{console.log("err",e)}}):this.#o.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(E(()=>this.isExporting.set(!1))).subscribe({next:e=>{console.log("res",e),this.exportedCmd.set(e.Command??null)},error:e=>{console.log("err",e)}})}downloadFile(e,i){let t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=i,o.click(),window.URL.revokeObjectURL(t)}static \u0275fac=function(i){return new(i||d)};static \u0275cmp=I({type:d,selectors:[["app-export"]],decls:27,vars:12,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let i;i=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: As command line `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: To file `;let F;F=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let m;m=$localize` Encrypt file ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let A;A=$localize`Password`;let $;return $=$localize`Repeat password`,[e,i,t,o,F,m,A,$,[1,"actions"],["spk-button","",1,"outlined",3,"routerLink"],["spk-button","",1,"raised","primary",3,"click"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],["type","checkbox","formControlName","encryption"],["for","password"],["type","password","id","password","formControlName","password"],["for","repeatPassword"],["type","password","id","repeatPassword","formControlName","repeatPassword"]]},template:function(i,t){if(i&1&&(r(0,"header")(1,"h3"),k(2," Export backup configuration "),r(3,"div",8)(4,"button",9),l(5,0),a(6,"spk-icon"),c(),n(),r(7,"button",10),P("click",function(){return t.submit()}),l(8,1),a(9,"spk-icon"),c(),n()()(),r(10,"p"),k(11),n()(),r(12,"form",11)(13,"spk-button-group")(14,"button",12),P("click",function(){return t.exportType.set("cmd")}),l(15,2),a(16,"spk-icon"),c(),n(),r(17,"button",12),P("click",function(){return t.exportType.set("file")}),l(18,3),a(19,"spk-icon"),c(),n()(),r(20,"spk-toggle",13),l(21,4),a(22,"input",14),c(),n(),r(23,"spk-toggle",15),l(24,5),a(25,"input",16),c(),n(),x(26,ie,8,0),n()),i&2){let o;s(4),C("routerLink",X(11,ne)),s(3),T("loading",t.isExporting()),s(4),y("#",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.ID,": ",(o=t.activeBackup())==null||o.Backup==null?null:o.Backup.Name,""),s(),C("formGroup",t.exportForm),s(2),T("active",t.exportType()==="cmd"),s(3),T("active",t.exportType()==="file"),s(9),D(t.encryptionFieldSignal()?26:-1)}},dependencies:[H,z,L,G,K,U,j,V,B,W,Z,Q,Y,J],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}"],changeDetection:0})};export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ke}from"./chunk-6FMUWDFQ.js";import{a as Te}from"./chunk-CPSIM3A5.js";import"./chunk-DGRMASPQ.js";import{b as Se}from"./chunk-S4KMY7LU.js";import{d as R}from"./chunk-7NOLIW3Y.js";import"./chunk-7EROSQ6G.js";import{a as H,g as b,h as Me,j as Ee,k as ge,n as Fe,o as Ce}from"./chunk-BNW7MJ4U.js";import"./chunk-HYRUU7RC.js";import"./chunk-KBOYFSOY.js";import"./chunk-NW7VZHBJ.js";import"./chunk-VPWPYB3Z.js";import{Ab as re,Bb as o,Cb as i,Db as r,Eb as F,Fb as C,Hb as pe,Nb as s,Ob as u,Pb as p,Qa as c,Qb as se,Rb as ue,Tb as P,Ub as d,Z as I,db as ie,ea as k,fa as O,gc as S,ic as N,jb as g,pb as _e,qb as ae,qc as D,rc as T,sb as E,ub as A,uc as $,vc as f,wc as de,xb as m,yb as le,zb as ce}from"./chunk-CFESGUGK.js";import"./chunk-C6Q5SG76.js";var Oe=()=>[R,b,H,Ee,ge,Fe,import("./chunk-3YZ3SEGY.js").then(e=>e.DatePipe),import("./chunk-PQEMNH5E.js").then(e=>e.DurationFormatPipe),import("./chunk-E2E7PU5Q.js").then(e=>e.BytesPipe)],me=()=>["/add-backup"],Pe=()=>["/restore"],Ne=e=>["/backup",e],$e=e=>["/restore",e],fe=e=>["/backup",e,"export"],Ie=e=>["/backup",e,"database"],Ae=e=>["/backup",e,"commandline"],De=e=>["/backup",e,"log"];function Re(e,_){if(e&1&&(S(0," - "),F(1),p(2,21),C(),S(3),$(4,"durationFormat")),e&2){let t=d().$implicit;c(3),N(" ",f(4,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDuration)," ")}}function He(e,_){e&1&&(F(0),p(1,22),C())}function be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.SourceFilesSize)," ")}}function xe(e,_){e&1&&(F(0),p(1,23),C())}function Be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.TargetFilesSize)," ")}}function Le(e,_){e&1&&(F(0),p(1,24),C())}function ye(e,_){if(e&1&&(o(0,"spk-chip",37),p(1,25),i()),e&2){let t=d().$implicit;c(),se(t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.BackupListCount),ue(1)}}function Ge(e,_){e&1&&(o(0,"spk-chip",38),p(1,26),i())}function he(e,_){if(e&1){let t=pe();o(0,"div",36)(1,"div",31)(2,"h3"),S(3),o(4,"spk-icon"),S(5,"database"),i()(),o(6,"p")(7,"span"),p(8,8),i(),S(9),$(10,"date"),g(11,Re,5,3)(12,He,2,0,"ng-container"),i(),o(13,"p")(14,"span"),p(15,9),i(),g(16,be,2,3)(17,xe,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,10),i(),g(21,Be,2,3)(22,Le,2,0,"ng-container"),i()(),g(23,ye,2,1,"spk-chip",37)(24,Ge,2,0,"spk-chip",38),o(25,"div",39)(26,"button",40),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.startBackup(l.Backup==null?null:l.Backup.ID))}),s(27,11),r(28,"spk-icon"),u(),i(),o(29,"button",41)(30,"spk-icon"),S(31,"pencil-simple"),i()(),o(32,"spk-menu",42)(33,"button",32)(34,"spk-icon"),S(35,"dots-three-vertical"),i()(),F(36,43),o(37,"h3",44),S(38,"Operations"),i(),o(39,"button",45,0),s(41,12),r(42,"spk-icon"),u(),i(),o(43,"button",45,0),s(45,13),r(46,"spk-icon"),u(),i(),o(47,"button",46,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.deleteBackup(l.Backup==null?null:l.Backup.ID))}),s(49,14),r(50,"spk-icon"),u(),i(),r(51,"spk-divider"),o(52,"h3",44),S(53,"Advanced"),i(),o(54,"button",45,0),s(56,15),r(57,"spk-icon"),u(),i(),o(58,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(60,16),r(61,"spk-icon"),u(),i(),o(62,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(64,17),r(65,"spk-icon"),u(),i(),o(66,"button",45,0),s(68,18),r(69,"spk-icon"),u(),i(),r(70,"spk-divider"),o(71,"h3",44),S(72,"Reporting"),i(),o(73,"button",45,0),s(75,19),r(76,"spk-icon"),u(),i(),o(77,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(79,20),r(80,"spk-icon"),u(),i(),C(),i()()()}if(e&2){let t,n=_.$implicit,l=d(3);c(3),N(" ",(t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:l.MISSING_BACKUP_NAME," "),c(6),N(" ",de(10,17,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,"short")," "),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.LastBackupDuration?11:12),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.SourceFilesSize?16:17),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.TargetFilesSize?21:22),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.BackupListCount?23:24),c(3),A("loader",l.startingBackup()),c(3),E("routerLink",T(20,Ne,n.Backup==null?null:n.Backup.ID)),c(3),E("right",!0),c(7),E("routerLink",T(22,$e,n.Backup==null?null:n.Backup.ID)),c(4),E("routerLink",T(24,fe,n.Backup==null?null:n.Backup.ID)),c(4),A("loader",l.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(26,Ie,n.Backup==null?null:n.Backup.ID)),c(12),E("routerLink",T(28,Ae,n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(30,De,n.Backup==null?null:n.Backup.ID))}}function ve(e,_){if(e&1&&ce(0,he,81,32,"div",36,le),e&2){let t=d(2);re(t.backups())}}function Xe(e,_){e&1&&(F(0),p(1,27),C())}function we(e,_){if(e&1&&g(0,ve,2,0)(1,Xe,2,0,"ng-container"),e&2){let t=d();m(t.backups().length?0:1)}}function ze(e,_){e&1&&(o(0,"div",48),r(1,"spk-progress-bar",49),o(2,"div",31)(3,"h3"),p(4,28),i()()())}var x=class e{#e=I(Te);#n=I(Se);MISSING_BACKUP_NAME=$localize`Backup name missing`;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;ngOnInit(){this.#e.getBackups(!0)}startBackup(_){this.#e.startBackup(_)}deleteBackup(_){window.confirm("Are you sure you want to delete this backup?")&&this.#e.deleteBackup(_)}verifyFiles(_){this.#n.postApiV1BackupByIdVerify({id:_}).subscribe()}compressBackup(_){this.#n.postApiV1BackupByIdCompact({id:_}).subscribe()}createErrorReport(_){this.#n.postApiV1BackupByIdCreatereport({id:_}).subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ie({type:e,selectors:[["app-home"]],decls:31,vars:5,consts:()=>{let _;_=$localize`Backups`;let t;t=$localize`Backups are stored in the cloud and can be restored at any time.`;let n;n=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let M;M=$localize`Restores allow you to restore your data from the cloud.`;let B;B=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;L=$localize`My backups`;let y;y=$localize`Last successful backup:`;let G;G=$localize`Source:`;let h;h=$localize`Destination:`;let v;v=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Start `;let X;X=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let w;w=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let z;z=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let K;K=$localize`${"\uFFFD#57\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let V;V=$localize`${"\uFFFD#61\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#61\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let j;j=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#65\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let q;q=$localize`${"\uFFFD#69\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#69\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let U;U=$localize`${"\uFFFD#76\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#76\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let W;W=$localize`${"\uFFFD#80\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#80\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `;let J;J=$localize`took`;let Q;Q=$localize`N/A`;let Y;Y=$localize`N/A`;let Z;Z=$localize`N/A`;let ee;ee=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: Version `;let ne;ne=$localize`No version yet`;let te;te=$localize`No backups founds`;let oe;return oe=$localize`Loading backups...`,[["option",""],_,t,n,l,M,B,L,y,G,h,v,X,w,z,K,V,j,q,U,W,J,Q,Y,Z,ee,ne,te,oe,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["menu",""],["title",""],["type","button",3,"routerLink"],[3,"click"],["type","button",3,"click"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(r(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",29),r(4,"img",30),o(5,"div",31)(6,"h3"),p(7,1),i(),o(8,"p"),p(9,2),i()(),o(10,"button",32),s(11,3),r(12,"spk-icon"),u(),i()(),o(13,"spk-card",29),r(14,"img",33),o(15,"div",31)(16,"h3"),p(17,4),i(),o(18,"p"),p(19,5),i()(),o(20,"button",32),s(21,6),r(22,"spk-icon"),u(),i()()(),o(23,"div",34)(24,"h2"),p(25,7),i(),o(26,"div",35),g(27,we,2,1)(28,ze,5,0),_e(29,27,Oe,null,28),i()()()),t&2&&(c(3),E("routerLink",D(3,me)),c(10),E("routerLink",D(4,Pe)),c(16),ae(!n.backupsLoading()))},dependencies:[R,ke,Me,b,H,Ce],styles:["[_nghost-%COMP%]{display:block}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}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.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%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{x as default};
|
|
1
|
+
import{a as ke}from"./chunk-ZUGIRXAF.js";import{a as Te}from"./chunk-GE3T3AG3.js";import"./chunk-OROSSCXB.js";import{b as Se}from"./chunk-O2MZ5CAQ.js";import{d as R}from"./chunk-J76HBC5J.js";import"./chunk-MSK2MH2K.js";import{a as H,g as b,h as Me,j as Ee,k as ge,n as Fe,o as Ce}from"./chunk-ZTSITRHY.js";import"./chunk-NJSJNACP.js";import"./chunk-BSZZLSIX.js";import"./chunk-BUARZS4A.js";import"./chunk-O53NVQ2A.js";import{Ab as ce,Bb as re,Cb as o,Db as i,Eb as r,Fb as F,Gb as C,Ib as pe,Ob as s,Pb as u,Qb as p,Ra as c,Rb as se,Sb as ue,Ub as P,Vb as d,_ as I,eb as ie,fa as k,ga as O,hc as S,jc as N,kb as g,qb as _e,rb as ae,rc as D,sc as T,tb as E,vb as A,vc as $,wc as f,xc as de,yb as m,zb as le}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";var Oe=()=>[R,b,H,Ee,ge,Fe,import("./chunk-LREVYYY4.js").then(e=>e.DatePipe),import("./chunk-G2NEYTH2.js").then(e=>e.DurationFormatPipe),import("./chunk-34MR2IQN.js").then(e=>e.BytesPipe)],me=()=>["/add-backup"],Pe=()=>["/restore"],Ne=e=>["/backup",e],$e=e=>["/restore",e],fe=e=>["/backup",e,"export"],Ie=e=>["/backup",e,"database"],Ae=e=>["/backup",e,"commandline"],De=e=>["/backup",e,"log"];function Re(e,_){if(e&1&&(S(0," - "),F(1),p(2,21),C(),S(3),$(4,"durationFormat")),e&2){let t=d().$implicit;c(3),N(" ",f(4,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.LastBackupDuration)," ")}}function He(e,_){e&1&&(F(0),p(1,22),C())}function be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.SourceFilesSize)," ")}}function xe(e,_){e&1&&(F(0),p(1,23),C())}function Be(e,_){if(e&1&&(S(0),$(1,"bytes")),e&2){let t=d().$implicit;N(" ",f(1,1,t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.TargetFilesSize)," ")}}function Le(e,_){e&1&&(F(0),p(1,24),C())}function ye(e,_){if(e&1&&(o(0,"spk-chip",37),p(1,25),i()),e&2){let t=d().$implicit;c(),se(t.Backup==null||t.Backup.Metadata==null?null:t.Backup.Metadata.BackupListCount),ue(1)}}function Ge(e,_){e&1&&(o(0,"spk-chip",38),p(1,26),i())}function he(e,_){if(e&1){let t=pe();o(0,"div",36)(1,"div",31)(2,"h3"),S(3),o(4,"spk-icon"),S(5,"database"),i()(),o(6,"p")(7,"span"),p(8,8),i(),S(9),$(10,"date"),g(11,Re,5,3)(12,He,2,0,"ng-container"),i(),o(13,"p")(14,"span"),p(15,9),i(),g(16,be,2,3)(17,xe,2,0,"ng-container"),i(),o(18,"p")(19,"span"),p(20,10),i(),g(21,Be,2,3)(22,Le,2,0,"ng-container"),i()(),g(23,ye,2,1,"spk-chip",37)(24,Ge,2,0,"spk-chip",38),o(25,"div",39)(26,"button",40),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.startBackup(l.Backup==null?null:l.Backup.ID))}),s(27,11),r(28,"spk-icon"),u(),i(),o(29,"button",41)(30,"spk-icon"),S(31,"pencil-simple"),i()(),o(32,"spk-menu",42)(33,"button",32)(34,"spk-icon"),S(35,"dots-three-vertical"),i()(),F(36,43),o(37,"h3",44),S(38,"Operations"),i(),o(39,"button",45,0),s(41,12),r(42,"spk-icon"),u(),i(),o(43,"button",45,0),s(45,13),r(46,"spk-icon"),u(),i(),o(47,"button",46,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.deleteBackup(l.Backup==null?null:l.Backup.ID))}),s(49,14),r(50,"spk-icon"),u(),i(),r(51,"spk-divider"),o(52,"h3",44),S(53,"Advanced"),i(),o(54,"button",45,0),s(56,15),r(57,"spk-icon"),u(),i(),o(58,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.verifyFiles(l.Backup==null?null:l.Backup.ID))}),s(60,16),r(61,"spk-icon"),u(),i(),o(62,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.compressBackup(l.Backup==null?null:l.Backup.ID))}),s(64,17),r(65,"spk-icon"),u(),i(),o(66,"button",45,0),s(68,18),r(69,"spk-icon"),u(),i(),r(70,"spk-divider"),o(71,"h3",44),S(72,"Reporting"),i(),o(73,"button",45,0),s(75,19),r(76,"spk-icon"),u(),i(),o(77,"button",47,0),P("click",function(){let l=k(t).$implicit,M=d(3);return O(M.createErrorReport(l.Backup==null?null:l.Backup.ID))}),s(79,20),r(80,"spk-icon"),u(),i(),C(),i()()()}if(e&2){let t,n=_.$implicit,l=d(3);c(3),N(" ",(t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:l.MISSING_BACKUP_NAME," "),c(6),N(" ",de(10,17,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,"short")," "),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.LastBackupDuration?11:12),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.SourceFilesSize?16:17),c(5),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.TargetFilesSize?21:22),c(2),m(!(n.Backup==null||n.Backup.Metadata==null)&&n.Backup.Metadata.BackupListCount?23:24),c(3),A("loader",l.startingBackup()),c(3),E("routerLink",T(20,Ne,n.Backup==null?null:n.Backup.ID)),c(3),E("right",!0),c(7),E("routerLink",T(22,$e,n.Backup==null?null:n.Backup.ID)),c(4),E("routerLink",T(24,fe,n.Backup==null?null:n.Backup.ID)),c(4),A("loader",l.deletingBackup()===(n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(26,Ie,n.Backup==null?null:n.Backup.ID)),c(12),E("routerLink",T(28,Ae,n.Backup==null?null:n.Backup.ID)),c(7),E("routerLink",T(30,De,n.Backup==null?null:n.Backup.ID))}}function ve(e,_){if(e&1&&ce(0,he,81,32,"div",36,le),e&2){let t=d(2);re(t.backups())}}function Xe(e,_){e&1&&(F(0),p(1,27),C())}function we(e,_){if(e&1&&g(0,ve,2,0)(1,Xe,2,0,"ng-container"),e&2){let t=d();m(t.backups().length?0:1)}}function ze(e,_){e&1&&(o(0,"div",48),r(1,"spk-progress-bar",49),o(2,"div",31)(3,"h3"),p(4,28),i()()())}var x=class e{#e=I(Te);#n=I(Se);MISSING_BACKUP_NAME=$localize`Backup name missing`;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;ngOnInit(){this.#e.getBackups(!0)}startBackup(_){this.#e.startBackup(_)}deleteBackup(_){window.confirm("Are you sure you want to delete this backup?")&&this.#e.deleteBackup(_)}verifyFiles(_){this.#n.postApiV1BackupByIdVerify({id:_}).subscribe()}compressBackup(_){this.#n.postApiV1BackupByIdCompact({id:_}).subscribe()}createErrorReport(_){this.#n.postApiV1BackupByIdCreatereport({id:_}).subscribe()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=ie({type:e,selectors:[["app-home"]],decls:31,vars:5,consts:()=>{let _;_=$localize`Backups`;let t;t=$localize`Backups are stored in the cloud and can be restored at any time.`;let n;n=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let l;l=$localize`Restores`;let M;M=$localize`Restores allow you to restore your data from the cloud.`;let B;B=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;L=$localize`My backups`;let y;y=$localize`Last successful backup:`;let G;G=$localize`Source:`;let h;h=$localize`Destination:`;let v;v=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Start `;let X;X=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let w;w=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let z;z=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let K;K=$localize`${"\uFFFD#57\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let V;V=$localize`${"\uFFFD#61\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#61\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let j;j=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#65\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let q;q=$localize`${"\uFFFD#69\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#69\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let U;U=$localize`${"\uFFFD#76\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#76\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `;let W;W=$localize`${"\uFFFD#80\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#80\uFFFD"}:CLOSE_TAG_SPK_ICON: Create error report `;let J;J=$localize`took`;let Q;Q=$localize`N/A`;let Y;Y=$localize`N/A`;let Z;Z=$localize`N/A`;let ee;ee=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: Version `;let ne;ne=$localize`No version yet`;let te;te=$localize`No backups founds`;let oe;return oe=$localize`Loading backups...`,[["option",""],_,t,n,l,M,B,L,y,G,h,v,X,w,z,K,V,j,q,U,W,J,Q,Y,Z,ee,ne,te,oe,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["menu",""],["title",""],["type","button",3,"routerLink"],[3,"click"],["type","button",3,"click"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(r(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",29),r(4,"img",30),o(5,"div",31)(6,"h3"),p(7,1),i(),o(8,"p"),p(9,2),i()(),o(10,"button",32),s(11,3),r(12,"spk-icon"),u(),i()(),o(13,"spk-card",29),r(14,"img",33),o(15,"div",31)(16,"h3"),p(17,4),i(),o(18,"p"),p(19,5),i()(),o(20,"button",32),s(21,6),r(22,"spk-icon"),u(),i()()(),o(23,"div",34)(24,"h2"),p(25,7),i(),o(26,"div",35),g(27,we,2,1)(28,ze,5,0),_e(29,27,Oe,null,28),i()()()),t&2&&(c(3),E("routerLink",D(3,me)),c(10),E("routerLink",D(4,Pe)),c(16),ae(!n.backupsLoading()))},dependencies:[R,ke,Me,b,H,Ce],styles:["[_nghost-%COMP%]{display:block}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}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.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%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as aa,A as B,Aa as Ba,B as C,Ba as Ca,C as D,Ca as Da,D as E,Da as Ea,E as F,Ea as Fa,F as G,Fa as Ga,G as H,Ga as Ha,H as I,Ha as Ia,I as J,Ia as Ja,J as K,Ja as Ka,K as L,Ka as La,L as M,La as Ma,M as N,Ma as Na,N as O,Na as Oa,O as P,Oa as Pa,P as Q,Q as R,R as S,S as T,T as U,U as V,V as W,W as X,X as Y,Y as Z,Z as _,_ as $,a as b,aa as ba,b as c,ba as ca,c as d,ca as da,d as e,da as ea,e as f,ea as fa,f as g,fa as ga,g as h,ga as ha,h as i,ha as ia,i as j,ia as ja,j as k,ja as ka,k as l,ka as la,l as m,la as ma,m as n,ma as na,n as o,na as oa,o as p,oa as pa,p as q,pa as qa,q as r,qa as ra,r as s,ra as sa,s as t,sa as ta,t as u,ta as ua,u as v,ua as va,v as w,va as wa,w as x,wa as xa,x as y,xa as ya,y as z,ya as za,z as A,za as Aa}from"./chunk-
|
|
1
|
+
import{$ as aa,A as B,Aa as Ba,B as C,Ba as Ca,C as D,Ca as Da,D as E,Da as Ea,E as F,Ea as Fa,F as G,Fa as Ga,G as H,Ga as Ha,H as I,Ha as Ia,I as J,Ia as Ja,J as K,Ja as Ka,K as L,Ka as La,L as M,La as Ma,M as N,Ma as Na,N as O,Na as Oa,O as P,Oa as Pa,P as Q,Q as R,R as S,S as T,T as U,U as V,V as W,W as X,X as Y,Y as Z,Z as _,_ as $,a as b,aa as ba,b as c,ba as ca,c as d,ca as da,d as e,da as ea,e as f,ea as fa,f as g,fa as ga,g as h,ga as ha,h as i,ha as ia,i as j,ia as ja,j as k,ja as ka,k as l,ka as la,l as m,la as ma,m as n,ma as na,n as o,na as oa,o as p,oa as pa,p as q,pa as qa,q as r,qa as ra,r as s,ra as sa,s as t,sa as ta,t as u,ta as ua,u as v,ua as va,v as w,va as wa,w as x,wa as xa,x as y,xa as ya,y as z,ya as za,z as A,za as Aa}from"./chunk-BUARZS4A.js";import{Aa as a}from"./chunk-VGQ6X3AL.js";import"./chunk-C6Q5SG76.js";export{l as APP_BASE_HREF,ka as AsyncPipe,i as BrowserPlatformLocation,za as CommonModule,xa as CurrencyPipe,pa as DATE_PIPE_DEFAULT_OPTIONS,oa as DATE_PIPE_DEFAULT_TIMEZONE,f as DOCUMENT,qa as DatePipe,va as DecimalPipe,r as FormStyle,t as FormatWidth,n as HashLocationStrategy,ra as I18nPluralPipe,sa as I18nSelectPipe,a as IMAGE_CONFIG,Ia as IMAGE_LOADER,ta as JsonPipe,ua as KeyValuePipe,h as LOCATION_INITIALIZED,o as Location,k as LocationStrategy,la as LowerCasePipe,Z as NgClass,_ as NgComponentOutlet,aa as NgFor,aa as NgForOf,$ as NgForOfContext,ba as NgIf,ca as NgIfContext,W as NgLocaleLocalization,V as NgLocalization,Pa as NgOptimizedImage,ga as NgPlural,ha as NgPluralCase,ia as NgStyle,da as NgSwitch,ea as NgSwitchCase,fa as NgSwitchDefault,ja as NgTemplateOutlet,p as NumberFormatStyle,u as NumberSymbol,Oa as PRECONNECT_CHECK_BLOCKLIST,m as PathLocationStrategy,wa as PercentPipe,g as PlatformLocation,q as Plural,ya as SlicePipe,ma as TitleCasePipe,s as TranslationWidth,na as UpperCasePipe,Ea as VERSION,Fa as ViewportScroller,v as WeekDay,Ha as XhrFactory,S as formatCurrency,R as formatDate,U as formatNumber,T as formatPercent,P as getCurrencySymbol,K as getLocaleCurrencyCode,J as getLocaleCurrencyName,I as getLocaleCurrencySymbol,D as getLocaleDateFormat,F as getLocaleDateTimeFormat,y as getLocaleDayNames,x as getLocaleDayPeriods,O as getLocaleDirection,A as getLocaleEraNames,M as getLocaleExtraDayPeriodRules,N as getLocaleExtraDayPeriods,B as getLocaleFirstDayOfWeek,w as getLocaleId,z as getLocaleMonthNames,H as getLocaleNumberFormat,G as getLocaleNumberSymbol,L as getLocalePluralCase,E as getLocaleTimeFormat,C as getLocaleWeekEndRange,Q as getNumberOfCurrencyDigits,Ca as isPlatformBrowser,Da as isPlatformServer,Ja as provideCloudflareLoader,Ka as provideCloudinaryLoader,La as provideImageKitLoader,Ma as provideImgixLoader,Na as provideNetlifyLoader,X as registerLocaleData,d as \u0275DomAdapter,Ga as \u0275NullViewportScroller,Aa as \u0275PLATFORM_BROWSER_ID,Ba as \u0275PLATFORM_SERVER_ID,e as \u0275PlatformNavigation,b as \u0275getDOM,j as \u0275normalizeQueryParams,Y as \u0275parseCookieValue,c as \u0275setRootDomAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{W as A}from"./chunk-
|
|
1
|
+
import{W as A}from"./chunk-BUARZS4A.js";var p=":",v="|",S="@@",z="\u241F",L;function N(t){L??=new TextEncoder;let e=L.encode(t),n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=U(n,e.length,0),o=U(n,e.length,102072);return i==0&&(o==0||o==1)&&(i=i^319790063,o=o^-1801410264),BigInt.asUintN(32,BigInt(i))<<BigInt(32)|BigInt.asUintN(32,BigInt(o))}function k(t,e=""){let n=N(t);return e&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=N(e)),BigInt.asUintN(63,n).toString()}function U(t,e,n){let i=2654435769,o=2654435769,r=0,f=e-12;for(;r<=f;r+=12){i+=t.getUint32(r,!0),o+=t.getUint32(r+4,!0),n+=t.getUint32(r+8,!0);let s=E(i,o,n);i=s[0],o=s[1],n=s[2]}let a=e-r;return n+=e,a>=4?(i+=t.getUint32(r,!0),r+=4,a>=8?(o+=t.getUint32(r,!0),r+=4,a>=9&&(n+=t.getUint8(r++)<<8),a>=10&&(n+=t.getUint8(r++)<<16),a===11&&(n+=t.getUint8(r++)<<24)):(a>=5&&(o+=t.getUint8(r++)),a>=6&&(o+=t.getUint8(r++)<<8),a===7&&(o+=t.getUint8(r++)<<16))):(a>=1&&(i+=t.getUint8(r++)),a>=2&&(i+=t.getUint8(r++)<<8),a===3&&(i+=t.getUint8(r++)<<16)),E(i,o,n)[2]}function E(t,e,n){return t-=e,t-=n,t^=n>>>13,e-=n,e-=t,e^=t<<8,n-=t,n-=e,n^=e>>>13,t-=e,t-=n,t^=n>>>12,e-=n,e-=t,e^=t<<16,n-=t,n-=e,n^=e>>>5,t-=e,t-=n,t^=n>>>3,e-=n,e-=t,e^=t<<10,n-=t,n-=e,n^=e>>>15,[t,e,n]}function w(t,e,n,i,o=[]){let r={},f={},a={},s=b(t[0],t.raw[0]),c=[s.text],$=[],g=s.text;for(let l=1;l<t.length;l++){let{messagePart:I,placeholderName:d=P(l),associatedMessageId:T}=C(t[l],t.raw[l]);g+=`{$${d}}${I}`,e!==void 0&&(r[d]=e[l-1],f[d]=o[l-1]),$.push(d),T!==void 0&&(a[d]=T),c.push(I)}let x=s.customId||k(g,s.meaning||""),j=s.legacyIds?s.legacyIds.filter(l=>l!==x):[];return{id:x,legacyIds:j,substitutions:r,substitutionLocations:f,text:g,customId:s.customId,meaning:s.meaning||"",description:s.description||"",messageParts:c,messagePartLocations:i,placeholderNames:$,associatedMessageIds:a,location:n}}function b(t,e){let{text:n,block:i}=y(t,e);if(i===void 0)return{text:n};{let[o,...r]=i.split(z),[f,a]=o.split(S,2),[s,c]=f.split(v,2);return c===void 0&&(c=s,s=void 0),c===""&&(c=void 0),{text:n,meaning:s,description:c,customId:a,legacyIds:r}}}function C(t,e){let{text:n,block:i}=y(t,e);if(i===void 0)return{messagePart:n};{let[o,r]=i.split(S);return{messagePart:n,placeholderName:o,associatedMessageId:r}}}function y(t,e){if(e.charAt(0)!==p)return{text:t};{let n=B(t,e);return{block:t.substring(1,n),text:t.substring(n+1)}}}function P(t){return t===1?"PH":`PH_${t-1}`}function B(t,e){for(let n=1,i=1;n<t.length;n++,i++)if(e[i]==="\\")i++;else if(t[n]===p)return n;throw new Error(`Unterminated $localize metadata block in "${e}".`)}var m=class extends Error{parsedMessage;type="MissingTranslationError";constructor(e){super(`No translation found for ${D(e)}.`),this.parsedMessage=e}};function _(t,e,n){let i=w(e,n),o=t[i.id];if(i.legacyIds!==void 0)for(let r=0;r<i.legacyIds.length&&o===void 0;r++)o=t[i.legacyIds[r]];if(o===void 0)throw new m(i);return[o.messageParts,o.placeholderNames.map(r=>{if(i.substitutions.hasOwnProperty(r))return i.substitutions[r];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${D(i)}.
|
|
2
2
|
The translation contains a placeholder with name ${r}, which does not exist in the message.`)})]}function F(t){let e=t.split(/{\$([^}]*)}/),n=[e[0]],i=[];for(let r=1;r<e.length-1;r+=2)i.push(e[r]),n.push(`${e[r+1]}`);let o=n.map(r=>r.charAt(0)===p?"\\"+r:r);return{text:t,messageParts:K(n,o),placeholderNames:i}}function K(t,e){return Object.defineProperty(t,"raw",{value:e}),t}function D(t){let e=t.meaning&&` - "${t.meaning}"`,n=t.legacyIds&&t.legacyIds.length>0?` [${t.legacyIds.map(i=>`"${i}"`).join(", ")}]`:"";return`"${t.id}"${n} ("${t.text}"${e})`}function M(t){$localize.translate||($localize.translate=G),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(t).forEach(e=>{$localize.TRANSLATIONS[e]=F(t[e])})}function G(t,e){try{return _($localize.TRANSLATIONS,t,e)}catch(n){return console.warn(n.message),[t,e]}}var u=function(t,...e){if(u.translate){let i=u.translate(t,e);t=i[0],e=i[1]}let n=O(t[0],t.raw[0]);for(let i=1;i<t.length;i++)n+=e[i-1]+O(t[i],t.raw[i]);return n},H=":";function O(t,e){return e.charAt(0)===H?t.substring(B(t,e)+1):t}globalThis.$localize=u;var h="en-US",V=["en-US","de-DE","fr-FR","da-DK"],R={"en-US":"en","da-DK":"da","de-DE":"de","fr-FR":"fr"},tt=[{value:"en-US",label:"English"},{value:"fr-FR",label:"French"},{value:"de-DE",label:"German"},{value:"da-DK",label:"Danish"}];function et(t){return t?R[t]??"en":"en"}function nt(){let t=localStorage.getItem("v1:duplicati:locale")||h,e=V.find(i=>i===t)??h,n=R[e];return e===h||(import(`/locale/angular/${n}.mjs`).then(i=>A(i.default)),fetch(`/locale/messages.${e}.json`).then(i=>i.json()).then(i=>{M(i.translations),u.locale=e})),e}export{tt as a,et as b,nt as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ca as k,Ga as ae,X as se,a as H,b as re,c as oe,e as f,za as ie}from"./chunk-BUARZS4A.js";import{Ca as M,Da as v,Ea as E,Fa as q,Ga as K,Ha as W,Hc as ne,Ia as X,Ja as J,Ka as Q,La as ee,Ma as m,Qa as T,R as g,U as d,Ua as te,X as _,Z as c,aa as z,oa as w,pa as N,ua as G,va as L,wa as Y,xa as S,ya as P}from"./chunk-VGQ6X3AL.js";import{a as I,b as Z}from"./chunk-C6Q5SG76.js";var j=class extends oe{supportsDOMEvents=!0},U=class r extends j{static makeCurrent(){re(new r)}onAndCancel(n,e,t){return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=ve();return e==null?null:Ee(e)}resetBaseElement(){D=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return se(document.cookie,n)}},D=null;function ve(){return D=D||document.querySelector("base"),D?D.getAttribute("href"):null}function Ee(r){return new URL(r,document.baseURI).pathname}var we=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),B=new _(""),pe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o){return this._findPluginFor(t).addEventListener(e,t,o)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new g(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(c(B),c(w))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),A=class{_doc;constructor(n){this._doc=n}manager},b="ng-app-id";function ce(r){for(let n of r)n.remove()}function le(r,n){let e=n.createElement("style");return e.textContent=r,e}function Se(r,n,e,t){let o=r.head?.querySelectorAll(`style[${b}="${n}"],link[${b}="${n}"]`);if(o)for(let s of o)s.removeAttribute(b),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function F(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var he=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=k(s),Se(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,le);t?.forEach(o=>this.addUsage(o,this.external,F))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ce(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ce(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,le(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,F(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(b,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(c(f),c(L),c(P,8),c(S))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),x={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},V=/%COMP%/g,me="%COMP%",Me=`_nghost-${me}`,Te=`_ngcontent-${me}`,De=!0,Ce=new _("",{providedIn:"root",factory:()=>De});function Re(r){return Te.replace(V,r)}function be(r){return Me.replace(V,r)}function ye(r,n){return n.map(e=>e.replace(V,r))}var ue=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,a,l,u=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=a,this.ngZone=l,this.nonce=u,this.platformIsServer=k(a),this.defaultRenderer=new C(e,i,l,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===M.ShadowDom&&(t=Z(I({},t),{encapsulation:M.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,a=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(t.encapsulation){case M.Emulated:s=new O(l,u,t,this.appId,p,i,a,h);break;case M.ShadowDom:return new $(l,u,e,t,i,a,this.nonce,h);default:s=new R(l,u,t,p,i,a,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static \u0275fac=function(t){return new(t||r)(c(pe),c(he),c(L),c(Ce),c(f),c(S),c(w),c(P))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),C=class{eventManager;doc;ngZone;platformIsServer;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(x[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(de(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(de(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new g(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=x[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=x[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(T.DashCase|T.Important)?n.style.setProperty(e,t,o&T.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&T.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t){if(typeof n=="string"&&(n=H().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);return this.eventManager.addEventListener(n,e,this.decoratePreventDefault(t))}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function de(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var $=class extends C{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,a,l){super(n,s,i,l),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=ye(o.id,o.styles);for(let h of u){let y=document.createElement("style");a&&y.setAttribute("nonce",a),y.textContent=h,this.shadowRoot.appendChild(y)}let p=o.getExternalStyles?.();if(p)for(let h of p){let y=F(h,s);a&&y.setAttribute("nonce",a),this.shadowRoot.appendChild(y)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends C{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,a,l){super(n,s,i,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o,this.styles=l?ye(l,t.styles):t.styles,this.styleUrls=t.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends R{contentAttr;hostAttr;constructor(n,e,t,o,s,i,a,l){let u=o+"-"+t.id;super(n,e,t,s,i,a,l,u),this.contentAttr=Re(u),this.hostAttr=be(u)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Ae=(()=>{class r extends A{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o){return e.addEventListener(t,o,!1),()=>this.removeEventListener(e,t,o)}removeEventListener(e,t,o){return e.removeEventListener(t,o)}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})(),fe=["alt","control","meta","shift"],Oe={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Ie={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},_e=(()=>{class r extends A{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o){let s=r.parseEventName(t),i=r.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>H().onAndCancel(e,s.domEventName,i))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",a=t.indexOf("code");if(a>-1&&(t.splice(a,1),i="code."),fe.forEach(u=>{let p=t.indexOf(u);p>-1&&(t.splice(p,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let l={};return l.domEventName=o,l.fullKey=i,l}static matchEventFullKeyCode(e,t){let o=Oe[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),fe.forEach(i=>{if(i!==o){let a=Ie[i];a(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac})}return r})();function vt(r,n){return ne(I({rootComponent:r},Ne(n)))}function Ne(r){return{appProviders:[...xe,...r?.providers??[]],platformProviders:ke}}function Le(){U.makeCurrent()}function Pe(){return new N}function He(){return G(document),document}var ke=[{provide:S,useValue:ie},{provide:Y,useValue:Le,multi:!0},{provide:f,useFactory:He,deps:[]}];var xe=[{provide:z,useValue:"root"},{provide:N,useFactory:Pe,deps:[]},{provide:B,useClass:Ae,multi:!0,deps:[f,w,S]},{provide:B,useClass:_e,multi:!0,deps:[f]},ue,he,pe,{provide:te,useExisting:ue},{provide:ae,useClass:we,deps:[]},[]];var Et=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var je=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=c(Ue),o},providedIn:"root"})}return r})(),Ue=(()=>{class r extends je{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case m.NONE:return t;case m.HTML:return E(t,"HTML")?v(t):ee(this._doc,String(t)).toString();case m.STYLE:return E(t,"Style")?v(t):t;case m.SCRIPT:if(E(t,"Script"))return v(t);throw new g(5200,!1);case m.URL:return E(t,"URL")?v(t):Q(String(t));case m.RESOURCE_URL:if(E(t,"ResourceURL"))return v(t);throw new g(5201,!1);default:throw new g(5202,!1)}}bypassSecurityTrustHtml(e){return q(e)}bypassSecurityTrustStyle(e){return K(e)}bypassSecurityTrustScript(e){return W(e)}bypassSecurityTrustUrl(e){return X(e)}bypassSecurityTrustResourceUrl(e){return J(e)}static \u0275fac=function(t){return new(t||r)(c(f))};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{vt as a,Et as b,je as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as m,Kc as k,Lc as f,Mc as x,Nc as j,P as w,R as l,Ya as b,_ as d,da as i,g as p,i as g,ka as h,la as a}from"./chunk-VGQ6X3AL.js";import{a as v,b as y}from"./chunk-C6Q5SG76.js";function D(n,e){!e?.injector&&i(D);let t=e?.injector??d(h),o=new g(1),u=x(()=>{let r;try{r=n()}catch(c){f(()=>o.error(c));return}f(()=>o.next(r))},{injector:t,manualCleanup:!0});return t.get(a).onDestroy(()=>{u.destroy(),o.complete()}),o.asObservable()}function S(n,e){let t=!e?.manualCleanup;t&&!e?.injector&&i(S);let o=t?e?.injector?.get(a)??d(a):null,u=O(e?.equal),r;e?.requireSync?r=b({kind:0},{equal:u}):r=b({kind:1,value:e?.initialValue},{equal:u});let c=n.subscribe({next:s=>r.set({kind:1,value:s}),error:s=>{if(e?.rejectErrors)throw s;r.set({kind:2,error:s})}});if(e?.requireSync&&r().kind===0)throw new l(601,!1);return o?.onDestroy(c.unsubscribe.bind(c)),k(()=>{let s=r();switch(s.kind){case 1:return s.value;case 2:throw s.error;case 0:throw new l(601,!1)}},{equal:e?.equal})}function O(n=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&n(e.value,t.value)}function R(n){return n?.injector||i(R),j(y(v({},n),{loader:e=>{let t=new p;return e.abortSignal.addEventListener("abort",()=>t.next()),new Promise((o,u)=>{n.loader(e).pipe(m(1),w(t)).subscribe({next:o,error:u,complete:()=>u(new Error("Resource completed before producing a value"))})})}}))}export{D as a,S as b,R as c};
|