@duplicati/ngclient 0.0.178 → 0.0.179
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/dest-icons/dincloud.png +0 -0
- package/assets/dest-icons/dreamhost.png +0 -0
- package/assets/dest-icons/dunkel.png +0 -0
- package/assets/dest-icons/duplicati.png +0 -0
- package/assets/dest-icons/hosteurope.png +0 -0
- package/assets/dest-icons/ibmcos.png +0 -0
- package/assets/dest-icons/impossiblecloud.png +0 -0
- package/assets/dest-icons/infomaniak.png +0 -0
- package/assets/dest-icons/polisystems.png +0 -0
- package/assets/dest-icons/rabata.png +0 -0
- package/assets/dest-icons/sakuracloud.png +0 -0
- package/assets/dest-icons/scaleway.png +0 -0
- package/assets/dest-icons/seagatelyve.png +0 -0
- package/assets/dest-icons/storadera.png +0 -0
- package/assets/dest-icons/wasabi.png +0 -0
- package/assets/sh.woff2 +0 -0
- package/chunk-2HZ7VZ3D.js +1 -0
- package/{chunk-AJMSZFGR.js → chunk-2LAZMIL4.js} +1 -1
- package/{chunk-M7SLT3MF.js → chunk-2U23BDRP.js} +1 -1
- package/chunk-3CCAGUTG.js +1 -0
- package/{chunk-MIUFEQ3S.js → chunk-4F7BBMQ2.js} +1 -1
- package/{chunk-WNOXOC4X.js → chunk-4JVBYGOM.js} +1 -1
- package/{chunk-PW55LN2T.js → chunk-55RRXYNB.js} +1 -1
- package/{chunk-Y4IW22ZU.js → chunk-6AX4L2U5.js} +1 -1
- package/chunk-6GJYSOXJ.js +1 -0
- package/{chunk-JTZ2JEV4.js → chunk-6WVN2KRC.js} +1 -1
- package/{chunk-6CYY2QG6.js → chunk-7XLQX4B6.js} +1 -1
- package/{chunk-G4FG3YUE.js → chunk-C6LHWLWL.js} +1 -1
- package/chunk-CM6KCZ6Q.js +1 -0
- package/{chunk-JTQDY6AH.js → chunk-D47P7LFF.js} +1 -1
- package/{chunk-WHLIHNEE.js → chunk-DNNNVTJK.js} +1 -1
- package/chunk-DV67LYLW.js +2 -0
- package/{chunk-YQSTMC2K.js → chunk-FEBDZE5A.js} +1 -1
- package/{chunk-NEQW3H7F.js → chunk-FHO4PDLK.js} +1 -1
- package/{chunk-PNECF7JS.js → chunk-HC6NRM4H.js} +1 -1
- package/chunk-HDM6ELAR.js +1 -0
- package/chunk-HEV3WHAH.js +1 -0
- package/{chunk-VSLN6R7K.js → chunk-HGZYRAXZ.js} +1 -1
- package/chunk-HPU4SX5Z.js +1 -0
- package/chunk-I77LGXJN.js +2 -0
- package/{chunk-76LEHUPM.js → chunk-IE7RK4YW.js} +1 -1
- package/chunk-IQI7X3JY.js +2 -0
- package/chunk-JKDYRSAH.js +1 -0
- package/{chunk-N4ADMNNU.js → chunk-JRFX5D6S.js} +1 -1
- package/chunk-JRMY6F6W.js +1 -0
- package/chunk-JSYVSJJU.js +1 -0
- package/{chunk-UT542KNO.js → chunk-L37SKX3M.js} +1 -1
- package/chunk-LVPZTSKG.js +1 -0
- package/{chunk-5HQJVUNE.js → chunk-MVPMVVRC.js} +1 -1
- package/chunk-PNYEL323.js +1 -0
- package/{chunk-AO4ZIHUL.js → chunk-QNZTEY37.js} +1 -1
- package/chunk-RIVMPP47.js +1 -0
- package/chunk-SYMBRSKN.js +7 -0
- package/{chunk-WLXOWWZB.js → chunk-T7XH5JIZ.js} +1 -1
- package/chunk-TOB4ESNO.js +1 -0
- package/{chunk-5MXXIFJM.js → chunk-U5GRFEV3.js} +1 -1
- package/chunk-UTLK72CH.js +1 -0
- package/{chunk-U4T4BSPF.js → chunk-VYIUFXYO.js} +1 -1
- package/chunk-WGXHTY3T.js +1 -0
- package/{chunk-PJLZ7V22.js → chunk-WPT4ETG3.js} +1 -1
- package/chunk-XECFWVLT.js +1 -0
- package/index.html +42 -1
- package/main-CMSRKMLS.js +1 -0
- package/package.json +1 -1
- package/assets/favicon.ico +0 -0
- package/chunk-27UON6YV.js +0 -2
- package/chunk-4IUPBI2K.js +0 -1
- package/chunk-5UXRNNTT.js +0 -1
- package/chunk-6O5DBV6Y.js +0 -1
- package/chunk-7IQ5FSGI.js +0 -1
- package/chunk-EBKB4YCL.js +0 -1
- package/chunk-F3RWB4I6.js +0 -1
- package/chunk-H6UYYWCU.js +0 -1
- package/chunk-J5LEAYPL.js +0 -1
- package/chunk-KR56GPXG.js +0 -2
- package/chunk-PCLJOXMF.js +0 -1
- package/chunk-PUOOECEB.js +0 -1
- package/chunk-QZJ7QZZ4.js +0 -1
- package/chunk-R6XDJFPE.js +0 -1
- package/chunk-SS7TCWY5.js +0 -1
- package/chunk-TXPM764C.js +0 -1
- package/chunk-WS7QWRRY.js +0 -1
- package/chunk-WWIKIIGV.js +0 -7
- package/chunk-WWIXPGSZ.js +0 -1
- package/chunk-XRXXVFJ4.js +0 -1
- package/chunk-XZZDJCRM.js +0 -1
- package/main-OOXK65IC.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as Gt}from"./chunk-T5LLH46J.js";import{a as yt,b as Re,c as Ot,d as Ft,e as At,f as wt,h as Mt,i as Lt,j as Pt}from"./chunk-DV67LYLW.js";import{j as $t}from"./chunk-3CCAGUTG.js";import{c as vt,d as Vt}from"./chunk-B5LH4P4E.js";import{a as Dt}from"./chunk-LVPZTSKG.js";import{a as U}from"./chunk-WILUKPQ3.js";import{a as xt}from"./chunk-RIVMPP47.js";import{a as Et,b as It}from"./chunk-FBWFZMGL.js";import{a as ue}from"./chunk-NEV6JB5M.js";import{B as Ce,C as pt,E as mt,H as Pe,K as Ct,L as ut,O as gt,P as Tt,V as ft,W as St,Y as Nt,a as st,c as se,e as de,i as ce,k as dt,s as pe,t as ct,u as me,z as Le}from"./chunk-RYXU2QDS.js";import{b as ht}from"./chunk-BKANUILG.js";import{e as _t}from"./chunk-GO4NSDR6.js";import{ea as rt}from"./chunk-RMOTUTEQ.js";import{$ as f,Ab as d,Ac as Me,Bb as R,D as He,E as $e,Fb as xe,Gb as fe,Gc as oe,Hb as P,Ib as E,K as je,M as qe,Ma as Qe,Mc as $,Pa as r,Pb as H,Qb as j,Qc as ot,R as Ie,Rb as _e,Rc as ae,Sc as at,Ub as Ye,Uc as lt,Vb as h,W as w,Xb as l,Yb as De,Zb as ye,aa as S,cb as Z,cc as Ze,da as We,dc as et,ec as y,f as Ee,fc as tt,gc as Oe,hb as x,jc as m,kc as nt,l as Je,la as k,lc as A,mc as Se,na as Te,oc as Fe,p as Xe,pc as Ae,qc as we,rc as X,sb as u,sc as M,tb as g,tc as p,ub as te,uc as Ge,wb as ne,wc as it,xb as ie,xc as be,yb as c,yc as v,zb as s,zc as B}from"./chunk-XYHHESIX.js";import{a as z,b as he}from"./chunk-7CGTOI24.js";var bt=class n{#e=w(ht);#t=w(Le);#n=w(ue);testDestination(t,e,o,i,a){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i,a):this.testDestinationv1(t,e,o,i,a)}testDestinationv2(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:!1,Options:null}}).subscribe({next:C=>{if(C.Success){this.emitSuccessV2(_,t,o,C);return}this.handleGenericError(_,t,o,C.Error??"Unknown error",a)},error:C=>{let N=C?.error?.body??C?.error?.requestBody;if(N?.Data?.FolderExists===!1||N?.StatusCode==="missing-folder"){i?this.handleMissingFolder(_,t,o):this.handleGenericError(_,t,o,$localize`The remote destination folder does not exist.`,a);return}if(N?.Data?.HostCertificate){this.handleMissingCertificate(_,t,o,N.Data?.HostCertificate);return}if(N?.Data?.ReportedHostKey){this.handleIncorrectKey(_,t,o,N.Data.ReportedHostKey,N.Data.AcceptedHostKey??null);return}this.handleGenericError(_,t,o,C?.message??"Unknown error",a)}})})}testDestinationv1(t,e,o,i,a){return new Ee(_=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e}}).subscribe({next:C=>{_.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:o}),_.complete()},error:C=>{this.handleDestinationErrorv1(C.message,t,o,i,a).subscribe(N=>{_.next(N)})}})})}handleMissingFolder(t,e,o){this.#t.open(U,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:i=>{if(!i){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,o,a);return}else this.handleFolderCreateFailure(t,e,o,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:a=>{this.handleFolderCreateFailure(t,e,o,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,o,i){this.#t.open(U,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${i}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o}),t.complete()}})}emitSuccessV2(t,e,o,i){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:o,anyFilesFound:!i.Data?.FolderIsEmpty,containsBackup:i.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:i.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,o){this.#t.open(U,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:o}),t.complete()}})}reportNoAction(t,e,o,i){t.next({action:"generic-error",targetUrl:e,errorMessage:i,testAgain:!1,destinationIndex:o}),t.complete()}handleMissingCertificate(t,e,o,i){this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${i}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,o,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:i,destinationIndex:o}),t.complete()}})}handleIncorrectKey(t,e,o,i,a){a?this.#t.open(U,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
+
with the REPORTED host key: ${i}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}}):this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${i}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:_=>{if(!_){this.reportNoAction(t,e,o,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:i,destinationIndex:o}),t.complete()}})}handleGenericError(t,e,o,i,a){function _(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:i}),t.complete()}if(a){_();return}this.#t.open(U,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:C=>_()})}handleDestinationErrorv1(t,e,o,i,a){return new Ee(_=>{if(t==="missing-folder"){i?this.handleMissingFolder(_,e,o):this.handleGenericError(_,e,o,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let C=t.split("incorrect-cert:")[1];this.handleMissingCertificate(_,e,o,C);return}if(t.startsWith("incorrect-host-key:")){let C=t.split('incorrect-host-key:"')[1].split('",')[0],N=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(_,e,o,C,N);return}this.handleGenericError(_,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};var Kt=["*"];function zt(n,t){n&1&&(s(0,"sh-chip",4),m(1,"Special"),d())}function Ut(n,t){n&1&&(s(0,"sh-chip",5),m(1,"Deprecated"),d())}var ve=class n{destination=ae.required();static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"]},ngContentSelectors:Kt,decls:11,vars:7,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,o){if(e&1&&(De(),s(0,"sh-card",0)(1,"div",1),R(2,"img",2),d(),s(3,"div",3),m(4),u(5,zt,2,0,"sh-chip",4)(6,Ut,2,0,"sh-chip",5),d(),s(7,"div",6),m(8),d(),s(9,"div",7),ye(10),d()()),e&2){let i=o.destination();r(2),c("src",Ge(i.icon),Qe)("alt",Ge(i.displayName)),r(2),A(" ",i.displayName," "),r(),g((i.sortOrder??0)==-2?5:(i.sortOrder??0)<0?6:-1),r(3),nt(i.description)}},dependencies:[pt,mt],styles:['[_nghost-%COMP%]{display:block}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var ge=class n{#e=w(ue);supportedDestinationTypes=$(()=>this.#e.backendModules().flatMap(t=>{if(!t?.Key)return null;let e=Ft(t.Key);if(e.length<=1){let o=Ot(t.Key);return o.isDefaultEntry===!0?[he(z({},o),{displayName:t.DisplayName||o.displayName||t.Key,description:t.Description||o.description||""})]:o}else return e}).filter(t=>t!==null));destinationTypeOptions=$(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon,searchTerms:[t.displayName,t.description,t.key,t.searchTerms??"",t.customKey??""].join(" "),sortOrder:t.sortOrder??0})));backendModules=$(()=>this.#e.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ie({token:n,factory:n.\u0275fac,providedIn:"root"})};function Jt(n,t){if(n&1){let e=E();s(0,"app-destination-list-item",3)(1,"button",4),h("click",function(){let i=f(e).$implicit,a=l();return S(a.setDestination.emit(i.customKey??i.key))}),H(2,0),R(3,"sh-icon"),j(),d()()}if(n&2){let e=t.$implicit;c("destination",e)}}var Rt=class n{#e=w(ge);setDestination=ot();destinationSearchTerm=k("");destinationTypeOptions=this.#e.destinationTypeOptions;destinationTypeOptionsFocused=$(()=>{let t=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),o=[...t].sort((i,a)=>{let _=i.sortOrder??0,C=a.sortOrder??0;return _!==C?C-_:i.displayName.localeCompare(a.displayName)}).filter(i=>{let a=i.sortOrder??0;return a<0&&e?.length&&(i.key.toLocaleLowerCase()===e.toLocaleLowerCase()||i.customKey?.toLocaleLowerCase()===e.toLocaleLowerCase())?!0:a>=0});return e?o.filter(i=>i.searchTerms.toLowerCase().includes(e)):o});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-destination-list"]],outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let t;t=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(e,o){e&1&&(s(0,"sh-form-field")(1,"input",1),we("ngModelChange",function(a){return Ae(o.destinationSearchTerm,a)||(o.destinationSearchTerm=a),a}),d()(),s(2,"div",2),ne(3,Jt,4,1,"app-destination-list-item",3,te),d()),e&2&&(r(),Fe("ngModel",o.destinationSearchTerm),r(2),ie(o.destinationTypeOptionsFocused()))},dependencies:[ve,pe,se,de,ce,Pe,Ce,me],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var Xt=["fileInput"],Ht=[[["label"]]],jt=["label"],Ve=class n{customId=ae();content=k("");readonly=k(!1);placeholder=ae("Drop a file here or use the browse button");fileInputRef=at("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=Te(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){e&1&&Ze(o.fileInputRef,Xt,5),e&2&&et()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[it([{provide:st,useExisting:n,multi:!0}])],ngContentSelectors:jt,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,o){if(e&1){let i=E();De(Ht),ye(0,0,["ngProjectAs","label",5,["label"]]),s(1,"div",1)(2,"button",2),h("click",function(){return f(i),S(o.triggerBrowse())}),s(3,"sh-icon"),m(4,"upload"),d()()(),s(5,"div",3),h("drop",function(_){return f(i),S(o.onFileDrop(_))})("dragover",function(_){return f(i),S(o.onDragOver(_))}),s(6,"textarea",4),we("ngModelChange",function(_){return f(i),Ae(o.content,_)||(o.content=_),S(_)}),d()(),s(7,"input",5,0),h("change",function(_){return f(i),S(o.onFileSelected(_))}),d()}e&2&&(r(6),c("placeholder",o.placeholder()),Fe("ngModel",o.content),c("disabled",o.readonly()))},dependencies:[pe,se,de,ce,me,Ce],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var qt=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),G=n=>({$implicit:n}),Wt=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),Qt=()=>({updateOn:"blur"}),Yt=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o}),J=(n,t)=>({fieldGroup:n,formView:t}),Zt=()=>["/connect/logon"];function en(n,t){n&1&&P(0)}function tn(n,t){if(n&1&&x(0,en,1,0,"ng-container",24),n&2){let e=t.$implicit,o=t.$index;l();let i=y(15);l();let a=p(0),_=p(1);c("ngTemplateOutlet",i)("ngTemplateOutletContext",v(7,G,Me(2,qt,o,e,a,_.oauthField)))}}function nn(n,t){n&1&&P(0)}function on(n,t){if(n&1&&x(0,nn,1,0,"ng-container",24),n&2){let e=t.$implicit,o=t.$index;l();let i=y(15);l();let a=p(0),_=p(1);c("ngTemplateOutlet",i)("ngTemplateOutletContext",v(7,G,Me(2,Wt,o,e,a,_.oauthField)))}}function an(n,t){if(n&1){let e=E();s(0,"button",25),h("click",function(){f(e);let i=l(2);return S(i.showTextArea.set(!1))}),H(1,8),R(2,"sh-icon"),j(),d()}}function ln(n,t){if(n&1){let e=E();s(0,"button",32,2),h("click",function(){let i=f(e).$implicit,a=l(3);return S(a.addAdvancedOption(i))}),m(2),d()}if(n&2){let e=t.$implicit;r(2),A(" ",e.name," ")}}function rn(n,t){if(n&1){let e=E();s(0,"div",22)(1,"sh-menu",26)(2,"button",27),H(3,9),R(4,"sh-icon"),j(),d(),xe(5,28),ne(6,ln,3,1,"button",29,te),fe(),d(),s(8,"sh-menu")(9,"button",30)(10,"sh-icon"),m(11,"dots-three-vertical"),d()(),xe(12,28),s(13,"button",31),h("click",function(){f(e);let i=l(2);return S(i.showTextArea.set(!0))}),s(14,"sh-icon"),m(15,"link"),d(),m(16," Edit contents as text "),d(),fe(),d()()}if(n&2){l();let e=p(9);r(),c("searchable",!0),r(),c("disabled",e.length===0),r(4),ie(e)}}function _n(n,t){if(n&1){let e=E();s(0,"textarea",33),h("ngModelChange",function(i){f(e);let a=l(2);return S(a.updateSettingsFromText(i))}),d()}if(n&2){let e=l(2);c("ngModel",e.settingsAsText())("ngModelOptions",be(2,Qt))}}function sn(n,t){n&1&&P(0)}function dn(n,t){if(n&1&&x(0,sn,1,0,"ng-container",24),n&2){let e=t.$implicit,o=t.$index;l(2);let i=y(15),a=l(),_=p(0),C=p(1),N=a.getFormView("advanced",e)??a.getDefaultFormView(e);c("ngTemplateOutlet",i)("ngTemplateOutletContext",v(7,G,Me(2,Yt,o,N,_,C.oauthField)))}}function cn(n,t){if(n&1&&ne(0,dn,1,9,"ng-container",null,te),n&2){let e=l(2);ie(e.advancedFormFieldNames())}}function pn(n,t){n&1&&(s(0,"sup",42),m(1,"*"),d())}function mn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=E();s(0,"app-file-tree",35)(1,"label",41),u(2,pn,2,0,"sup",42),m(3),u(4,mn,2,1,"sh-icon",43),d(),s(5,"input",44),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(3),_=p(4),C=p(5);c("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),r(),c("for",C),r(),g(e.formView.isMandatory&&_?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("id",C)("ngModel",i)}}function un(n,t){n&1&&(s(0,"sup",45),m(1,"*"),d())}function gn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1){let e=E();s(0,"app-file-tree",36)(1,"label",41),u(2,un,2,0,"sup",45),m(3),u(4,gn,2,1,"sh-icon",43),d(),s(5,"input",44),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(3),_=p(4),C=p(5);c("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),r(),c("for",C),r(),g(e.formView.isMandatory&&_?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("id",C)("ngModel",i)}}function fn(n,t){n&1&&(s(0,"sup",46),m(1,"*"),d())}function Sn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Nn(n,t){n&1&&(s(0,"sh-icon",47),m(1," warning "),d())}function hn(n,t){n&1&&P(0)}function En(n,t){if(n&1&&(s(0,"sh-icon",51),m(1," link "),d()),n&2){l();let e=p(8),o=p(9);Oe("error",e&&o==="error")("warn",e&&o==="warning"),c("shTooltip",e)}}function In(n,t){n&1&&(s(0,"sh-icon",50),m(1,"envelope"),d())}function xn(n,t){n&1&&(s(0,"sh-icon",50),m(1,"hard-drives"),d())}function Dn(n,t){n&1&&(s(0,"sh-icon",50),m(1,"jar"),d())}function yn(n,t){n&1&&(s(0,"sh-icon",50),m(1,"textbox"),d())}function On(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,fn,2,0,"sup",46),m(3),u(4,Sn,2,1,"sh-icon",43),u(5,Nn,2,0,"sh-icon",47),x(6,hn,1,0,"ng-container",24),d(),s(7,"input",48),h("keydown",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,i))})("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),X(8)(9),u(10,En,2,5,"sh-icon",49)(11,In,2,0,"sh-icon",50)(12,xn,2,0,"sh-icon",50)(13,Dn,2,0,"sh-icon",50)(14,yn,2,0,"sh-icon",50),d()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(3),_=p(4),C=p(5);l();let N=y(17);r(),c("for",C),r(),g(e.formView.isMandatory&&_?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),g(_&&e.formView.type==="Path"?5:-1),r(),c("ngTemplateOutlet",N)("ngTemplateOutletContext",v(16,G,B(13,J,e.fieldGroup,e.formView))),r(),c("type",e.formView.type==="Email"?"email":"text")("id",C)("ngModel",i);let V=a,q=l().hasLeadingSlash(V??"");r(),M(q&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),r(),M(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),r(),g(e.formView.type==="Path"?10:e.formView.type==="Email"?11:e.formView.type==="Hostname"?12:e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?13:14)}}function Fn(n,t){n&1&&(s(0,"sup",52),m(1,"*"),d())}function An(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function wn(n,t){n&1&&P(0)}function Mn(n,t){if(n&1){let e=E();s(0,"span",56),h("click",function(){f(e);let i=l(2).$implicit,a=l(2);return S(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),m(1," AuthID "),d()}}function Ln(n,t){n&1&&(s(0,"sh-icon",50),m(1,"password"),d())}function Pn(n,t){if(n&1){let e=E();s(0,"sh-icon",57),h("click",function(){f(e);let i=l(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),d()}}function vn(n,t){if(n&1){let e=E();s(0,"sh-icon",57),h("click",function(){f(e);let i=l(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),d()}}function Vn(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,Fn,2,0,"sup",52),m(3),u(4,An,2,1,"sh-icon",43),x(5,wn,1,0,"ng-container",24),d(),s(6,"input",53),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),u(7,Mn,2,0,"span",54)(8,Ln,2,0,"sh-icon",50),u(9,Pn,2,0,"sh-icon",55)(10,vn,2,0,"sh-icon",55),d()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(14,G,B(11,J,e.fieldGroup,e.formView))),r(),c("type",e.formView.showPassword?"text":"password")("id",_)("ngModel",i),r(),g(e.oauthField===e.formView.name?7:8),r(2),g(e.formView.showPassword?9:10)}}function $n(n,t){n&1&&(s(0,"sup",59),m(1,"*"),d())}function Gn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function bn(n,t){n&1&&P(0)}function Rn(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function kn(n,t){if(n&1){let e=E();s(0,"sh-select",58)(1,"label",41),u(2,$n,2,0,"sup",59),m(3),u(4,Gn,2,1,"sh-icon",43),x(5,bn,1,0,"ng-container",24),d(),s(6,"input",44),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,Rn,1,2,"ng-template",null,3,oe)}if(n&2){let e=y(8);l();let o=p(0),i=l().$implicit,a=p(1),_=p(2),C=p(4),N=p(5);l();let V=y(17);c("options",o)("isClearable",!1)("optionTemplate",e),r(),c("for",N),r(),g(i.formView.isMandatory&&C?2:-1),r(),A(" ",a," "),r(),g(i.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",V)("ngTemplateOutletContext",v(14,G,B(11,J,i.fieldGroup,i.formView))),r(),c("id",N)("ngModel",_)}}function Bn(n,t){if(n&1&&(X(0),u(1,kn,9,16)),n&2){let e=l().$implicit,o=M(l(2).mapOptions(e.formView));r(),g(o?1:-1)}}function Kn(n,t){n&1&&(s(0,"sup",62),m(1,"*"),d())}function zn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function Un(n,t){n&1&&P(0)}function Jn(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Xn(n,t){if(n&1){let e=E();s(0,"sh-select",61)(1,"label",41),u(2,Kn,2,0,"sup",62),m(3),u(4,zn,2,1,"sh-icon",43),x(5,Un,1,0,"ng-container",24),d(),s(6,"input",44),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,Jn,1,2,"ng-template",null,4,oe)}if(n&2){let e=y(8);l();let o=p(0),i=l().$implicit,a=p(1),_=p(2),C=p(4),N=p(5);l();let V=y(17);c("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),r(),c("for",N),r(),g(i.formView.isMandatory&&C?2:-1),r(),A(" ",a," "),r(),g(i.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",V)("ngTemplateOutletContext",v(15,G,B(12,J,i.fieldGroup,i.formView))),r(),c("id",N)("ngModel",_)}}function Hn(n,t){n&1&&R(0,"sh-progress-bar",60)}function jn(n,t){if(n&1&&(X(0),u(1,Xn,9,17)(2,Hn,1,0,"sh-progress-bar",60)),n&2){let e=l().$implicit,o=p(2),i=M(l(2).mapOptionsWithFreeText(e.formView,o));r(),g(i?1:2)}}function qn(n,t){n&1&&(s(0,"sup",64),m(1,"*"),d())}function Wn(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Qn(n,t){n&1&&P(0)}function Yn(n,t){if(n&1){let e=E();s(0,"app-size",63),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),s(1,"label",41),u(2,qn,2,0,"sup",64),m(3),u(4,Wn,2,1,"sh-icon",43),x(5,Qn,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);c("inputType",e.Name)("ngModel",i)("customId",_),r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(12,G,B(9,J,e.fieldGroup,e.formView)))}}function Zn(n,t){n&1&&(s(0,"sup",65),m(1,"*"),d())}function ei(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function ti(n,t){n&1&&P(0)}function ni(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,Zn,2,0,"sup",65),m(3),u(4,ei,2,1,"sh-icon",43),x(5,ti,1,0,"ng-container",24),d(),s(6,"input",66),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),s(7,"sh-icon",50),m(8,"numpad"),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(11,G,B(8,J,e.fieldGroup,e.formView))),r(),c("id",_)("ngModel",i)}}function ii(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function oi(n,t){n&1&&P(0)}function ai(n,t){if(n&1){let e=E();s(0,"sh-toggle",67),h("click",function(){f(e);let i=l().$implicit,a=p(2),_=l(2);return S(_.updateFieldValue(i.fieldGroup,i.formView.name,_.isTrue(a)?"false":"true"))}),s(1,"label",41),m(2),u(3,ii,2,1,"sh-icon",43),x(4,oi,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(5);l();let _=y(17),C=l();Oe("active",C.isTrue(i)),r(),c("for",a),r(),A(" ",o," "),r(),g(e.formView.longDescription?3:-1),r(),c("ngTemplateOutlet",_)("ngTemplateOutletContext",v(10,G,B(7,J,e.fieldGroup,e.formView)))}}function li(n,t){n&1&&(s(0,"sup",69),m(1,"*"),d())}function ri(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function _i(n,t){n&1&&P(0)}function si(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function di(n,t){if(n&1){let e=E();s(0,"sh-select",68)(1,"label",41),u(2,li,2,0,"sup",69),m(3),u(4,ri,2,1,"sh-icon",43),x(5,_i,1,0,"ng-container",24),d(),s(6,"input",70),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,si,1,2,"ng-template",null,5,oe)}if(n&2){let e=y(8);l();let o=p(0),i=l().$implicit,a=p(1),_=p(2),C=p(4),N=p(5);l();let V=y(17);c("options",o)("selectMultiple",!0)("optionTemplate",e),r(),c("for",N),r(),g(i.formView.isMandatory&&C?2:-1),r(),A(" ",a," "),r(),g(i.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",V)("ngTemplateOutletContext",v(13,G,B(10,J,i.fieldGroup,i.formView))),r(),c("ngModel",_)}}function ci(n,t){if(n&1&&(X(0),u(1,di,9,15)),n&2){let e=l().$implicit,o=M(l(2).mapOptions(e.formView));r(),g(o?1:-1)}}function pi(n,t){n&1&&(s(0,"sup",71),m(1,"*"),d())}function mi(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function Ci(n,t){n&1&&P(0)}function ui(n,t){if(n&1){let e=E();s(0,"app-timespan",63),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),s(1,"label",41),u(2,pi,2,0,"sup",71),m(3),u(4,mi,2,1,"sh-icon",43),x(5,Ci,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17);c("inputType",e.formView.name)("ngModel",i)("customId",_),r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(12,G,B(9,J,e.fieldGroup,e.formView)))}}function gi(n,t){n&1&&(s(0,"sup",73),m(1,"*"),d())}function Ti(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(2).$implicit;c("shTooltip",e.formView.longDescription)}}function fi(n,t){n&1&&P(0)}function Si(n,t){if(n&1){let e=E();s(0,"app-file-drop-textarea",72),h("ngModelChange",function(i){f(e);let a=l().$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),s(1,"label"),u(2,gi,2,0,"sup",73),m(3),u(4,Ti,2,1,"sh-icon",43),x(5,fi,1,0,"ng-container",24),d()()}if(n&2){let e=l().$implicit,o=p(2),i=p(4),a=p(5);l();let _=y(17);c("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),r(2),g(e.formView.isMandatory&&i?2:-1),r(),A(" ",e.formView.shortDescription??e.formView.name," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",_)("ngTemplateOutletContext",v(11,G,B(8,J,e.fieldGroup,e.formView)))}}function Ni(n,t){n&1&&(R(0,"sh-spinner"),s(1,"span"),_e(2,10),d()),n&2&&tt("--spinner-size","16px")("--spinner-thickness","2px")}function hi(n,t){n&1&&(s(0,"div",76),_e(1,11),d())}function Ei(n,t){if(n&1&&m(0),n&2){let e=t.$implicit;Se(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ii(n,t){if(n&1){let e=E();s(0,"sh-select",77)(1,"label",41)(2,"sup",78),m(3,"*"),d(),s(4,"span"),_e(5,12),d()(),s(6,"input",44),h("ngModelChange",function(i){f(e);let a=l(4).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),x(7,Ei,1,2,"ng-template",null,6,oe)}if(n&2){l(4);let e=p(2),o=p(5),i=l(2);c("options",i.restoreBackupIdOptions())("isClearable",!1),r(),c("for",o),r(5),c("id",o)("ngModel",e)}}function xi(n,t){if(n&1&&u(0,Ni,3,4)(1,hi,2,0,"div",76)(2,Ii,9,5),n&2){let e=l(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Di(n,t){n&1&&(s(0,"sup",79),m(1,"*"),d())}function yi(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(4).$implicit;c("shTooltip",e.formView.longDescription)}}function Oi(n,t){n&1&&P(0)}function Fi(n,t){if(n&1){let e=E();s(0,"button",81),h("click",function(){f(e),l(4);let i=p(5),a=l(2);return S(a.toggleDisabled(i))}),H(1,13),R(2,"sh-icon"),j(),d()}}function Ai(n,t){if(n&1){let e=E();s(0,"sh-form-field")(1,"label",41),u(2,Di,2,0,"sup",79),m(3),u(4,yi,2,1,"sh-icon",43),x(5,Oi,1,0,"ng-container",24),d(),s(6,"input",80),h("ngModelChange",function(i){f(e);let a=l(3).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),s(7,"sh-icon",50),m(8,"textbox"),d()(),u(9,Fi,3,0,"button",40)}if(n&2){let e=l(3).$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17),N=l();r(),c("for",_),r(),g(e.formView.isMandatory&&a?2:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?4:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(15,G,B(12,J,e.fieldGroup,e.formView))),r(),c("type","text")("id",_)("ngModel",i)("placeholder",e.formView.longDescription)("disabled",!0),r(3),g(N.getIsDisabled(_)?9:-1)}}function wi(n,t){if(n&1&&(s(0,"div",74),u(1,xi,3,1)(2,Ai,10,17),d()),n&2){let e=l(4);r(),g(e.isRestoreFlow()?1:2)}}function Mi(n,t){if(n&1){let e=E();s(0,"div",82),H(1,14),R(2,"div")(3,"div"),j(),d(),s(4,"button",81),h("click",function(){f(e);let i=l(5);return S(i.openConsole())}),H(5,15),R(6,"sh-icon"),j(),d()}}function Li(n,t){n&1&&(s(0,"div",82),_e(1,16),d(),s(2,"button",83),H(3,17),R(4,"sh-icon"),j(),d()),n&2&&(r(2),c("routerLink",be(1,Zt)))}function Pi(n,t){if(n&1&&(s(0,"div",75),u(1,Mi,7,0)(2,Li,5,2),d()),n&2){let e=l(4);r(),g(e.isConnectedToConsole()?1:2)}}function vi(n,t){if(n&1&&u(0,wi,3,1,"div",74)(1,Pi,3,1,"div",75),n&2){let e=l(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function Vi(n,t){n&1&&(s(0,"sup",85),m(1,"*"),d())}function $i(n,t){if(n&1&&(s(0,"sh-icon",43),m(1,"question"),d()),n&2){let e=l(3).$implicit;c("shTooltip",e.formView.longDescription)}}function Gi(n,t){n&1&&P(0)}function bi(n,t){if(n&1){let e=E();s(0,"div",84)(1,"sh-form-field")(2,"label",41),u(3,Vi,2,0,"sup",85),m(4),u(5,$i,2,1,"sh-icon",43),x(6,Gi,1,0,"ng-container",24),d(),s(7,"input",86),h("ngModelChange",function(i){f(e);let a=l(2).$implicit,_=l(2);return S(_.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),s(8,"sh-icon",50),m(9,"textbox"),d()(),s(10,"button",87),h("click",function(){f(e);let i=l(4);return S(i.authenticateFilen())}),H(11,18),R(12,"sh-icon"),j(),d()()}if(n&2){let e=l(2).$implicit,o=p(1),i=p(2),a=p(4),_=p(5);l();let C=y(17),N=l();r(2),c("for",_),r(),g(e.formView.isMandatory&&a?3:-1),r(),A(" ",o," "),r(),g(e.formView.longDescription?5:-1),r(),c("ngTemplateOutlet",C)("ngTemplateOutletContext",v(12,G,B(9,J,e.fieldGroup,e.formView))),r(),c("id",_)("ngModel",i),r(3),c("disabled",N.isAuthenticatingFilen())}}function Ri(n,t){if(n&1&&u(0,bi,13,14,"div",84),n&2){let e=l(3);g(e.hasFilenApiKey()?-1:0)}}function ki(n,t){if(n&1){let e=E();s(0,"button",81),h("click",function(){f(e);let i=l().$implicit,a=l(2);return S(a.removeAdvancedOption(i.formView.name))}),s(1,"sh-icon"),m(2,"x-circle"),d()()}}function Bi(n,t){if(n&1&&(s(0,"div",34),X(1)(2)(3)(4)(5),u(6,Cn,6,12,"app-file-tree",35)(7,Tn,6,9,"app-file-tree",36)(8,On,15,18,"sh-form-field")(9,Vn,11,16,"sh-form-field")(10,Bn,2,2)(11,jn,3,2)(12,Yn,6,14,"app-size",37)(13,ni,9,13,"sh-form-field")(14,ai,5,12,"sh-toggle",38)(15,ci,2,2)(16,ui,6,14,"app-timespan",37)(17,Si,6,13,"app-file-drop-textarea",39)(18,vi,2,1)(19,Ri,1,1),u(20,ki,3,0,"button",40),d()),n&2){let e=t.$implicit;l();let o=p(0),i=l();Oe("single-field",e.fieldGroup!=="advanced"),r(),M(e.formView.shortDescription??e.formView.name),r(),M(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),r();let a=M(i.getFieldValue(e.fieldGroup,e.formView.name));r(),M((a??"").toString().trim()===""),r(),M("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),r(),g(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:e.formView.type==="DuplicatiBackupId"?18:e.formView.type==="Filen2FACode"?19:-1),r(14),g(e.fieldGroup==="advanced"?20:-1)}}function Ki(n,t){if(n&1&&(s(0,"sh-icon",88),m(1,"x-circle"),d()),n&2){l();let e=p(0);c("shTooltip",(e==null?null:e.message)??"Invalid value")}}function zi(n,t){if(n&1&&(s(0,"sh-icon",89),m(1,"warning"),d()),n&2){l();let e=p(0);c("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ui(n,t){if(n&1&&(X(0),u(1,Ki,2,1,"sh-icon",88)(2,zi,2,1,"sh-icon",89)),n&2){let e=l().$implicit,o=p(0),i=M(e.formView.validate(o));r(),g((i==null?null:i.type)==="error"?1:(i==null?null:i.type)==="warning"?2:-1)}}function Ji(n,t){if(n&1&&(X(0),u(1,Ui,3,2)),n&2){let e=t.$implicit,i=(M(l(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";r(),g(!i&&e.formView.validate?1:-1)}}function Xi(n,t){if(n&1&&(X(0),ne(1,tn,1,9,"ng-container",null,te),ne(3,on,1,9,"ng-container",null,te),s(5,"sh-toggle-card",19),xe(6,20)(7),_e(8,7),fe(),X(9),u(10,an,3,0,"button",21)(11,rn,17,2,"div",22),fe(),u(12,_n,1,3,"textarea",23)(13,cn,2,0),d(),x(14,Bi,21,9,"ng-template",null,0,oe)(16,Ji,2,2,"ng-template",null,1,oe)),n&2){let e=l(),o=p(1);M(e.destinationForm()),r(),ie(o.custom),r(2),ie(o.dynamic),r(2),c("disallowToggle",!0),r(4),M(e.nonSelectedAdvancedFormViews()),r(),g(e.showTextArea()?10:11),r(2),g(e.showTextArea()?12:13)}}var Bt=class n{#e=w($t);#t=w(ue);#n=w(xt);#s=w(ge);#a=w(Dt);#l=w(yt);#i=w(Le);injector=w(We);targetUrl=lt.required();useBackupState=ae(!1);#o=null;destinationType=$(()=>{let t=this.targetUrl();if(!t)return null;let e=Re(t);return this.#o=e?.customKey??e?.key,this.#o});refreshView=k(!1);destinationForm=k({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=$(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=k(null);showTextArea=k(!1);isLoadingRestoreBackupIdOptions=k(!1);isRestoreFlow=$(()=>!this.useBackupState());restoreBackupIdOptions=It(Et(this.targetUrl).pipe(Xe(t=>{if(!t)return{authKey:null,url:null,isRestore:this.isRestoreFlow(),hasKey:this.hasStorageApiKey()};let e=t.indexOf("?"),o=e>=0?t.substring(e+1):"",i=new URLSearchParams(o),a=i.get("duplicati-auth-apiid")??"",_=i.get("duplicati-auth-apikey")??"";return{authKey:`${a}|${_}`,url:t}}),He((t,e)=>t.authKey===e.authKey),qe(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),je(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#l.getDuplicatiStorageBackups(t).pipe($e(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Je([]))),{initialValue:[]});isConnectedToConsole=$(()=>this.#a.state()==="connected");hasStorageApiKey=$(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=k(!1);hasFilenApiKey=$(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=$(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=Te(()=>{let t=this.targetUrl(),e=Re(t??""),o=e.key,i=e.customKey??o,a=this.#s.backendModules().find(D=>D.Key===o)??{Key:o,DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!o)return;let _=e&&e.oauthField?e.oauthField:null,C=e&&e.customFields?e.customFields:{},N=e&&e.dynamicFields?e.dynamicFields:[],V=e&&e.advancedFields?e.advancedFields:[],q=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],K={destinationType:i,oauthField:_,custom:[],dynamic:[],advanced:[]};C&&Object.entries(C).forEach(([D,T],O)=>{let F=T.order??O,b=T.validate;!b&&T.type==="Bucketname"&&(b=L=>Lt(L)?null:{type:"error",message:$localize`Invalid bucket name.`}),b&&T.type==="Hostname"&&(b=L=>Pt(L)?null:{type:"error",message:$localize`Invalid hostname.`}),K.custom.push(z({order:900+F,validate:b},T))});for(let D=0;D<a.Options.length;D++){let T=a.Options[D];if(T.Deprecated)continue;let O=N.find(F=>F===T.Name||T.Aliases?.includes(F.name)||F.name===T.Name);if(O){let F=T.Aliases?.indexOf(O.name)??-1,b=T.Aliases&&F>-1?T.Aliases[F]:T.Name,L=O&&typeof O!="string",le=L?O?.defaultValue??T.DefaultValue:T.DefaultValue,re=L&&O?.order!==void 0?O.order:D,Q={name:b,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,order:900+re},Y=L?z(z({},Q),O):Q;K.dynamic.push(Y)}else{let F=T.Name;if(q.find(ee=>ee===F))continue;let L=V.find(ee=>ee===F||ee.name===F),le=L&&typeof L!="string",re=le&&L?.order!==void 0?L.order:D,Q={name:F,type:T.Type,shortDescription:T.ShortDescription??void 0,longDescription:T.LongDescription??void 0,options:T.ValidValues,defaultValue:T.DefaultValue,order:900+re},Y=le?z(z({},Q),L):Q;K.advanced.push(Y)}}if(K.custom.sort((D,T)=>D.order-T.order),K.dynamic.sort((D,T)=>D.order-T.order),K.advanced.sort((D,T)=>D.order-T.order),this.destinationFormConfig.set(K),!t)return;let W=wt(t);W&&this.destinationForm.set({custom:W.custom,dynamic:W.dynamic,advanced:W.advanced})});destinationFormEffect=Te(()=>{let t=this.#o,e=this.destinationForm(),o=this.refreshView();if(!e||!t)return;let i=At({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});i&&this.targetUrl.set(i)});getFieldValue(t,e){let i=this.destinationForm()[t][e];return i||null}getFormView(t,e){let i=this.destinationFormConfig()?.[t].find(a=>a.name===e);return i||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(z({},e))}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,o,i){if(o==="Hostname"||o==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(i.key))return;if(i.key=="/"||i.key=="\\"||i.key==":"){i.preventDefault();return}}}updateFieldValue(t,e,o){let i=this.destinationForm();i[t][e]=o,this.destinationForm.set(z({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(z({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let o=t.options;return o?o.map(i=>({key:i,value:i})):null}mapOptionsWithFreeText(t,e){let o=this.mapOptions(t);return o?(e&&e.length>0&&(o.find(a=>a.value===e)||o.push({key:e,value:e})),o):null}#r=k(!1);oauthStartTokenCreation(t,e,o,i){this.#r.set(!0);let a=(i??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),_=this.#n.serverSettings()?.["--oauth-url"];if(_&&_.length>0&&(a=_),this.useBackupState()){let T=this.#e.mapFormsToSettings().find(O=>O.Name==="--oauth-url")?.Value;T&&T.length>0&&(a=T)}let C=this.destinationForm().advanced["oauth-url"];C&&C.length>0&&(a=C);let N=`${a}?type=${t}`,V=450,q=600,K=screen.width/2-V/2,W=screen.height/2-q/2,D=window.open(N,"_blank","height="+q+",width="+V+",menubar=0,status=0,titlebar=0,toolbar=0,left="+K+",top="+W);return window.addEventListener("message",T=>{let O=T.data.startsWith("authid:"),F=O?T.data.replace("authid:",""):null;O&&(this.destinationForm.update(b=>(b[e][o]=F,b)),this.#r.set(!1),this.refreshView.set(!this.refreshView()),D?.close())}),!1}settingsAsText=$(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,o])=>{let i=e??"",a="";return typeof o=="boolean"?a=this.isTrue(o)?"True":"False":(typeof o=="number"||o!=null)&&(a=o.toString()),`${i}=${a}`}).join(`
|
|
7
|
+
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Mt(t);this.destinationForm.update(o=>he(z({},o),{advanced:e}))}getIsDisabled(t){return document.getElementById(t)?.disabled??!0}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled)}openConsole(){this.#a.openConsole()}#_(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(!0),this.#l.getFilenApiKey(t,e).pipe($e(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:o=>{if(o.length===0){this.#i.open(U,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(i=>(i.advanced["api-key"]=o,i.dynamic["two-factor-code"]=null,i)),this.refreshView.set(!this.refreshView())},error:o=>{console.error("Error authenticating Filen",o),this.#i.open(U,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${o.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let o=this.destinationForm().advanced["api-key"];if(o&&o.length>0){this.#i.open(U,{data:{title:$localize`Confirm re-authenticate?`,message:$localize`You already have an API key. Are you sure you want to re-authenticate?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{if(i){var a=new URL(t);a.searchParams.delete("api-key"),this.#_(a.toString())}}});return}this.#_(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$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#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let _;_=$localize`This field is mandatory`;let C;C=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let N;N=$localize`This field is mandatory`;let V;V=$localize`This field is mandatory`;let q;q=$localize`This field is mandatory`;let K;K=$localize`This field is mandatory`;let W;W=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let T;T=$localize`This field is mandatory`;let O;O=$localize`This field is mandatory`;let F;F=$localize`Loading available backups...`;let b;b=$localize`No backups found from this machine, contact support`;let L;L=$localize`This field is mandatory`;let le;le=$localize`Pick the backup to restore from`;let re;re=$localize`This field is mandatory`;let Q;Q=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:An API key with storage access is required to use Duplicati storage.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:Visit the console and assign an API key to this machine.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:`,Y=Ye(Y);let ee;ee=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Be;Be=$localize`Connect to the console to use Duplicati storage.`;let Ke;Ke=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ze;ze=$localize`This field is mandatory`;let Ue;return Ue=$localize` Authenticate now ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,o,F,b,le,Q,Y,ee,Be,Ke,Ue,[1,"advanced-options",3,"disallowToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",i],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",_],["shTooltip",C,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",N],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",V],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",q],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",K],["shTooltip",W],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",D],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",T],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",O],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",L],["shTooltip",re],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],[1,"filen-2fa-setup"],["shTooltip",ze],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["shButton","","type","button",1,"outlined",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,o){if(e&1&&(X(0)(1),u(2,Xi,18,5)),e&2){let i=M(o.destinationType());r();let a=M(o.destinationFormConfig());r(),g(i&&a?2:-1)}},dependencies:[ct,se,dt,de,pe,ce,rt,_t,Vt,vt,Gt,Ve,Pe,Ce,me,ft,Ct,Tt,Nt,St,ut,gt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}.filen-2fa-setup[_ngcontent-%COMP%], .duplicati-backup-id[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:flex-end}.duplicati-backup-id[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{width:100%}.duplicati-backup-id-console[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.duplicati-backup-id-console[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:4px}"],changeDetection:0})};export{bt as a,ve as b,ge as c,Rt as d,Bt as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as y}from"./chunk-FBWFZMGL.js";import{b as w}from"./chunk-PNYEL323.js";import{a as b}from"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{B as U,L as $,u as k}from"./chunk-RYXU2QDS.js";import{b as x}from"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as m,Ab as r,Bb as d,E as g,Ib as E,Ma as O,Mc as I,Pa as l,Pb as M,Qb as R,Rb as T,Sb as f,Tb as F,Vb as N,W as p,Xb as c,aa as C,cb as P,gc as v,jc as u,kc as D,la as S,p as G,sb as s,tb as _,yb as L,zb as a}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";function V(n,o){n&1&&d(0,"sh-progress-bar",3)}function B(n,o){if(n&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),n&2){let e,t,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((t=i.serverState())==null?null:t.UpdatedVersion),F(1)}}function J(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(n&2){let e,t=c();v("loader",t.checkingForUpdates()),l(2),_((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(n,o){if(n&1){let e=E();a(0,"button",6),N("click",function(){m(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(n,o){n&1&&d(0,"sh-progress-bar",3)}var h=class n{#e=p(x);#t=p(w);#n=p(b);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#t.serverState;duplicatiVersion=I(()=>this.#n.systemInfo()?.ServerVersionName??"Unknown");generalInfo=y(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),g(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(g(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,t,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(t.isLoading()?0:-1),l(5),f(t.duplicatiVersion()),F(5),l(2),_(((i=t.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=t.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=t.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(t.generalInfo())}},dependencies:[$,U,k],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as _}from"./chunk-RIVMPP47.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import{oa as l}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Cb as n,Cc as g,Db as i,Dc as d,Pa as a,Rb as p,W as s,cb as S,jc as c,kc as m}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var o=class r{#e=s(_);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||r)};static \u0275cmp=S({type:r,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,E){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),g(5,"json"),i()()),e&2&&(a(4),m(d(5,1,E.serverSettings())))},dependencies:[l],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as C}from"./chunk-
|
|
1
|
+
import{g as C}from"./chunk-MVPMVVRC.js";import"./chunk-I77LGXJN.js";import"./chunk-T5LLH46J.js";import"./chunk-DV67LYLW.js";import{a as k}from"./chunk-HEV3WHAH.js";import{j as w}from"./chunk-3CCAGUTG.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-7XLQX4B6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-LVPZTSKG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-RIVMPP47.js";import{b as u}from"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{M as W,R as y}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as n,Bb as s,Pa as r,Pb as F,Qb as l,W as c,Xb as O,cb as D,gc as L,la as f,na as P,sb as E,tb as g,wc as N,xc as R,yb as _,yc as p,zb as o}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=P(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&L("full-width",a.isProgressPage())},features:[N([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a,i as b}from"./chunk-3CCAGUTG.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-6Q6SSTBK.js";import"./chunk-WILUKPQ3.js";import"./chunk-RIVMPP47.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,f as b}from"./chunk-
|
|
1
|
+
import{e as a,f as b}from"./chunk-MVPMVVRC.js";import"./chunk-I77LGXJN.js";import"./chunk-T5LLH46J.js";import"./chunk-DV67LYLW.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as T}from"./chunk-RIVMPP47.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{B as f,G as M}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{d as p,e as h}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as t,Bb as _,Pa as E,Rb as r,Vb as c,W as a,cb as u,gc as S,jc as g,la as d,zb as e}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var m=class C{#e=a(T);#n=a(p);hoveringConnect=d(!1);setWelcomeShown(){this.#e.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""])})}static \u0275fac=function(o){return new(o||C)};static \u0275cmp=u({type:C,selectors:[["app-select"]],decls:21,vars:2,consts:()=>{let l;l=$localize`Connect to console`;let o;o=$localize`Consolidate all your backup reports in one place.`;let n;n=$localize`Connection link`;let i;return i=$localize`For enterprises that are onboarding many machines.`,[l,o,n,i,[1,"left"],[1,"actionables"],["shButton","","routerLink","/welcome/connect/logon",1,"connect","outlined","primary",3,"mouseenter","mouseleave"],[1,"action"],["shButton","","routerLink","/welcome/connect/link",1,"connect","outlined",3,"mouseenter","mouseleave"],[1,"space"],[1,"without-connecting",3,"click"],[1,"right"],["src","/assets/images/console.avif","alt",""]]},template:function(o,n){o&1&&(e(0,"section",4)(1,"div",5)(2,"button",6),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(3,"div",7)(4,"h2"),r(5,0),t(),e(6,"p"),r(7,1),t()()(),e(8,"sh-divider"),g(9,"or"),t(),e(10,"button",8),c("mouseenter",function(){return n.hoveringConnect.set(!0)})("mouseleave",function(){return n.hoveringConnect.set(!1)}),e(11,"div",7)(12,"h2"),r(13,2),t(),e(14,"p"),r(15,3),t()()(),_(16,"div",9),e(17,"p",10),c("click",function(){return n.setWelcomeShown()}),g(18,"Proceed without connecting to console"),t()()(),e(19,"section",11),_(20,"img",12),t()),o&2&&(E(19),S("hovering",n.hoveringConnect()))},dependencies:[h,M,f],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{width:100%;height:2.5rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}"],changeDetection:0})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-HEV3WHAH.js";import{j as C}from"./chunk-3CCAGUTG.js";import"./chunk-GMNCWLGX.js";import"./chunk-B5LH4P4E.js";import"./chunk-TJYZBTTS.js";import"./chunk-7XLQX4B6.js";import"./chunk-AJXTVI3H.js";import"./chunk-LF24JF3M.js";import{a as G}from"./chunk-QNZTEY37.js";import"./chunk-6Q6SSTBK.js";import"./chunk-U63HBLGG.js";import"./chunk-LVPZTSKG.js";import"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-RIVMPP47.js";import{b as h}from"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{L as M,M as $,R as I}from"./chunk-RYXU2QDS.js";import{b as L}from"./chunk-BKANUILG.js";import{b as N,c as O,e as B,f as b}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Ab as u,Bb as r,C as f,Pa as n,Pb as c,Qb as _,W as l,Xb as A,cb as D,jc as P,lc as E,na as R,sb as T,tb as g,wc as k,yb as d,zb as s,zc as p}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Q}from"./chunk-LVPZTSKG.js";import{a as H}from"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import{a as q}from"./chunk-RIVMPP47.js";import"./chunk-FBWFZMGL.js";import"./chunk-PNYEL323.js";import"./chunk-NEV6JB5M.js";import"./chunk-QWNOPLJC.js";import{B as X,C as z,H as K,L as j,c as B,e as U,i as G,s as W,u as V,w as J}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{d as A,e as I}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as m,Ab as l,Bb as T,Bc as $,Ib as f,Mc as O,Pa as a,Pb as S,Qb as P,Rb as p,Rc as v,Ub as D,Vb as h,W as E,Xb as s,aa as F,cb as b,ic as x,jc as d,la as N,na as M,oc as w,pc as L,qc as k,sb as c,tb as _,yb as y,zb as r}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Y=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Z(t,n){t&1&&p(0,0,1)}function ee(t,n){t&1&&p(0,0,2)}function te(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function ne(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Z,1,0)(4,ee,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,te,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ie(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let C=s();return L(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(t&2){let e=s();a(3),w("ngModel",e.customRegisterUrl),a(4),y("disabled",!e.customRegisterUrlValid())}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function re(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function le(t,n){if(t&1&&c(0,oe,5,0)(1,re,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ae(t,n){t&1&&(S(0,5,1),T(1,"p"),P())}function se(t,n){t&1&&(S(0,5,2),T(1,"p"),P())}function ce(t,n){if(t&1){let e=f();r(0,"sh-alert",16),S(1,5),c(2,ae,2,0,"p")(3,se,2,0,"p"),P(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function _e(t,n){t&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#i=E(H);#e=E(Q);#n=E(q);isOldOpen=N(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#n.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#n.setShownWelcomePage().subscribe(()=>{this.#t.navigate([""])})});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#i.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ne,7,2,"div",7),c(2,ie,9,2),c(3,le,2,1),c(4,ce,8,1),c(5,_e,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x($(7,Y,o,C,u,g,i.state()==="registered")),a(),_(o?1:-1),a(),_(C?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(g?4:-1),a(),_(u?5:-1)}},dependencies:[I,W,B,U,G,K,X,j,z,J,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};
|
package/index.html
CHANGED
|
@@ -51,6 +51,14 @@
|
|
|
51
51
|
body:not(:has(app-root router-outlet ~ *)) > .loading {
|
|
52
52
|
display: flex;
|
|
53
53
|
}
|
|
54
|
+
body > .loading.has-error {
|
|
55
|
+
display: flex !important;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 12px;
|
|
58
|
+
padding: 24px;
|
|
59
|
+
text-align: center;
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
54
62
|
.loading::after {
|
|
55
63
|
content: '...';
|
|
56
64
|
display: inline-block;
|
|
@@ -62,6 +70,39 @@
|
|
|
62
70
|
animation: loadingDots 1.5s infinite;
|
|
63
71
|
}
|
|
64
72
|
|
|
73
|
+
body > .loading.has-error::after {
|
|
74
|
+
content: '';
|
|
75
|
+
animation: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
body > .loading .loading-title {
|
|
79
|
+
font-size: 26px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
body > .loading .loading-error {
|
|
84
|
+
font-size: 18px;
|
|
85
|
+
max-width: 520px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
body > .loading .retry-button {
|
|
89
|
+
padding: 10px 18px;
|
|
90
|
+
border-radius: 12px;
|
|
91
|
+
border: 1px solid var(--startingColor);
|
|
92
|
+
background: transparent;
|
|
93
|
+
color: var(--startingColor);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
font-size: 16px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
body > .loading .retry-button:hover {
|
|
99
|
+
background: rgba(0, 0, 0, 0.05);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
html.dark body > .loading .retry-button:hover {
|
|
103
|
+
background: rgba(255, 255, 255, 0.08);
|
|
104
|
+
}
|
|
105
|
+
|
|
65
106
|
@keyframes loadingDots {
|
|
66
107
|
0%,
|
|
67
108
|
20% {
|
|
@@ -83,5 +124,5 @@
|
|
|
83
124
|
<body>
|
|
84
125
|
<app-root></app-root>
|
|
85
126
|
<div class="loading">Connecting ...</div>
|
|
86
|
-
<link rel="modulepreload" href="chunk-OC3JR7EH.js"><link rel="modulepreload" href="chunk-
|
|
127
|
+
<link rel="modulepreload" href="chunk-OC3JR7EH.js"><link rel="modulepreload" href="chunk-6AX4L2U5.js"><link rel="modulepreload" href="chunk-D7TCA6E7.js"><link rel="modulepreload" href="chunk-7XLQX4B6.js"><link rel="modulepreload" href="chunk-AJXTVI3H.js"><link rel="modulepreload" href="chunk-LF24JF3M.js"><link rel="modulepreload" href="chunk-QNZTEY37.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-U63HBLGG.js"><link rel="modulepreload" href="chunk-WILUKPQ3.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-CMSRKMLS.js" type="module"></script></body>
|
|
87
128
|
</html>
|
package/main-CMSRKMLS.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as Me,c as Ee}from"./chunk-OC3JR7EH.js";import{a as Se}from"./chunk-6AX4L2U5.js";import{a as Te}from"./chunk-D7TCA6E7.js";import{a as I}from"./chunk-7XLQX4B6.js";import{a as we}from"./chunk-AJXTVI3H.js";import{b as Re}from"./chunk-LF24JF3M.js";import"./chunk-QNZTEY37.js";import{a as P}from"./chunk-6Q6SSTBK.js";import{a as Ce}from"./chunk-U63HBLGG.js";import"./chunk-WILUKPQ3.js";import"./chunk-CGKL2MHM.js";import"./chunk-PNYEL323.js";import{a as H}from"./chunk-NEV6JB5M.js";import{a as h,b as v,c as ve,d as E}from"./chunk-QWNOPLJC.js";import{v as ge,x as ye}from"./chunk-RYXU2QDS.js";import{c as be}from"./chunk-BKANUILG.js";import{c as le,d as me,g as de,h as ue,i as he,j as fe}from"./chunk-GO4NSDR6.js";import{a as ne}from"./chunk-56FBKSBN.js";import{a as re,b as se,c as ie,e as ae,f as pe,g as ce}from"./chunk-FIBRO5I3.js";import{la as te,qa as oe}from"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{Bb as Y,E as M,I as $,Ic as Z,Jc as ee,K as w,M as K,R as C,U as _,W as r,cb as Q,da as q,ea as z,f as F,g as W,l as G,la as d,m as B,na as X,p as R,y as L,z as J}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var k=class e{#e=r(h);#a=r(v);ngOnInit(){this.#a.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Q({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&Y(0,"router-outlet")},dependencies:[le],encapsulation:2})};var Ie={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new _("ENVIRONMENT");var A=class e{#e=r(be);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#e.getApiV1Webmodules().pipe(K(n=>this.webmodules.set(n)),M(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Pe=()=>{let e=r(E);return e.token()?!0:e.checkProxyAuthed().pipe(w(t=>t?G(!0):e.refreshToken().pipe(R(()=>!0))))},De=()=>{let e=r(v),t=r(I),o=r(q),n=e.relayIsEnabled()?"longpoll":"websocket",i=[o.get(H).preload(!0),o.get(H).preloadFilterGroups(!0),o.get(A).preload(!0)];return e.configLoaded===null?L(i).pipe(R(()=>n)):e.configLoaded?.pipe(w(()=>L(i)))},Ve=()=>!0,ke={path:"connect/:typeParam",loadComponent:()=>import("./chunk-XECFWVLT.js")},Ue=()=>{let e=r(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},Ae=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-WA7KEG63.js")},{path:"logout",loadComponent:()=>import("./chunk-PTSGXV6M.js")},{path:"",canActivate:[Pe],children:[{path:"",canActivate:[De,Ve,Ue],children:[{path:"welcome",loadComponent:()=>import("./chunk-IH4WNUW5.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-WGXHTY3T.js")},ke]},{path:"",loadComponent:()=>import("./chunk-2U23BDRP.js"),children:[{path:"",loadComponent:()=>import("./chunk-HPU4SX5Z.js")},ke,{path:"add-backup",loadComponent:()=>import("./chunk-6WVN2KRC.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-IE7RK4YW.js")},{path:"backup/import",loadComponent:()=>import("./chunk-L37SKX3M.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-WPT4ETG3.js"),loadChildren:()=>import("./chunk-CM6KCZ6Q.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-WPT4ETG3.js"),loadChildren:()=>import("./chunk-CM6KCZ6Q.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-2LAZMIL4.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-DNNNVTJK.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-D47P7LFF.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-C6LHWLWL.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-4F7BBMQ2.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-FEBDZE5A.js")},{path:"from-config",loadComponent:()=>import("./chunk-6Y3RYZEE.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-U5GRFEV3.js"),loadChildren:()=>import("./chunk-JRMY6F6W.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-U5GRFEV3.js"),loadChildren:()=>import("./chunk-JRMY6F6W.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-U5GRFEV3.js"),loadChildren:()=>import("./chunk-JRMY6F6W.js")},{path:"settings",loadComponent:()=>import("./chunk-IQI7X3JY.js")},{path:"about",loadComponent:()=>import("./chunk-55RRXYNB.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-T7XH5JIZ.js")},{path:"changelog",loadComponent:()=>import("./chunk-CHUTAXTB.js")},{path:"libraries",loadComponent:()=>import("./chunk-GH6EHG4Z.js")},{path:"system-info",loadComponent:()=>import("./chunk-BGYXB4MY.js")},{path:"server-settings",loadComponent:()=>import("./chunk-TOB4ESNO.js")},{path:"logs",loadChildren:()=>import("./chunk-FCCYQZ63.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-6KLZAB4D.js")}]}]}]}]}]}];var V=null,Ne=(e,t)=>{let o=r(E),n=r(me),i=r(h),p=r(f),s=i.getItem("locale"),u=r(ye),c=Me(s),a=e.url==="/api/v1/auth/login",m=e.url==="/api/v1/auth/refresh",S=e.url==="/api/v1/progressstate",y=e.url==="/api/v1/remoteoperation/test",b=e.url==="/api/v1/filesystem/validate",T=e.url.startsWith("/api/v2/"),x=o.token(),U=e,j=e.headers.has("custom-proxy-check")||x===ve;if(x&&e.url.startsWith(p.baseUrl)&&!j){let l=e.headers.set("Authorization",`Bearer ${x}`);s&&s!=="en-US"&&(l=l.set("X-Ui-Language",c)),U=e.clone({headers:l})}return t(U).pipe(R(l=>{if(l.type===4&&l.status===200&&T){let g=l.body;if(g?.Success===!1)throw{status:200,message:g?.Error??"Unknown error",error:{Error:g?.Error??"Unknown error"},requestBody:g}}return l}),J(l=>{let g=l.error?.Error||`Error Code: ${l.status}, Message: ${l.message}`;return!j&&(S&&l.status===404||y||b||u.error(g),m&&l.status===401&&(o.logout(),n.navigate(["/logout"])),!a&&!m&&l.status===401)?(V??=o.refreshToken().pipe($()),V.pipe(w(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),M(()=>V=null))):B(()=>({error:l,message:g}))}))};var N=class e{#e=r(z);showError(t){let o=this.#e.querySelector("body > .loading");if(!o)return;o.classList.add("has-error"),o.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let i=this.#e.createElement("div");i.classList.add("loading-error"),i.textContent=t||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),o.append(n,i,p)}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var je="1.0.0",Oe=`portal-proxy-client-${P()}`,Fe=1,O=class e{#e=1e3;#a=r(f);#d=r(N);#o=d("disconnected");#u=d(this.#e);#p=d(!1);#n=d(!1);#c=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#l=[];#r={};#t=null;#h=new TextDecoder("utf-8");#m=null;#g=X(()=>{let t=this.#p(),o=this.#u(),n=this.#c();if(!n||!t||!o||o<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n)},o)});#i(t){this.#s||(this.#s=!0,this.#d.showError(t||"Unable to connect to the server."))}#f(){this.#s||(this.#s=!0)}utf8Atob(t){let o=Uint8Array.from(atob(t),i=>i.charCodeAt(0)),n=this.#h.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.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(this.#a.machineServerUrl),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#p.set(!1),this.#c.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#c.set(t),this.#p.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=p=>{let s=JSON.parse(p.data);if(this.wsState()==="connect"){if(s.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${s.type}'`);return}let c={token:t,publicKey:"",clientVersion:je,protocolVersion:Fe},a=this.createResponse(s,"authportal",c);this.#o.set("welcome"),this.#t?.send(a)}else if(this.wsState()==="welcome"){if(s.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${s.type}'`);return}var u=JSON.parse(s.payload??"");if(u.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#l.length>0;){let c=this.#l.pop();c&&this.#r[c.messageId]&&this.activateCommand(c)}}else if(this.wsState()==="authenticated"){if(s.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${s.type}'`);return}let c=this.#r[s.messageId];if(c){if(s.errorMessage)this.#i(s.errorMessage),c.reject(s.errorMessage);else{let a=JSON.parse(s.payload??"");a.statusCode>=400?this.#i(a.body||`Initial request failed with status code ${a.statusCode}`):this.#f(),a.body=a?.body==null?null:this.utf8Atob(a.body),c.resolve(a)}delete this.#r[s.messageId],window.clearTimeout(c.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let i={from:Oe,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(i)}sendCommand(t,o,n,i,p,s,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((c,a)=>{let m=P(),y={from:Oe,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:i,body:p,headers:s})},b={resolve:c,reject:a,timer:window.setTimeout(()=>{let T=this.#r[m];T&&(delete this.#r[m],this.#i("The request timed out before receiving a response."),T.reject("Timeout"))},u)};this.#r[m]=b,this.#n()?this.activateCommand(y):this.#l.push(y)})}activateCommand(t){this.#t?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function We(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function xe(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let i=We(t.body),p={};t.headers.keys().forEach(a=>{p[a]=t.headers.get(a)??""});let s=t.headers.get("timeout"),u=s!==null?parseInt(s):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let c=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,i,p,u);return new F(a=>{c.then(m=>{let S=new re;p!=null&&Object.keys(p).forEach(b=>{S.set(b,p[b])});let y=new se({body:m.body,status:m.statusCode,statusText:"OK",headers:S});a.next(y),a.complete()}).catch(m=>{a.error(new ie({error:m??"Unknown error",status:0,statusText:m??"Unknown error"}))})})}var Le=(e,t)=>{let o={relayconfigState:r(v),defaultTimeout:r(f).defaultTimeout,relayWebsocket:r(O)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let i=new W;return o.relayconfigState.configLoaded.subscribe(p=>{p&&xe(o,e,t).subscribe(i)}),i}return xe(o,e,t)};var He={providers:[Z(),ue(Ae,fe(),he(de)),ae(ce(),pe([Le,Ne])),h,{provide:f,useValue:Ie},{provide:ee,useValue:Ee()},{provide:ge,useValue:{alertVariant:"simple"}},Se,I,Re,oe,Ce,te,we,Te]};ne(k,He);
|
package/package.json
CHANGED
package/assets/favicon.ico
DELETED
|
Binary file
|
package/chunk-27UON6YV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as b,r as L}from"./chunk-RYXU2QDS.js";import{b as N}from"./chunk-BKANUILG.js";import{E,Mc as U,R as A,W as w,la as k,p as S}from"./chunk-XYHHESIX.js";import{a as s,b as D}from"./chunk-7CGTOI24.js";var h=class{constructor(t){this.loader=t}_data=k(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(E(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var g=class e{#e=w(N);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#i=new h(()=>this.getS3Config("StorageClasses"));#s=U(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#s}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#i.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(S(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(S(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(S(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(S(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=A({token:e,factory:e.\u0275fac,providedIn:"root"})};var i=new L,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.`},G={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>i.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return s({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},C=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>i.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return s({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>i.control(e??"",[b.required,b.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=>i.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"amazon aws spaces cloud mycloudyplace impossible scaleway hosteurope dunkel dreamhost dincloud poli systems ibm cos storadera wasabi infomaniak infomaniak \u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 seagate lyve digitalocean backblaze b2 cloudian minio linode bunnycdn microsoft azure google storage ibm oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3AllProviders(),isMandatory:!0,formElement:e=>i.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>k([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>k([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return s({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"BucketnameB2",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>i.control(e??"",[b.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return F(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:a,path:u}=m(t);return s({destinationType:e,dynamic:s({"rclone-remote-repository":a,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>i.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.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=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.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=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return F(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(s({},e),{advanced:D(s({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],s({destinationType:e,custom:{path:d(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,V(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),a=n.split("/")[0],u=n.split("/").slice(1).join("/");return s({destinationType:e,custom:{server:r,share:a,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:G.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>i.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>i.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${v([...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"],s({destinationType:e},r)}}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${v([...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"],s({destinationType:e},r)}}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(s({},e),{advanced:D(s({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],s({destinationType:e,custom:{path:d(t),bucket:n}},r)}}}],pe={".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"};var z=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+.-]*:\/\/(?:[^@\/?#]*@)?([^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return F(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function F(e,t,o,r,n){let a=v(n),u=encodeURIComponent(x(t)),$=u==""?"":u+T(o),y=r??"",M=y.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,f=V($,j(y));return`${M}${f}${a}`}function B(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function V(...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 j(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new z(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 T(e){return e==null||e===""?"":":"+e.toString()}function P(e){return C.find(o=>o.key===e||o.customKey===e)??C.find(o=>`${o.key}s`===e)??null??s({key:e,displayName:e},G)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.hostname),port:e.port,path:B(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=P(e);return t.searchParams.forEach((a,u)=>{n?.dynamicFields?.some(y=>y===u||y?.name===u)?r[u]=decodeURIComponent(a):o[u]=decodeURIComponent(a)}),{advanced:o,dynamic:r}}function v(e,t=!1){let o=e.map(([n,a])=>`${n}=${a?encodeURIComponent(a.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function he(e){let t=e.destinationType??"";return P(t)?.mapper.to(e)??""}function ge(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`:"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return P(t).mapper.from(t,new z("http://localhost"),e);let n=P(t),a="";`${n.key}s`===t&&(a+=r.indexOf("?")===-1?"?":"&",a+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(a+=a.indexOf("?")===-1?"?":"&",a+=o.split("?")[1]??"");try{let u=new z(r+a);if(u.host==="undefined")return null;let $=o.split("?")[0].split("/")[0],y=!isNaN(Number(u.host.replaceAll(".",""))),O=$.split("."),M=O.length===4&&O.every(f=>f.length&&f.length<=3&&!isNaN(Number(f))&&parseInt(f)<=255);return y&&!M?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+a,u),null}}function I(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
2
|
-
`).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function ye(e){return I(e).map(([t,o])=>({Name:t,Value:o}))}function fe(e){return Object.fromEntries(I(e))}export{P as a,he as b,ge as c,ye as d,fe as e,pe as f};
|
package/chunk-4IUPBI2K.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-WILUKPQ3.js";import{a as u}from"./chunk-NEV6JB5M.js";import{z as a}from"./chunk-RYXU2QDS.js";import{b as g}from"./chunk-BKANUILG.js";import{Mc as c,R as n,W as r,la as s,na as l}from"./chunk-XYHHESIX.js";var f=class o{#s=r(a);#e=r(g);#r=r(u);repeatRegisterTimer=null;state=s("unknown");claimUrl=s(null);registerUrl=s("");customRegisterUrl=s("");status=c(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=l(()=>{let e=this.#r.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),(t==="connecting"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>this.#t(i),error:i=>this.#i(i)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>this.#t(i)})}#i(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{console.log("next",t),this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}beginRemoteRegistration(e=!1){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:t=>this.#t(t),error:t=>this.#i(t)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#s.open(m,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:i=>e.#t(i),error:i=>e.#i(i)})}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=n({token:o,factory:o.\u0275fac,providedIn:"root"})};export{f as a};
|
package/chunk-5UXRNNTT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as v}from"./chunk-FBWFZMGL.js";import{b as p}from"./chunk-BKANUILG.js";import{M as S,Mc as s,R as a,W as c,la as u}from"./chunk-XYHHESIX.js";import{a as o,b as g}from"./chunk-7CGTOI24.js";var d="shown-welcome-page-v1",n="hide-console-connection-status",l=class t{#e=c(p);#r=v(this.#e.getApiV1Serversettings());#t=u(void 0);serverSettings=s(()=>this.#t()||this.#r());isConsoleConnectionStatusHidden=s(()=>{let e=this.serverSettings();return e?e[n]==="True":!1});refreshServerSettings(){this.#e.getApiV1Serversettings().subscribe({next:e=>{this.#t.set(e)}})}patchServerSettings(e){return this.#e.patchApiV1Serversettings({requestBody:e})}patchServerSetting(e,r){let i={};return i[e]=r,this.patchServerSettings(i)}setShownWelcomePage(){return this.patchServerSetting(d,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(n,e?"True":"False").pipe(S(()=>this.#t.set(g(o({},this.serverSettings()),{[n]:e?"True":"False"}))))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})};export{l as a};
|
package/chunk-6O5DBV6Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as q}from"./chunk-4IUPBI2K.js";import{a as H}from"./chunk-AGPZBYW6.js";import"./chunk-WILUKPQ3.js";import"./chunk-NEV6JB5M.js";import{a as Q}from"./chunk-5UXRNNTT.js";import"./chunk-FBWFZMGL.js";import{B as X,C as z,H as K,L as j,c as B,e as U,i as G,s as W,u as V,w as J}from"./chunk-RYXU2QDS.js";import"./chunk-BKANUILG.js";import{d as A,e as I}from"./chunk-GO4NSDR6.js";import"./chunk-56FBKSBN.js";import"./chunk-FIBRO5I3.js";import"./chunk-RMOTUTEQ.js";import"./chunk-QF5K4MHH.js";import{$ as m,Ab as l,Bb as T,Bc as $,Ib as f,Mc as O,Pa as a,Pb as S,Qb as P,Rb as p,Rc as v,Ub as D,Vb as h,W as E,Xb as s,aa as F,cb as b,ic as x,jc as d,la as N,na as M,oc as w,pc as L,qc as k,sb as c,tb as _,yb as y,zb as r}from"./chunk-XYHHESIX.js";import"./chunk-7CGTOI24.js";var Y=(t,n,e,i,o)=>({"loading-state":t,"ready-to-add-link":n,"is-connected":e,"failed-to-connect":i,"is-registered":o});function Z(t,n){t&1&&p(0,0,1)}function ee(t,n){t&1&&p(0,0,2)}function te(t,n){if(t&1){let e=f();r(0,"button",10),h("click",function(){m(e);let o=s(2);return F(o.cancel())}),d(1,"Cancel registration"),l()}}function ne(t,n){if(t&1&&(r(0,"div",7)(1,"p"),S(2,0),c(3,Z,1,0)(4,ee,1,0),P(),l(),T(5,"sh-progress-bar",8),c(6,te,2,0,"button",9),l()),t&2){let e=s();a(3),_(e.state()==="unknown"?3:4),a(3),_((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1)}}function ie(t,n){if(t&1){let e=f();r(0,"sh-form-field")(1,"label",11),p(2,1),l(),r(3,"input",12),k("ngModelChange",function(o){m(e);let C=s();return L(C.customRegisterUrl,o)||(C.customRegisterUrl=o),F(o)}),l()(),r(4,"div",13)(5,"button",14),d(6,"Go back"),l(),r(7,"button",15),h("click",function(){m(e);let o=s();return F(o.registerViaCustomUrl())}),p(8,2),l()()}if(t&2){let e=s();a(3),w("ngModel",e.customRegisterUrl),a(4),y("disabled",!e.customRegisterUrlValid())}}function oe(t,n){if(t&1){let e=f();r(0,"p"),p(1,3),l(),T(2,"sh-progress-bar",8),r(3,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(4,"Cancel"),l()}}function re(t,n){if(t&1){let e=f();r(0,"p"),p(1,4),l(),r(2,"button",10),h("click",function(){m(e);let o=s(2);return F(o.retryWhenFaulted())}),d(3,"Retry"),l()}}function le(t,n){if(t&1&&c(0,oe,5,0)(1,re,4,0),t&2){let e=s();_(e.claimUrl()!==null?0:1)}}function ae(t,n){t&1&&(S(0,5,1),T(1,"p"),P())}function se(t,n){t&1&&(S(0,5,2),T(1,"p"),P())}function ce(t,n){if(t&1){let e=f();r(0,"sh-alert",16),S(1,5),c(2,ae,2,0,"p")(3,se,2,0,"p"),P(),l(),r(4,"button",10),h("click",function(){m(e);let o=s();return F(o.retryWhenFaulted())}),d(5," Retry "),r(6,"sh-icon"),d(7,"arrow-arc-left"),l()()}if(t&2){let e=s();a(2),_(e.typeParam()==="link"?2:3)}}function _e(t,n){t&1&&(r(0,"h3"),d(1,"Successfully connected"),l(),r(2,"p"),d(3,"We're going to redirect you to the home page"),l())}var R=class t{#t=E(A);#i=E(H);#e=E(q);#n=E(Q);isOldOpen=N(!1);typeParam=v.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=O(()=>{let n=this.#n.serverSettings();return this.#e.state()==="inactive"?"":n&&n["additional-report-url"]||""});copiedReportingUrl=N(!1);customRegisterUrlValid=O(()=>{let n=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return!(n.length===0||!e.test(n))});registeringCounter=N(null);didTry=!1;triedFinishConnection=!1;stateEffect=M(()=>{let n=this.#e.registerUrl(),e=this.state(),i=this.typeParam(),o=this.registeringCounter();e==="inactive"&&i==="logon"&&n!==""&&(this.didTry||(this.#e.beginRemoteRegistration(),this.didTry=!0)),e==="registered"&&this.claimUrl()!==null&&(this.triedFinishConnection||(this.triedFinishConnection=!0,this.#o())),e==="registering"?(o===null&&this.registeringCounter.set(0),setTimeout(()=>{this.registeringCounter.set((o??0)+1)},1e3)):this.registeringCounter.set(null),(e==="connected"||e==="disabled"||e==="connecting")&&this.#n.setShownWelcomePage().subscribe(()=>{this.#t.navigate([""])})});ngOnInit(){this.#e.refreshRemoteControlStatus()}#o(){let n=this.#e.claimUrl();this.#i.open(`${n}?closeAfterConnection=true`,"_blank")}registerViaCustomUrl(){this.#e.beginRemoteRegistration(!0)}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=!1,this.triedFinishConnection=!1,this.typeParam()==="logon"&&this.#t.navigate(["/welcome/select"])}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let n=this.additionalReportingUrl();n&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(n))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let n;n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let u;return u=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,u=D(u),[n,e,i,o,C,u,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(r(0,"sh-card",6),c(1,ne,7,2,"div",7),c(2,ie,9,2),c(3,le,2,1),c(4,ce,8,1),c(5,_e,4,0),l()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",u=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";x($(7,Y,o,C,u,g,i.state()==="registered")),a(),_(o?1:-1),a(),_(C?2:-1),a(),_(i.state()==="registered"?3:-1),a(),_(g?4:-1),a(),_(u?5:-1)}},dependencies:[I,W,B,U,G,K,X,j,z,J,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"],changeDetection:0})};export{R as default};
|