@duplicati/ngclient 0.0.143 → 0.0.144
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/aliyun.png +0 -0
- package/assets/dest-icons/aws.png +0 -0
- package/assets/dest-icons/azure.png +0 -0
- package/assets/dest-icons/backblaze.png +0 -0
- package/assets/dest-icons/box-com.png +0 -0
- package/assets/dest-icons/dropbox.png +0 -0
- package/assets/dest-icons/external-harddrive.png +0 -0
- package/assets/dest-icons/file-jump.png +0 -0
- package/assets/dest-icons/file-system.png +0 -0
- package/assets/dest-icons/filen.png +0 -0
- package/assets/dest-icons/ftp.png +0 -0
- package/assets/dest-icons/google-cloud.png +0 -0
- package/assets/dest-icons/google-drive.png +0 -0
- package/assets/dest-icons/idrive-e2.png +0 -0
- package/assets/dest-icons/jottacloud.png +0 -0
- package/assets/dest-icons/mega-nz.png +0 -0
- package/assets/dest-icons/nas.png +0 -0
- package/assets/dest-icons/office-365.png +0 -0
- package/assets/dest-icons/one-drive.png +0 -0
- package/assets/dest-icons/open-stack.png +0 -0
- package/assets/dest-icons/pcloud.png +0 -0
- package/assets/dest-icons/rackspace.png +0 -0
- package/assets/dest-icons/rclone.png +0 -0
- package/assets/dest-icons/sftp.png +0 -0
- package/assets/dest-icons/sharepoint.png +0 -0
- package/assets/dest-icons/sia-cloud.png +0 -0
- package/assets/dest-icons/sia_logo_dark.92db63f5.svg +6 -0
- package/assets/dest-icons/smb.png +0 -0
- package/assets/dest-icons/ssh.png +0 -0
- package/assets/dest-icons/storj.png +0 -0
- package/assets/dest-icons/tahoelafs.png +0 -0
- package/assets/dest-icons/tencent-cloud.png +0 -0
- package/assets/dest-icons/webdav.png +0 -0
- package/{chunk-HBTRQAXQ.js → chunk-2CTSAUUN.js} +1 -1
- package/chunk-74NKDA4G.js +1 -0
- package/{chunk-HDQRG3ZZ.js → chunk-B7NRTB6T.js} +1 -1
- package/chunk-C2L3SQU3.js +1 -0
- package/chunk-CDRDYQEV.js +1 -0
- package/chunk-ERKYRXHP.js +8 -0
- package/{chunk-5AENPWCF.js → chunk-FVE45QKX.js} +1 -1
- package/{chunk-GDWLKG6V.js → chunk-GCZWFRPZ.js} +1 -1
- package/{chunk-36RDZAZ4.js → chunk-GDBU3Z7P.js} +1 -1
- package/{chunk-NTA2CULM.js → chunk-KOVQRACM.js} +1 -1
- package/{chunk-KUPXKQHP.js → chunk-LEXA637O.js} +1 -1
- package/{chunk-WZ23D2R7.js → chunk-T4TFHAZT.js} +1 -1
- package/{chunk-MBBEXLIJ.js → chunk-UGLRUY6T.js} +1 -1
- package/{chunk-M2RYJ73O.js → chunk-WHKW5IYF.js} +1 -1
- package/{chunk-6BCYG4Y6.js → chunk-ZVIRETHC.js} +1 -1
- package/index.html +1 -1
- package/{main-SFGPSKNZ.js → main-SUSCPR3H.js} +1 -1
- package/package.json +1 -1
- package/chunk-BSP6AKSZ.js +0 -1
- package/chunk-LSVMEMXJ.js +0 -1
- package/chunk-XLE2TW65.js +0 -1
- package/chunk-YHNIGBHB.js +0 -8
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="71" height="40" viewBox="0 0 71 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="4.40001" height="4.39988" transform="matrix(4.37114e-08 1 1 -4.37114e-08 65.9334 0)" fill="#C3E500"/>
|
|
3
|
+
<rect width="4.40001" height="4.39988" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5335 0)" fill="#E50AAE"/>
|
|
4
|
+
<rect width="4.40001" height="4.39988" transform="matrix(4.37114e-08 1 1 -4.37114e-08 65.9334 4.39998)" fill="#36D955"/>
|
|
5
|
+
<path d="M30.8816 40H37.7877V35.8449H30.8816V40ZM19.3714 40H26.2775V35.8449H19.3714V40ZM56.8227 40H61.4268V35.8449H56.8227V40ZM42.3924 40H52.2186V35.8449H42.3924V40ZM0.449596 40H14.7674V35.8449H0.44896V40H0.449596ZM26.502 7.26534H30.6571V0.134766H26.502V7.26534ZM53.6215 23.9977H52.218V35.8449H56.8221V18.944C56.878 14.733 53.8459 11.9254 49.2419 11.9254H38.1247V15.9679H48.5684C50.9264 15.912 52.4425 17.091 52.4425 19C52.3865 21.0775 51.095 21.8635 47.6699 22.9866L44.6378 23.9971C39.8093 25.569 37.7877 28.3207 37.7877 32.1387V35.8443H42.3917V32.8681C42.3917 30.285 43.4022 29.1626 46.8273 27.8145L49.8594 26.6355C51.3194 26.074 52.667 25.3439 53.6215 23.9964V23.9977ZM26.2769 35.8449H30.8809V11.9254H26.2769V35.8449ZM14.7667 35.8449H19.3708V31.9709C19.3708 28.0968 17.2932 25.6822 12.1836 23.9977L9.15154 22.9872C5.78243 21.8642 4.43491 21.1907 4.43491 18.9447C4.43491 17.2041 6.0635 15.9686 8.14042 15.9686H19.0331V11.926H7.46762C3.14399 11.926 0 14.5651 0 18.8887C0 23.2123 2.30203 25.2899 6.9627 26.8619L9.99477 27.8724C14.1499 29.2758 14.7674 30.1744 14.7674 32.8694V35.8455L14.7667 35.8449Z" fill="#1D2609"/>
|
|
6
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as mt}from"./chunk-TJOWPBPB.js";import{a as pt,b as Ot,c as Ct}from"./chunk-YHNIGBHB.js";import"./chunk-6GC5VKTI.js";import"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import{a as Dt}from"./chunk-XLE2TW65.js";import{h as Et}from"./chunk-36RDZAZ4.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import"./chunk-QGFC5ZUR.js";import"./chunk-OXOOR7I4.js";import{a as m}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{c as _t,e as ct,f as ut,g as Tt,i as gt,j as St,s as dt}from"./chunk-USU2EHJV.js";import"./chunk-ETCRT3EV.js";import{b as nt,d as it}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as F,Cb as g,Gb as w,Hb as b,Jb as p,Oc as v,Qb as u,Ra as r,Rb as T,Sb as N,Tb as f,Ub as $,Vb as B,Vc as et,Wb as d,Yb as l,_ as O,bb as j,ea as _,ec as Q,fa as c,fc as q,ia as K,ic as Y,lc as I,mc as k,nc as J,oa as C,qc as A,rc as M,sc as y,ub as D,vb as E,wb as P,xb as x,yb as L,yc as Z,zb as h,zc as tt}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],ht=()=>({maxWidth:"700px",width:"100%"});function It(i,n){if(i&1){let t=p();u(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),Y("loader",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing")}}function Nt(i,n){if(i&1){let t=p();u(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),T()}}function ft(i,n){i&1&&(s(0,"sh-alert"),u(1,5),g(2,"sh-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"sh-alert",21),u(1,6),g(2,"sh-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"sh-alert",22),u(1,7),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"sh-alert",23),u(1,8),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=p();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),g(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Pt(i,n){if(i&1){let t=p();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),k(t.displayName),r(2),k(t.description)}}function xt(i,n){if(i&1){let t=p();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function Lt(i,n){if(i&1&&(s(0,"div",34),x(1,Pt,5,2,"div",35,P),F(),s(3,"sh-menu",36)(4,"button",37),N(5,10),F(),w(6,19),x(7,xt,3,1,"button",38,P),b(),F()),i&2){let t=l();r(),L(t.destinationTypeOptionsFocused()),r(2),h("searchable",!0),r(4),L(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=p();s(0,"app-single-destination",41),y("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(u(0,4,1),g(1,"sh-icon",28),T())}function Bt(i,n){i&1&&(u(0,4,2),g(1,"sh-icon"),T())}function kt(i,n){if(i&1){let t=p();s(0,"sh-dialog",42),y("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),N(3,11),F(),s(4,"sh-alert",22),N(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),y("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),g(14,"sh-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),h("options",tt(3,ht)),r(8),A("ngModel",t.targetUrlCtrl)}}var U=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(pt);injector=O(K);#t=O(mt);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=v(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=v(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=j({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([Et])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=B(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=B(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,G,V,W,z,H,X,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=p();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,It,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),w(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,Nt,3,0,"button",18),b(),F()(),T(),F(),D(14,ft,3,0,"sh-alert")(15,$t,3,0,"sh-alert",21)(16,At,3,1,"sh-alert",22)(17,Mt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Lt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),u(23,3),g(24,"sh-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"sh-icon",28)(28,Bt,2,0,"sh-icon"),T(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),h("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,dt,St,_t,ct,ut,gt,Tt,rt,lt,ot,st,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{U as default};
|
|
1
|
+
import{g as mt}from"./chunk-TJOWPBPB.js";import{a as pt,b as Ot,c as Ct}from"./chunk-ERKYRXHP.js";import"./chunk-6GC5VKTI.js";import"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import{a as Dt}from"./chunk-CDRDYQEV.js";import{h as Et}from"./chunk-GDBU3Z7P.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import"./chunk-QGFC5ZUR.js";import"./chunk-OXOOR7I4.js";import{a as m}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import{c as _t,e as ct,f as ut,g as Tt,i as gt,j as St,s as dt}from"./chunk-USU2EHJV.js";import"./chunk-ETCRT3EV.js";import{b as nt,d as it}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as F,Cb as g,Gb as w,Hb as b,Jb as p,Oc as v,Qb as u,Ra as r,Rb as T,Sb as N,Tb as f,Ub as $,Vb as B,Vc as et,Wb as d,Yb as l,_ as O,bb as j,ea as _,ec as Q,fa as c,fc as q,ia as K,ic as Y,lc as I,mc as k,nc as J,oa as C,qc as A,rc as M,sc as y,ub as D,vb as E,wb as P,xb as x,yb as L,yc as Z,zb as h,zc as tt}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],ht=()=>({maxWidth:"700px",width:"100%"});function It(i,n){if(i&1){let t=p();u(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),T()}if(i&2){let t=l();r(),Y("loader",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing")}}function Nt(i,n){if(i&1){let t=p();u(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),T()}}function ft(i,n){i&1&&(s(0,"sh-alert"),u(1,5),g(2,"sh-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"sh-alert",21),u(1,6),g(2,"sh-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"sh-alert",22),u(1,7),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"sh-alert",23),u(1,8),g(2,"sh-icon",31),T(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=p();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),g(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Pt(i,n){if(i&1){let t=p();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),k(t.displayName),r(2),k(t.description)}}function xt(i,n){if(i&1){let t=p();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function Lt(i,n){if(i&1&&(s(0,"div",34),x(1,Pt,5,2,"div",35,P),F(),s(3,"sh-menu",36)(4,"button",37),N(5,10),F(),w(6,19),x(7,xt,3,1,"button",38,P),b(),F()),i&2){let t=l();r(),L(t.destinationTypeOptionsFocused()),r(2),h("searchable",!0),r(4),L(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=p();s(0,"app-single-destination",41),y("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(u(0,4,1),g(1,"sh-icon",28),T())}function Bt(i,n){i&1&&(u(0,4,2),g(1,"sh-icon"),T())}function kt(i,n){if(i&1){let t=p();s(0,"sh-dialog",42),y("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),N(3,11),F(),s(4,"sh-alert",22),N(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),y("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),g(14,"sh-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),h("options",tt(3,ht)),r(8),A("ngModel",t.targetUrlCtrl)}}var U=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(pt);injector=O(K);#t=O(mt);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=v(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=v(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=j({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([Et])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=B(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=B(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,G,V,W,z,H,X,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=p();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,It,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),w(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,Nt,3,0,"button",18),b(),F()(),T(),F(),D(14,ft,3,0,"sh-alert")(15,$t,3,0,"sh-alert",21)(16,At,3,1,"sh-alert",22)(17,Mt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Lt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),u(23,3),g(24,"sh-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"sh-icon",28)(28,Bt,2,0,"sh-icon"),T(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),h("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,dt,St,_t,ct,ut,gt,Tt,rt,lt,ot,st,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{U as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-UGLRUY6T.js")},{path:"destination",loadComponent:()=>import("./chunk-C2L3SQU3.js")},{path:"source-data",loadComponent:()=>import("./chunk-B7NRTB6T.js")},{path:"schedule",loadComponent:()=>import("./chunk-WHKW5IYF.js")},{path:"options",loadComponent:()=>import("./chunk-LEXA637O.js")}];export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,g as b}from"./chunk-
|
|
1
|
+
import{f as a,g as b}from"./chunk-GDBU3Z7P.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import"./chunk-QGFC5ZUR.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-USU2EHJV.js";import"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Bt,b as xt,c as Lt}from"./chunk-ERKYRXHP.js";import"./chunk-6GC5VKTI.js";import"./chunk-CZLLEVMJ.js";import{a as yt}from"./chunk-CDRDYQEV.js";import{h as Pt}from"./chunk-GDBU3Z7P.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-VC72SWC4.js";import"./chunk-QGFC5ZUR.js";import{a as $}from"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import{c as b,e as k,f as Et,g as At,i as v,j as $t,r as Mt,s as G}from"./chunk-USU2EHJV.js";import{b as mt,d as St}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as U,b as Ct,d as ht,e as It,g as Nt,h as ft,l as w,o as Ot}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as F,Cb as c,Gb as Ft,Hb as rt,Jb as g,Oa as it,Oc as L,Qb as u,Ra as r,Rb as _,Sb as B,Tb as z,Tc as Dt,Ub as H,Uc as gt,Vb as X,Vc as pt,Wb as D,Yb as l,Zb as lt,_ as h,_b as ct,bb as f,ea as d,ec as ut,fa as T,fc as _t,ia as nt,ic as dt,lc as x,mc as W,oa as I,qc as O,rc as E,sc as A,tc as j,ub as m,uc as q,vb as S,vc as R,wb as ot,wc as Q,xb as at,yb as st,zb as C,zc as Tt}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var wt=["*"],M=class o{destination=gt.required();static \u0275fac=function(t){return new(t||o)};static \u0275cmp=f({type:o,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"]},ngContentSelectors:wt,decls:9,vars:6,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"description"],[1,"actions"]],template:function(t,n){if(t&1&&(lt(),s(0,"sh-card",0)(1,"div",1),c(2,"img",2),F(),s(3,"div",3),x(4),F(),s(5,"div",4),x(6),F(),s(7,"div",5),ct(8),F()()),t&2){let i=n.destination();r(2),C("src",Q(i.icon),it)("alt",Q(i.displayName)),r(2),W(i.displayName),r(2),W(i.description)}},dependencies:[ft],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})};function kt(o,e){if(o&1){let t=g();s(0,"app-destination-list-item",3)(1,"button",4),D("click",function(){let i=d(t).$implicit,a=l();return T(a.setDestination.emit(i.key))}),u(2,0),c(3,"sh-icon"),_(),F()()}if(o&2){let t=e.$implicit;C("destination",t)}}var K=class o{#i=h(xt);setDestination=Dt();destinationSearchTerm=I("");destinationTypeOptionsInFocus=I(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#i.destinationTypeOptions;destinationTypeOptionsFocused=L(()=>{let e=new Set(this.destinationTypeOptionsInFocus()),t=this.destinationTypeOptions(),n=this.destinationSearchTerm().toLowerCase(),i=[...t].sort((a,N)=>{let y=e.has(a.key),P=e.has(N.key);return y&&!P?-1:!y&&P?1:0});return n?i.filter(a=>a.displayName.toLowerCase().includes(n)):i});static \u0275fac=function(t){return new(t||o)};static \u0275cmp=f({type:o,selectors:[["app-destination-list"]],outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let e;e=$localize`Search for destination...`;let t;return t=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,["type","text","placeholder",e,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(t,n){t&1&&(s(0,"sh-form-field")(1,"input",1),A("ngModelChange",function(a){return E(n.destinationSearchTerm,a)||(n.destinationSearchTerm=a),a}),F()(),s(2,"div",2),at(3,kt,4,1,"app-destination-list-item",3,ot),F()),t&2&&(r(),O("ngModel",n.destinationSearchTerm),r(2),st(n.destinationTypeOptionsFocused()))},dependencies:[M,G,b,k,v,w,Nt,U],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 vt=["formRef"],Gt=()=>({maxWidth:"700px",width:"100%"});function Kt(o,e){if(o&1){let t=g();u(0,1,1),s(1,"button",28),D("click",function(){d(t);let i=l();return T(i.testDestination(0,!0))}),F(),_()}if(o&2){let t=l();r(),dt("loader",t.testSignal()=="testing"),C("disabled",t.testSignal()=="testing")}}function Vt(o,e){if(o&1){let t=g();u(0,1,2),s(1,"button",29),D("click",function(){d(t);let i=l();return T(i.openTargetUrlDialog())}),c(2,"sh-icon"),F(),_()}}function zt(o,e){if(o&1){let t=g();u(0,1,4),s(1,"button",29),D("click",function(){d(t);let i=l(2);return T(i.copyTargetUrl())}),c(2,"sh-icon"),F(),_()}}function Ht(o,e){if(o&1){let t=g();u(0,1,3),s(1,"sh-menu")(2,"button",17),c(3,"sh-icon"),F(),Ft(4,30),s(5,"button",29),D("click",function(){d(t);let i=l();return T(i.openTargetUrlDialog())}),c(6,"sh-icon"),F(),m(7,zt,3,0,"button",17),rt(),F(),_()}if(o&2){l();let t=R(0);r(7),S(t?7:-1)}}function Xt(o,e){o&1&&(s(0,"sh-alert"),u(1,4),c(2,"sh-icon",31),_(),F())}function Wt(o,e){o&1&&(s(0,"sh-alert",18),u(1,5),c(2,"sh-icon",31),_(),F())}function jt(o,e){if(o&1&&(s(0,"sh-alert",19),u(1,6),c(2,"sh-icon",31),_(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function qt(o,e){if(o&1&&(s(0,"sh-alert",20),u(1,7),c(2,"sh-icon",31),_(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function Qt(o,e){if(o&1){let t=g();s(0,"app-destination-list-item",21)(1,"button",24),D("click",function(){d(t);let i=l();return T(i.removeDestination())}),B(2,8),F()()}if(o&2){l();let t=R(14);C("destination",t)}}function Yt(o,e){if(o&1){let t=g();s(0,"app-destination-list",32),D("setDestination",function(i){d(t);let a=l();return T(a.setDestination(i))}),F()}}function Jt(o,e){if(o&1){let t=g();s(0,"app-single-destination",33),A("targetUrlChange",function(i){d(t);let a=l();return E(a.targetUrlModel,i)||(a.targetUrlModel=i),T(i)}),F()}if(o&2){let t=l();O("targetUrl",t.targetUrlModel),C("useBackupState",!0)}}function Zt(o,e){o&1&&(u(0,3,1),c(1,"sh-icon",26),_())}function te(o,e){o&1&&(u(0,3,2),c(1,"sh-icon"),_())}function ee(o,e){o&1&&(s(0,"h2"),B(1,11),F())}function ne(o,e){o&1&&(s(0,"h2"),B(1,12),F())}function ie(o,e){if(o&1){let t=g();s(0,"sh-dialog",34),A("isOpenChange",function(i){d(t);let a=l();return E(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),T(i)}),s(1,"header",35),m(2,ee,2,0,"h2")(3,ne,2,0,"h2"),s(4,"sh-alert",19),B(5,9),F()(),s(6,"div",36)(7,"sh-form-field")(8,"textarea",37),A("ngModelChange",function(i){d(t);let a=l();return E(a.targetUrlCtrl,i)||(a.targetUrlCtrl=i),T(i)}),F()()(),s(9,"footer",38)(10,"button",24),D("click",function(){d(t);let i=l();return T(i.closeTargetUrlDialog(!1))}),x(11,"Cancel"),F(),s(12,"button",39),D("click",function(){d(t);let i=l();return T(i.closeTargetUrlDialog(!0))}),u(13,10),c(14,"sh-icon"),_(),F()()()}if(o&2){let t=l(),n=R(0);O("isOpen",t.targetUrlDialogOpen),C("options",Tt(4,Gt)),r(2),S(n?3:2),r(6),O("ngModel",t.targetUrlCtrl)}}var V=new Mt,Be=(o={destinations:[]})=>V.group({destinations:V.array(o.destinations)}),xe=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>V.group({destinationType:V.control(o),custom:e,dynamic:t,advanced:n}),Y=class o{#i=h(St);#o=h(mt);#t=h(Pt);#e=h(It);#a=h(Bt);injector=h(nt);formRef=pt.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=I(null);targetUrlInitial=I(null);targetUrlDialogOpen=I(!1);toggleNewDestination=I(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;selectedDestinationType=L(()=>{let e=this.targetUrlModel();if(!e)return null;let t=e.split("://")[0];return yt(t)??null});selectedDestinationTypeOption=L(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let e=this.targetUrlModel();this.targetUrlCtrl.set(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();!e||t===n||!t||this.#t.setTargetUrl(t)}testDestination(e,t,n){let i=this.targetUrlModel();i&&(this.#t.setTestState("testing"),this.#a.testDestination(i,e,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),this.#t.isNew()&&(a.containsBackup===!0?(this.#t.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),t||this.#e.open($,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#t.setTestState("warning",$localize`The remote destination contains unknown files.`),t||this.#e.open($,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),n?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){n?.();return}let N=i.includes("?");a.action==="trust-cert"&&this.#t.setTargetUrl(i+`${N?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.setTargetUrl(i+`${N?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):n?.()}}))}setDestination(e){this.#t.setTargetUrl(`${e}://`,!0)}removeDestination(){this.#t.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let e=this.#t.isNew(),t=this.testSignal();if(!e){this.#n();return}if(t===""){this.#e.open($,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open($,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(t!=="success"){this.#e.open($,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#n()}});return}this.#n()}#n(){this.#t.isNew()||this.#t.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=f({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&ut(n.formRef,vt,5),t&2&&_t()},decls:27,vars:11,consts:()=>{let e;e=$localize` Backup destination ${"\uFFFD#6\uFFFD"}:START_TAG_DIV:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*8:2\uFFFD"}:START_BLOCK_IF_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Set target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*9:3\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:3\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#2:3\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#4:3\uFFFD"}:START_TAG_NG_CONTAINER:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:4\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#4:3\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#1:3\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/*9:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_DIV:`,e=X(e);let t;t=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*24:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*24:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*25:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*25:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=X(n);let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let N;N=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let y;y=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let P;P=$localize`Change`;let J;J=$localize`Be careful, this will overwrite everything you have in your destination.`;let Z;Z=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let tt;tt=$localize`Set target URL`;let et;return et=$localize`Edit target URL`,[["formRef",""],e,t,n,i,a,N,y,P,J,Z,tt,et,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"loader","disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1){let i=g();j(0),s(1,"form",13,0),D("submit",function(){return d(i),T(n.next())}),s(3,"header")(4,"h3",14),u(5,1),s(6,"div",15),m(7,Kt,2,3,"button",16),m(8,Vt,3,0,"button",17)(9,Ht,8,1,"sh-menu"),F(),_(),F(),m(10,Xt,3,0,"sh-alert")(11,Wt,3,0,"sh-alert",18)(12,jt,3,1,"sh-alert",19)(13,qt,3,1,"sh-alert",20),j(14),m(15,Qt,3,1,"app-destination-list-item",21),F(),m(16,Yt,1,0,"app-destination-list"),m(17,Jt,1,2,"app-single-destination",22),s(18,"div",23)(19,"button",24),D("click",function(){return d(i),T(n.goBack())}),u(20,2),c(21,"sh-icon"),_(),F(),s(22,"button",25),u(23,3),m(24,Zt,2,0,"sh-icon",26)(25,te,2,0,"sh-icon"),_(),F()()(),m(26,ie,15,5,"sh-dialog",27)}if(t&2){let i=q(!!n.targetUrlModel());r(7),S(i?7:-1),r(),S(i?9:8),r(2),S(n.testSignal()=="testing"?10:n.testSignal()=="success"?11:n.testSignal()=="warning"?12:n.testSignal()=="error"?13:-1),r(4);let a=q(n.selectedDestinationTypeOption());r(),S(a?15:-1),r(),S(i?-1:16),r(),S(i?17:-1),r(5),C("disabled",n.testSignal()=="testing"||!i),r(2),S(n.testSignal()=="testing"?24:25),r(2),S(n.targetUrlDialogOpen()?26:-1)}},dependencies:[Lt,K,M,G,$t,b,k,Et,v,At,w,Ot,U,ht,Ct],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;overflow:hidden;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}"],changeDetection:0})};export{Be as createDestinationForm,xe as createDestinationFormGroup,Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as k,r as L}from"./chunk-USU2EHJV.js";import{h as U}from"./chunk-J3BBLPAD.js";import{H as C,Oc as R,V as E,_ as A,oa as z,r as S}from"./chunk-QDFCX6XE.js";import{a as s,b as D}from"./chunk-EUDKD2JW.js";var h=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(C(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var g=class e{#e=A(U);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#i=new h(()=>this.getS3Config("StorageClasses"));#s=R(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#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=E({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.`},w={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]}},a(e,t))}}},V=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"/assets/dest-icons/file-system.png",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:"/"+n;return s({destinationType:e,custom:{path:u.split("?")[0]}},a(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"/assets/dest-icons/ssh.png",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??"",[k.required,k.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"/assets/dest-icons/aws.png",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:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},a(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",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}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsStorageClasses()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},a(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"/assets/dest-icons/google-drive.png",oauthField:"authid",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)}},a(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"/assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>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}},a(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"/assets/dest-icons/azure.png",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)}},a(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"/assets/dest-icons/one-drive.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)}},a(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"/assets/dest-icons/one-drive.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`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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"/assets/dest-icons/sharepoint.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:"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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"/assets/dest-icons/sharepoint.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:"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)}},a(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"/assets/dest-icons/dropbox.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)}},a(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)}},a(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)}},a(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"/assets/dest-icons/backblaze.png",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`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{server:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},a(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{server:r,path:n}=m(t);return s({destinationType:e,custom:{bucket:r,path:n}},a(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"/assets/dest-icons/mega-nz.png",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)}},a(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",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>i.control(e??"",[k.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>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)}},a(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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"/assets/dest-icons/rclone.png",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return v(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=a(e,t),{server:l,path:u}=m(t);return s({destinationType:e,dynamic:s({"rclone-remote-repository":l,"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",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{server:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},a(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"/assets/dest-icons/webdav.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:"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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"/assets/dest-icons/ftp.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",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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"/assets/dest-icons/ftp.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",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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(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 v(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},a(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=a(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",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:l}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:l}},a(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"/assets/dest-icons/smb.png",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,M(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),l=n.split("/")[0],u=n.split("/").slice(1).join("/");return s({destinationType:e,custom:{server:r,share:l,path:u}},a(e,t))}}},{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)}},a(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"/assets/dest-icons/file-jump.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>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 console.log(t),c(e,null,null,t)},from:(e,t,o)=>(console.log(t),s({destinationType:e,custom:{path:d(t)}},a(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${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=a(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${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=a(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=a(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)}}}],le={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};function c(e,t,o,r){return v(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function v(e,t,o,r,n){let l=b(n),u=encodeURIComponent(B(t)),y=u==""?"":u+j(o),f=r??"",$=f.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,O=M(y,I(f));return`${$}${O}${l}`}function N(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function M(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function I(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new URL(e)}catch{return""}return decodeURIComponent(e.hostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function B(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function j(e){return e==null||e===""?"":":"+e.toString()}function P(e){return V.find(o=>o.key===e||o.customKey===e)??V.find(o=>`${o.key}s`===e)??null??s({key:e,displayName:e},w)}function m(e){return{server:decodeURIComponent(e.hostname),port:e.port,path:N(decodeURIComponent(e.pathname))}}function a(e,t){let o={},r={},n=P(e);return t.searchParams.forEach((l,u)=>{n?.dynamicFields?.some(f=>f===u||f?.name===u)?r[u]=decodeURIComponent(l):o[u]=decodeURIComponent(l)}),{advanced:o,dynamic:r}}function b(e,t=!1){let o=e.map(([n,l])=>`${n}=${l?encodeURIComponent(l.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function me(e){let t=e.destinationType??"";return P(t)?.mapper.to(e)??""}function de(e){let t=URL.canParse(e),o=e.split("://")[0],r=e.split("://")[1],n=o==="file"?"http://dummy":"http://"+r;if(!r)return null;if(r.startsWith("%")&&o==="file")return P(o).mapper.from(o,new URL("http://localhost"),e);let l=P(o),u="";`${l.key}s`===o&&(u+=n.indexOf("?")===-1?"?":"&",u+="use-ssl=true",e=l.key+e.substring(o.length));try{let y=new URL(n+u);if(y.host==="undefined")return null;let f=r.split("?")[0].split("/")[0],G=!isNaN(Number(y.host.replaceAll(".",""))),$=f.split("."),O=$.length===4&&$.every(F=>F.length&&F.length<=3&&!isNaN(Number(F))&&parseInt(F)<=255);return G&&!O?null:l.mapper.from(l.key,y,e)}catch(y){return console.error("Error while parsing target path",y),null}}export{P as a,me as b,de as c,le as d};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as it}from"./chunk-6GC5VKTI.js";import{a as tt,b as nt}from"./chunk-CZLLEVMJ.js";import{a as X,b as Ze,c as Je}from"./chunk-CDRDYQEV.js";import{h as et}from"./chunk-GDBU3Z7P.js";import{a as Ye}from"./chunk-QY6E755W.js";import{a as k}from"./chunk-GUH5TMOS.js";import{a as K}from"./chunk-66BSPEOQ.js";import{a as qe,c as ue,e as Ce,i as ge,k as We,s as fe,t as Qe}from"./chunk-USU2EHJV.js";import{A as Ue,C as He,a as pe,e as ke,g as me,l as Re,o as Be,p as ze,t as Ke,z as Xe}from"./chunk-WRNQOX5R.js";import{h as je}from"./chunk-J3BBLPAD.js";import{ea as Ge}from"./chunk-WJPLJKPQ.js";import{Ab as _,Ac as de,Bb as d,Cb as z,Cc as ce,Gb as re,Hb as W,Hc as J,Ib as le,Jb as N,Oc as P,Pc as Y,Qb as Q,Ra as l,Rb as Z,Sb as De,Uc as ee,V as oe,Wb as x,Xc as be,Yb as s,Zb as we,_ as M,_b as Ae,ac as Fe,bb as ae,bc as Oe,cc as Me,ea as T,f as ie,fa as S,gb as G,gc as B,ia as ye,ic as se,lc as p,nc as F,oa as b,oc as _e,qc as Ve,rc as ve,sc as Le,tc as L,ub as g,uc as A,vb as f,vc as c,wb as H,xb as j,yb as q,yc as Pe,zb as m,zc as $e}from"./chunk-QDFCX6XE.js";import{a as O,b as ne}from"./chunk-EUDKD2JW.js";var ot=class n{#t=M(je);#e=M(ke);#n=M(K);testDestination(t,e,o,i){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,o,i):this.testDestinationv1(t,e,o,i)}testDestinationv2(t,e,o,i){return new ie(a=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,AutoCreate:!1,Options:null}}).subscribe({next:r=>{if(r.Success){this.emitSuccessV2(a,t,e,r);return}this.handleGenericError(a,t,e,r.Error??"Unknown error",i)},error:r=>{let u=r?.error?.body;if(u?.Data?.FolderExists===!1||u?.StatusCode==="missing-folder"){o?this.handleMissingFolder(a,t,e):this.handleGenericError(a,t,e,$localize`The remote destination folder does not exist.`,i);return}if(u?.Data?.HostCertificate){this.handleMissingCertificate(a,t,e,u.Data?.HostCertificate);return}if(u?.Data?.ReportedHostKey){this.handleIncorrectKey(a,t,e,u.Data.ReportedHostKey,u.Data.AcceptedHostKey??null);return}this.handleGenericError(a,t,e,r?.message??"Unknown error",i)}})})}testDestinationv1(t,e,o,i){return new ie(a=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:r=>{a.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:e}),a.complete()},error:r=>{this.handleDestinationErrorv1(r.message,t,e,o,i).subscribe(u=>{a.next(u)})}})})}handleMissingFolder(t,e,o){this.#e.open(k,{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.#t.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.#t.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.#e.open(k,{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.#e.open(k,{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.#e.open(k,{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.#e.open(k,{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:r=>{if(!r){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.#e.open(k,{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:r=>{if(!r){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 r(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:i}),t.complete()}if(a){r();return}this.#e.open(k,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:i,cancelText:$localize`OK`},closed:u=>r()})}handleDestinationErrorv1(t,e,o,i,a){return new ie(r=>{if(t==="missing-folder"){i?this.handleMissingFolder(r,e,o):this.handleGenericError(r,e,o,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let u=t.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,o,u);return}if(t.startsWith("incorrect-host-key:")){let u=t.split('incorrect-host-key:"')[1].split('",')[0],E=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,o,u,E);return}this.handleGenericError(r,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Te=class n{#t=M(K);supportedDestinationTypes=P(()=>this.#t.backendModules().map(t=>{if(!t?.Key)return null;let e=X(t.Key);return e.isDefaultEntry===!0?ne(O({},e),{displayName:t.DisplayName||e.displayName||t.Key,description:t.Description||e.description||""}):e}).filter(t=>t!==null));destinationTypeOptions=P(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon})));backendModules=P(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})};var st=["fileInput"],_t=[[["label"]]],dt=["label"],Se=class n{customId=ee();content=b("");readonly=b(!1);placeholder=ee("Drop a file here or use the browse button");fileInputRef;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=Y(()=>{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=ae({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,o){if(e&1&&Fe(st,5),e&2){let i;Oe(i=Me())&&(o.fileInputRef=i.first)}},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Pe([{provide:qe,useExisting:n,multi:!0}])],ngContentSelectors:dt,decls:9,vars:3,consts:()=>{let t;return t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fileInput",""],t,[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=N();we(_t),Ae(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",2)(2,"button",3),x("click",function(){return T(i),S(o.triggerBrowse())}),Q(3,1),z(4,"sh-icon"),Z(),d()(),_(5,"div",4),x("drop",function(r){return T(i),S(o.onFileDrop(r))})("dragover",function(r){return T(i),S(o.onDragOver(r))}),_(6,"textarea",5),Le("ngModelChange",function(r){return T(i),ve(o.content,r)||(o.content=r),S(r)}),d()(),_(7,"input",6,0),x("change",function(r){return T(i),S(o.onFileSelected(r))}),d()}e&2&&(l(6),m("placeholder",o.placeholder()),Ve("ngModel",o.content),m("disabled",o.readonly()))},dependencies:[fe,ue,Ce,ge,pe,me],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 ct=(n,t,e,o)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:o}),Ie=n=>({$implicit:n}),pt=(n,t,e,o)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:o}),mt=()=>({updateOn:"blur"}),ut=(n,t,e,o)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:o});function Ct(n,t){n&1&&le(0)}function gt(n,t){if(n&1&&G(0,Ct,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,ct,o,e,a,r.oauthField)))}}function ft(n,t){n&1&&le(0)}function Tt(n,t){if(n&1&&G(0,ft,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s();let i=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,pt,o,e,a,r.oauthField)))}}function St(n,t){if(n&1){let e=N();_(0,"button",14),x("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!1))}),Q(1,6),z(2,"sh-icon"),Z(),d()}}function ht(n,t){if(n&1){let e=N();_(0,"button",21,1),x("click",function(){let i=T(e).$implicit,a=s(3);return S(a.addAdvancedOption(i))}),p(2),d()}if(n&2){let e=t.$implicit;l(2),F(" ",e.name," ")}}function xt(n,t){if(n&1){let e=N();_(0,"div",11)(1,"sh-menu",15)(2,"button",16),Q(3,7),z(4,"sh-icon"),Z(),d(),re(5,17),j(6,ht,3,1,"button",18,H),W(),d(),_(8,"sh-menu")(9,"button",19)(10,"sh-icon"),p(11,"dots-three-vertical"),d()(),re(12,17),_(13,"button",20),x("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!0))}),_(14,"sh-icon"),p(15,"link"),d(),p(16," Edit contents as text "),d(),W(),d()()}if(n&2){s();let e=c(9);l(),m("searchable",!0),l(),m("disabled",e.length===0),l(4),q(e)}}function Nt(n,t){if(n&1){let e=N();_(0,"textarea",22),x("ngModelChange",function(i){T(e);let a=s(2);return S(a.updateSettingsFromText(i))}),d()}if(n&2){let e=s(2);m("ngModel",e.settingsAsText())("ngModelOptions",$e(2,mt))}}function Et(n,t){n&1&&le(0)}function It(n,t){if(n&1&&G(0,Et,1,0,"ng-container",13),n&2){let e=t.$implicit,o=t.$index;s(2);let i=B(15),a=s(),r=c(0),u=c(1),E=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,ut,o,E,r,u.oauthField)))}}function yt(n,t){if(n&1&&j(0,It,1,9,"ng-container",null,H),n&2){let e=s(2);q(e.advancedFormFieldNames())}}function Dt(n,t){n&1&&(_(0,"sup",31),p(1,"*"),d())}function wt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function At(n,t){if(n&1){let e=N();_(0,"app-file-tree",24)(1,"label",30),g(2,Dt,2,0,"sup",31),p(3),g(4,wt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Ft(n,t){n&1&&(_(0,"sup",34),p(1,"*"),d())}function Ot(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Mt(n,t){if(n&1){let e=N();_(0,"app-file-tree",25)(1,"label",30),g(2,Ft,2,0,"sup",34),p(3),g(4,Ot,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5);m("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Vt(n,t){n&1&&(_(0,"sup",35),p(1,"*"),d())}function vt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Lt(n,t){n&1&&(_(0,"sh-icon",36),p(1," warning "),d())}function Pt(n,t){n&1&&(_(0,"sh-icon",37),p(1,"x-circle"),d())}function $t(n,t){n&1&&(_(0,"sh-icon",38),p(1,"warning"),d())}function bt(n,t){if(n&1&&(_(0,"sh-icon",42),p(1," link "),d()),n&2){s();let e=c(9),o=c(10);se("error",e&&o==="error")("warn",e&&o==="warning"),m("shTooltip",e)}}function Gt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"envelope"),d())}function kt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"hard-drives"),d())}function Rt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"jar"),d())}function Bt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"textbox"),d())}function zt(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,Vt,2,0,"sup",35),p(3),g(4,vt,2,1,"sh-icon",32),g(5,Lt,2,0,"sh-icon",36),g(6,Pt,2,0,"sh-icon",37),g(7,$t,2,0,"sh-icon",38),d(),_(8,"input",39),x("keydown",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,i))})("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),L(9)(10),g(11,bt,2,5,"sh-icon",40)(12,Gt,2,0,"sh-icon",41)(13,kt,2,0,"sh-icon",41)(14,Rt,2,0,"sh-icon",41)(15,Bt,2,0,"sh-icon",41),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(3),r=c(4),u=c(5),E=s(2);l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),f(r&&e.formView.type==="Path"?5:-1),l(),f(e.formView.type=="Hostname"&&!r&&!E.isValidHostname(a)?6:-1),l(),f(e.formView.type=="Bucketname"&&!r&&!E.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",i);let V=a,w=E.hasLeadingSlash(V??"");l(),A(w&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),A(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function Kt(n,t){n&1&&(_(0,"sup",43),p(1,"*"),d())}function Xt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1){let e=N();_(0,"span",47),x("click",function(){T(e);let i=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(i.destinationType,i.fieldGroup,i.formView.name,i.formView.oauthVersion))}),p(1," AuthID "),d()}}function Ht(n,t){n&1&&(_(0,"sh-icon",41),p(1,"password"),d())}function jt(n,t){if(n&1){let e=N();_(0,"sh-icon",48),x("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye "),d()}}function qt(n,t){if(n&1){let e=N();_(0,"sh-icon",48),x("click",function(){T(e);let i=s(2).$implicit;return S(i.formView.showPassword=!i.formView.showPassword)}),p(1," eye-slash "),d()}}function Wt(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,Kt,2,0,"sup",43),p(3),g(4,Xt,2,1,"sh-icon",32),d(),_(5,"input",44),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),g(6,Ut,2,0,"span",45)(7,Ht,2,0,"sh-icon",41),g(8,jt,2,0,"sh-icon",46)(9,qt,2,0,"sh-icon",46),d()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",i),l(),f(e.oauthField===e.formView.name?6:7),l(2),f(e.formView.showPassword?8:9)}}function Qt(n,t){n&1&&(_(0,"sup",50),p(1,"*"),d())}function Zt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Jt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Yt(n,t){if(n&1){let e=N();_(0,"sh-select",49)(1,"label",30),g(2,Qt,2,0,"sup",50),p(3),g(4,Zt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,Jt,1,2,"ng-template",null,2,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("isClearable",!1)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function en(n,t){if(n&1&&(L(0),g(1,Yt,8,9)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function tn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),d())}function nn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function on(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function an(n,t){if(n&1){let e=N();_(0,"sh-select",52)(1,"label",30),g(2,tn,2,0,"sup",53),p(3),g(4,nn,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,on,1,2,"ng-template",null,3,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function rn(n,t){n&1&&z(0,"sh-progress-bar",51)}function ln(n,t){if(n&1&&(L(0),g(1,an,8,10)(2,rn,1,0,"sh-progress-bar",51)),n&2){let e=s().$implicit,o=c(2),i=A(s(2).mapOptionsWithFreeText(e.formView,o));l(),f(i?1:2)}}function sn(n,t){n&1&&(_(0,"sup",55),p(1,"*"),d())}function _n(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function dn(n,t){if(n&1){let e=N();_(0,"app-size",54),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),g(2,sn,2,0,"sup",55),p(3),g(4,_n,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.Name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function cn(n,t){n&1&&(_(0,"sup",56),p(1,"*"),d())}function pn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function mn(n,t){if(n&1){let e=N();_(0,"sh-form-field")(1,"label",30),g(2,cn,2,0,"sup",56),p(3),g(4,pn,2,1,"sh-icon",32),d(),_(5,"input",57),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),_(6,"sh-icon",41),p(7,"numpad"),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",i)}}function un(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=N();_(0,"sh-toggle",58),x("click",function(){T(e);let i=s().$implicit,a=c(2),r=s(2);return S(r.updateFieldValue(i.fieldGroup,i.formView.name,r.isTrue(a)?"false":"true"))}),_(1,"label",30),p(2),g(3,un,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(5),r=s(2);se("active",r.isTrue(i)),l(),m("for",a),l(),F(" ",o," "),l(),f(e.formView.longDescription?3:-1)}}function gn(n,t){n&1&&(_(0,"sup",60),p(1,"*"),d())}function fn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Tn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;_e(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Sn(n,t){if(n&1){let e=N();_(0,"sh-select",59)(1,"label",30),g(2,gn,2,0,"sup",60),p(3),g(4,fn,2,1,"sh-icon",32),d(),_(5,"input",61),x("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),G(6,Tn,1,2,"ng-template",null,4,J)}if(n&2){let e=B(7);s();let o=c(0),i=s().$implicit,a=c(1),r=c(2),u=c(4),E=c(5);m("options",o)("selectMultiple",!0)("optionTemplate",e),l(),m("for",E),l(),f(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),f(i.formView.longDescription?4:-1),l(),m("ngModel",r)}}function hn(n,t){if(n&1&&(L(0),g(1,Sn,8,8)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),f(o?1:-1)}}function xn(n,t){n&1&&(_(0,"sup",62),p(1,"*"),d())}function Nn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function En(n,t){if(n&1){let e=N();_(0,"app-timespan",54),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label",30),g(2,xn,2,0,"sup",62),p(3),g(4,Nn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(1),i=c(2),a=c(4),r=c(5);m("inputType",e.formView.name)("ngModel",i)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),f(e.formView.longDescription?4:-1)}}function In(n,t){n&1&&(_(0,"sup",64),p(1,"*"),d())}function yn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Dn(n,t){if(n&1){let e=N();_(0,"app-file-drop-textarea",63),x("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label"),g(2,In,2,0,"sup",64),p(3),g(4,yn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,o=c(2),i=c(4),a=c(5);m("ngModel",o)("customId",a)("placeholder",e.formView.longDescription),l(2),f(e.formView.isMandatory&&i?2:-1),l(),F(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?4:-1)}}function wn(n,t){if(n&1){let e=N();_(0,"button",65),x("click",function(){T(e);let i=s().$implicit,a=s(2);return S(a.removeAdvancedOption(i.formView.name))}),_(1,"sh-icon"),p(2,"x-circle"),d()()}}function An(n,t){if(n&1&&(_(0,"div",23),L(1)(2)(3)(4)(5),g(6,At,6,12,"app-file-tree",24)(7,Mt,6,9,"app-file-tree",25)(8,zt,16,13,"sh-form-field")(9,Wt,10,9,"sh-form-field")(10,en,2,2)(11,ln,3,2)(12,dn,5,7,"app-size",26)(13,mn,8,6,"sh-form-field")(14,Cn,4,5,"sh-toggle",27)(15,hn,2,2)(16,En,5,7,"app-timespan",26)(17,Dn,5,6,"app-file-drop-textarea",28),g(18,wn,3,0,"button",29),d()),n&2){let e=t.$implicit;s();let o=c(0),i=s();se("single-field",e.fieldGroup!=="advanced"),l(),A(e.formView.shortDescription??e.formView.name),l(),A(i.getFieldGroup(o,e.fieldGroup)[e.formView.name]),l();let a=A(i.getFieldValue(e.fieldGroup,e.formView.name));l(),A((a??"").toString().trim()===""),l(),A("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(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"?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:-1),l(12),f(e.fieldGroup==="advanced"?18:-1)}}function Fn(n,t){if(n&1&&(L(0),j(1,gt,1,9,"ng-container",null,H),j(3,Tt,1,9,"ng-container",null,H),_(5,"sh-toggle-card",8),re(6,9)(7),De(8,5),W(),L(9),g(10,St,3,0,"button",10)(11,xt,17,2,"div",11),W(),g(12,Nt,1,3,"textarea",12)(13,yt,2,0),d(),G(14,An,19,9,"ng-template",null,0,J)),n&2){let e=s(),o=c(1);A(e.destinationForm()),l(),q(o.custom),l(2),q(o.dynamic),l(2),m("disallowToggle",!0),l(4),A(e.nonSelectedAdvancedFormViews()),l(),f(e.showTextArea()?10:11),l(2),f(e.showTextArea()?12:13)}}var at=class n{#t=M(et);#e=M(K);#n=M(it);#a=M(Te);injector=M(ye);targetUrl=be.required();useBackupState=ee(!1);#i=null;destinationType=P(()=>{let t=this.targetUrl();if(!t)return null;let e=X(t.split("://")[0]);return this.#i=e?.customKey??e?.key,this.#i});destinationForm=b({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=b(null);showTextArea=b(!1);nonSelectedAdvancedFormViews=P(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(o=>e.findIndex(i=>i===o.name)===-1)});destinationTypeEffect=Y(()=>{let t=this.destinationType()??"",e=X(t),o=e?.key,i=this.#a.backendModules().find(I=>I.Key===o)??{Key:t,DisplayName:t,Description:X(t).description,Options:[]};if(!i||!i.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],E=e&&e.advancedFields?e.advancedFields:[],V=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],w={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([I,C],y)=>{let D=C.order??y;w.custom.push(O({order:900+D},C))});for(let I=0;I<i.Options.length;I++){let C=i.Options[I];if(C.Deprecated)continue;let y=u.find(D=>D===C.Name||C.Aliases?.includes(D.name)||D.name===C.Name);if(y){let D=C.Aliases?.indexOf(y.name)??-1,$=C.Aliases&&D>-1?C.Aliases[D]:C.Name,h=y&&typeof y!="string",he=h?y?.defaultValue??C.DefaultValue:C.DefaultValue,xe=h&&y?.order!==void 0?y.order:I,U={name:$,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+xe},Ne=h?O(O({},U),y):U;w.dynamic.push(Ne)}else{let D=C.Name;if(V.find(te=>te===D))continue;let h=E.find(te=>te===D||te.name===D),he=h&&typeof h!="string",xe=he&&h?.order!==void 0?h.order:I,U={name:D,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:C.DefaultValue,order:900+xe},Ne=he?O(O({},U),h):U;w.advanced.push(Ne)}}w.custom.sort((I,C)=>I.order-C.order),w.dynamic.sort((I,C)=>I.order-C.order),w.advanced.sort((I,C)=>I.order-C.order),this.destinationFormConfig.set(w);let R=this.targetUrl();if(!R)return;let v=Je(R);v&&this.destinationForm.set({custom:v.custom,dynamic:v.dynamic,advanced:v.advanced})});destinationFormEffect=Y(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let o=Ze({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});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(O({},e))}isValidBucketname(t){if(!t)return!1;let e=t.length;return!(e<3||e>63||!/^[a-z0-9.-]+$/.test(t)||!/^[a-z0-9]/.test(t)||!/[a-z0-9]$/.test(t)||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)||/(\.\.)|(\.-)|(-\.)/.test(t))}isValidHostname(t){if(!t||t.length>253)return!1;let e=t.split(".");for(let o of e)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}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(O({},i))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(O({},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}#o=b(!1);oauthStartTokenCreation(t,e,o,i){this.#o.set(!0);let a=(i??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let C=this.#t.mapFormsToSettings().find(y=>y.Name==="--oauth-url")?.Value;C&&C.length>0&&(a=C)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let E=`${a}?type=${t}`,V=450,w=600,R=screen.width/2-V/2,v=screen.height/2-w/2,I=window.open(E,"_blank","height="+w+",width="+V+",menubar=0,status=0,titlebar=0,toolbar=0,left="+R+",top="+v);return window.addEventListener("message",C=>{let y=C.data.startsWith("authid:"),D=y?C.data.replace("authid:",""):null;y&&(this.destinationForm.update($=>($[e][o]=D,$)),this.#o.set(!1),I?.close())}),!1}settingsAsText=P(()=>{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=t.split(`
|
|
8
|
+
`).map(i=>i.trim()).filter(i=>i.length>0),o={};for(let i of e){let[a,r]=i.split("=").map(u=>u.trim());a&&a.trim().length>0&&r!==void 0&&(o[a]=r)}this.destinationForm.update(i=>ne(O({},i),{advanced:o}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ae({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 r;r=$localize`This field is mandatory`;let u;u=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let E;E=$localize`Hostname is invalid`;let V;V=$localize`Bucket name is invalid`;let w;w=$localize`This field is mandatory`;let R;R=$localize`This field is mandatory`;let v;v=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let C;C=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let $;return $=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,e,o,[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",r],["shTooltip",u,1,"warn"],["shTooltip",E,1,"error"],["shTooltip",V,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",w],["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",R],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",v],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",I],["shTooltip",C],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",y],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",D],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",$],["shButton","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(L(0)(1),g(2,Fn,16,5)),e&2){let i=A(o.destinationType());l();let a=A(o.destinationFormConfig());l(),f(i&&a?2:-1)}},dependencies:[Qe,ue,We,Ce,fe,ge,Ge,Ye,tt,nt,Se,Re,me,pe,Xe,Be,Ke,He,Ue,ze],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-500)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}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}"],changeDetection:0})};export{ot as a,Te as b,at as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y,d as nn}from"./chunk-XLE2TW65.js";import{a as tn}from"./chunk-WWFNG47J.js";import{a as en}from"./chunk-XNVRJH42.js";import{a as Ze}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import{a as Ye}from"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{e as Xe}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as Q,f as we,g as ze,h as Ve,j as Ue,k as Ke,o as je,p as We,w as qe,x as Je}from"./chunk-WRNQOX5R.js";import{h as Qe}from"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as o,Ac as P,Bb as t,Cb as p,Dc as N,Ec as x,Fc as A,Gb as m,H as j,Hb as M,Hc as J,Ib as $,Jb as k,Pc as ve,Qb as s,Ra as _,Rb as u,Sb as g,Tb as h,Ub as H,Vb as W,Wb as I,Yb as F,_ as v,bb as Re,ea as D,fa as f,gb as O,gc as U,hb as ke,ic as R,lc as r,mc as Be,nc as E,oa as X,qc as Le,rb as xe,rc as Ge,sb as ye,sc as be,ub as C,vb as S,wb as w,xb as z,yb as V,zb as T,zc as q}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var _n=()=>[import("./chunk-ACH476VA.js").then(n=>n.NgTemplateOutlet),Q,Ue,Je,qe,import("./chunk-2RB5RKNM.js").then(n=>n.DurationFormatPipe),import("./chunk-QFU6VJXV.js").then(n=>n.BytesPipe),import("./chunk-7WD3AN66.js").then(n=>n.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],an=n=>({$implicit:n}),cn=n=>["/backup",n],sn=n=>["/restore",n],un=n=>["/backup",n,"export"],Fn=n=>["/backup",n,"delete"],dn=n=>["/backup",n,"database"],pn=n=>["/backup",n,"commandline"],gn=n=>["/backup",n,"log"];function Tn(n,i){if(n&1){let e=k();o(0,"button",51),I("click",function(){let c=D(e).$implicit,d=F(2);return f(d.sortByColumn.set(c.value))}),g(1,15),t()}if(n&2){let e=i.$implicit,a=F(2);R("active",a.orderBy()===e.value),_(),h(e.label),H(1)}}function Cn(n,i){if(n&1&&(o(0,"sh-menu",52)(1,"button",53),s(2,14),p(3,"strong")(4,"sh-icon"),u(),t(),m(5,54),z(6,Tn,2,3,"button",55,w),M(),t()),n&2){let e=F();_(4),h(e.orderBy()),H(2),_(2),V(e.sortOrderOptions())}}function Sn(n,i){if(n&1&&(o(0,"p")(1,"span"),g(2,21),t(),r(3),N(4,"relativeTime"),t()),n&2){let e=F().$implicit,a=F(4);_(3),E(" ",A(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function En(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(4);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function mn(n,i){n&1&&(m(0),r(1,"-"),M())}function Mn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function On(n,i){n&1&&(m(0),r(1,"-"),M())}function Nn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Dn(n,i){n&1&&(m(0),r(1,"-"),M())}function fn(n,i){n&1&&$(0)}function $n(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"sh-chip")(5,"sh-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),g(10,16),t(),r(11),N(12,"relativeTime"),t(),C(13,Sn,5,4,"p"),o(14,"p")(15,"span"),g(16,17),t(),C(17,En,2,4)(18,mn,2,0,"ng-container"),t(),o(19,"p")(20,"span"),g(21,18),t(),C(22,Mn,2,3)(23,On,2,0,"ng-container"),t(),o(24,"p")(25,"span"),g(26,19),t(),C(27,Nn,2,3)(28,Dn,2,0,"ng-container"),t()(),o(29,"sh-chip",59),g(30,20),t(),o(31,"div",49),O(32,fn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(4),c=U(51);_(3),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(3),Be(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),_(),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(4),E(" ",A(12,12,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,a.timeType()==="actual")," "),_(2),S(e.Schedule!=null&&e.Schedule.Time?13:-1),_(4),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?17:18),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?22:23),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?27:28);let d=a.getBackupVersionCount(e);_(3),h(d)(d),H(30),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,an,e))}}function Pn(n,i){if(n&1&&z(0,$n,33,17,"div",58,w),n&2){let e=F(3);V(e.backups())}}function In(n,i){n&1&&(m(0),g(1,22),M())}function An(n,i){if(n&1&&(o(0,"div",56),C(1,Pn,2,0)(2,In,2,0,"ng-container"),t()),n&2){let e=F(2);_(),S(e.backups().length?1:2)}}function hn(n,i){n&1&&(s(0,23,1),$(1),u())}function Hn(n,i){n&1&&(s(0,24,1),$(1),u())}function Rn(n,i){n&1&&(s(0,25,1),$(1),u())}function kn(n,i){n&1&&(s(0,26,1),$(1),u())}function xn(n,i){n&1&&(s(0,27,1),$(1),u())}function yn(n,i){n&1&&(s(0,28,1),$(1),u())}function Bn(n,i){n&1&&(s(0,29,1),$(1),u())}function Ln(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Gn(n,i){n&1&&(m(0),r(1,"-"),M())}function bn(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Xn(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function wn(n,i){n&1&&(m(0),r(1,"-"),M())}function zn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Un(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Kn(n,i){n&1&&(m(0),r(1,"-"),M())}function jn(n,i){n&1&&$(0)}function Wn(n,i){if(n&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td"),r(4),t(),o(5,"td"),C(6,Ln,2,4)(7,Gn,2,0,"ng-container"),t(),o(8,"td"),C(9,bn,2,4)(10,vn,2,0,"ng-container"),t(),o(11,"td"),C(12,Xn,2,4)(13,wn,2,0,"ng-container"),t(),o(14,"td"),C(15,zn,2,3)(16,Vn,2,0,"ng-container"),t(),o(17,"td"),C(18,Un,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),g(22,32),t()(),o(23,"td"),O(24,jn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(3),c=U(51);_(2),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(2),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(2),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),_(3),S(e.Schedule!=null&&e.Schedule.Time?9:10),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?12:13),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?15:16),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?18:19);let d=a.getBackupVersionCount(e);_(4),h(d)(d),H(22),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,an,e))}}function qn(n,i){if(n&1){let e=k();o(0,"sh-table",61),be("sortByColumnChange",function(c){D(e);let d=F(2);return Ge(d.sortByColumn,c)||(d.sortByColumn=c),f(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,hn,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,Hn,2,0,"ng-container",64),u(),t(),o(8,"th",66),s(9,25),O(10,Rn,2,0,"ng-container",64),u(),t(),o(11,"th",67),s(12,26),O(13,kn,2,0,"ng-container",64),u(),t(),o(14,"th",68),s(15,27),O(16,xn,2,0,"ng-container",64),u(),t(),o(17,"th",69),s(18,28),O(19,yn,2,0,"ng-container",64),u(),t(),o(20,"th",70),s(21,29),O(22,Bn,2,0,"ng-container",64),u(),t(),o(23,"th"),g(24,30),t(),o(25,"th"),g(26,31),t()(),z(27,Wn,25,13,"tr",null,w),t()}if(n&2){let e=F(2),a=U(53);T("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(5),V(e.backups())}}function Jn(n,i){if(n&1&&C(0,An,3,1,"div",56)(1,qn,29,10,"sh-table",57),n&2){let e=F();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Qn(n,i){n&1&&(o(0,"div",71),p(1,"sh-progress-bar",72),o(2,"div",45)(3,"h3"),g(4,33),t()()())}function Yn(n,i){n&1&&g(0,34,1)}function Zn(n,i){n&1&&(o(0,"sh-icon"),r(1,"check"),t())}function et(n,i){n&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function nt(n,i){if(n&1){let e=k();o(0,"button",73),I("click",function(){let c=D(e).$implicit,d=F();return f(d.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),p(2,"sh-icon"),C(3,Yn,1,0),u(),t(),o(4,"button",74)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",46),C(9,Zn,2,0,"sh-icon")(10,et,2,0,"sh-icon"),t(),m(11,54),o(12,"h3",75),r(13,"Operations"),t(),o(14,"button",76),s(15,35),p(16,"sh-icon"),u(),t(),o(17,"button",76),s(18,36),p(19,"sh-icon"),u(),t(),o(20,"button",76),s(21,37),p(22,"sh-icon"),u(),t(),p(23,"sh-divider"),o(24,"h3",75),r(25,"Advanced"),t(),o(26,"button",76),s(27,38),p(28,"sh-icon"),u(),t(),o(29,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),p(34,"sh-icon"),u(),t(),o(35,"button",76),s(36,41),p(37,"sh-icon"),u(),t(),p(38,"sh-divider"),o(39,"h3",75),r(40,"Reporting"),t(),o(41,"button",76),s(42,42),p(43,"sh-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=F();R("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),T("routerLink",P(15,cn,e.Backup==null?null:e.Backup.ID)),_(4),R("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),_(),S(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),_(5),T("routerLink",P(17,sn,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(19,un,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(21,Fn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(23,dn,e.Backup==null?null:e.Backup.ID)),_(9),T("routerLink",P(25,pn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(27,gn,e.Backup==null?null:e.Backup.ID))}}function tt(n,i){n&1&&(o(0,"sh-icon",77),r(1,"funnel-simple"),t(),o(2,"sh-icon",78),r(3,"sort-ascending"),t(),o(4,"sh-icon",79),r(5,"sort-descending"),t())}var on={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=v(Qe);#t=v(en);#e=v(Ze);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Ye("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);return on[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=on[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let d="http://null?"+i.split("?")[1],y=new URL(d).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,L]of Object.entries(nn))if(y.endsWith(B))return L}return a.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Re({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let d;d=$localize`Restores allow you to restore your data from the cloud.`;let K;K=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let L;L=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let _e;_e=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let G;G=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,G=W(G,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${G}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let Fe;Fe=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize`Version`;let me;me=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Me;Me=$localize` ${b}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let Ne;Ne=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let De;De=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let $e;$e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ie;Ie=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ae;Ae=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let he;he=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let He;return He=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,d,K,y,B,L,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,Fe,de,pe,ge,Te,Ce,Se,Ee,me,Me,Oe,Ne,De,fe,$e,Pe,Ie,Ae,he,He,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let c=k();p(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",43),p(4,"img",44),o(5,"div",45)(6,"h3"),g(7,2),t(),o(8,"p"),g(9,3),t()(),o(10,"button",46),s(11,4),p(12,"sh-icon"),u(),t()(),o(13,"sh-card",43),p(14,"img",47),o(15,"div",45)(16,"h3"),g(17,5),t(),o(18,"p"),g(19,6),t()(),o(20,"button",46),s(21,7),p(22,"sh-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),g(26,8),M(),o(27,"div",49)(28,"sh-button-group",50)(29,"button",51),I("click",function(){return D(c),f(a.viewMode.set("list"))}),s(30,9),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){return D(c),f(a.viewMode.set("details"))}),s(33,10),p(34,"sh-icon"),u(),t()(),o(35,"sh-menu",52)(36,"button",53),s(37,11),p(38,"strong")(39,"sh-icon"),u(),t(),m(40,54),o(41,"button",51),I("click",function(){return D(c),f(a.setTimeType("relative"))}),g(42,12),t(),o(43,"button",51),I("click",function(){return D(c),f(a.setTimeType("actual"))}),g(44,13),t(),M(),t(),C(45,Cn,8,1,"sh-menu",52),t()(),ke(46,Jn,2,1)(47,Qn,5,0),xe(48,46,_n,null,47),t()(),O(50,nt,44,29,"ng-template",null,0,J)(52,tt,6,0,"ng-template",null,1,J)}e&2&&(_(3),T("routerLink",q(9,ln)),_(10),T("routerLink",q(10,rn)),_(16),R("active",a.viewMode()==="list"),_(3),R("active",a.viewMode()==="details"),_(7),h(a.timeType()),H(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[Xe,tn,Ve,ze,Q,Ke,je,We,we],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{Z as default};
|
|
1
|
+
import{a as Y,d as nn}from"./chunk-CDRDYQEV.js";import{a as tn}from"./chunk-WWFNG47J.js";import{a as en}from"./chunk-XNVRJH42.js";import{a as Ze}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import{a as Ye}from"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{e as Xe}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as Q,f as we,g as ze,h as Ve,j as Ue,k as Ke,o as je,p as We,w as qe,x as Je}from"./chunk-WRNQOX5R.js";import{h as Qe}from"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as o,Ac as P,Bb as t,Cb as p,Dc as N,Ec as x,Fc as A,Gb as m,H as j,Hb as M,Hc as J,Ib as $,Jb as k,Pc as ve,Qb as s,Ra as _,Rb as u,Sb as g,Tb as h,Ub as H,Vb as W,Wb as I,Yb as F,_ as v,bb as Re,ea as D,fa as f,gb as O,gc as U,hb as ke,ic as R,lc as r,mc as Be,nc as E,oa as X,qc as Le,rb as xe,rc as Ge,sb as ye,sc as be,ub as C,vb as S,wb as w,xb as z,yb as V,zb as T,zc as q}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var _n=()=>[import("./chunk-ACH476VA.js").then(n=>n.NgTemplateOutlet),Q,Ue,Je,qe,import("./chunk-2RB5RKNM.js").then(n=>n.DurationFormatPipe),import("./chunk-QFU6VJXV.js").then(n=>n.BytesPipe),import("./chunk-7WD3AN66.js").then(n=>n.RelativeTimePipe)],ln=()=>["/add-backup"],rn=()=>["/restore"],an=n=>({$implicit:n}),cn=n=>["/backup",n],sn=n=>["/restore",n],un=n=>["/backup",n,"export"],Fn=n=>["/backup",n,"delete"],dn=n=>["/backup",n,"database"],pn=n=>["/backup",n,"commandline"],gn=n=>["/backup",n,"log"];function Tn(n,i){if(n&1){let e=k();o(0,"button",51),I("click",function(){let c=D(e).$implicit,d=F(2);return f(d.sortByColumn.set(c.value))}),g(1,15),t()}if(n&2){let e=i.$implicit,a=F(2);R("active",a.orderBy()===e.value),_(),h(e.label),H(1)}}function Cn(n,i){if(n&1&&(o(0,"sh-menu",52)(1,"button",53),s(2,14),p(3,"strong")(4,"sh-icon"),u(),t(),m(5,54),z(6,Tn,2,3,"button",55,w),M(),t()),n&2){let e=F();_(4),h(e.orderBy()),H(2),_(2),V(e.sortOrderOptions())}}function Sn(n,i){if(n&1&&(o(0,"p")(1,"span"),g(2,21),t(),r(3),N(4,"relativeTime"),t()),n&2){let e=F().$implicit,a=F(4);_(3),E(" ",A(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function En(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(4);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function mn(n,i){n&1&&(m(0),r(1,"-"),M())}function Mn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function On(n,i){n&1&&(m(0),r(1,"-"),M())}function Nn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Dn(n,i){n&1&&(m(0),r(1,"-"),M())}function fn(n,i){n&1&&$(0)}function $n(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"sh-chip")(5,"sh-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),g(10,16),t(),r(11),N(12,"relativeTime"),t(),C(13,Sn,5,4,"p"),o(14,"p")(15,"span"),g(16,17),t(),C(17,En,2,4)(18,mn,2,0,"ng-container"),t(),o(19,"p")(20,"span"),g(21,18),t(),C(22,Mn,2,3)(23,On,2,0,"ng-container"),t(),o(24,"p")(25,"span"),g(26,19),t(),C(27,Nn,2,3)(28,Dn,2,0,"ng-container"),t()(),o(29,"sh-chip",59),g(30,20),t(),o(31,"div",49),O(32,fn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(4),c=U(51);_(3),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(3),Be(a.getBackendIcon(e.Backup==null?null:e.Backup.TargetURL)),_(),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(4),E(" ",A(12,12,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupFinished,a.timeType()==="actual")," "),_(2),S(e.Schedule!=null&&e.Schedule.Time?13:-1),_(4),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?17:18),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?22:23),_(5),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?27:28);let d=a.getBackupVersionCount(e);_(3),h(d)(d),H(30),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,an,e))}}function Pn(n,i){if(n&1&&z(0,$n,33,17,"div",58,w),n&2){let e=F(3);V(e.backups())}}function In(n,i){n&1&&(m(0),g(1,22),M())}function An(n,i){if(n&1&&(o(0,"div",56),C(1,Pn,2,0)(2,In,2,0,"ng-container"),t()),n&2){let e=F(2);_(),S(e.backups().length?1:2)}}function hn(n,i){n&1&&(s(0,23,1),$(1),u())}function Hn(n,i){n&1&&(s(0,24,1),$(1),u())}function Rn(n,i){n&1&&(s(0,25,1),$(1),u())}function kn(n,i){n&1&&(s(0,26,1),$(1),u())}function xn(n,i){n&1&&(s(0,27,1),$(1),u())}function yn(n,i){n&1&&(s(0,28,1),$(1),u())}function Bn(n,i){n&1&&(s(0,29,1),$(1),u())}function Ln(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDate,a.timeType()==="actual")," ")}}function Gn(n,i){n&1&&(m(0),r(1,"-"),M())}function bn(n,i){if(n&1&&(r(0),N(1,"relativeTime")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Xn(n,i){if(n&1&&(r(0),N(1,"durationFormat")),n&2){let e=F().$implicit,a=F(3);E(" ",A(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function wn(n,i){n&1&&(m(0),r(1,"-"),M())}function zn(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Vn(n,i){n&1&&(m(0),r(1,"-"),M())}function Un(n,i){if(n&1&&(r(0),N(1,"bytes")),n&2){let e=F().$implicit;E(" ",x(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Kn(n,i){n&1&&(m(0),r(1,"-"),M())}function jn(n,i){n&1&&$(0)}function Wn(n,i){if(n&1&&(o(0,"tr")(1,"td"),r(2),t(),o(3,"td"),r(4),t(),o(5,"td"),C(6,Ln,2,4)(7,Gn,2,0,"ng-container"),t(),o(8,"td"),C(9,bn,2,4)(10,vn,2,0,"ng-container"),t(),o(11,"td"),C(12,Xn,2,4)(13,wn,2,0,"ng-container"),t(),o(14,"td"),C(15,zn,2,3)(16,Vn,2,0,"ng-container"),t(),o(17,"td"),C(18,Un,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),g(22,32),t()(),o(23,"td"),O(24,jn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=F(3),c=U(51);_(2),E(" ",(e.Backup==null?null:e.Backup.Name)??a.MISSING_BACKUP_NAME," "),_(2),E(" ",a.getBackendType(e.Backup==null?null:e.Backup.TargetURL)," "),_(2),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDate?6:7),_(3),S(e.Schedule!=null&&e.Schedule.Time?9:10),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.LastBackupDuration?12:13),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.SourceFilesSize?15:16),_(3),S(!(e.Backup==null||e.Backup.Metadata==null)&&e.Backup.Metadata.TargetFilesSize?18:19);let d=a.getBackupVersionCount(e);_(4),h(d)(d),H(22),_(2),T("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,an,e))}}function qn(n,i){if(n&1){let e=k();o(0,"sh-table",61),be("sortByColumnChange",function(c){D(e);let d=F(2);return Ge(d.sortByColumn,c)||(d.sortByColumn=c),f(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,hn,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,Hn,2,0,"ng-container",64),u(),t(),o(8,"th",66),s(9,25),O(10,Rn,2,0,"ng-container",64),u(),t(),o(11,"th",67),s(12,26),O(13,kn,2,0,"ng-container",64),u(),t(),o(14,"th",68),s(15,27),O(16,xn,2,0,"ng-container",64),u(),t(),o(17,"th",69),s(18,28),O(19,yn,2,0,"ng-container",64),u(),t(),o(20,"th",70),s(21,29),O(22,Bn,2,0,"ng-container",64),u(),t(),o(23,"th"),g(24,30),t(),o(25,"th"),g(26,31),t()(),z(27,Wn,25,13,"tr",null,w),t()}if(n&2){let e=F(2),a=U(53);T("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(3),T("ngTemplateOutlet",a),_(5),V(e.backups())}}function Jn(n,i){if(n&1&&C(0,An,3,1,"div",56)(1,qn,29,10,"sh-table",57),n&2){let e=F();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Qn(n,i){n&1&&(o(0,"div",71),p(1,"sh-progress-bar",72),o(2,"div",45)(3,"h3"),g(4,33),t()()())}function Yn(n,i){n&1&&g(0,34,1)}function Zn(n,i){n&1&&(o(0,"sh-icon"),r(1,"check"),t())}function et(n,i){n&1&&(o(0,"sh-icon"),r(1,"dots-three-vertical"),t())}function nt(n,i){if(n&1){let e=k();o(0,"button",73),I("click",function(){let c=D(e).$implicit,d=F();return f(d.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),p(2,"sh-icon"),C(3,Yn,1,0),u(),t(),o(4,"button",74)(5,"sh-icon"),r(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",46),C(9,Zn,2,0,"sh-icon")(10,et,2,0,"sh-icon"),t(),m(11,54),o(12,"h3",75),r(13,"Operations"),t(),o(14,"button",76),s(15,35),p(16,"sh-icon"),u(),t(),o(17,"button",76),s(18,36),p(19,"sh-icon"),u(),t(),o(20,"button",76),s(21,37),p(22,"sh-icon"),u(),t(),p(23,"sh-divider"),o(24,"h3",75),r(25,"Advanced"),t(),o(26,"button",76),s(27,38),p(28,"sh-icon"),u(),t(),o(29,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){let c=D(e).$implicit,d=F();return f(d.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),p(34,"sh-icon"),u(),t(),o(35,"button",76),s(36,41),p(37,"sh-icon"),u(),t(),p(38,"sh-divider"),o(39,"h3",75),r(40,"Reporting"),t(),o(41,"button",76),s(42,42),p(43,"sh-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=F();R("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),T("routerLink",P(15,cn,e.Backup==null?null:e.Backup.ID)),_(4),R("loader",a.loadingId()===(e.Backup==null?null:e.Backup.ID))("success",a.successId()===(e.Backup==null?null:e.Backup.ID)),_(),S(a.successId()===(e.Backup==null?null:e.Backup.ID)?9:10),_(5),T("routerLink",P(17,sn,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(19,un,e.Backup==null?null:e.Backup.ID)),_(3),T("routerLink",P(21,Fn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(23,dn,e.Backup==null?null:e.Backup.ID)),_(9),T("routerLink",P(25,pn,e.Backup==null?null:e.Backup.ID)),_(6),T("routerLink",P(27,gn,e.Backup==null?null:e.Backup.ID))}}function tt(n,i){n&1&&(o(0,"sh-icon",77),r(1,"funnel-simple"),t(),o(2,"sh-icon",78),r(3,"sort-ascending"),t(),o(4,"sh-icon",79),r(5,"sort-descending"),t())}var on={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=v(Qe);#t=v(en);#e=v(Ze);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=Ye("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=ve(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);return on[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=on[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let d="http://null?"+i.split("?")[1],y=new URL(d).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[B,L]of Object.entries(nn))if(y.endsWith(B))return L}return a.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(j(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Re({type:n,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let e;e=$localize`Backups are stored in the cloud and can be restored at any time.`;let a;a=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let d;d=$localize`Restores allow you to restore your data from the cloud.`;let K;K=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let L;L=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ae;ae=$localize`Last successful backup:`;let _e;_e=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let G;G=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,G=W(G,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${G}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let Fe;Fe=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ce;Ce=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize`Version`;let me;me=$localize`Actions`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Me;Me=$localize` ${b}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let Ne;Ne=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let De;De=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let $e;$e=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ie;Ie=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ae;Ae=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let he;he=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let He;return He=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,d,K,y,B,L,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,Fe,de,pe,ge,Te,Ce,Se,Ee,me,Me,Oe,Ne,De,fe,$e,Pe,Ie,Ae,he,He,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let c=k();p(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",43),p(4,"img",44),o(5,"div",45)(6,"h3"),g(7,2),t(),o(8,"p"),g(9,3),t()(),o(10,"button",46),s(11,4),p(12,"sh-icon"),u(),t()(),o(13,"sh-card",43),p(14,"img",47),o(15,"div",45)(16,"h3"),g(17,5),t(),o(18,"p"),g(19,6),t()(),o(20,"button",46),s(21,7),p(22,"sh-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),g(26,8),M(),o(27,"div",49)(28,"sh-button-group",50)(29,"button",51),I("click",function(){return D(c),f(a.viewMode.set("list"))}),s(30,9),p(31,"sh-icon"),u(),t(),o(32,"button",51),I("click",function(){return D(c),f(a.viewMode.set("details"))}),s(33,10),p(34,"sh-icon"),u(),t()(),o(35,"sh-menu",52)(36,"button",53),s(37,11),p(38,"strong")(39,"sh-icon"),u(),t(),m(40,54),o(41,"button",51),I("click",function(){return D(c),f(a.setTimeType("relative"))}),g(42,12),t(),o(43,"button",51),I("click",function(){return D(c),f(a.setTimeType("actual"))}),g(44,13),t(),M(),t(),C(45,Cn,8,1,"sh-menu",52),t()(),ke(46,Jn,2,1)(47,Qn,5,0),xe(48,46,_n,null,47),t()(),O(50,nt,44,29,"ng-template",null,0,J)(52,tt,6,0,"ng-template",null,1,J)}e&2&&(_(3),T("routerLink",q(9,ln)),_(10),T("routerLink",q(10,rn)),_(16),R("active",a.viewMode()==="list"),_(3),R("active",a.viewMode()==="details"),_(7),h(a.timeType()),H(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[Xe,tn,Ve,ze,Q,Ke,je,We,we],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{Z as default};
|