@duplicati/ngclient 0.0.232 → 0.0.233

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.
Files changed (116) hide show
  1. package/assets/sh.woff2 +0 -0
  2. package/{chunk-B52v_pjw.js → chunk-8Y8ReLEn.js} +2 -2
  3. package/{chunk-Brvxo-yI.js → chunk-AuCOjHXM.js} +1 -1
  4. package/{chunk-Bja52qI7.js → chunk-B1c7h-_w.js} +1 -1
  5. package/{chunk-BqN36tfl.js → chunk-B1wZ4poV.js} +1 -1
  6. package/{chunk-DI7suso2.js → chunk-B5Y6lgE8.js} +1 -1
  7. package/chunk-B6c2NXNy.js +1 -0
  8. package/{chunk-Cjb79u3p.js → chunk-BZgAzrl9.js} +1 -1
  9. package/chunk-B_cIFQAl.js +1 -0
  10. package/{chunk-Da_-7L7P.js → chunk-BaSm1lsB.js} +1 -1
  11. package/{chunk-Saq2s7Ep.js → chunk-Bgw6E0Xu.js} +1 -1
  12. package/{chunk-CIcBoEH1.js → chunk-Bj7EyCHb.js} +1 -1
  13. package/{chunk-aOMoAKYY.js → chunk-BmmYJhOf.js} +1 -1
  14. package/chunk-BrtdRb9j.js +1 -0
  15. package/{chunk-CkrxdjhU.js → chunk-BsNCg00z.js} +2 -2
  16. package/{chunk-CHzwXmsn.js → chunk-BstaUtD_.js} +1 -1
  17. package/{chunk-BBsBaTWO.js → chunk-BxpXVeOr.js} +1 -1
  18. package/{chunk-ivwxSoND.js → chunk-ByL8ndec.js} +1 -1
  19. package/chunk-BzJX1fKw.js +1 -0
  20. package/{chunk-B53Wj4F9.js → chunk-C3gUxHQM.js} +1 -1
  21. package/{chunk-Cz0KuBHB.js → chunk-C7AeY2HY.js} +2 -2
  22. package/chunk-C7gG_Yh_.js +2 -0
  23. package/{chunk-CgyaUJSI.js → chunk-C9OqpwwE.js} +1 -1
  24. package/{chunk-DvyGZpE4.js → chunk-C9ecLR93.js} +2 -2
  25. package/chunk-CGsQCBkP.js +1 -0
  26. package/{chunk-CUaRQ2FJ.js → chunk-CIe9Bupz.js} +1 -1
  27. package/chunk-CIw_h8oP.js +1 -0
  28. package/{chunk-DZm4l28A.js → chunk-CP6xnjgo.js} +2 -2
  29. package/{chunk-Cg09iQR5.js → chunk-CS2J-6VZ.js} +1 -1
  30. package/{chunk-umW-K0Ca.js → chunk-CWgXi-7W.js} +1 -1
  31. package/{chunk-DmDqcC4A.js → chunk-CX3Axjpk.js} +1 -1
  32. package/{chunk-BlTnmRGU.js → chunk-Ca1aaA1h.js} +1 -1
  33. package/{chunk-CartdZy-.js → chunk-CfxBiw7I.js} +1 -1
  34. package/{chunk-CTm37hI-.js → chunk-CgJAbgNN.js} +1 -1
  35. package/{chunk-CUuyy9Er.js → chunk-ChUm8bnG.js} +1 -1
  36. package/{chunk-CtEMAj2d.js → chunk-CkRbgemk.js} +1 -1
  37. package/chunk-ClRItSzt.js +1 -0
  38. package/{chunk-DoQHDPZg.js → chunk-CsIAXoYP.js} +1 -1
  39. package/{chunk-BVEyeg9y.js → chunk-CuJ_uEdr.js} +1 -1
  40. package/{chunk-BEhUV7oX.js → chunk-CvSsZZty.js} +1 -1
  41. package/{chunk-Bb6BmVO4.js → chunk-CyqqlRjO.js} +2 -2
  42. package/{chunk-DqIU7ViF.js → chunk-D1pDZLJ9.js} +1 -1
  43. package/{chunk-vnqcxg-9.js → chunk-D2G7_0hG.js} +1 -1
  44. package/{chunk-DKZlKdfB.js → chunk-D3PhthfU.js} +1 -1
  45. package/chunk-D55uWC7G.js +1 -0
  46. package/{chunk-B8uF0dom.js → chunk-DDWDcSq2.js} +1 -1
  47. package/{chunk-Cu2bh6aQ.js → chunk-DD_wKpGc.js} +1 -1
  48. package/{chunk-Box6Lckh.js → chunk-DGvC49aU.js} +1 -1
  49. package/{chunk-BkIXk6uR.js → chunk-DGxk44Me.js} +2 -2
  50. package/{chunk-D5tms-6w.js → chunk-DM11Gu0H.js} +1 -1
  51. package/chunk-DV8bRznt.js +2 -0
  52. package/{chunk-Dum38U6w.js → chunk-DWiO0A6h.js} +2 -2
  53. package/{chunk-BpRWdcC8.js → chunk-DXEgz1tV.js} +1 -1
  54. package/{chunk-BI14DMeb.js → chunk-DbbyVAGl.js} +1 -1
  55. package/{chunk-CVQPUpDQ.js → chunk-DcdpG1YG.js} +2 -2
  56. package/{chunk-B9maI7Xa.js → chunk-DhiIZLrA.js} +3 -3
  57. package/{chunk-BTgf5lfZ.js → chunk-DidJB9ig.js} +1 -1
  58. package/{chunk-CX26gEKv.js → chunk-Dk-Wgx3e.js} +1 -1
  59. package/{chunk-BBU0vswn.js → chunk-DuYKanVS.js} +1 -1
  60. package/{chunk-DY3nK3tu.js → chunk-DwmssGG9.js} +1 -1
  61. package/chunk-DxFBzFom.js +1 -0
  62. package/{chunk-ihUnHtR7.js → chunk-Dz5guW4b.js} +1 -1
  63. package/{chunk-DzmZd524.js → chunk-FTZ5atHM.js} +1 -1
  64. package/{chunk-CZoVeRAG.js → chunk-I5dxaHZ4.js} +2 -2
  65. package/{chunk-C4GeR7BF.js → chunk-K2iai6rC.js} +1 -1
  66. package/{chunk-BYWmNy-_.js → chunk-L8hQtTzU.js} +1 -1
  67. package/{chunk-CKnRcyHZ.js → chunk-MDqH8T3Z.js} +2 -2
  68. package/{chunk-BkUa7yBI.js → chunk-Y-xXBGKy.js} +1 -1
  69. package/{chunk-Bt_Ie-F3.js → chunk-Z81HNfgo.js} +1 -1
  70. package/{chunk-DUYvFN8m.js → chunk-aCJqF9DH.js} +1 -1
  71. package/{chunk-Bo1yB-fQ.js → chunk-aYCYzU5Q.js} +1 -1
  72. package/{chunk-C80zvTbO.js → chunk-bt6lhYfG.js} +1 -1
  73. package/{chunk-Rp7-yjlz.js → chunk-eiyaQxBt.js} +1 -1
  74. package/{chunk-DJJ8GbYi.js → chunk-h6n5A491.js} +1 -1
  75. package/{chunk-vPGrgL1U.js → chunk-jy8x4GhV.js} +1 -1
  76. package/{chunk-BS8PXjJJ.js → chunk-ksSA-rDF.js} +1 -1
  77. package/{chunk-Dn8nZWLd.js → chunk-lymL5FDY.js} +1 -1
  78. package/{chunk-CAwTsBqQ.js → chunk-mA4J4_nC.js} +1 -1
  79. package/{chunk-CwKy8pxa.js → chunk-mflQLMHH.js} +1 -1
  80. package/chunk-nuwlP4Wz.js +14 -0
  81. package/chunk-uGh0bVbu.js +4 -0
  82. package/index.html +1 -1
  83. package/locale/messages.de.json +69 -9
  84. package/locale/messages.de_CH.json +68 -8
  85. package/locale/messages.de_DE.json +68 -8
  86. package/locale/messages.en.json +32 -8
  87. package/locale/messages.fr.json +77 -13
  88. package/locale/messages.fr_CA.json +72 -8
  89. package/locale/messages.fr_FR.json +72 -8
  90. package/locale/messages.it.json +76 -12
  91. package/locale/messages.it_IT.json +72 -8
  92. package/locale/messages.json +32 -8
  93. package/locale/messages.ko.json +8 -15
  94. package/locale/messages.nl_BE.json +72 -8
  95. package/locale/messages.nl_NL.json +72 -8
  96. package/locale/messages.tr.json +7 -9
  97. package/locale/messages.zh-Hans.json +159 -16
  98. package/locale/messages.zh-Hant.json +159 -16
  99. package/locale/messages.zh.json +159 -16
  100. package/locale/messages.zh_CN.json +159 -16
  101. package/locale/messages.zh_HK.json +7 -8
  102. package/locale/messages.zh_TW.json +159 -16
  103. package/{main-VVQP2YE7.js → main-3NL5M6JB.js} +13 -13
  104. package/package.json +1 -1
  105. package/chunk-B73LRsqH.js +0 -1
  106. package/chunk-BO2GlieG.js +0 -1
  107. package/chunk-BaxM-kGV.js +0 -2
  108. package/chunk-BvGGBIy7.js +0 -1
  109. package/chunk-CGArETYn.js +0 -1
  110. package/chunk-CTRzgLM9.js +0 -2
  111. package/chunk-CTwO6j97.js +0 -1
  112. package/chunk-Cu4siB3B.js +0 -4
  113. package/chunk-DTu0ZYnR.js +0 -1
  114. package/chunk-DYnVzNxt.js +0 -1
  115. package/chunk-kU0H989B.js +0 -14
  116. package/chunk-mby7fvmj.js +0 -1
