@duplicati/ngclient 0.0.136 → 0.0.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/spk.woff2 +0 -0
- package/chunk-23ODVSFI.js +1 -0
- package/chunk-2D26BDYB.js +1 -0
- package/{chunk-Y5UKX3VC.js → chunk-3JKXOOME.js} +1 -1
- package/chunk-3ZVSHKLD.js +1 -0
- package/chunk-4DBVVUBO.js +1 -0
- package/chunk-5SXTGTAZ.js +1 -0
- package/chunk-64ZU74CD.js +1 -0
- package/chunk-6DSLFJ4T.js +1 -0
- package/chunk-74BJ4GVA.js +1 -0
- package/chunk-7IBACL6K.js +1 -0
- package/chunk-7QJG4IIT.js +1 -0
- package/{chunk-HDV3QKLN.js → chunk-AM7RYTIO.js} +1 -1
- package/{chunk-LKJ2SBQA.js → chunk-B6OIHB5W.js} +1 -1
- package/{chunk-LFMC622O.js → chunk-BQE7QZIT.js} +1 -1
- package/chunk-CCA5ZCEA.js +1 -0
- package/chunk-CF7KRXOR.js +1 -0
- package/chunk-DG7SFNGT.js +1 -0
- package/chunk-EMXIHCYQ.js +1 -0
- package/chunk-EN6226UP.js +1 -0
- package/chunk-GJXR776M.js +1 -0
- package/{chunk-X3RII7G2.js → chunk-GKOS3VYR.js} +1 -1
- package/chunk-H52UO57S.js +8 -0
- package/chunk-HDDYOVZL.js +1 -0
- package/chunk-HRSZZWTB.js +1 -0
- package/chunk-IZXB2EWT.js +1 -0
- package/{chunk-JM7VAPIC.js → chunk-J6BHRR34.js} +1 -1
- package/chunk-JI7GCFQB.js +1 -0
- package/chunk-KSQIUDEA.js +1 -0
- package/chunk-LPFSQKIK.js +1 -0
- package/{chunk-T5KDR4TA.js → chunk-M3CLGZMQ.js} +1 -1
- package/{chunk-7MV7VPDB.js → chunk-MMPTX6PS.js} +1 -1
- package/chunk-N57J64DN.js +3 -0
- package/chunk-NHAGSIVX.js +1 -0
- package/chunk-NS4PAVKI.js +1 -0
- package/chunk-NZ2KKCDC.js +1 -0
- package/{chunk-HU5PJ35D.js → chunk-OFFMLGEZ.js} +1 -1
- package/chunk-PZA4FRVJ.js +1 -0
- package/chunk-PZCO6IX3.js +1 -0
- package/{chunk-43A44MVC.js → chunk-QRRKPBY6.js} +1 -1
- package/chunk-RCKA5DTC.js +1 -0
- package/chunk-RNMBKZ6Y.js +3 -0
- package/chunk-ULLALJQ2.js +1 -0
- package/chunk-UT7GWYPR.js +1 -0
- package/{chunk-UFP4XKZF.js → chunk-UZK7ABRM.js} +1 -1
- package/chunk-V5YSQG4X.js +2 -0
- package/chunk-V6EWWEIG.js +1 -0
- package/chunk-V77N2OUE.js +1 -0
- package/chunk-WHFO4IFB.js +1 -0
- package/chunk-WZNH4JPF.js +1 -0
- package/chunk-WZRDKVOR.js +1 -0
- package/{chunk-XLKQSWFD.js → chunk-XIOHRQ3X.js} +1 -1
- package/{chunk-WF6EAWTW.js → chunk-ZI2XNFAW.js} +1 -1
- package/index.html +1 -1
- package/locale/messages.cs.json +22 -1
- package/locale/messages.da.json +24 -1
- package/locale/messages.de.json +211 -22
- package/locale/messages.en_GB.json +24 -1
- package/locale/messages.es.json +25 -1
- package/locale/messages.fi.json +32 -3
- package/locale/messages.fr.json +20 -1
- package/locale/messages.hu.json +26 -3
- package/locale/messages.it.json +38 -24
- package/locale/messages.ja_JP.json +28 -1
- package/locale/messages.nl_NL.json +164 -20
- package/locale/messages.pl.json +20 -1
- package/locale/messages.pt.json +19 -1
- package/locale/messages.pt_BR.json +19 -1
- package/locale/messages.ru.json +33 -3
- package/locale/messages.sr_RS.json +32 -3
- package/locale/messages.sv_SE.json +32 -3
- package/locale/messages.zh-Hans.json +25 -9
- package/locale/messages.zh_CN.json +27 -18
- package/locale/messages.zh_TW.json +25 -3
- package/main-4FANBYAP.js +1 -0
- package/package.json +1 -1
- package/chunk-3B3CD5KI.js +0 -1
- package/chunk-42LUYQ5S.js +0 -1
- package/chunk-4NAIBN6Y.js +0 -1
- package/chunk-4WF2SEOM.js +0 -1
- package/chunk-6ABAW3RM.js +0 -1
- package/chunk-6JDDO2JR.js +0 -1
- package/chunk-6NTCVCCY.js +0 -1
- package/chunk-7HKUM56D.js +0 -1
- package/chunk-7N3LIJV6.js +0 -1
- package/chunk-B5ABLFSQ.js +0 -1
- package/chunk-D7KAEUGB.js +0 -1
- package/chunk-FCCV5HAI.js +0 -6
- package/chunk-FHZLYBIT.js +0 -1
- package/chunk-FUEIZLWH.js +0 -1
- package/chunk-FUZLIOUQ.js +0 -1
- package/chunk-FZG6OXT3.js +0 -1
- package/chunk-IQHBPLHL.js +0 -1
- package/chunk-J6SAG7QN.js +0 -1
- package/chunk-K6ISVHYD.js +0 -1
- package/chunk-L5Y36SCW.js +0 -1
- package/chunk-M3URTEVE.js +0 -2
- package/chunk-MVUGI7Y7.js +0 -1
- package/chunk-OHMTS3T7.js +0 -1
- package/chunk-P3AZ3DXZ.js +0 -1
- package/chunk-P4KFR7NY.js +0 -1
- package/chunk-P4KOC4NP.js +0 -1
- package/chunk-POGTGPHE.js +0 -1
- package/chunk-PVLT4ZGI.js +0 -1
- package/chunk-QECYPB3W.js +0 -1
- package/chunk-ROOTIQEO.js +0 -1
- package/chunk-SMQWGV7N.js +0 -1
- package/chunk-UFQWL2QF.js +0 -3
- package/chunk-VRE6C66C.js +0 -1
- package/chunk-WXAZWUCA.js +0 -1
- package/chunk-XIIFTZ5G.js +0 -1
- package/chunk-YZYJP5XH.js +0 -1
- package/chunk-ZFCSCXTC.js +0 -1
- package/chunk-ZFONU33Q.js +0 -1
- package/main-HYB6MFRZ.js +0 -1
package/chunk-ZFONU33Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as $,r as E}from"./chunk-NSIELNIY.js";import{h as O}from"./chunk-DNJOKPEL.js";import{H as M,Hc as C,U as V,Z as G,na as D,r as f}from"./chunk-BTMXQPBB.js";import{a}from"./chunk-EUDKD2JW.js";var u=class{constructor(t){this.loader=t}_data=D(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(M(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=G(O);#o=new u(()=>this.getS3Config("Providers"));#n=new u(()=>this.getS3Config("Regions"));#r=new u(()=>this.getS3Config("RegionHosts"));#a=new u(()=>this.getS3Config("StorageClasses"));#i=C(()=>{let t=this.#o.value()(),o=this.#r.value()(),n=[...t??[],...o?.map(c=>({key:`Amazon ${c.key}`,value:c.value}))??[]];return Array.from(new Map(n.map(c=>[c.value,c])).values())});#s=new u(()=>this.getStorjConfig("Satellites"));#l=new u(()=>this.getStorjConfig("AuthenticationMethods"));#c=new u(()=>this.getOpenstackConfig("Providers"));#p=new u(()=>this.getOpenstackConfig("Versions"));#m=new u(()=>this.getGcsConfig("Locations"));#u=new u(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#a.load()}getStorjSatellites(){return this.#s.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#m.load()}getGcsStorageClasses(){return this.#u.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(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(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,n])=>({key:o,value:n})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=V({token:e,factory:e.\u0275fac,providedIn:"root"})};var r=new E,l={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.`},A={description:$localize`Unknown destination type`,customFields:{path:{type:"String",name:"path",doubleSlash:l,shortDescription:$localize`Path`,formElement:e=>r.control(e??"")}},mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>{let c=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:c.split("?")[0]}},i(e,t))}}},L=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:l,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>r.control(e??""),isMandatory:!0}},mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>{let c=o.startsWith("file:///")?o.split("file:///")[1]:o.split("file://")[1],g=c.slice(1).startsWith(":\\")?c:"/"+c;return a({destinationType:e,custom:{path:g.split("?")[0]}},i(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>r.control(e??"",[$.required,$.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=>r.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:n}=e.custom;return s(e,t,o,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>r.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>r.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:!0,formElement:e=>r.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>D([{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 s(e,t,null,o)},from:(e,t,o)=>a({destinationType:e,custom:{path:p(t.pathname),bucket:t.hostname}},i(e,t))}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,oauthField:"authid",customFields:{path:{type:"Bucketname",name:"path",doubleSlash:l,shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>r.control(e??""),isMandatory:!0}},dynamicFields:[{name:"authid",isMandatory:!0}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>D([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return s(e,t,null,o)},from:(e,t,o)=>{let n=t.pathname.replace(/^\//,"");return a({destinationType:e,custom:{server:t.hostname,path:n}},i(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>r.control(e??"")},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:n}=e.custom;return s(e,o,t,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>r.control(e??"")},path:{type:"String",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:n}=e.custom;return s(e,o,t,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>r.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return s(e,t,null,o)},from:(e,t,o)=>a({destinationType:e,custom:{bucket:t.hostname,path:decodeURIComponent(t.pathname)}},i(e,t))}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>r.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:l,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return s(e,t,null,o)},from:(e,t,o)=>a({destinationType:e,custom:{bucket:t.hostname,path:p(t.pathname)}},i(e,t))}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return s(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>r.control(e??"",[$.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>r.control(e??"")},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:n}=e.custom;return s(e,o,t,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,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"],n=Object.entries(e.dynamic).filter(([c])=>!["rclone-remote-repository","rclone-remote-path"].includes(c));return F(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced),...n])},from:(e,t,o)=>{let{advanced:n,dynamic:c}=i(e,t);return a({destinationType:e,dynamic:a({"rclone-remote-repository":t.hostname,"rclone-remote-path":t.pathname},c)},n)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>r.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{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 s(e,t,null,null)},from:(e,t,o)=>a({destinationType:e,custom:{path:p(t.pathname),bucket:t.hostname}},i(e,t))}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>r.control(e??"")},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:n}=e.custom;return s(e,t,o,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>r.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=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:n}=e.custom;return s(e,t,o,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>r.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=>r.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:n}=e.custom;return s(e,o,t,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],n=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([c])=>c!=="sia-targetpath")];return F(e.destinationType??"sia",t,null,o,n)},from:(e,t,o)=>a({destinationType:e,custom:{path:p(t.pathname)}},i(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"cos-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,order:1,isMandatory:!0},{name:"cos-region",shortDescription:$localize`Region`,order:2},{name:"cos-app-id",shortDescription:$localize`COS App Id`,order:3,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,order:4,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,order:5,isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:p(t.pathname)}},i(e,t))}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>r.control(e??"")},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:n}=e.custom;return s(e,t,o,n)},from:(e,t,o)=>a({destinationType:e,custom:{server:t.hostname,port:t.port,path:p(t.pathname)}},i(e,t))}},{key:"cifs",displayName:$localize`CIFS`,description:$localize`Store backups in CIFS.`,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>r.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>r.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>r.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:n}=e.custom;return s(e,o,null,b(t,n))},from:(e,t,o)=>{let n=t.pathname.split("/")[1],c=t.pathname.split("/").slice(2).join("/");return a({destinationType:e,custom:{server:t.hostname,share:n,path:c}},i(e,t))}}},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>s(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},i(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,customFields:{path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>r.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>r.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return console.log(t),s(e,null,null,t)},from:(e,t,o)=>(console.log(t),a({destinationType:e,custom:{path:h(t)}},i(e,t)))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:l},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${k([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let n=i(e,t);return delete n.advanced["storj-auth-method"],a({destinationType:e},n)}}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:l}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${k([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let n=i(e,t);return delete n.advanced["storj-auth-method"],a({destinationType:e},n)}}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,customFields:{bucket:{type:"Bucketname",name:"oss-bucket-name",shortDescription:$localize`Bucket name`,formElement:e=>r.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:l,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>r.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path,o=e.custom["oss-bucket-name"];return s(e,o,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:p(t.pathname),bucket:t.hostname}},i(e,t))}}],re={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function s(e,t,o,n){return F(e.destinationType??"file",t,o,n,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function F(e,t,o,n,c){let m=k(c),g=R(t),S=g==""?"":g+U(o),v=b(S,n??"");return`${e}://${v}${m}`}function p(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function b(...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 h(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new URL(e)}catch{return""}return(e.hostname??"")+(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function U(e){return e==null||e===""?"":":"+e.toString()}function P(e){return L.find(o=>o.key===e||o.customKey===e)??a({key:e,displayName:e},A)}function i(e,t){let o={},n={},c=P(e);return t.searchParams.forEach((m,g)=>{c?.dynamicFields?.some(y=>y===g||y?.name===g)?n[g]=decodeURIComponent(m):o[g]=decodeURIComponent(m)}),{advanced:o,dynamic:n}}function k(e,t=!1){let o=e.map(([c,m])=>`${c}=${m?encodeURIComponent(m.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function se(e){let t=e.destinationType??"";return P(t)?.mapper.to(e)??""}function le(e){let t=URL.canParse(e),o=e.split("://")[0],n=e.split("://")[1],c="http://"+n;if(!n)return null;if(n.startsWith("%")&&o==="file")return P(o).mapper.from(o,new URL("http://localhost"),e);try{let m=new URL(c);if(m.host==="undefined")return null;let g=n.split("?")[0].split("/")[0],S=!isNaN(Number(m.host.replaceAll(".",""))),y=g.split("."),v=y.length===4&&y.every(z=>z.length&&z.length<=3&&!isNaN(Number(z))&&parseInt(z)<=255);return S&&!v?null:P(o).mapper.from(o,m,e)}catch{return null}}export{P as a,se as b,le as c,re as d};
|
package/main-HYB6MFRZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as be,c as Ce}from"./chunk-M3URTEVE.js";import{a as he}from"./chunk-43A44MVC.js";import{a as I}from"./chunk-ROOTIQEO.js";import"./chunk-FUZLIOUQ.js";import"./chunk-JM7VAPIC.js";import"./chunk-2BX65XJQ.js";import{a as P}from"./chunk-RHW5QVAY.js";import{a as L}from"./chunk-6JQM2X3B.js";import{a as de}from"./chunk-WXARH2SG.js";import{a as b,b as C,c as ue,d as E}from"./chunk-FZG6OXT3.js";import{c as ie,d as ae,g as pe,h as ce}from"./chunk-2W6BEUGU.js";import{a as ee}from"./chunk-JFOXV66M.js";import{c as le}from"./chunk-Y5IRBMLB.js";import{a as te,b as oe,d as ne,e as re,f as se,i as me}from"./chunk-DNJOKPEL.js";import{a as ge}from"./chunk-UFP4XKZF.js";import{la as Y,qa as Z}from"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{a as ye}from"./chunk-HDV3QKLN.js";import{b as fe}from"./chunk-LKJ2SBQA.js";import{A as x,Ab as z,B as G,Cc as q,Dc as X,H as w,Ic as Q,N as J,P as R,R as B,U as k,X as $,Z as s,ab as _,f as j,ha as K,i as D,n as F,na as d,o as U,r as S}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var M=class e{#o=s(b);#s=s(C);ngOnInit(){this.#s.fetchConfig(),this.#o.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=_({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&z(0,"router-outlet")},dependencies:[ie],encapsulation:2})};var Se={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var h=new $("ENVIRONMENT");var A=class e{#o=s(me);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#o.getApiV1Webmodules().pipe(B(n=>this.webmodules.set(n)),w(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=k({token:e,factory:e.\u0275fac,providedIn:"root"})};var Me=()=>{let e=s(E);return e.token()?!0:e.checkProxyAuthed().pipe(R(t=>t?F(!0):e.refreshToken().pipe(S(()=>!0))))},Ae=()=>{let e=s(C),t=s(I),o=s(K),n=e.relayIsEnabled()?"longpoll":"websocket",i=[o.get(L).preload(!0),o.get(L).preloadFilterGroups(!0),o.get(A).preload(!0)];return e.configLoaded===null?x(i).pipe(S(()=>n)):e.configLoaded?.pipe(R(()=>x(i)))},Re=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-42LUYQ5S.js")},{path:"logout",loadComponent:()=>import("./chunk-WF6EAWTW.js")},{path:"",canActivate:[Me],children:[{path:"",canActivate:[Ae],loadComponent:()=>import("./chunk-ZFCSCXTC.js"),children:[{path:"",loadComponent:()=>import("./chunk-7N3LIJV6.js")},{path:"add-backup",loadComponent:()=>import("./chunk-POGTGPHE.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-OHMTS3T7.js")},{path:"backup/import",loadComponent:()=>import("./chunk-K6ISVHYD.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-FHZLYBIT.js"),loadChildren:()=>import("./chunk-QECYPB3W.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-FHZLYBIT.js"),loadChildren:()=>import("./chunk-QECYPB3W.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-4NAIBN6Y.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-D7KAEUGB.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-UFQWL2QF.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-VRE6C66C.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-WXAZWUCA.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-6ABAW3RM.js")},{path:"from-config",loadComponent:()=>import("./chunk-QBJGIKPM.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-YZYJP5XH.js"),loadChildren:()=>import("./chunk-P3AZ3DXZ.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-YZYJP5XH.js"),loadChildren:()=>import("./chunk-P3AZ3DXZ.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-YZYJP5XH.js"),loadChildren:()=>import("./chunk-P3AZ3DXZ.js")},{path:"settings",loadComponent:()=>import("./chunk-PVLT4ZGI.js")},{path:"about",loadComponent:()=>import("./chunk-J6SAG7QN.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-7MV7VPDB.js")},{path:"changelog",loadComponent:()=>import("./chunk-DBD6FOQL.js")},{path:"libraries",loadComponent:()=>import("./chunk-XBJRRUMO.js")},{path:"system-info",loadComponent:()=>import("./chunk-QVEGV6V6.js")},{path:"server-settings",loadComponent:()=>import("./chunk-EKP3ML6M.js")},{path:"logs",loadChildren:()=>import("./chunk-LDIHJZUP.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-WRWIBPXL.js")}]}]}]}]}];var V=null,Te=(e,t)=>{let o=s(E),n=s(ae),i=s(b),l=s(h),r=i.getItem("locale"),u=s(le),a=be(r),p=e.url==="/api/v1/auth/login",m=e.url==="/api/v1/auth/refresh",v=e.url==="/api/v1/progressstate",g=e.url==="/api/v1/remoteoperation/test",y=e.url==="/api/v1/filesystem/validate",T=e.url.startsWith("/api/v2/"),N=o.token(),H=e,W=e.headers.has("custom-proxy-check")||N===ue;if(N&&e.url.startsWith(l.baseUrl)&&!W){let c=e.headers.set("Authorization",`Bearer ${N}`);r&&r!=="en-US"&&(c=c.set("X-Ui-Language",a)),H=e.clone({headers:c})}return t(H).pipe(S(c=>{if(c.type===4&&c.status===200&&T){let f=c.body;if(f?.Success===!1)throw{status:200,message:f?.Error??"Unknown error",error:{Error:f?.Error??"Unknown error"},body:f}}return c}),G(c=>{let f=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;return!W&&(v&&c.status===404||g||y||u.error(f),m&&c.status===401&&(o.logout(),n.navigate(["/logout"])),!p&&!m&&c.status===401)?(V??=o.refreshToken().pipe(J()),V.pipe(R(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),w(()=>V=null))):U(()=>({error:c,message:f}))}))};var Oe="1.0.0",we=`portal-proxy-client-${P()}`,Ne=1,O=class e{#o=1e3;#s=s(h);#t=d("disconnected");#l=d(this.#o);#i=d(!1);#n=d(!1);#a=d(null);isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#t.asReadonly();#p=[];#r={};#e=null;#m=new TextDecoder("utf-8");#c=null;#d=Q(()=>{let t=this.#i(),o=this.#l(),n=this.#a();if(!n||!t||!o||o<this.#o){this.#c&&window.clearInterval(this.#c);return}this.#c=window.setInterval(()=>{this.connectToMachineServer(n)},o)});utf8Atob(t){let o=Uint8Array.from(atob(t),i=>i.charCodeAt(0)),n=this.#m.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,i=this.wsState();(i==="disconnected"||i==="error"||n)&&(this.#e?.close(),this.#e=null),!this.#e&&(this.#e=new WebSocket(this.#s.machineServerUrl),this.#t.set("connecting"),this.#e.onopen=()=>{this.#t.set("connect"),this.#n.set(!0),this.#i.set(!1),this.#a.set(null)},this.#e.onclose=()=>{this.#t.set("disconnected"),this.#n.set(!1),this.#a.set(t),this.#i.set(!0)},this.#e.onerror=()=>{this.#t.set("error")},this.#e.onmessage=l=>{let r=JSON.parse(l.data);if(this.wsState()==="connect"){if(r.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${r.type}'`);return}let a={token:t,publicKey:"",clientVersion:Oe,protocolVersion:Ne},p=this.createResponse(r,"authportal",a);this.#t.set("welcome"),this.#e?.send(p)}else if(this.wsState()==="welcome"){if(r.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${r.type}'`);return}var u=JSON.parse(r.payload??"");if(u.accepted===!1){this.disconnectFromMachineServer("Authentication failed");return}for(this.#t.set("authenticated"),this.#n.set(!0);this.#p.length>0;){let a=this.#p.pop();a&&this.#r[a.messageId]&&this.activateCommand(a)}}else if(this.wsState()==="authenticated"){if(r.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${r.type}'`);return}let a=this.#r[r.messageId];if(a){if(r.errorMessage){a.reject(r.errorMessage);return}else{let p=JSON.parse(r.payload??"");p.body=p?.body==null?null:this.utf8Atob(p.body),a.resolve(p)}delete this.#r[r.messageId],window.clearTimeout(a.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#e?.close(),this.#e=null,this.#t.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let i={from:we,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(t,o,n,i,l,r,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((a,p)=>{let m=P(),g={from:we,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:l,headers:r})},y={resolve:a,reject:p,timer:window.setTimeout(()=>{let T=this.#r[m];T&&(delete this.#r[m],T.reject("Timeout"))},u)};this.#r[m]=y,this.#n()?this.activateCommand(g):this.#p.push(g)})}activateCommand(t){this.#e?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=k({token:e,factory:e.\u0275fac,providedIn:"root"})};function xe(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function ke(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let i=xe(t.body),l={};t.headers.keys().forEach(p=>{l[p]=t.headers.get(p)??""});let r=t.headers.get("timeout"),u=r!==null?parseInt(r):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let a=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,i,l,u);return new j(p=>{a.then(m=>{let v=new te;l!=null&&Object.keys(l).forEach(y=>{v.set(y,l[y])});let g=new oe({body:m.body,status:m.code,statusText:"OK",headers:v});p.next(g),p.complete()})})}var Ee=(e,t)=>{let o={relayconfigState:s(C),defaultTimeout:s(h).defaultTimeout,relayWebsocket:s(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new D;return o.relayconfigState.configLoaded.subscribe(l=>{l&&ke(o,e,t).subscribe(i)}),i}return ke(o,e,t)};var Ie={providers:[q(),pe(Re,ce()),ne(se(),re([Ee,Te])),b,{provide:h,useValue:Se},{provide:X,useValue:Ce()},he,I,fe,Z,de,Y,ge,ye]};ee(M,Ie);
|