@@ -1,3 +1,3 @@
1
- import {j as jn,m as me}from'./chunk-BO2GlieG.js';import {aj as l$1,T,ab as C,ax as De,I,N as Nt,aG as pt,az as t,aZ as ee$1,G as Ge,ai as m$1,H as qu,c0 as n$1}from'./main-VVQP2YE7.js';var y=class{constructor(t){this.loader=t;}loader;_data=Ge(void 0);_isLoading=false;_loaded=false;load(){return !this._loaded&&!this._isLoading&&(this._isLoading=true,this.loader().pipe(qu(()=>this._isLoading=false)).subscribe(t=>{this._data.set(t),this._loaded=true;})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=false;}};function K(e){return !("personalLicensedUser"in e)}function q(e){if(K(e))return m$1(l$1({},e),{personal:e.personal,personalLicensedUser:null,personalUnlicensedUser:null});let s=e,{personalLicensedUser:t,personalUnlicensedUser:o}=s,r=n$1(s,["personalLicensedUser","personalUnlicensedUser"]);return m$1(l$1({},r),{personal:t+o,personalLicensedUser:t,personalUnlicensedUser:o})}var d=class e{#e=T(C);#s=T(De);#n=T(I);#o=new y(()=>this.getS3Config("Providers"));#i=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#a=new y(()=>this.getS3Config("StorageClasses"));#l=Nt(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(s=>({key:`Amazon ${s.key}`,value:s.value}))??[]];return Array.from(new Map(r.map(s=>[s.value,s])).values())});#c=new y(()=>this.getStorjConfig("Satellites"));#u=new y(()=>this.getStorjConfig("AuthenticationMethods"));#p=new y(()=>this.getOpenstackConfig("Providers"));#m=new y(()=>this.getOpenstackConfig("Versions"));#d=new y(()=>this.getGcsConfig("Locations"));#g=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#l}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#i.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#a.load()}getStorjSatellites(){return this.#c.load()}getStorjAuthenticationMethods(){return this.#u.load()}getOpenstackProviders(){return this.#p.load()}getOpenstackVersions(){return this.#m.load()}getGcsLocations(){return this.#d.load()}getGcsStorageClasses(){return this.#g.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(pt(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(pt(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(pt(o=>this.#t(o)))}#t(t){return (t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(pt(o=>this.#t(o)),pt(o=>o.find(r=>r.key==="folders")?.value),pt(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(pt(r=>this.#t(r)),pt(r=>r.find(s=>s.key==="api-key")?.value))}getOffice365Counts(t$1,o,r){let s={"Content-Type":"application/json"};return this.#n.relayIsEnabled()&&(s.timeout=`${300*1e3}`),this.#s.post(`${t.BASE}/api/v1/webmodule/office365`,JSON.stringify({"backup-id":r??"","source-prefix":o,operation:"CountItems",url:t$1}),{headers:s}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(u=>u.key==="counts")?.value),pt(i=>{let u=JSON.parse(i);return {users:u.users,groups:u.groups,sites:q(u.sites)}}))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=ee$1({token:e,factory:e.\u0275fac,providedIn:"root"})};var n=new jn,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},L={description:$localize`Unknown destination type`,sourceDescription:null,icon:"assets/dest-icons/file-system.png",isDefaultEntry:true,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>n.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let s=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return l$1({destinationType:e,custom:{path:s.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,sourceDescription:$localize`Use files from your local file system as a remote source.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:110,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>n.control(e??""),isMandatory:true}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),s=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=s.slice(1).startsWith(":\\")||s.slice(1).startsWith(":/")||s.startsWith("\\\\")?s:"/"+s;return l$1({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,sourceDescription:$localize`Use files from Duplicati Storage as a remote source.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:100,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:true,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>l$1({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,sourceDescription:$localize`Use files from SFTP (SSH) as a remote source.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>n.control(e??"",[me.required,me.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,sourceDescription:$localize`Use files from Amazon S3 as a remote source.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??false}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,sourceDescription:$localize`Use files from Google Cloud Storage as a remote source.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,sourceDescription:$localize`Use files from Google Drive as a remote source.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,sourceDescription:$localize`Use files from pCloud as a remote source.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>Ge([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:true}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:s}=m(t);return l$1({destinationType:e,custom:{server:r,path:s}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,sourceDescription:$localize`Use files from Azure Blob Storage as a remote source.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,sourceDescription:$localize`Use files from OneDrive as a remote source.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business (deprecated)`,description:$localize`Store backups in OneDrive Business. Deprecated, use Sharepoint instead.`,sourceDescription:$localize`Use files from OneDrive Business as a remote source. Deprecated, use SharePoint instead.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint (deprecated)`,description:$localize`Store backups in Microsoft SharePoint using legacy API.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source using the legacy API.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:true},{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,sourceDescription:$localize`Use files from Dropbox as a remote source.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,sourceDescription:$localize`Use files from Box.com as a remote source.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,sourceDescription:$localize`Use files from Jottacloud as a remote source.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,sourceDescription:$localize`Use files from B2 Cloud Storage as a remote source.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true,validate:e=>{function t(o){if(!o)return false;let r=o.length;return !(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,sourceDescription:$localize`Use files from IDrive e2 as a remote source.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{bucket:r,path:s}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,sourceDescription:$localize`Use files from Mega.nz as a remote source.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,sourceDescription:$localize`Use files from Microsoft Office 365 Group as a remote source.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>n.control(e??"",[me.email]),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,sourceDescription:$localize`Use files from Rackspace CloudFiles as a remote source.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,sourceDescription:$localize`Use files from Rclone as a remote source.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([s])=>!["rclone-remote-repository","rclone-remote-path"].includes(s));return U(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t),{bucket:i,path:u}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":u},s),advanced:l$1({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,sourceDescription:$localize`Use files from OpenStack Object Storage as a remote source.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:true},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,sourceDescription:$localize`Use files from WebDAV as a remote source.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],advancedFields:[{type:"FileTree",name:"debug-propfind-file",accepts:".txt,.log"}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,sourceDescription:$localize`Use files from Sia Decentralized Cloud as a remote source.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([s])=>s!=="sia-targetpath")];return U(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,sourceDescription:$localize`Use files from Tencent COS as a remote source.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:true},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:true},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,sourceDescription:$localize`Use files from Tahoe LAFS as a remote source.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,sourceDescription:$localize`Use files from SMB storage as a remote source.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,N(t,r))},from:(e,t,o)=>{let{server:r,path:s}=m(t),i=s.split("/")[0],u=s.split("/").slice(1).join("/");return l$1({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,sourceDescription:$localize`Use files from CIFS storage as a remote source. Deprecated, use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:L.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,sourceDescription:$localize`Use files from Filen.io as a remote source.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,sourceDescription:$localize`Use files from Filejump as a remote source.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>n.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>n.control(e??""),isMandatory:true}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,sourceDescription:$localize`Use files from Storj with an access grant as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,sourceDescription:$localize`Use files from Storj with an API key as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:true},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,sourceDescription:$localize`Use files from Aliyun OSS as a remote source.`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:true},{name:"oss-access-key-id",isMandatory:true},{name:"oss-access-key-secret",isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,sourceDescription:$localize`Use Microsoft 365 data as a remote source.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:true,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:true},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:true}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,sourceDescription:$localize`Use Google Workspace data as a remote source.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:true,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:true},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:true}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,sourceDescription:$localize`Use files from Drime Cloud as a remote source.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),g("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),g("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],H={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var J=new jn,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams;}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return U(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function U(e,t,o,r,s){let i=b(s),u=encodeURIComponent(X(t)),S=u==""?"":u+Y(o),k=r??"",w=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=N(S,Q(k));return `${w}${$}${i}`}function Z(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function N(...e){if(e.length===0)return "";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function Q(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return "";if(typeof e=="string")try{e=new v(e);}catch{return ""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function X(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function Y(e){return e==null||e===""?"":":"+e.toString()}function Ee(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":V(e).icon:""}function Le(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=V(e);return t?t.displayName:"Unknown"}function V(e){try{let o=new v(e),r=P.find(s=>s.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return G(t)}var ee={file:{Display:$localize`Local`,Icon:null}};function Ne(e){if(!e)return "";let t=V(e);if(!t)return "";let o=ee[t.key];if(o?.Display)return o.Display;if(t.key==="s3"){let r="http://null?"+e.split("?")[1],i=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[u,S]of Object.entries(H))if(i.endsWith(u))return S}return t.displayName}function G(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},L)}function Ie(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return {bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:Z(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},s=G(e);return t.searchParams.forEach((i,u)=>{s?.dynamicFields?.some(k=>k===u||k?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function b(e,t=false){let o=e.map(([s,i])=>`${s}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Be(e){let t=e.destinationType??"";return G(t)?.mapper.to(e)??""}function xe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let s=V(e),i="";if(`${s.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=s.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return G(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let S=o.split("?")[0].split("/")[0],k=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),A=S.split("."),w=A.length===4&&A.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!w?null:s.mapper.from(s.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function _(e){return typeof e!="string"||!e.trim()?[]:e.split(`
1
+ import {j as jn,m as me}from'./chunk-B6c2NXNy.js';import {aj as l$1,T,ab as C,ax as De,I,N as Nt,aG as pt,az as t,aZ as ee$1,G as Ge,ai as m$1,J as zu,b$ as n$1}from'./main-3NL5M6JB.js';var y=class{constructor(t){this.loader=t;}loader;_data=Ge(void 0);_isLoading=false;_loaded=false;load(){return !this._loaded&&!this._isLoading&&(this._isLoading=true,this.loader().pipe(zu(()=>this._isLoading=false)).subscribe(t=>{this._data.set(t),this._loaded=true;})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=false;}};function K(e){return !("personalLicensedUser"in e)}function q(e){if(K(e))return m$1(l$1({},e),{personal:e.personal,personalLicensedUser:null,personalUnlicensedUser:null});let s=e,{personalLicensedUser:t,personalUnlicensedUser:o}=s,r=n$1(s,["personalLicensedUser","personalUnlicensedUser"]);return m$1(l$1({},r),{personal:t+o,personalLicensedUser:t,personalUnlicensedUser:o})}var d=class e{#e=T(C);#s=T(De);#n=T(I);#o=new y(()=>this.getS3Config("Providers"));#i=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#a=new y(()=>this.getS3Config("StorageClasses"));#l=Nt(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(s=>({key:`Amazon ${s.key}`,value:s.value}))??[]];return Array.from(new Map(r.map(s=>[s.value,s])).values())});#c=new y(()=>this.getStorjConfig("Satellites"));#u=new y(()=>this.getStorjConfig("AuthenticationMethods"));#p=new y(()=>this.getOpenstackConfig("Providers"));#m=new y(()=>this.getOpenstackConfig("Versions"));#d=new y(()=>this.getGcsConfig("Locations"));#g=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#l}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#i.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#a.load()}getStorjSatellites(){return this.#c.load()}getStorjAuthenticationMethods(){return this.#u.load()}getOpenstackProviders(){return this.#p.load()}getOpenstackVersions(){return this.#m.load()}getGcsLocations(){return this.#d.load()}getGcsStorageClasses(){return this.#g.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(pt(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(pt(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(pt(o=>this.#t(o)))}#t(t){return (t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(pt(o=>this.#t(o)),pt(o=>o.find(r=>r.key==="folders")?.value),pt(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(pt(r=>this.#t(r)),pt(r=>r.find(s=>s.key==="api-key")?.value))}getOffice365Counts(t$1,o,r){let s={"Content-Type":"application/json"};return this.#n.relayIsEnabled()&&(s.timeout=`${300*1e3}`),this.#s.post(`${t.BASE}/api/v1/webmodule/office365`,JSON.stringify({"backup-id":r??"","source-prefix":o,operation:"CountItems",url:t$1}),{headers:s}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(u=>u.key==="counts")?.value),pt(i=>{let u=JSON.parse(i);return {users:u.users,groups:u.groups,sites:q(u.sites)}}))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=ee$1({token:e,factory:e.\u0275fac,providedIn:"root"})};var n=new jn,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},L={description:$localize`Unknown destination type`,sourceDescription:null,icon:"assets/dest-icons/file-system.png",isDefaultEntry:true,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>n.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let s=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return l$1({destinationType:e,custom:{path:s.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,sourceDescription:$localize`Use files from your local file system as a remote source.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:110,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>n.control(e??""),isMandatory:true}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),s=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=s.slice(1).startsWith(":\\")||s.slice(1).startsWith(":/")||s.startsWith("\\\\")?s:"/"+s;return l$1({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,sourceDescription:$localize`Use files from Duplicati Storage as a remote source.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:100,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:true,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>l$1({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,sourceDescription:$localize`Use files from SFTP (SSH) as a remote source.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>n.control(e??"",[me.required,me.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,sourceDescription:$localize`Use files from Amazon S3 as a remote source.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??false}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,sourceDescription:$localize`Use files from Google Cloud Storage as a remote source.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,sourceDescription:$localize`Use files from Google Drive as a remote source.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,sourceDescription:$localize`Use files from pCloud as a remote source.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>Ge([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:true}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:s}=m(t);return l$1({destinationType:e,custom:{server:r,path:s}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,sourceDescription:$localize`Use files from Azure Blob Storage as a remote source.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,sourceDescription:$localize`Use files from OneDrive as a remote source.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business (deprecated)`,description:$localize`Store backups in OneDrive Business. Deprecated, use Sharepoint instead.`,sourceDescription:$localize`Use files from OneDrive Business as a remote source. Deprecated, use SharePoint instead.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint (deprecated)`,description:$localize`Store backups in Microsoft SharePoint using legacy API.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source using the legacy API.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:true},{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,sourceDescription:$localize`Use files from Dropbox as a remote source.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,sourceDescription:$localize`Use files from Box.com as a remote source.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,sourceDescription:$localize`Use files from Jottacloud as a remote source.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,sourceDescription:$localize`Use files from B2 Cloud Storage as a remote source.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true,validate:e=>{function t(o){if(!o)return false;let r=o.length;return !(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,sourceDescription:$localize`Use files from IDrive e2 as a remote source.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{bucket:r,path:s}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,sourceDescription:$localize`Use files from Mega.nz as a remote source.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,sourceDescription:$localize`Use files from Microsoft Office 365 Group as a remote source.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>n.control(e??"",[me.email]),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,sourceDescription:$localize`Use files from Rackspace CloudFiles as a remote source.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,sourceDescription:$localize`Use files from Rclone as a remote source.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([s])=>!["rclone-remote-repository","rclone-remote-path"].includes(s));return U(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t),{bucket:i,path:u}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":u},s),advanced:l$1({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,sourceDescription:$localize`Use files from OpenStack Object Storage as a remote source.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:true},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,sourceDescription:$localize`Use files from WebDAV as a remote source.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],advancedFields:[{type:"FileTree",name:"debug-propfind-file",accepts:".txt,.log"}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,sourceDescription:$localize`Use files from Sia Decentralized Cloud as a remote source.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([s])=>s!=="sia-targetpath")];return U(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,sourceDescription:$localize`Use files from Tencent COS as a remote source.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:true},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:true},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,sourceDescription:$localize`Use files from Tahoe LAFS as a remote source.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,sourceDescription:$localize`Use files from SMB storage as a remote source.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,N(t,r))},from:(e,t,o)=>{let{server:r,path:s}=m(t),i=s.split("/")[0],u=s.split("/").slice(1).join("/");return l$1({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,sourceDescription:$localize`Use files from CIFS storage as a remote source. Deprecated, use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:L.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,sourceDescription:$localize`Use files from Filen.io as a remote source.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,sourceDescription:$localize`Use files from Filejump as a remote source.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>n.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>n.control(e??""),isMandatory:true}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,sourceDescription:$localize`Use files from Storj with an access grant as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,sourceDescription:$localize`Use files from Storj with an API key as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:true},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,sourceDescription:$localize`Use files from Aliyun OSS as a remote source.`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:true},{name:"oss-access-key-id",isMandatory:true},{name:"oss-access-key-secret",isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,sourceDescription:$localize`Use Microsoft 365 data as a remote source.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:true,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:true},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:true}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,sourceDescription:$localize`Use Google Workspace data as a remote source.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:true,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:true},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:true}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,sourceDescription:$localize`Use files from Drime Cloud as a remote source.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),g("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),g("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],H={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var J=new jn,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams;}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return U(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function U(e,t,o,r,s){let i=b(s),u=encodeURIComponent(X(t)),S=u==""?"":u+Y(o),k=r??"",w=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=N(S,Q(k));return `${w}${$}${i}`}function Z(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function N(...e){if(e.length===0)return "";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function Q(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return "";if(typeof e=="string")try{e=new v(e);}catch{return ""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function X(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function Y(e){return e==null||e===""?"":":"+e.toString()}function Ee(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":V(e).icon:""}function Le(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=V(e);return t?t.displayName:"Unknown"}function V(e){try{let o=new v(e),r=P.find(s=>s.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return G(t)}var ee={file:{Display:$localize`Local`,Icon:null}};function Ne(e){if(!e)return "";let t=V(e);if(!t)return "";let o=ee[t.key];if(o?.Display)return o.Display;if(t.key==="s3"){let r="http://null?"+e.split("?")[1],i=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[u,S]of Object.entries(H))if(i.endsWith(u))return S}return t.displayName}function G(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},L)}function Ie(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return {bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:Z(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},s=G(e);return t.searchParams.forEach((i,u)=>{s?.dynamicFields?.some(k=>k===u||k?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function b(e,t=false){let o=e.map(([s,i])=>`${s}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Be(e){let t=e.destinationType??"";return G(t)?.mapper.to(e)??""}function xe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let s=V(e),i="";if(`${s.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=s.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return G(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let S=o.split("?")[0].split("/")[0],k=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),A=S.split("."),w=A.length===4&&A.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!w?null:s.mapper.from(s.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function _(e){return typeof e!="string"||!e.trim()?[]:e.split(`
2
2
  `).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),s=r.join("=").trim();return o.trim()?[o.trim(),s]:null}).filter(t=>t!==null)}function je(e){return _(e).map(([t,o])=>({Name:t,Value:o}))}function Te(e){return Object.fromEntries(_(e))}function Re(e){if(!e)return false;let t=e.length;return !(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function We(e){if(!e||e.length>253)return false;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return false;return true}function g(e,t,o,r,s){return m$1(l$1({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:$localize`Store backups in ${t} storage.`,dynamicFields:[...(F.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>s.some(S=>u.value.endsWith(S))),isMandatory:true,formElement:i=>J.control(i??"")}],mapper:m$1(l$1({},F.mapper),{to:i=>{let{bucket:u,path:S}=i.custom;return s.some(k=>i.dynamic["s3-server-name"]?.endsWith(k))&&(i.destinationType="s3"),c(i,u,null,S)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>s.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??false})})}
3
3
  export{Be as B,Ee as E,G,Ie as I,Le as L,Ne as N,Re as R,Te as T,V,We as W,d,h,je as j,xe as x};
@@ -1 +1 @@
1
- import {w}from'./chunk-CHzwXmsn.js';import {e as ee}from'./chunk-C4GeR7BF.js';import'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import'./chunk-BEhUV7oX.js';import'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {h as hw,Z as lr,_ as _t,a8 as To,j as vg,Q as Qi,n as nC,$ as $l}from'./main-VVQP2YE7.js';import'./chunk-B8uF0dom.js';import'./chunk-B9maI7Xa.js';import'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=hw({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(vg(0,"app-status-bar"),Qi(1,"div",7)(2,"sh-tabs",8)(3,"button",9),nC(4,0),$l(),Qi(5,"button",10),nC(6,1),$l(),Qi(7,"button",11),nC(8,2),$l(),Qi(9,"button",12),nC(10,3),$l(),Qi(11,"button",13),nC(12,4),$l(),Qi(13,"button",14),nC(14,5),$l(),Qi(15,"button",15),nC(16,6),$l()(),Qi(17,"section"),vg(18,"router-outlet"),$l()());},dependencies:[ee,w,lr,_t,To],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"]})};export{l as default};
1
+ import {w}from'./chunk-BstaUtD_.js';import {e as ee}from'./chunk-K2iai6rC.js';import'./chunk-CIe9Bupz.js';import'./chunk-BmmYJhOf.js';import'./chunk-CvSsZZty.js';import'./chunk-CyqqlRjO.js';import'./chunk-CX3Axjpk.js';import'./chunk-C3gUxHQM.js';import'./chunk-DidJB9ig.js';import {h as hw,Z as lr,_ as _t,a8 as To,i as Ig,Q as Qi,n as nC,$ as $l}from'./main-3NL5M6JB.js';import'./chunk-DDWDcSq2.js';import'./chunk-DhiIZLrA.js';import'./chunk-B6c2NXNy.js';import'./chunk-MDqH8T3Z.js';import'./chunk-mflQLMHH.js';import'./chunk-CuJ_uEdr.js';import'./chunk-D1pDZLJ9.js';import'./chunk-DGvC49aU.js';var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=hw({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(Ig(0,"app-status-bar"),Qi(1,"div",7)(2,"sh-tabs",8)(3,"button",9),nC(4,0),$l(),Qi(5,"button",10),nC(6,1),$l(),Qi(7,"button",11),nC(8,2),$l(),Qi(9,"button",12),nC(10,3),$l(),Qi(11,"button",13),nC(12,4),$l(),Qi(13,"button",14),nC(14,5),$l(),Qi(15,"button",15),nC(16,6),$l()(),Qi(17,"section"),Ig(18,"router-outlet"),$l()());},dependencies:[ee,w,lr,_t,To],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"]})};export{l as default};
@@ -1,2 +1,2 @@
1
- import {N as Ne$1,C as Ct$1,M as Mt}from'./chunk-Cjb79u3p.js';import {I as I$1}from'./chunk-DJJ8GbYi.js';import {J}from'./chunk-DUYvFN8m.js';import {j as je$1}from'./chunk-ihUnHtR7.js';import {N as Nt$1}from'./chunk-Bb6BmVO4.js';import {v as ve$1}from'./chunk-DmDqcC4A.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {B as Bn,Z as Ze$1,e as en,y as yt$1,R as Rn,J as Jt}from'./chunk-BO2GlieG.js';import {a as at$1}from'./chunk-CKnRcyHZ.js';import {T,m,af as E1,b as I1,G as Ge$1,N as Nt,aj as l,ai as m$1,h as hw,b_ as ei,v,d as N,Q as Qi,aP as ql,n as nC,aQ as Gl,f as aT,$ as $l,bg as ag,A as yg,C as CE,i as cT,l as vT,V as Vg,r as kd,k as iC,O as Od,L as Lg,j as vg,F as Fg,a1 as dT,ap as lT,a2 as fT,s as CD,a3 as KC,y as _D,w as jC,J as om,ak as um,al as WC,Y as Yg,aa as Ql,ao as qC,c4 as pC,a$ as JC,b$ as Dg,c6 as lb}from'./main-VVQP2YE7.js';import'./chunk-BpRWdcC8.js';import'./chunk-CAwTsBqQ.js';import'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import'./chunk-B8uF0dom.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var Se=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var he=()=>({updateOn:"blur"}),I=t=>({formView:t}),V=t=>({$implicit:t});function we(t,i){if(t&1){let e=vT();Qi(0,"button",15),Vg("click",function(){kd(e);let n=iC();return Od(n.showTextArea.set(false))}),Lg(1,6),vg(2,"sh-icon"),Fg(),$l();}}function Le(t,i){if(t&1){let e=vT();Qi(0,"button",19,1),Vg("click",function(){let n=kd(e).$implicit,a=iC(3);return Od(a.addSetting(n))}),Qi(2,"div",20),jC(3),Qi(4,"p"),jC(5),$l()()();}if(t&2){let e=i.$implicit;Yg("deprecated",e.deprecatedDescription),CE(3),Ql(" ",e.shortDescription," "),CE(2),om(e.name);}}function Ie(t,i){if(t&1&&(Qi(0,"h3",11),jC(1),$l(),dT(2,Le,6,4,"button",18,lT)),t&2){let e=i.$implicit;CE(),om(e.displayName),CE(),fT(e.options);}}function Ve(t,i){if(t&1){let e=vT();Qi(0,"sh-menu")(1,"button",21)(2,"sh-icon"),jC(3,"dots-three-vertical"),$l()(),ql(4,17),Qi(5,"button",15),Vg("click",function(){kd(e);let n=iC(2);return Od(n.addFreeTextSetting())}),Lg(6,8),vg(7,"sh-icon"),Fg(),$l(),Qi(8,"button",22),Vg("click",function(){kd(e);let n=iC(2);return Od(n.showTextArea.set(true))}),Qi(9,"sh-icon"),jC(10,"link"),$l(),jC(11," Edit contents as text "),$l(),Qi(12,"button",15),Vg("click",function(){kd(e);let n=iC(2);return Od(n.showOptionNames.set(!n.showOptionNames()))}),Lg(13,9),vg(14,"sh-icon"),Fg(),$l(),Gl(),$l();}}function Ne(t,i){if(t&1&&(Qi(0,"sh-menu",16)(1,"button",13),Lg(2,7),vg(3,"sh-icon"),Fg(),$l(),ql(4,17),dT(5,Ie,4,1,null,null,lT),Gl(),$l(),aT(7,Ve,15,0,"sh-menu")),t&2){let e=iC();yg("searchable",true),CE(5),fT(e.nonSelectedOptionsGrouped()),CE(2),cT(e.hasFreeTextSettings()?7:-1);}}function be(t,i){if(t&1){let e=vT();Qi(0,"textarea",23),Vg("ngModelChange",function(n){kd(e);let a=iC();return Od(a.updateSettingsFromText(n))}),$l(),CD();}if(t&2){let e=iC();yg("ngModel",e.settingsAsText())("ngModelOptions",KC(2,he)),_D();}}function Ee(t,i){t&1&&(Qi(0,"div",24),jC(1,"Add a setting above to get started."),$l());}function Me(t,i){t&1&&(Qi(0,"sh-icon",32),jC(1," warning-octagon "),$l());}function Pe(t,i){if(t&1&&(Qi(0,"span",33),jC(1),$l()),t&2){let e=iC(2).$implicit;CE(),Ql("--",e.FormView.name);}}function ve(t,i){if(t&1&&jC(0),t&2){let e=iC(2).$implicit;Ql(" ",e.FormView.shortDescription," ");}}function $e(t,i){if(t&1&&(Qi(0,"sh-icon",34),jC(1,"archive"),$l()),t&2){let e=iC(2).$implicit;yg("shTooltip",e.FormView.deprecatedDescription);}}function Ae(t,i){if(t&1&&(Qi(0,"sh-icon",35),jC(1,"question"),$l()),t&2){let e=iC(2).$implicit;yg("shTooltip",e.FormView.longDescription);}}function De(t,i){if(t&1&&(aT(0,Me,2,0,"sh-icon",32),Qi(1,"span"),aT(2,Pe,2,1,"span",33)(3,ve,1,1),$l(),aT(4,$e,2,1,"sh-icon",34)(5,Ae,2,1,"sh-icon",35)),t&2){let e=iC().$implicit,o=qC(1),n=iC(2);cT(o?0:-1),CE(),Yg("deprecated",e.FormView.deprecatedDescription),CE(),cT(n.showOptionNames()?2:3),CE(2),cT(e.FormView.deprecatedDescription?4:e.FormView.longDescription?5:-1);}}function Re(t,i){t&1&&Dg(0);}function Ge(t,i){if(t&1){let e=vT();Qi(0,"div",26)(1,"label"),ag(2,Re,1,0,"ng-container",36),$l(),Qi(3,"div")(4,"sh-form-field")(5,"input",37),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateFreeTextSettingName(a,n))}),$l(),CD(),Qi(6,"sh-icon",38),jC(7,"rectangle-dashed"),$l()()(),Qi(8,"div")(9,"sh-form-field")(10,"input",37),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),Qi(11,"sh-icon",38),jC(12,"textbox"),$l()()()();}if(t&2){let e=iC().$implicit,o=pC(3);CE(2),yg("ngTemplateOutlet",o),CE(3),yg("ngModel",e.Name),_D(),CE(5),yg("ngModel",e.Value()),_D();}}function ke(t,i){t&1&&Dg(0);}function Be(t,i){if(t&1){let e=vT();Qi(0,"app-file-tree",27)(1,"label",39),ag(2,ke,1,0,"ng-container",36),$l(),Qi(3,"input",40),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);yg("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",true)("showHiddenNodes",true)("selectFiles",true)("hideShortcuts",false)("resolvePaths",true),CE(),yg("for",n),CE(),yg("ngTemplateOutlet",o),CE(),yg("id",n)("ngModel",e.Value()),_D();}}function ze(t,i){if(t&1){let e=vT();Qi(0,"app-file-tree",28),vg(1,"label",39),Qi(2,"input",40),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=qC(0);yg("startingPath",e.Value())("hideShortcuts",false)("resolvePaths",true),CE(),yg("for",o),CE(),yg("id",o)("ngModel",e.Value()),_D();}}function Ue(t,i){t&1&&Dg(0);}function Ke(t,i){t&1&&Dg(0);}function He(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"link"),$l());}function Je(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"hard-drives"),$l());}function Xe(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"jar"),$l());}function je(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"envelope"),$l());}function qe(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"textbox"),$l());}function Qe(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),ag(2,Ue,1,0,"ng-container",36)(3,Ke,1,0,"ng-container",41),$l(),Qi(4,"input",42),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),aT(5,He,2,0,"sh-icon",38)(6,Je,2,0,"sh-icon",38)(7,Xe,2,0,"sh-icon",38)(8,je,2,0,"sh-icon",38)(9,qe,2,0,"sh-icon",38),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),yg("for",n),CE(),yg("ngTemplateOutlet",o),CE(),yg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(10,V,JC(8,I,e.FormView))),CE(),yg("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),_D(),CE(),cT(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9);}}function We(t,i){t&1&&Dg(0);}function Ye(t,i){t&1&&Dg(0);}function Ze(t,i){if(t&1){let e=vT();Qi(0,"sh-icon",45),Vg("click",function(){kd(e);let n=iC(2).$implicit;return Od(n.showPassword=!n.showPassword)}),jC(1," eye "),$l();}}function et(t,i){if(t&1){let e=vT();Qi(0,"sh-icon",45),Vg("click",function(){kd(e);let n=iC(2).$implicit;return Od(n.showPassword=!n.showPassword)}),jC(1," eye-slash "),$l();}}function tt(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),ag(2,We,1,0,"ng-container",36)(3,Ye,1,0,"ng-container",41),$l(),Qi(4,"input",43),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),Qi(5,"sh-icon",38),jC(6,"password"),$l(),aT(7,Ze,2,0,"sh-icon",44)(8,et,2,0,"sh-icon",44),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),yg("for",n),CE(),yg("ngTemplateOutlet",o),CE(),yg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(10,V,JC(8,I,e.FormView))),CE(),yg("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),_D(),CE(3),cT(e.showPassword?7:8);}}function nt(t,i){t&1&&Dg(0);}function it(t,i){t&1&&Dg(0);}function ot(t,i){if(t&1&&jC(0),t&2){let e=i.$implicit;Ql(" ",e," ");}}function at(t,i){if(t&1){let e=vT();Qi(0,"sh-select",46)(1,"label",39),ag(2,nt,1,0,"ng-container",36)(3,it,1,0,"ng-container",41),$l(),Qi(4,"input",40),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),$l(),ag(5,ot,1,1,"ng-template",null,3,lb);}if(t&2){let e=pC(6),o=iC().$implicit,n=pC(3),a=qC(0);iC(2);let c=pC(10);yg("options",o.FormView.options)("isClearable",false)("optionTemplate",e),CE(),yg("for",a),CE(),yg("ngTemplateOutlet",n),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,V,JC(9,I,o.FormView))),CE(),yg("id",a)("ngModel",o.Value()),_D();}}function rt(t,i){t&1&&Dg(0);}function lt(t,i){t&1&&Dg(0);}function _t(t,i){if(t&1){let e=vT();Qi(0,"app-size",47),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),Qi(1,"label",39),ag(2,rt,1,0,"ng-container",36)(3,lt,1,0,"ng-container",41),$l()(),CD();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);yg("inputType",e.Name)("ngModel",e.Value())("customId",n),_D(),CE(),yg("for",n),CE(),yg("ngTemplateOutlet",o),CE(),yg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(9,V,JC(7,I,e.FormView)));}}function st(t,i){t&1&&Dg(0);}function pt(t,i){t&1&&Dg(0);}function ct(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),ag(2,st,1,0,"ng-container",36)(3,pt,1,0,"ng-container",41),$l(),Qi(4,"input",48),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),Qi(5,"sh-icon",38),jC(6,"numpad"),$l()();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),yg("for",n),CE(),yg("ngTemplateOutlet",o),CE(),yg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(8,V,JC(6,I,e.FormView))),CE(),yg("id",n)("ngModel",e.Value()),_D();}}function mt(t,i){t&1&&Dg(0);}function dt(t,i){t&1&&Dg(0);}function ut(t,i){if(t&1){let e=vT();Qi(0,"sh-toggle",30)(1,"label",39),ag(2,mt,1,0,"ng-container",36)(3,dt,1,0,"ng-container",41),$l(),Qi(4,"input",49),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),yg("for",n),CE(),yg("ngTemplateOutlet",o),CE(),yg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(8,V,JC(6,I,e.FormView))),CE(),yg("id",n)("ngModel",e.Value()),_D();}}function Ct(t,i){t&1&&Dg(0);}function gt(t,i){t&1&&Dg(0);}function ft(t,i){if(t&1&&jC(0),t&2){let e=i.$implicit;Ql(" ",e," ");}}function yt(t,i){if(t&1){let e=vT();Qi(0,"sh-select",50)(1,"label",39),ag(2,Ct,1,0,"ng-container",36)(3,gt,1,0,"ng-container",41),$l(),Qi(4,"input",51),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),$l(),CD(),$l(),ag(5,ft,1,1,"ng-template",null,4,lb);}if(t&2){let e=pC(6),o=iC().$implicit,n=pC(3),a=qC(0);iC(2);let c=pC(10);yg("options",o.FormView.options)("selectMultiple",true)("optionTemplate",e),CE(),yg("for",a),CE(),yg("ngTemplateOutlet",n),CE(),yg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(10,V,JC(8,I,o.FormView))),CE(),yg("ngModel",o.Value()),_D();}}function Tt(t,i){t&1&&Dg(0);}function xt(t,i){t&1&&Dg(0);}function St(t,i){if(t&1){let e=vT();Qi(0,"app-timespan",47),Vg("ngModelChange",function(n){kd(e);let a=iC().$implicit,c=iC(2);return Od(c.updateSettingValue(a,n))}),Qi(1,"label",39),ag(2,Tt,1,0,"ng-container",36)(3,xt,1,0,"ng-container",41),$l()(),CD();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);yg("inputType",e.Name)("ngModel",e.Value())("customId",n),_D(),CE(),yg("for",n),CE(),yg("ngTemplateOutlet",o),CE(),yg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(9,V,JC(7,I,e.FormView)));}}function Ot(t,i){if(t&1){let e=vT();um(0)(1),ag(2,De,6,5,"ng-template",null,2,lb),Qi(4,"div",25),aT(5,Ge,13,3,"div",26)(6,Be,4,11,"app-file-tree",27)(7,ze,3,6,"app-file-tree",28)(8,Qe,10,12,"sh-form-field")(9,tt,9,12,"sh-form-field")(10,at,7,13)(11,_t,4,11,"app-size",29)(12,ct,7,10,"sh-form-field")(13,ut,5,10,"sh-toggle",30)(14,yt,7,12)(15,St,4,11,"app-timespan",29),Qi(16,"button",31),Vg("click",function(){let n=kd(e).$implicit,a=iC(2);return Od(a.removeSetting(n))}),Qi(17,"sh-icon"),jC(18,"x-bold"),$l()()();}if(t&2){let e=i.$implicit,o=i.$index,n=iC(2);WC("destination-"+e.Name+o),CE(),WC(n.inAppOptions(e.Name)),CE(3),Yg("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),CE(),cT(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1);}}function Ft(t,i){if(t&1&&(aT(0,Ee,2,0,"div",24),dT(1,Ot,19,5,null,null,lT)),t&2){let e=iC();cT(e.selectedSettings().length===0?0:-1),CE(),fT(e.selectedSettings());}}function ht(t,i){if(t&1&&(Qi(0,"sh-icon",52),jC(1,"x-circle"),$l()),t&2){iC();let e=qC(0);yg("shTooltip",e?.message??"Invalid value");}}function wt(t,i){if(t&1&&(Qi(0,"sh-icon",34),jC(1,"warning"),$l()),t&2){iC();let e=qC(0);yg("shTooltip",e?.message??"Invalid value");}}function Lt(t,i){if(t&1&&(um(0),aT(1,ht,2,1,"sh-icon",52)(2,wt,2,1,"sh-icon",34)),t&2){iC();let e=qC(0),o=iC().$implicit,n=WC(o.formView.validate(e));CE(),cT(n?.type==="error"?1:n?.type==="warning"?2:-1);}}function It(t,i){if(t&1&&(um(0),aT(1,Lt,3,2)),t&2){let e=iC().$implicit,n=(WC(e.Value())??"").toString().trim()==="";CE(),cT(!n&&e.formView.validate?1:-1);}}function Vt(t,i){if(t&1&&aT(0,It,2,2),t&2){let e=i.$implicit;cT(e.Value?0:-1);}}var Oe=class t{#e=T(m);options=E1.required();hiddenOptions=I1([]);hasFreeTextSettings=I1(false);applicationOptions=I1();showTextArea=Ge$1(false);showOptionNames=Ge$1(false);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=Nt(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(L=>L.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let M=c?.trim().toLowerCase(),q=a.options.find(Fe=>(Fe??"").trim().toLocaleLowerCase()===M);q&&(c=q);}let L=Se.find(M=>M.name===a?.name);return L&&(a=l(l({},a),L)),m$1(l({},n),{Value:Ge$1(c),FormView:a})}else if(this.hasFreeTextSettings())return m$1(l({},n),{Value:Ge$1(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=Nt(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>m$1(l({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=Nt(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
- `));updateSettingsFromText(i){if(typeof i!="string")return;let e=je$1(i);this.options.update(()=>e);}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return false}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?false:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}]);}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]});}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let c=e?.trim().toLowerCase()??"",L=i.FormView.options.find(M=>(M??"").trim().toLocaleLowerCase()===c);if(L)return n[a].Value=L,n}return n[a].Value=e,n});}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);return n[a].Name=e,n});}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name));}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;a=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Toggle option names `;let c;return c=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,a,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles","hideShortcuts","resolvePaths"],[3,"startingPath","hideShortcuts","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",c,1,"error"],[1,"optionname"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(Qi(0,"sh-toggle-card",10),ql(1,11)(2),nC(3,5),Gl(),Qi(4,"div",12),aT(5,we,3,0,"button",13)(6,Ne,8,2),$l(),Gl(),aT(7,be,1,3,"textarea",14)(8,Ft,3,1),$l(),ag(9,Vt,1,1,"ng-template",null,0,lb)),e&2&&(yg("disableToggle",true)("isActive",true),CE(5),cT(o.showTextArea()?5:6),CE(2),cT(o.showTextArea()?7:8));},dependencies:[Bn,Ze$1,en,yt$1,Rn,Jt,Ne$1,Ct$1,Mt,ei,I$1,Fe,v,ve$1,at$1,N,Nt$1,J],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.optionname[_ngcontent-%COMP%]{font-family:monospace}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"]})};export{Oe as OptionsListComponent};
1
+ import {N as Ne$1,C as Ct$1,M as Mt}from'./chunk-BZgAzrl9.js';import {I as I$1}from'./chunk-h6n5A491.js';import {J}from'./chunk-aCJqF9DH.js';import {j as je$1}from'./chunk-Dz5guW4b.js';import {N as Nt$1}from'./chunk-CyqqlRjO.js';import {v as ve$1}from'./chunk-CX3Axjpk.js';import {F as Fe}from'./chunk-DhiIZLrA.js';import {B as Bn,Z as Ze$1,e as en,y as yt$1,R as Rn,J as Jt}from'./chunk-B6c2NXNy.js';import {a as at$1}from'./chunk-MDqH8T3Z.js';import {T,m,af as D1,E as E1,G as Ge$1,N as Nt,aj as l,ai as m$1,h as hw,bZ as ei,v,c as N,Q as Qi,aP as ql,n as nC,aQ as Gl,d as aT,$ as $l,bi as cg,y as vg,C as CE,g as cT,l as vT,H as Hg,O as Od,k as iC,P as Pd,F as Fg,i as Ig,j as jg,a1 as dT,ap as lT,a2 as fT,r as CD,a3 as KC,x as _D,s as jC,K as im,ak as dm,al as WC,L as Kg,aa as Ql,ao as qC,c3 as pC,a$ as JC,b_ as wg,c5 as lb}from'./main-3NL5M6JB.js';import'./chunk-DXEgz1tV.js';import'./chunk-mA4J4_nC.js';import'./chunk-C3gUxHQM.js';import'./chunk-DidJB9ig.js';import'./chunk-DDWDcSq2.js';import'./chunk-D1pDZLJ9.js';import'./chunk-DGvC49aU.js';var Se=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var he=()=>({updateOn:"blur"}),I=t=>({formView:t}),V=t=>({$implicit:t});function we(t,i){if(t&1){let e=vT();Qi(0,"button",15),Hg("click",function(){Od(e);let n=iC();return Pd(n.showTextArea.set(false))}),Fg(1,6),Ig(2,"sh-icon"),jg(),$l();}}function Le(t,i){if(t&1){let e=vT();Qi(0,"button",19,1),Hg("click",function(){let n=Od(e).$implicit,a=iC(3);return Pd(a.addSetting(n))}),Qi(2,"div",20),jC(3),Qi(4,"p"),jC(5),$l()()();}if(t&2){let e=i.$implicit;Kg("deprecated",e.deprecatedDescription),CE(3),Ql(" ",e.shortDescription," "),CE(2),im(e.name);}}function Ie(t,i){if(t&1&&(Qi(0,"h3",11),jC(1),$l(),dT(2,Le,6,4,"button",18,lT)),t&2){let e=i.$implicit;CE(),im(e.displayName),CE(),fT(e.options);}}function Ve(t,i){if(t&1){let e=vT();Qi(0,"sh-menu")(1,"button",21)(2,"sh-icon"),jC(3,"dots-three-vertical"),$l()(),ql(4,17),Qi(5,"button",15),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.addFreeTextSetting())}),Fg(6,8),Ig(7,"sh-icon"),jg(),$l(),Qi(8,"button",22),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.showTextArea.set(true))}),Qi(9,"sh-icon"),jC(10,"link"),$l(),jC(11," Edit contents as text "),$l(),Qi(12,"button",15),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.showOptionNames.set(!n.showOptionNames()))}),Fg(13,9),Ig(14,"sh-icon"),jg(),$l(),Gl(),$l();}}function Ne(t,i){if(t&1&&(Qi(0,"sh-menu",16)(1,"button",13),Fg(2,7),Ig(3,"sh-icon"),jg(),$l(),ql(4,17),dT(5,Ie,4,1,null,null,lT),Gl(),$l(),aT(7,Ve,15,0,"sh-menu")),t&2){let e=iC();vg("searchable",true),CE(5),fT(e.nonSelectedOptionsGrouped()),CE(2),cT(e.hasFreeTextSettings()?7:-1);}}function be(t,i){if(t&1){let e=vT();Qi(0,"textarea",23),Hg("ngModelChange",function(n){Od(e);let a=iC();return Pd(a.updateSettingsFromText(n))}),$l(),CD();}if(t&2){let e=iC();vg("ngModel",e.settingsAsText())("ngModelOptions",KC(2,he)),_D();}}function Ee(t,i){t&1&&(Qi(0,"div",24),jC(1,"Add a setting above to get started."),$l());}function Me(t,i){t&1&&(Qi(0,"sh-icon",32),jC(1," warning-octagon "),$l());}function Pe(t,i){if(t&1&&(Qi(0,"span",33),jC(1),$l()),t&2){let e=iC(2).$implicit;CE(),Ql("--",e.FormView.name);}}function ve(t,i){if(t&1&&jC(0),t&2){let e=iC(2).$implicit;Ql(" ",e.FormView.shortDescription," ");}}function $e(t,i){if(t&1&&(Qi(0,"sh-icon",34),jC(1,"archive"),$l()),t&2){let e=iC(2).$implicit;vg("shTooltip",e.FormView.deprecatedDescription);}}function Ae(t,i){if(t&1&&(Qi(0,"sh-icon",35),jC(1,"question"),$l()),t&2){let e=iC(2).$implicit;vg("shTooltip",e.FormView.longDescription);}}function De(t,i){if(t&1&&(aT(0,Me,2,0,"sh-icon",32),Qi(1,"span"),aT(2,Pe,2,1,"span",33)(3,ve,1,1),$l(),aT(4,$e,2,1,"sh-icon",34)(5,Ae,2,1,"sh-icon",35)),t&2){let e=iC().$implicit,o=qC(1),n=iC(2);cT(o?0:-1),CE(),Kg("deprecated",e.FormView.deprecatedDescription),CE(),cT(n.showOptionNames()?2:3),CE(2),cT(e.FormView.deprecatedDescription?4:e.FormView.longDescription?5:-1);}}function Re(t,i){t&1&&wg(0);}function Ge(t,i){if(t&1){let e=vT();Qi(0,"div",26)(1,"label"),cg(2,Re,1,0,"ng-container",36),$l(),Qi(3,"div")(4,"sh-form-field")(5,"input",37),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateFreeTextSettingName(a,n))}),$l(),CD(),Qi(6,"sh-icon",38),jC(7,"rectangle-dashed"),$l()()(),Qi(8,"div")(9,"sh-form-field")(10,"input",37),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),Qi(11,"sh-icon",38),jC(12,"textbox"),$l()()()();}if(t&2){let e=iC().$implicit,o=pC(3);CE(2),vg("ngTemplateOutlet",o),CE(3),vg("ngModel",e.Name),_D(),CE(5),vg("ngModel",e.Value()),_D();}}function ke(t,i){t&1&&wg(0);}function Be(t,i){if(t&1){let e=vT();Qi(0,"app-file-tree",27)(1,"label",39),cg(2,ke,1,0,"ng-container",36),$l(),Qi(3,"input",40),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);vg("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",true)("showHiddenNodes",true)("selectFiles",true)("hideShortcuts",false)("resolvePaths",true),CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("id",n)("ngModel",e.Value()),_D();}}function ze(t,i){if(t&1){let e=vT();Qi(0,"app-file-tree",28),Ig(1,"label",39),Qi(2,"input",40),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=qC(0);vg("startingPath",e.Value())("hideShortcuts",false)("resolvePaths",true),CE(),vg("for",o),CE(),vg("id",o)("ngModel",e.Value()),_D();}}function Ue(t,i){t&1&&wg(0);}function Ke(t,i){t&1&&wg(0);}function He(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"link"),$l());}function Je(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"hard-drives"),$l());}function Xe(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"jar"),$l());}function je(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"envelope"),$l());}function qe(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"textbox"),$l());}function Qe(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),cg(2,Ue,1,0,"ng-container",36)(3,Ke,1,0,"ng-container",41),$l(),Qi(4,"input",42),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),aT(5,He,2,0,"sh-icon",38)(6,Je,2,0,"sh-icon",38)(7,Xe,2,0,"sh-icon",38)(8,je,2,0,"sh-icon",38)(9,qe,2,0,"sh-icon",38),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(10,V,JC(8,I,e.FormView))),CE(),vg("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),_D(),CE(),cT(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9);}}function We(t,i){t&1&&wg(0);}function Ye(t,i){t&1&&wg(0);}function Ze(t,i){if(t&1){let e=vT();Qi(0,"sh-icon",45),Hg("click",function(){Od(e);let n=iC(2).$implicit;return Pd(n.showPassword=!n.showPassword)}),jC(1," eye "),$l();}}function et(t,i){if(t&1){let e=vT();Qi(0,"sh-icon",45),Hg("click",function(){Od(e);let n=iC(2).$implicit;return Pd(n.showPassword=!n.showPassword)}),jC(1," eye-slash "),$l();}}function tt(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),cg(2,We,1,0,"ng-container",36)(3,Ye,1,0,"ng-container",41),$l(),Qi(4,"input",43),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),Qi(5,"sh-icon",38),jC(6,"password"),$l(),aT(7,Ze,2,0,"sh-icon",44)(8,et,2,0,"sh-icon",44),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(10,V,JC(8,I,e.FormView))),CE(),vg("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),_D(),CE(3),cT(e.showPassword?7:8);}}function nt(t,i){t&1&&wg(0);}function it(t,i){t&1&&wg(0);}function ot(t,i){if(t&1&&jC(0),t&2){let e=i.$implicit;Ql(" ",e," ");}}function at(t,i){if(t&1){let e=vT();Qi(0,"sh-select",46)(1,"label",39),cg(2,nt,1,0,"ng-container",36)(3,it,1,0,"ng-container",41),$l(),Qi(4,"input",40),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l(),cg(5,ot,1,1,"ng-template",null,3,lb);}if(t&2){let e=pC(6),o=iC().$implicit,n=pC(3),a=qC(0);iC(2);let c=pC(10);vg("options",o.FormView.options)("isClearable",false)("optionTemplate",e),CE(),vg("for",a),CE(),vg("ngTemplateOutlet",n),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,V,JC(9,I,o.FormView))),CE(),vg("id",a)("ngModel",o.Value()),_D();}}function rt(t,i){t&1&&wg(0);}function lt(t,i){t&1&&wg(0);}function _t(t,i){if(t&1){let e=vT();Qi(0,"app-size",47),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),Qi(1,"label",39),cg(2,rt,1,0,"ng-container",36)(3,lt,1,0,"ng-container",41),$l()(),CD();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),_D(),CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(9,V,JC(7,I,e.FormView)));}}function st(t,i){t&1&&wg(0);}function pt(t,i){t&1&&wg(0);}function ct(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),cg(2,st,1,0,"ng-container",36)(3,pt,1,0,"ng-container",41),$l(),Qi(4,"input",48),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),Qi(5,"sh-icon",38),jC(6,"numpad"),$l()();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(8,V,JC(6,I,e.FormView))),CE(),vg("id",n)("ngModel",e.Value()),_D();}}function mt(t,i){t&1&&wg(0);}function dt(t,i){t&1&&wg(0);}function ut(t,i){if(t&1){let e=vT();Qi(0,"sh-toggle",30)(1,"label",39),cg(2,mt,1,0,"ng-container",36)(3,dt,1,0,"ng-container",41),$l(),Qi(4,"input",49),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(8,V,JC(6,I,e.FormView))),CE(),vg("id",n)("ngModel",e.Value()),_D();}}function Ct(t,i){t&1&&wg(0);}function gt(t,i){t&1&&wg(0);}function ft(t,i){if(t&1&&jC(0),t&2){let e=i.$implicit;Ql(" ",e," ");}}function yt(t,i){if(t&1){let e=vT();Qi(0,"sh-select",50)(1,"label",39),cg(2,Ct,1,0,"ng-container",36)(3,gt,1,0,"ng-container",41),$l(),Qi(4,"input",51),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l(),cg(5,ft,1,1,"ng-template",null,4,lb);}if(t&2){let e=pC(6),o=iC().$implicit,n=pC(3),a=qC(0);iC(2);let c=pC(10);vg("options",o.FormView.options)("selectMultiple",true)("optionTemplate",e),CE(),vg("for",a),CE(),vg("ngTemplateOutlet",n),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(10,V,JC(8,I,o.FormView))),CE(),vg("ngModel",o.Value()),_D();}}function Tt(t,i){t&1&&wg(0);}function xt(t,i){t&1&&wg(0);}function St(t,i){if(t&1){let e=vT();Qi(0,"app-timespan",47),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),Qi(1,"label",39),cg(2,Tt,1,0,"ng-container",36)(3,xt,1,0,"ng-container",41),$l()(),CD();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),_D(),CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(9,V,JC(7,I,e.FormView)));}}function Ot(t,i){if(t&1){let e=vT();dm(0)(1),cg(2,De,6,5,"ng-template",null,2,lb),Qi(4,"div",25),aT(5,Ge,13,3,"div",26)(6,Be,4,11,"app-file-tree",27)(7,ze,3,6,"app-file-tree",28)(8,Qe,10,12,"sh-form-field")(9,tt,9,12,"sh-form-field")(10,at,7,13)(11,_t,4,11,"app-size",29)(12,ct,7,10,"sh-form-field")(13,ut,5,10,"sh-toggle",30)(14,yt,7,12)(15,St,4,11,"app-timespan",29),Qi(16,"button",31),Hg("click",function(){let n=Od(e).$implicit,a=iC(2);return Pd(a.removeSetting(n))}),Qi(17,"sh-icon"),jC(18,"x-bold"),$l()()();}if(t&2){let e=i.$implicit,o=i.$index,n=iC(2);WC("destination-"+e.Name+o),CE(),WC(n.inAppOptions(e.Name)),CE(3),Kg("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),CE(),cT(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1);}}function Ft(t,i){if(t&1&&(aT(0,Ee,2,0,"div",24),dT(1,Ot,19,5,null,null,lT)),t&2){let e=iC();cT(e.selectedSettings().length===0?0:-1),CE(),fT(e.selectedSettings());}}function ht(t,i){if(t&1&&(Qi(0,"sh-icon",52),jC(1,"x-circle"),$l()),t&2){iC();let e=qC(0);vg("shTooltip",e?.message??"Invalid value");}}function wt(t,i){if(t&1&&(Qi(0,"sh-icon",34),jC(1,"warning"),$l()),t&2){iC();let e=qC(0);vg("shTooltip",e?.message??"Invalid value");}}function Lt(t,i){if(t&1&&(dm(0),aT(1,ht,2,1,"sh-icon",52)(2,wt,2,1,"sh-icon",34)),t&2){iC();let e=qC(0),o=iC().$implicit,n=WC(o.formView.validate(e));CE(),cT(n?.type==="error"?1:n?.type==="warning"?2:-1);}}function It(t,i){if(t&1&&(dm(0),aT(1,Lt,3,2)),t&2){let e=iC().$implicit,n=(WC(e.Value())??"").toString().trim()==="";CE(),cT(!n&&e.formView.validate?1:-1);}}function Vt(t,i){if(t&1&&aT(0,It,2,2),t&2){let e=i.$implicit;cT(e.Value?0:-1);}}var Oe=class t{#e=T(m);options=D1.required();hiddenOptions=E1([]);hasFreeTextSettings=E1(false);applicationOptions=E1();showTextArea=Ge$1(false);showOptionNames=Ge$1(false);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=Nt(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(L=>L.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let M=c?.trim().toLowerCase(),q=a.options.find(Fe=>(Fe??"").trim().toLocaleLowerCase()===M);q&&(c=q);}let L=Se.find(M=>M.name===a?.name);return L&&(a=l(l({},a),L)),m$1(l({},n),{Value:Ge$1(c),FormView:a})}else if(this.hasFreeTextSettings())return m$1(l({},n),{Value:Ge$1(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=Nt(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>m$1(l({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=Nt(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
+ `));updateSettingsFromText(i){if(typeof i!="string")return;let e=je$1(i);this.options.update(()=>e);}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return false}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?false:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}]);}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]});}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let c=e?.trim().toLowerCase()??"",L=i.FormView.options.find(M=>(M??"").trim().toLocaleLowerCase()===c);if(L)return n[a].Value=L,n}return n[a].Value=e,n});}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);return n[a].Name=e,n});}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name));}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;a=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Toggle option names `;let c;return c=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,a,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles","hideShortcuts","resolvePaths"],[3,"startingPath","hideShortcuts","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",c,1,"error"],[1,"optionname"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(Qi(0,"sh-toggle-card",10),ql(1,11)(2),nC(3,5),Gl(),Qi(4,"div",12),aT(5,we,3,0,"button",13)(6,Ne,8,2),$l(),Gl(),aT(7,be,1,3,"textarea",14)(8,Ft,3,1),$l(),cg(9,Vt,1,1,"ng-template",null,0,lb)),e&2&&(vg("disableToggle",true)("isActive",true),CE(5),cT(o.showTextArea()?5:6),CE(2),cT(o.showTextArea()?7:8));},dependencies:[Bn,Ze$1,en,yt$1,Rn,Jt,Ne$1,Ct$1,Mt,ei,I$1,Fe,v,ve$1,at$1,N,Nt$1,J],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.optionname[_ngcontent-%COMP%]{font-family:monospace}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"]})};export{Oe as OptionsListComponent};
@@ -1 +1 @@
1
- import {k}from'./chunk-CUaRQ2FJ.js';import {m as m$4}from'./chunk-BEhUV7oX.js';import {m,N as Nt$1}from'./chunk-Bb6BmVO4.js';import {b as I1,T,aX as y,a5 as g,N as Nt,G as Ge$1,z as za,h as hw,d as N,v,b2 as m$1,aJ as ci,f as aT,i as cT,aD as YC,aH as m$2,Y as Yg,Q as Qi,$ as $l,k as iC,C as CE,w as jC,j as vg,aa as Ql,A as yg,L as Lg,aM as ob,F as Fg,au as jg,aR as sb,aN as ab,av as rC,n as nC,ag as Zg,bg as ag,c4 as pC,l as vT,V as Vg,r as kd,O as Od,J as om,c6 as lb,ab as C,a6 as be$1,bh as Q$1,I,m as m$3,aP as ql,aQ as Gl,o as oC,ac as v1,H as qu,p as cm,U as UC,s as CD,x as am,y as _D,_ as _t,a3 as KC}from'./main-VVQP2YE7.js';import {d}from'./chunk-B8uF0dom.js';import {a as at}from'./chunk-CKnRcyHZ.js';import {v as ve$1}from'./chunk-DmDqcC4A.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {B as Bn,Z as Ze$1,e as en,R as Rn,J as Jt}from'./chunk-BO2GlieG.js';import {C as C$1}from'./chunk-CwKy8pxa.js';import {O}from'./chunk-BVEyeg9y.js';function Y(t,n){if(t&1&&jC(0),t&2){let e=iC(3);Ql(" ",e.statusData().actionText," - ");}}function Z$1(t,n){t&1&&(Qi(0,"sh-icon"),jC(1,"check"),$l());}function ee$1(t,n){t&1&&(Qi(0,"sh-icon"),jC(1,"copy"),$l());}function te(t,n){if(t&1){let e=vT();Qi(0,"div",9)(1,"button",10),Vg("click",function(u){kd(e);let F=iC(4);return Od(F.copyToClipboard(u,F.tooltipText()))}),aT(2,Z$1,2,0,"sh-icon")(3,ee$1,2,0,"sh-icon"),jC(4," Copy "),$l(),Qi(5,"p",11),jC(6),$l()();}if(t&2){let e=iC(4);CE(),yg("color",e.copied()?"success":null),CE(),cT(e.copied()===true?2:3),CE(4),om(e.tooltipText());}}function ne(t,n){if(t&1&&(Qi(0,"div",8),jC(1),$l(),ag(2,te,7,3,"ng-template",null,0,lb)),t&2){let e=pC(3),s=iC(3);yg("shTooltip",e),CE(),Ql(" ",s.statusData().fileStatusText," ");}}function ie(t,n){if(t&1&&(Qi(0,"div"),aT(1,Y,1,1),jC(2),$l(),aT(3,ne,4,2),vg(4,"sh-progress-bar",7)),t&2){let e=iC(2);CE(),cT(e.backupId()===null?1:-1),CE(),Ql(" ",e.statusData().statusText," "),CE(),cT(e.statusData()?.BackendFileSize?3:-1),CE(),yg("value",e.statusData().progress*100);}}function oe(t,n){if(t&1&&(Qi(0,"div",5),Lg(1,1),vg(2,"sh-icon"),ob(3,"relativeTime"),ob(4,"date"),Fg(),$l()),t&2){let e=iC(2);CE(4),jg(e.nextBackup().backup?.Backup?.Name)(sb(3,3,e.nextBackup().time))(ab(4,5,e.nextBackup().time,"shortTime")),rC(1);}}function ae(t,n){t&1&&(Qi(0,"div",5),nC(1,2),$l());}function se(t,n){t&1&&(Qi(0,"div",6),Lg(1,3),vg(2,"sh-spinner"),Fg(),$l()),t&2&&(CE(2),Zg("--spinner-size","12px")("--spinner-thickness","2px"));}function re(t,n){if(t&1&&(Qi(0,"div",4),aT(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),$l()),t&2){let e=iC();CE(),cT(e.isActive()?1:!e.backupId()&&(e.nextBackup().backup||e.nextBackup().time)?2:!e.backupId()&&!e.serverState()?.ActiveTask?3:e.backupId()?-1:4);}}var W$1=class t{backupId=I1(null);#e=T(y);#t=T(g);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=Nt(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=Nt(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):true});isVisible=Nt(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():false:true);nextBackup=Nt(()=>{this.#t.backups();return {backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=Nt(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=Ge$1(false);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(true),this.copiedTimeout=setTimeout(()=>{this.copied.set(false);},2e3);}tooltipTrigger=Ge$1(true);tooltipTriggerEffect=za(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(false));});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,s){e&2&&Yg("is-visible",s.isVisible());},inputs:{backupId:[1,"backupId"]},features:[YC([m$2])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let s;return s=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,s,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,s){e&1&&aT(0,re,5,1,"div",4),e&2&&cT(s.isVisible()?0:-1);},dependencies:[N,v,m,d,at,m$1,ci],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"]})};function he(o,t){o&1&&(Qi(0,"sh-icon",2),jC(1,"x-bold"),$l());}function ye(o,t){o&1&&(Qi(0,"sh-icon",3),jC(1,"list-bold"),$l());}function be(o,t){if(o&1){let n=vT();Qi(0,"button",1),Vg("click",function(){kd(n);let i=iC();return Od(i.toggleNav())}),aT(1,he,2,0,"sh-icon",2)(2,ye,2,0,"sh-icon",3),$l();}if(o&2){let n=iC();CE(),cT(n.isNavOpen()?1:2);}}var w=class o{#e=T(m$4);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&aT(0,be,3,1,"button",0),n&2&&cT(e.isMobile()?0:-1);},dependencies:[v,N],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"]})};var Ie=()=>["/connect/logon"];function ve(o,t){o&1&&(Lg(0,0,1),vg(1,"div",9),Fg());}function Be(o,t){o&1&&(Lg(0,0,2),vg(1,"div",10),Fg());}function ke(o,t){if(o&1){let n=vT();Qi(0,"div",8),Vg("click",function(){kd(n);let i=iC();return Od(i.resetAndRetry())}),Lg(1,0),aT(2,ve,2,0)(3,Be,2,0),Fg(),$l();}if(o&2){let n=iC();CE(2),cT(n.resetting()?2:3);}}function Le(o,t){o&1&&(Qi(0,"div",6),Lg(1,1),vg(2,"div",11),Fg(),$l()),o&2&&yg("routerLink",KC(1,Ie));}function Ge(o,t){o&1&&(Qi(0,"div",6),Lg(1,2),vg(2,"div",10),Fg(),$l()),o&2&&yg("routerLink",KC(1,Ie));}function xe(o,t){if(o&1){let n=vT();Qi(0,"div",7),Lg(1,3),Qi(2,"sh-icon",12),Vg("click",function(){kd(n);let i=iC();return Od(i.cancel())}),$l(),Qi(3,"div",13),Vg("click",function(){kd(n);let i=iC();return Od(i.claim())}),$l(),vg(4,"div",14),Fg(),$l();}}function $e(o,t){if(o&1){let n=vT();Qi(0,"div",8),Vg("click",function(){kd(n);let i=iC();return Od(i.openConsole())}),Lg(1,4),vg(2,"div",15),Fg(),$l();}}var G=class o{#e=T(C$1);state=this.#e.state;resetting=Ge$1(false);stateEffect=za(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(false),this.#e.beginRemoteRegistration());});ngOnInit(){this.#e.refreshRemoteControlStatus();}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank");}cancel(){this.#e.cancelRemoteRegistration();}resetAndRetry(){this.resetting.set(true),this.#e.cancelRemoteRegistration();}openConsole(){this.#e.openConsole();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=oC(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,a=oC(a);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,a,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&aT(0,ke,4,1,"div",5)(1,Le,3,2,"div",6)(2,Ge,3,2,"div",6)(3,xe,5,0,"div",7)(4,$e,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",a=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";cT(a?0:u?1:i?2:r?3:M?4:-1);}},dependencies:[_t,N,at],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"]})};var Re={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ue=["mbps","gbps"],Pe=8,Z=1024,V=Z*1024,q=V*1024,Q=q*1024,Ae=Q*1024,we={B:1,KB:Z,MB:V,GB:q,TB:Q,PB:Ae},Ve=1e3,j=Ve*1e3,W=j*1e3,He=[{threshold:Ae,unitPrefix:"PByte"},{threshold:Q,unitPrefix:"TByte"},{threshold:q,unitPrefix:"GByte"},{threshold:V,unitPrefix:"MByte"},{threshold:Z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],x=class o{#e=T(C);closed=v1();isSubmitting=Ge$1(false);sizeOptions=Ge$1([...Ue]);maxUpload=Ge$1(0);maxDownload=Ge$1(0);maxUploadUnit=Ge$1("mbps");maxDownloadUnit=Ge$1("mbps");ngOnInit(){this.init();}convertToBitsPerSecondUnits(t,n){let i=t*(we[n.toUpperCase()]||V)*Pe;return i===0?{value:0,unit:"mbps"}:i>=W?{value:parseFloat((i/W).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/j).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case "gbps":e=t*W;break;case "mbps":e=t*j;break}let i=e/Pe;if(i===0)return {valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:a,unitPrefix:u}of He)if(i>=a)return {valueForApi:Math.round(i/a),unitPrefixForApi:u};return {valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit);}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload();}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit);}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload();}else this.resetDownload();},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload();}});}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps");}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps");}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e;}submit(){this.isSubmitting.set(true);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),a=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),h=Re[M];h?t=`${r}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`);}if(a){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(a,u),h=Re[M];h?n=`${r}${h}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`);}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.closed.emit(true);},error:r=>{console.error("Failed to submit throttle settings:",r);}});}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let a;a=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,a,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(Qi(0,"header")(1,"h3"),nC(2,0),$l(),Qi(3,"p"),nC(4,1),$l()(),Qi(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),nC(9,2),$l(),Qi(10,"sh-form-field")(11,"input",9),Vg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),cm("ngModelChange",function(a){return UC(e.maxUpload,a)||(e.maxUpload=a),a}),$l(),CD(),$l(),Qi(12,"sh-select",10)(13,"input",11),cm("ngModelChange",function(a){return UC(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),$l(),CD(),$l()(),Qi(14,"div",8)(15,"label"),nC(16,3),$l(),Qi(17,"sh-form-field")(18,"input",9),Vg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),cm("ngModelChange",function(a){return UC(e.maxDownload,a)||(e.maxDownload=a),a}),$l(),CD(),$l(),Qi(19,"sh-select",10)(20,"input",11),cm("ngModelChange",function(a){return UC(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),$l(),CD(),$l()()()(),Qi(21,"footer",12)(22,"button",13),Vg("click",function(){return e.closed.emit(false)}),nC(23,4),$l(),Qi(24,"button",14),Vg("click",function(){return e.submit()}),nC(25,5),$l()()),n&2&&(CE(11),am("ngModel",e.maxUpload),_D(),CE(),yg("isClearable",false)("options",e.sizeOptions()),CE(),am("ngModel",e.maxUploadUnit),_D(),CE(5),am("ngModel",e.maxDownload),_D(),CE(),yg("isClearable",false)("options",e.sizeOptions()),CE(),am("ngModel",e.maxDownloadUnit),_D(),CE(4),Yg("loading",e.isSubmitting()));},dependencies:[Bn,Ze$1,en,Rn,Jt,Fe,Nt$1,v],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}']})};function Ye(o,t){o&1&&vg(0,"app-remote-connectivity-status");}function ze(o,t){if(o&1){let n=vT();Qi(0,"button",7),Vg("click",function(){kd(n);let i=iC(2);return Od(i.abort())}),Lg(1,1),vg(2,"sh-icon"),Fg(),$l();}}function Je(o,t){if(o&1){let n=vT();Qi(0,"button",7),Vg("click",function(){kd(n);let i=iC(2);return Od(i.stop())}),Lg(1,2),vg(2,"sh-icon"),Fg(),$l();}}function Xe(o,t){if(o&1&&aT(0,ze,3,0,"button",14)(1,Je,3,0,"button",14),o&2){let n=iC();cT(n.isStopping()?0:1);}}function Ke(o,t){o&1&&(Lg(0,0,1),vg(1,"sh-icon"),Fg());}function We(o,t){o&1&&(Lg(0,0,2),vg(1,"sh-icon"),Fg());}function je(o,t){o&1&&vg(0,"app-remote-connectivity-status",10);}function Ze(o,t){o&1&&vg(0,"app-remote-connectivity-status",12);}function qe(o,t){if(o&1){let n=vT();Qi(0,"button",13),Vg("click",function(){kd(n);let i=iC();return Od(i.isStopping()?i.abort():i.stop())}),Qi(1,"sh-icon"),jC(2),$l(),jC(3),$l();}if(o&2){let n=iC();CE(2),om(n.isStopping()?"skull":"stop"),CE(),Ql(" ",n.isStopping()?"Abort":"Stop"," ");}}var ee=class o{#e=T(C);#t=T(y);#n=T(be$1);#a=T(Q$1);#i=T(I);#s=T(m$3);#l=T(O);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Nt(()=>this.#a.serverState()?.ActiveTask?.Item1);isStopping=Nt(()=>this.runningTask()==this.#o());#o=Ge$1(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"});}openPauseDialog(){this.#n.open(k,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe());}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe();}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t);}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=oC(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(Qi(0,"div",3),vg(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),Qi(3,"div",5)(4,"div",6),aT(5,Ye,1,0,"app-remote-connectivity-status"),aT(6,Xe,2,1),Qi(7,"button",7),Vg("click",function(){return e.pauseResume()}),Lg(8,0),aT(9,Ke,2,0)(10,We,2,0),Fg(),$l(),Qi(11,"button",7),Vg("click",function(){return e.openThrottleSettingsDialog()}),Qi(12,"sh-icon"),jC(13,"speedometer"),$l()()(),Qi(14,"div",8)(15,"sh-menu")(16,"button",9),aT(17,je,1,0,"app-remote-connectivity-status",10),Qi(18,"sh-icon"),jC(19,"dots-three-vertical-bold"),$l()(),ql(20,11),aT(21,Ze,1,0,"app-remote-connectivity-status",12),aT(22,qe,4,2,"button"),Qi(23,"button",13),Vg("click",function(){return e.pauseResume()}),Qi(24,"sh-icon"),jC(25),$l(),jC(26),$l(),Qi(27,"button",13),Vg("click",function(){return e.openThrottleSettingsDialog()}),Qi(28,"sh-icon"),jC(29,"speedometer"),$l(),jC(30," Throttle Settings "),$l(),Gl(),$l()()()()),n&2&&(CE(5),cT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),CE(),cT(e.runningTask()?6:-1),CE(),Yg("loading",e.isResuming()),CE(2),cT(e.clientIsRunning()?9:10),CE(8),cT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),CE(4),cT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),CE(),cT(e.runningTask()?22:-1),CE(3),om(e.clientIsRunning()?"pause":"play"),CE(),Ql(" ",e.clientIsRunning()?"Pause":"Resume"," "));},dependencies:[G,N,v,ve$1,w,W$1],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"]})};export{W$1 as W,ee as e};
1
+ import {k}from'./chunk-CIe9Bupz.js';import {m as m$4}from'./chunk-CvSsZZty.js';import {m,N as Nt$1}from'./chunk-CyqqlRjO.js';import {E as E1,T,aX as y,a5 as g,N as Nt,G as Ge$1,z as za,h as hw,c as N,v,b2 as m$1,aJ as ci,d as aT,g as cT,aD as YC,aH as m$2,L as Kg,Q as Qi,$ as $l,k as iC,C as CE,s as jC,i as Ig,aa as Ql,y as vg,F as Fg,aM as ob,j as jg,au as Vg,aR as sb,aN as ab,av as rC,n as nC,ag as Yg,bi as cg,c3 as pC,l as vT,H as Hg,O as Od,P as Pd,K as im,c5 as lb,ab as C,a6 as be$1,bj as Q$1,I,m as m$3,aP as ql,aQ as Gl,o as oC,ac as I1,J as zu,p as lm,U as UC,r as CD,w as cm,x as _D,_ as _t,a3 as KC}from'./main-3NL5M6JB.js';import {d}from'./chunk-DDWDcSq2.js';import {a as at}from'./chunk-MDqH8T3Z.js';import {v as ve$1}from'./chunk-CX3Axjpk.js';import {F as Fe}from'./chunk-DhiIZLrA.js';import {B as Bn,Z as Ze$1,e as en,R as Rn,J as Jt}from'./chunk-B6c2NXNy.js';import {C as C$1}from'./chunk-mflQLMHH.js';import {O}from'./chunk-CuJ_uEdr.js';function Y(t,n){if(t&1&&jC(0),t&2){let e=iC(3);Ql(" ",e.statusData().actionText," - ");}}function Z$1(t,n){t&1&&(Qi(0,"sh-icon"),jC(1,"check"),$l());}function ee$1(t,n){t&1&&(Qi(0,"sh-icon"),jC(1,"copy"),$l());}function te(t,n){if(t&1){let e=vT();Qi(0,"div",9)(1,"button",10),Hg("click",function(u){Od(e);let F=iC(4);return Pd(F.copyToClipboard(u,F.tooltipText()))}),aT(2,Z$1,2,0,"sh-icon")(3,ee$1,2,0,"sh-icon"),jC(4," Copy "),$l(),Qi(5,"p",11),jC(6),$l()();}if(t&2){let e=iC(4);CE(),vg("color",e.copied()?"success":null),CE(),cT(e.copied()===true?2:3),CE(4),im(e.tooltipText());}}function ne(t,n){if(t&1&&(Qi(0,"div",8),jC(1),$l(),cg(2,te,7,3,"ng-template",null,0,lb)),t&2){let e=pC(3),s=iC(3);vg("shTooltip",e),CE(),Ql(" ",s.statusData().fileStatusText," ");}}function ie(t,n){if(t&1&&(Qi(0,"div"),aT(1,Y,1,1),jC(2),$l(),aT(3,ne,4,2),Ig(4,"sh-progress-bar",7)),t&2){let e=iC(2);CE(),cT(e.backupId()===null?1:-1),CE(),Ql(" ",e.statusData().statusText," "),CE(),cT(e.statusData()?.BackendFileSize?3:-1),CE(),vg("value",e.statusData().progress*100);}}function oe(t,n){if(t&1&&(Qi(0,"div",5),Fg(1,1),Ig(2,"sh-icon"),ob(3,"relativeTime"),ob(4,"date"),jg(),$l()),t&2){let e=iC(2);CE(4),Vg(e.nextBackup().backup?.Backup?.Name)(sb(3,3,e.nextBackup().time))(ab(4,5,e.nextBackup().time,"shortTime")),rC(1);}}function ae(t,n){t&1&&(Qi(0,"div",5),nC(1,2),$l());}function se(t,n){t&1&&(Qi(0,"div",6),Fg(1,3),Ig(2,"sh-spinner"),jg(),$l()),t&2&&(CE(2),Yg("--spinner-size","12px")("--spinner-thickness","2px"));}function re(t,n){if(t&1&&(Qi(0,"div",4),aT(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),$l()),t&2){let e=iC();CE(),cT(e.isActive()?1:!e.backupId()&&(e.nextBackup().backup||e.nextBackup().time)?2:!e.backupId()&&!e.serverState()?.ActiveTask?3:e.backupId()?-1:4);}}var W$1=class t{backupId=E1(null);#e=T(y);#t=T(g);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=Nt(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=Nt(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):true});isVisible=Nt(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():false:true);nextBackup=Nt(()=>{this.#t.backups();return {backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=Nt(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=Ge$1(false);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(true),this.copiedTimeout=setTimeout(()=>{this.copied.set(false);},2e3);}tooltipTrigger=Ge$1(true);tooltipTriggerEffect=za(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(false));});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,s){e&2&&Kg("is-visible",s.isVisible());},inputs:{backupId:[1,"backupId"]},features:[YC([m$2])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let s;return s=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,s,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,s){e&1&&aT(0,re,5,1,"div",4),e&2&&cT(s.isVisible()?0:-1);},dependencies:[N,v,m,d,at,m$1,ci],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"]})};function he(o,t){o&1&&(Qi(0,"sh-icon",2),jC(1,"x-bold"),$l());}function ye(o,t){o&1&&(Qi(0,"sh-icon",3),jC(1,"list-bold"),$l());}function be(o,t){if(o&1){let n=vT();Qi(0,"button",1),Hg("click",function(){Od(n);let i=iC();return Pd(i.toggleNav())}),aT(1,he,2,0,"sh-icon",2)(2,ye,2,0,"sh-icon",3),$l();}if(o&2){let n=iC();CE(),cT(n.isNavOpen()?1:2);}}var w=class o{#e=T(m$4);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&aT(0,be,3,1,"button",0),n&2&&cT(e.isMobile()?0:-1);},dependencies:[v,N],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"]})};var Ie=()=>["/connect/logon"];function ve(o,t){o&1&&(Fg(0,0,1),Ig(1,"div",9),jg());}function Be(o,t){o&1&&(Fg(0,0,2),Ig(1,"div",10),jg());}function ke(o,t){if(o&1){let n=vT();Qi(0,"div",8),Hg("click",function(){Od(n);let i=iC();return Pd(i.resetAndRetry())}),Fg(1,0),aT(2,ve,2,0)(3,Be,2,0),jg(),$l();}if(o&2){let n=iC();CE(2),cT(n.resetting()?2:3);}}function Le(o,t){o&1&&(Qi(0,"div",6),Fg(1,1),Ig(2,"div",11),jg(),$l()),o&2&&vg("routerLink",KC(1,Ie));}function Ge(o,t){o&1&&(Qi(0,"div",6),Fg(1,2),Ig(2,"div",10),jg(),$l()),o&2&&vg("routerLink",KC(1,Ie));}function xe(o,t){if(o&1){let n=vT();Qi(0,"div",7),Fg(1,3),Qi(2,"sh-icon",12),Hg("click",function(){Od(n);let i=iC();return Pd(i.cancel())}),$l(),Qi(3,"div",13),Hg("click",function(){Od(n);let i=iC();return Pd(i.claim())}),$l(),Ig(4,"div",14),jg(),$l();}}function $e(o,t){if(o&1){let n=vT();Qi(0,"div",8),Hg("click",function(){Od(n);let i=iC();return Pd(i.openConsole())}),Fg(1,4),Ig(2,"div",15),jg(),$l();}}var G=class o{#e=T(C$1);state=this.#e.state;resetting=Ge$1(false);stateEffect=za(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(false),this.#e.beginRemoteRegistration());});ngOnInit(){this.#e.refreshRemoteControlStatus();}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank");}cancel(){this.#e.cancelRemoteRegistration();}resetAndRetry(){this.resetting.set(true),this.#e.cancelRemoteRegistration();}openConsole(){this.#e.openConsole();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=oC(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,a=oC(a);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,a,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&aT(0,ke,4,1,"div",5)(1,Le,3,2,"div",6)(2,Ge,3,2,"div",6)(3,xe,5,0,"div",7)(4,$e,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",a=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";cT(a?0:u?1:i?2:r?3:M?4:-1);}},dependencies:[_t,N,at],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"]})};var Re={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ue=["mbps","gbps"],Pe=8,Z=1024,V=Z*1024,q=V*1024,Q=q*1024,Ae=Q*1024,we={B:1,KB:Z,MB:V,GB:q,TB:Q,PB:Ae},Ve=1e3,j=Ve*1e3,W=j*1e3,He=[{threshold:Ae,unitPrefix:"PByte"},{threshold:Q,unitPrefix:"TByte"},{threshold:q,unitPrefix:"GByte"},{threshold:V,unitPrefix:"MByte"},{threshold:Z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],x=class o{#e=T(C);closed=I1();isSubmitting=Ge$1(false);sizeOptions=Ge$1([...Ue]);maxUpload=Ge$1(0);maxDownload=Ge$1(0);maxUploadUnit=Ge$1("mbps");maxDownloadUnit=Ge$1("mbps");ngOnInit(){this.init();}convertToBitsPerSecondUnits(t,n){let i=t*(we[n.toUpperCase()]||V)*Pe;return i===0?{value:0,unit:"mbps"}:i>=W?{value:parseFloat((i/W).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/j).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case "gbps":e=t*W;break;case "mbps":e=t*j;break}let i=e/Pe;if(i===0)return {valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:a,unitPrefix:u}of He)if(i>=a)return {valueForApi:Math.round(i/a),unitPrefixForApi:u};return {valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit);}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload();}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit);}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload();}else this.resetDownload();},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload();}});}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps");}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps");}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e;}submit(){this.isSubmitting.set(true);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),a=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),h=Re[M];h?t=`${r}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`);}if(a){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(a,u),h=Re[M];h?n=`${r}${h}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`);}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(zu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.closed.emit(true);},error:r=>{console.error("Failed to submit throttle settings:",r);}});}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let a;a=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,a,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(Qi(0,"header")(1,"h3"),nC(2,0),$l(),Qi(3,"p"),nC(4,1),$l()(),Qi(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),nC(9,2),$l(),Qi(10,"sh-form-field")(11,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return UC(e.maxUpload,a)||(e.maxUpload=a),a}),$l(),CD(),$l(),Qi(12,"sh-select",10)(13,"input",11),lm("ngModelChange",function(a){return UC(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),$l(),CD(),$l()(),Qi(14,"div",8)(15,"label"),nC(16,3),$l(),Qi(17,"sh-form-field")(18,"input",9),Hg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),lm("ngModelChange",function(a){return UC(e.maxDownload,a)||(e.maxDownload=a),a}),$l(),CD(),$l(),Qi(19,"sh-select",10)(20,"input",11),lm("ngModelChange",function(a){return UC(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),$l(),CD(),$l()()()(),Qi(21,"footer",12)(22,"button",13),Hg("click",function(){return e.closed.emit(false)}),nC(23,4),$l(),Qi(24,"button",14),Hg("click",function(){return e.submit()}),nC(25,5),$l()()),n&2&&(CE(11),cm("ngModel",e.maxUpload),_D(),CE(),vg("isClearable",false)("options",e.sizeOptions()),CE(),cm("ngModel",e.maxUploadUnit),_D(),CE(5),cm("ngModel",e.maxDownload),_D(),CE(),vg("isClearable",false)("options",e.sizeOptions()),CE(),cm("ngModel",e.maxDownloadUnit),_D(),CE(4),Kg("loading",e.isSubmitting()));},dependencies:[Bn,Ze$1,en,Rn,Jt,Fe,Nt$1,v],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}']})};function Ye(o,t){o&1&&Ig(0,"app-remote-connectivity-status");}function ze(o,t){if(o&1){let n=vT();Qi(0,"button",7),Hg("click",function(){Od(n);let i=iC(2);return Pd(i.abort())}),Fg(1,1),Ig(2,"sh-icon"),jg(),$l();}}function Je(o,t){if(o&1){let n=vT();Qi(0,"button",7),Hg("click",function(){Od(n);let i=iC(2);return Pd(i.stop())}),Fg(1,2),Ig(2,"sh-icon"),jg(),$l();}}function Xe(o,t){if(o&1&&aT(0,ze,3,0,"button",14)(1,Je,3,0,"button",14),o&2){let n=iC();cT(n.isStopping()?0:1);}}function Ke(o,t){o&1&&(Fg(0,0,1),Ig(1,"sh-icon"),jg());}function We(o,t){o&1&&(Fg(0,0,2),Ig(1,"sh-icon"),jg());}function je(o,t){o&1&&Ig(0,"app-remote-connectivity-status",10);}function Ze(o,t){o&1&&Ig(0,"app-remote-connectivity-status",12);}function qe(o,t){if(o&1){let n=vT();Qi(0,"button",13),Hg("click",function(){Od(n);let i=iC();return Pd(i.isStopping()?i.abort():i.stop())}),Qi(1,"sh-icon"),jC(2),$l(),jC(3),$l();}if(o&2){let n=iC();CE(2),im(n.isStopping()?"skull":"stop"),CE(),Ql(" ",n.isStopping()?"Abort":"Stop"," ");}}var ee=class o{#e=T(C);#t=T(y);#n=T(be$1);#a=T(Q$1);#i=T(I);#s=T(m$3);#l=T(O);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Nt(()=>this.#a.serverState()?.ActiveTask?.Item1);isStopping=Nt(()=>this.runningTask()==this.#o());#o=Ge$1(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"});}openPauseDialog(){this.#n.open(k,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe());}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe();}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t);}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=hw({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=oC(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(Qi(0,"div",3),Ig(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),Qi(3,"div",5)(4,"div",6),aT(5,Ye,1,0,"app-remote-connectivity-status"),aT(6,Xe,2,1),Qi(7,"button",7),Hg("click",function(){return e.pauseResume()}),Fg(8,0),aT(9,Ke,2,0)(10,We,2,0),jg(),$l(),Qi(11,"button",7),Hg("click",function(){return e.openThrottleSettingsDialog()}),Qi(12,"sh-icon"),jC(13,"speedometer"),$l()()(),Qi(14,"div",8)(15,"sh-menu")(16,"button",9),aT(17,je,1,0,"app-remote-connectivity-status",10),Qi(18,"sh-icon"),jC(19,"dots-three-vertical-bold"),$l()(),ql(20,11),aT(21,Ze,1,0,"app-remote-connectivity-status",12),aT(22,qe,4,2,"button"),Qi(23,"button",13),Hg("click",function(){return e.pauseResume()}),Qi(24,"sh-icon"),jC(25),$l(),jC(26),$l(),Qi(27,"button",13),Hg("click",function(){return e.openThrottleSettingsDialog()}),Qi(28,"sh-icon"),jC(29,"speedometer"),$l(),jC(30," Throttle Settings "),$l(),Gl(),$l()()()()),n&2&&(CE(5),cT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),CE(),cT(e.runningTask()?6:-1),CE(),Kg("loading",e.isResuming()),CE(2),cT(e.clientIsRunning()?9:10),CE(8),cT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),CE(4),cT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),CE(),cT(e.runningTask()?22:-1),CE(3),im(e.clientIsRunning()?"pause":"play"),CE(),Ql(" ",e.clientIsRunning()?"Pause":"Resume"," "));},dependencies:[G,N,v,ve$1,w,W$1],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"]})};export{W$1 as W,ee as e};