@duplicati/ngclient 0.0.138 → 0.0.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-MQTQESMQ.js → chunk-3WCZIRMO.js} +1 -1
- package/{chunk-LPFSQKIK.js → chunk-5V3CTTYH.js} +1 -1
- package/{chunk-M3CLGZMQ.js → chunk-654PTAAL.js} +1 -1
- package/chunk-6WNZ5AZZ.js +8 -0
- package/chunk-E2CREQ7G.js +1 -0
- package/{chunk-RNMBKZ6Y.js → chunk-EESK45BW.js} +1 -1
- package/chunk-H2PTENA3.js +1 -0
- package/{chunk-LDIHJZUP.js → chunk-IBG5YOFG.js} +1 -1
- package/{chunk-WHFO4IFB.js → chunk-K6PEXJFJ.js} +1 -1
- package/{chunk-CF7KRXOR.js → chunk-MB34F2MX.js} +1 -1
- package/{chunk-BQE7QZIT.js → chunk-OBFPN4Q2.js} +1 -1
- package/{chunk-UT7GWYPR.js → chunk-ONBF7XZA.js} +1 -1
- package/chunk-OZV5FSRK.js +1 -0
- package/{chunk-EN6226UP.js → chunk-P5GBD4XK.js} +1 -1
- package/{chunk-GKOS3VYR.js → chunk-Q3EG4ZLT.js} +1 -1
- package/{chunk-VPTK3JCV.js → chunk-Q6W2U6VI.js} +2 -2
- package/{chunk-SLJD5T2G.js → chunk-QU24HTBS.js} +1 -1
- package/{chunk-5SXTGTAZ.js → chunk-SDLN3QK4.js} +1 -1
- package/{chunk-OFFMLGEZ.js → chunk-SISVWTKC.js} +1 -1
- package/{chunk-7IBACL6K.js → chunk-SKWDGX7G.js} +1 -1
- package/chunk-TW56VFHP.js +1 -0
- package/index.html +1 -1
- package/{main-4FANBYAP.js → main-YSTAIUGS.js} +1 -1
- package/package.json +1 -1
- package/chunk-4DBVVUBO.js +0 -1
- package/chunk-EMXIHCYQ.js +0 -1
- package/chunk-H52UO57S.js +0 -8
- package/chunk-HRSZZWTB.js +0 -1
- package/chunk-V6EWWEIG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-Q6W2U6VI.js";import"./chunk-32366MQR.js";import"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as mt}from"./chunk-JI7GCFQB.js";import{a as Et,b as Ot,c as Ct}from"./chunk-H52UO57S.js";import"./chunk-X7SFNRJF.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as Dt}from"./chunk-V6EWWEIG.js";import{h as dt}from"./chunk-HRSZZWTB.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-J6BHRR34.js";import{a as m}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as _t,e as ct,f as ut,g as Tt,i as pt,j as gt,s as St}from"./chunk-NSIELNIY.js";import"./chunk-3ZVSHKLD.js";import{b as nt,d as it}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as p,Bb as L,Cb as b,Eb as E,Hc as G,Kb as u,Lb as T,Mb as f,Nb as k,Ob as $,Oc as et,Pb as w,Qa as r,Qb as S,Rb as l,Z as O,Zb as Q,_b as q,ab as H,bc as Y,da as _,ea as c,ec as N,fc as B,gc as J,ha as j,jc as A,kc as M,lc as P,na as C,rc as Z,sb as D,sc as tt,tb as d,ub as y,vb as h,wb as x,xb as I,yb as s,zb as F}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function Nt(i,n){if(i&1){let t=E();u(0,2,1),s(1,"button",30),S("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"),I("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=E();u(0,2,2),s(1,"button",20),S("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),p(2,"spk-icon"),F(),T()}}function kt(i,n){i&1&&(s(0,"spk-alert"),u(1,5),p(2,"spk-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"spk-alert",21),u(1,6),p(2,"spk-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"spk-alert",22),u(1,7),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"spk-alert",23),u(1,8),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1){let t=E();s(0,"p",32),S("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),p(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),k((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function yt(i,n){if(i&1){let t=E();s(0,"div",39),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),N(2),F(),s(3,"p"),N(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function ht(i,n){if(i&1){let t=E();s(0,"button",40,1),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),N(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function xt(i,n){if(i&1&&(s(0,"div",34),h(1,yt,5,2,"div",35,y),F(),s(3,"spk-menu",36)(4,"button",37),f(5,10),F(),L(6,19),h(7,ht,3,1,"button",38,y),b(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),I("searchable",!0),r(4),x(t.destinationTypeOptions())}}function Lt(i,n){if(i&1){let t=E();s(0,"app-single-destination",41),P("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),p(1,"spk-icon",28),T())}function wt(i,n){i&1&&(u(0,4,2),p(1,"spk-icon"),T())}function Bt(i,n){if(i&1){let t=E();s(0,"spk-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),f(3,11),F(),s(4,"spk-alert",22),f(5,12),F()(),s(6,"div",44)(7,"spk-form-field")(8,"textarea",45),P("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),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),N(11,"Cancel"),F(),s(12,"button",47),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),p(14,"spk-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),I("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(Et);injector=O(j);#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=G(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=G(()=>{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=H({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([dt])],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_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=w(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=w(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$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 V;V=$localize`All destinations`;let W;W=$localize`Edit target URL`;let z;z=$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_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,U,K,V,W,z,X,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"disabled","loader"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["spk-button","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","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",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=E();s(0,"form",14,0),S("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,Nt,2,3,"button",17),s(7,"spk-menu")(8,"button",18),p(9,"spk-icon"),F(),L(10,19),s(11,"button",20),S("click",function(){return _(e),c(o.openTargetUrlDialog())}),p(12,"spk-icon"),F(),D(13,ft,3,0,"button",18),b(),F()(),T(),F(),D(14,kt,3,0,"spk-alert")(15,$t,3,0,"spk-alert",21)(16,At,3,1,"spk-alert",22)(17,Mt,3,1,"spk-alert",23),D(18,Pt,5,1,"p"),F(),D(19,xt,9,1),D(20,Lt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),S("click",function(){return _(e),c(o.goBack())}),u(23,3),p(24,"spk-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"spk-icon",28)(28,wt,2,0,"spk-icon"),T(),F()()(),D(29,Bt,15,4,"spk-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),d(e?6:-1),r(7),d(e?13:-1),r(),d(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),d(e?18:-1),r(),d(e?-1:19),r(),d(e?20:-1),r(5),I("disabled",o.testSignal()=="testing"||!e),r(2),d(o.testSignal()=="testing"?27:28),r(2),d(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,St,gt,_t,ct,ut,pt,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%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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{v as default};
|
|
1
|
+
import{g as mt}from"./chunk-JI7GCFQB.js";import{a as Et,b as Ot,c as Ct}from"./chunk-6WNZ5AZZ.js";import"./chunk-X7SFNRJF.js";import"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as Dt}from"./chunk-TW56VFHP.js";import{h as dt}from"./chunk-E2CREQ7G.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-J6BHRR34.js";import{a as m}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as _t,e as ct,f as ut,g as Tt,i as pt,j as gt,s as St}from"./chunk-NSIELNIY.js";import"./chunk-3ZVSHKLD.js";import{b as nt,d as it}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as ot,b as at,d as st,e as Ft,l as rt,o as lt}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as p,Bb as L,Cb as b,Eb as E,Hc as G,Kb as u,Lb as T,Mb as f,Nb as k,Ob as $,Oc as et,Pb as w,Qa as r,Qb as S,Rb as l,Z as O,Zb as Q,_b as q,ab as H,bc as Y,da as _,ea as c,ec as N,fc as B,gc as J,ha as j,jc as A,kc as M,lc as P,na as C,rc as Z,sb as D,sc as tt,tb as d,ub as y,vb as h,wb as x,xb as I,yb as s,zb as F}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Rt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function Nt(i,n){if(i&1){let t=E();u(0,2,1),s(1,"button",30),S("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"),I("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=E();u(0,2,2),s(1,"button",20),S("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),p(2,"spk-icon"),F(),T()}}function kt(i,n){i&1&&(s(0,"spk-alert"),u(1,5),p(2,"spk-icon",31),T(),F())}function $t(i,n){i&1&&(s(0,"spk-alert",21),u(1,6),p(2,"spk-icon",31),T(),F())}function At(i,n){if(i&1&&(s(0,"spk-alert",22),u(1,7),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Mt(i,n){if(i&1&&(s(0,"spk-alert",23),u(1,8),p(2,"spk-icon",31),T(),F()),i&2){let t=l();r(2),k(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1){let t=E();s(0,"p",32),S("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),p(2,"strong")(3,"br")(4,"span",33),T(),F()}if(i&2){let t,o=l();r(4),k((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function yt(i,n){if(i&1){let t=E();s(0,"div",39),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),N(2),F(),s(3,"p"),N(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function ht(i,n){if(i&1){let t=E();s(0,"button",40,1),S("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),N(2),F()}if(i&2){let t=n.$implicit;r(2),J(" ",t.displayName," ")}}function xt(i,n){if(i&1&&(s(0,"div",34),h(1,yt,5,2,"div",35,y),F(),s(3,"spk-menu",36)(4,"button",37),f(5,10),F(),L(6,19),h(7,ht,3,1,"button",38,y),b(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),I("searchable",!0),r(4),x(t.destinationTypeOptions())}}function Lt(i,n){if(i&1){let t=E();s(0,"app-single-destination",41),P("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),p(1,"spk-icon",28),T())}function wt(i,n){i&1&&(u(0,4,2),p(1,"spk-icon"),T())}function Bt(i,n){if(i&1){let t=E();s(0,"spk-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),f(3,11),F(),s(4,"spk-alert",22),f(5,12),F()(),s(6,"div",44)(7,"spk-form-field")(8,"textarea",45),P("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),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),N(11,"Cancel"),F(),s(12,"button",47),S("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),p(14,"spk-icon"),T(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),I("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(Ft);#a=O(Et);injector=O(j);#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=G(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=G(()=>{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=H({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,Rt,5),t&2&&q()},features:[Z([dt])],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_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SPK_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_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=w(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=w(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let K;K=$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 V;V=$localize`All destinations`;let W;W=$localize`Edit target URL`;let z;z=$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_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,U,K,V,W,z,X,[3,"submit"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"disabled","loader"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["spk-button","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["spk-button","","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",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=E();s(0,"form",14,0),S("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,Nt,2,3,"button",17),s(7,"spk-menu")(8,"button",18),p(9,"spk-icon"),F(),L(10,19),s(11,"button",20),S("click",function(){return _(e),c(o.openTargetUrlDialog())}),p(12,"spk-icon"),F(),D(13,ft,3,0,"button",18),b(),F()(),T(),F(),D(14,kt,3,0,"spk-alert")(15,$t,3,0,"spk-alert",21)(16,At,3,1,"spk-alert",22)(17,Mt,3,1,"spk-alert",23),D(18,Pt,5,1,"p"),F(),D(19,xt,9,1),D(20,Lt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),S("click",function(){return _(e),c(o.goBack())}),u(23,3),p(24,"spk-icon"),T(),F(),s(25,"button",27),u(26,4),D(27,bt,2,0,"spk-icon",28)(28,wt,2,0,"spk-icon"),T(),F()()(),D(29,Bt,15,4,"spk-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),d(e?6:-1),r(7),d(e?13:-1),r(),d(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),d(e?18:-1),r(),d(e?-1:19),r(),d(e?20:-1),r(5),I("disabled",o.testSignal()=="testing"||!e),r(2),d(o.testSignal()=="testing"?27:28),r(2),d(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Ct,St,gt,_t,ct,ut,pt,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%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-N57J64DN.js";import{a as se,b as ae}from"./chunk-2G6TVFPZ.js";import{h as ie}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-N57J64DN.js";import{a as se,b as ae}from"./chunk-2G6TVFPZ.js";import{h as ie}from"./chunk-E2CREQ7G.js";import"./chunk-WZNH4JPF.js";import"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import"./chunk-LDIZ5E5Z.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import{c as Z,e as J,i as ee,k as ne,s as te,t as oe}from"./chunk-NSIELNIY.js";import{b as V,d as q}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Y,g as H,l as Q,t as j}from"./chunk-Y5IRBMLB.js";import"./chunk-DNJOKPEL.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import{Ab as g,Eb as M,Hc as k,Kb as S,Lb as O,Mb as r,Oc as W,Qa as p,Qb as I,Rb as c,Z as C,Zb as x,_b as G,ab as K,bc as U,da as P,ea as f,jc as u,kc as d,lc as m,na as v,sb as N,sc as X,tb as F,xb as T,yb as t,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var _e=["formRef"],re=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(s,l){s&1&&(S(0,1,1),g(1,"spk-icon",20),O())}function ce(s,l){s&1&&(t(0,"p",21),r(1,6),i())}function ue(s,l){s&1&&(t(0,"p"),r(1,7),i())}function de(s,l){if(s&1){let n=M();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionTime,a)||(o.optionsFields.backupRetentionTime=a),f(a)}),t(3,"label",30),r(4,9),i()()}if(s&2){let n=c();p(2),T("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function me(s,l){if(s&1){let n=M();t(0,"p"),r(1,10),i(),t(2,"spk-form-field")(3,"label",31),r(4,11),i(),t(5,"input",32),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionVersions,a)||(o.optionsFields.backupRetentionVersions=a),f(a)}),i()()}if(s&2){let n=c();p(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Se(s,l){s&1&&(t(0,"p"),r(1,12),i())}function Oe(s,l){if(s&1){let n=M();t(0,"p"),r(1,13),i(),t(2,"spk-form-field")(3,"p"),r(4,14),i(),t(5,"label",33),r(6,15),i(),t(7,"input",34),m("ngModelChange",function(a){P(n);let o=c();return d(o.optionsFields.backupRetentionCustom,a)||(o.optionsFields.backupRetentionCustom=a),f(a)}),i()()}if(s&2){let n=c();p(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var Te=["Bytes","KB","MB","GB","TB","PB"],ge=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],Ce=1024*1024*1024*2,Pe=1024*1024*5,h=class s{#e=C(ie);#n=C(q);#t=C(V);formRef=W.required("formRef");selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=v(ge);sizeSplit=k(()=>{let n=this.optionsFields.remoteVolumeSize().match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);return{value:n?parseInt(n[1],10):0,unit:n?n[2].toUpperCase():"MB"}});exceededVolumeSize=k(()=>{let l=this.sizeSplit().value,n=this.sizeSplit().unit;if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,Te.indexOf(n));return e>Ce||e<Pe});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=K({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&x(e.formRef,_e,5),n&2&&G()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let a;a=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let E;E=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `;let b;b=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let R;R=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let w;w=$localize`Number of versions`;let D;D=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let B;B=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let L;L=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let z;return z=$localize`Retention expression`,[l,n,e,a,o,E,b,A,R,y,$,w,D,B,L,z,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"spk-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),m("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),N(7,pe,2,0,"spk-icon",20),O(),i()(),N(8,ce,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),g(12,"spk-icon",23),i(),O(),i()(),t(13,"spk-select",24)(14,"label",19),r(15,3),i(),t(16,"input",25),m("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),N(17,ue,2,0,"p")(18,de,5,2)(19,me,6,1)(20,Se,2,0,"p")(21,Oe,8,1),t(22,"app-options-list",26),m("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),g(26,"spk-icon"),O(),i(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),g(29,"spk-icon"),O(),i()()()),n&2&&(p(4),T("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),p(3),F(e.exceededVolumeSize()?7:-1),p(),F(e.exceededVolumeSize()?8:-1),p(5),T("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),u("ngModel",e.optionsFields.backupRetention),p(),F(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),p(5),u("options",e.settings),T("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",X(15,re)),p(5),U("loader",e.isSubmitting()))},dependencies:[te,Z,ne,J,ee,oe,le,H,Y,j,se,ae,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{a as it}from"./chunk-X7SFNRJF.js";import{a as tt,b as nt}from"./chunk-2G6TVFPZ.js";import{a as X,b as Ze,c as Je}from"./chunk-TW56VFHP.js";import{h as et}from"./chunk-E2CREQ7G.js";import{a as Ye}from"./chunk-WZNH4JPF.js";import{a as G}from"./chunk-2BX65XJQ.js";import{a as z}from"./chunk-6JQM2X3B.js";import{a as qe,c as ue,e as Ce,i as fe,k as We,s as ge,t as Qe}from"./chunk-NSIELNIY.js";import{A as Ue,C as He,a as pe,e as Ge,g as me,l as Re,o as Be,p as Ke,t as ze,z as Xe}from"./chunk-Y5IRBMLB.js";import{h as je}from"./chunk-DNJOKPEL.js";import{ea as be}from"./chunk-CWLTHXVS.js";import{$b as B,Ab as K,Ac as J,Bb as re,Cb as W,Db as le,Eb as N,Hc as P,Ic as Y,Kb as Q,Lb as Z,Mb as De,Nc as ee,Qa as l,Qb as E,Qc as $e,Rb as s,Sb as we,Tb as Ae,U as oe,Vb as Fe,Wb as Oe,Xb as ke,Z as k,ab as ae,bc as se,da as T,ea as S,ec as p,f as ie,fb as b,gc as F,ha as ye,hc as _e,jc as Ve,kc as Me,lc as ve,mc as v,na as $,nc as A,oc as c,rc as Pe,sb as f,sc as Le,tb as g,tc as de,ub as H,vb as j,vc as ce,wb as q,xb as m,yb as _,zb as d}from"./chunk-BTMXQPBB.js";import{a as O,b as ne}from"./chunk-EUDKD2JW.js";var ot=class n{#t=k(je);#e=k(Ge);#n=k(z);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(G,{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(G,{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(G,{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(G,{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(G,{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(G,{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(G,{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],h=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,o,u,h);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=k(z);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})));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=$("");readonly=$(!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=ke())&&(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_SPK_ICON:upload${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["fileInput",""],t,[1,"browse-btn"],["spk-button","","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),E("click",function(){return T(i),S(o.triggerBrowse())}),Q(3,1),K(4,"spk-icon"),Z(),d()(),_(5,"div",4),E("drop",function(r){return T(i),S(o.onFileDrop(r))})("dragover",function(r){return T(i),S(o.onDragOver(r))}),_(6,"textarea",5),ve("ngModelChange",function(r){return T(i),Me(o.content,r)||(o.content=r),S(r)}),d()(),_(7,"input",6,0),E("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:[ge,ue,Ce,fe,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 ft(n,t){if(n&1&&b(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 gt(n,t){n&1&&le(0)}function Tt(n,t){if(n&1&&b(0,gt,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),E("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!1))}),Q(1,6),K(2,"spk-icon"),Z(),d()}}function xt(n,t){if(n&1){let e=N();_(0,"button",21,1),E("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 Et(n,t){if(n&1){let e=N();_(0,"div",11)(1,"spk-menu",15)(2,"button",16),Q(3,7),K(4,"spk-icon"),Z(),d(),re(5,17),j(6,xt,3,1,"button",18,H),W(),d(),_(8,"spk-menu")(9,"button",19)(10,"spk-icon"),p(11,"dots-three-vertical"),d()(),re(12,17),_(13,"button",20),E("click",function(){T(e);let i=s(2);return S(i.showTextArea.set(!0))}),_(14,"spk-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),E("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",Le(2,mt))}}function ht(n,t){n&1&&le(0)}function It(n,t){if(n&1&&b(0,ht,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),h=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",i)("ngTemplateOutletContext",de(7,Ie,ce(2,ut,o,h,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,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function At(n,t){if(n&1){let e=N();_(0,"app-file-tree",24)(1,"label",30),f(2,Dt,2,0,"sup",31),p(3),f(4,wt,2,1,"spk-icon",32),d(),_(5,"input",33),E("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(),g(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),g(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,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function kt(n,t){if(n&1){let e=N();_(0,"app-file-tree",25)(1,"label",30),f(2,Ft,2,0,"sup",34),p(3),f(4,Ot,2,1,"spk-icon",32),d(),_(5,"input",33),E("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(),g(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",i)}}function Vt(n,t){n&1&&(_(0,"sup",35),p(1,"*"),d())}function Mt(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function vt(n,t){n&1&&(_(0,"spk-icon",36),p(1," warning "),d())}function Pt(n,t){n&1&&(_(0,"spk-icon",37),p(1,"x-circle"),d())}function Lt(n,t){n&1&&(_(0,"spk-icon",38),p(1,"warning"),d())}function $t(n,t){if(n&1&&(_(0,"spk-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("spkTooltip",e)}}function bt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"envelope"),d())}function Gt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"hard-drives"),d())}function Rt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"jar"),d())}function Bt(n,t){n&1&&(_(0,"spk-icon",41),p(1,"textbox"),d())}function Kt(n,t){if(n&1){let e=N();_(0,"spk-form-field")(1,"label",30),f(2,Vt,2,0,"sup",35),p(3),f(4,Mt,2,1,"spk-icon",32),f(5,vt,2,0,"spk-icon",36),f(6,Pt,2,0,"spk-icon",37),f(7,Lt,2,0,"spk-icon",38),d(),_(8,"input",39),E("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(),v(9)(10),f(11,$t,2,5,"spk-icon",40)(12,bt,2,0,"spk-icon",41)(13,Gt,2,0,"spk-icon",41)(14,Rt,2,0,"spk-icon",41)(15,Bt,2,0,"spk-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),h=s(2);l(),m("for",u),l(),g(e.formView.isMandatory&&r?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),g(r&&e.formView.type==="Path"?5:-1),l(),g(e.formView.type=="Hostname"&&!r&&!h.isValidHostname(a)?6:-1),l(),g(e.formView.type=="Bucketname"&&!r&&!h.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",i);let V=a,w=h.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(),g(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function zt(n,t){n&1&&(_(0,"sup",43),p(1,"*"),d())}function Xt(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Ut(n,t){if(n&1){let e=N();_(0,"span",47),E("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,"spk-icon",41),p(1,"password"),d())}function jt(n,t){if(n&1){let e=N();_(0,"spk-icon",48),E("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,"spk-icon",48),E("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,"spk-form-field")(1,"label",30),f(2,zt,2,0,"sup",43),p(3),f(4,Xt,2,1,"spk-icon",32),d(),_(5,"input",44),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),f(6,Ut,2,0,"span",45)(7,Ht,2,0,"spk-icon",41),f(8,jt,2,0,"spk-icon",46)(9,qt,2,0,"spk-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(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",i),l(),g(e.oauthField===e.formView.name?6:7),l(2),g(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,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("spkTooltip",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,"spk-select",49)(1,"label",30),f(2,Qt,2,0,"sup",50),p(3),f(4,Zt,2,1,"spk-icon",32),d(),_(5,"input",33),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),b(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),h=c(5);m("options",o)("isClearable",!1)("optionTemplate",e),l(),m("for",h),l(),g(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),g(i.formView.longDescription?4:-1),l(),m("id",h)("ngModel",r)}}function en(n,t){if(n&1&&(v(0),f(1,Yt,8,9)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),g(o?1:-1)}}function tn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),d())}function nn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("spkTooltip",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,"spk-select",52)(1,"label",30),f(2,tn,2,0,"sup",53),p(3),f(4,nn,2,1,"spk-icon",32),d(),_(5,"input",33),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),b(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),h=c(5);m("options",o)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",h),l(),g(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),g(i.formView.longDescription?4:-1),l(),m("id",h)("ngModel",r)}}function rn(n,t){n&1&&K(0,"spk-progress-bar",51)}function ln(n,t){if(n&1&&(v(0),f(1,an,8,10)(2,rn,1,0,"spk-progress-bar",51)),n&2){let e=s().$implicit,o=c(2),i=A(s(2).mapOptionsWithFreeText(e.formView,o));l(),g(i?1:2)}}function sn(n,t){n&1&&(_(0,"sup",55),p(1,"*"),d())}function _n(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function dn(n,t){if(n&1){let e=N();_(0,"app-size",54),E("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),f(2,sn,2,0,"sup",55),p(3),f(4,_n,2,1,"spk-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(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(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,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function mn(n,t){if(n&1){let e=N();_(0,"spk-form-field")(1,"label",30),f(2,cn,2,0,"sup",56),p(3),f(4,pn,2,1,"spk-icon",32),d(),_(5,"input",57),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d(),_(6,"spk-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(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",i)}}function un(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=N();_(0,"spk-toggle",58),E("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),f(3,un,2,1,"spk-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(),g(e.formView.longDescription?3:-1)}}function fn(n,t){n&1&&(_(0,"sup",60),p(1,"*"),d())}function gn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("spkTooltip",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,"spk-select",59)(1,"label",30),f(2,fn,2,0,"sup",60),p(3),f(4,gn,2,1,"spk-icon",32),d(),_(5,"input",61),E("ngModelChange",function(i){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),d()(),b(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),h=c(5);m("options",o)("selectMultiple",!0)("optionTemplate",e),l(),m("for",h),l(),g(i.formView.isMandatory&&u?2:-1),l(),F(" ",a," "),l(),g(i.formView.longDescription?4:-1),l(),m("ngModel",r)}}function xn(n,t){if(n&1&&(v(0),f(1,Sn,8,8)),n&2){let e=s().$implicit,o=A(s(2).mapOptions(e.formView));l(),g(o?1:-1)}}function En(n,t){n&1&&(_(0,"sup",62),p(1,"*"),d())}function Nn(n,t){if(n&1&&(_(0,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function hn(n,t){if(n&1){let e=N();_(0,"app-timespan",54),E("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),f(2,En,2,0,"sup",62),p(3),f(4,Nn,2,1,"spk-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(),g(e.formView.isMandatory&&a?2:-1),l(),F(" ",o," "),l(),g(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,"spk-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("spkTooltip",e.formView.longDescription)}}function Dn(n,t){if(n&1){let e=N();_(0,"app-file-drop-textarea",63),E("ngModelChange",function(i){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,i))}),_(1,"label"),f(2,In,2,0,"sup",64),p(3),f(4,yn,2,1,"spk-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),g(e.formView.isMandatory&&i?2:-1),l(),F(" ",e.formView.shortDescription??e.formView.name," "),l(),g(e.formView.longDescription?4:-1)}}function wn(n,t){if(n&1){let e=N();_(0,"button",65),E("click",function(){T(e);let i=s().$implicit,a=s(2);return S(a.removeAdvancedOption(i.formView.name))}),_(1,"spk-icon"),p(2,"x-circle"),d()()}}function An(n,t){if(n&1&&(_(0,"div",23),v(1)(2)(3)(4)(5),f(6,At,6,12,"app-file-tree",24)(7,kt,6,9,"app-file-tree",25)(8,Kt,16,13,"spk-form-field")(9,Wt,10,9,"spk-form-field")(10,en,2,2)(11,ln,3,2)(12,dn,5,7,"app-size",26)(13,mn,8,6,"spk-form-field")(14,Cn,4,5,"spk-toggle",27)(15,xn,2,2)(16,hn,5,7,"app-timespan",26)(17,Dn,5,6,"app-file-drop-textarea",28),f(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(),g(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"?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),g(e.fieldGroup==="advanced"?18:-1)}}function Fn(n,t){if(n&1&&(v(0),j(1,ft,1,9,"ng-container",null,H),j(3,Tt,1,9,"ng-container",null,H),_(5,"spk-toggle-card",8),re(6,9)(7),De(8,5),W(),v(9),f(10,St,3,0,"button",10)(11,Et,17,2,"div",11),W(),f(12,Nt,1,3,"textarea",12)(13,yt,2,0),d(),b(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(),g(e.showTextArea()?10:11),l(2),g(e.showTextArea()?12:13)}}var at=class n{#t=k(et);#e=k(z);#n=k(it);#a=k(Te);injector=k(ye);targetUrl=$e.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=$({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=$(null);showTextArea=$(!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:[],h=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,L=C.Aliases&&D>-1?C.Aliases[D]:C.Name,x=y&&typeof y!="string",xe=x?y?.defaultValue??C.DefaultValue:C.DefaultValue,Ee=x&&y?.order!==void 0?y.order:I,U={name:L,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+Ee},Ne=x?O(O({},U),y):U;w.dynamic.push(Ne)}else{let D=C.Name;if(V.find(te=>te===D))continue;let x=h.find(te=>te===D||te.name===D),xe=x&&typeof x!="string",Ee=xe&&x?.order!==void 0?x.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+Ee},Ne=xe?O(O({},U),x):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 M=Je(R);M&&this.destinationForm.set({custom:M.custom,dynamic:M.dynamic,advanced:M.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=$(!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 h=`${a}?type=${t}`,V=450,w=600,R=screen.width/2-V/2,M=screen.height/2-w/2,I=window.open(h,"_blank","height="+w+",width="+V+",menubar=0,status=0,titlebar=0,toolbar=0,left="+R+",top="+M);return window.addEventListener("message",C=>{let y=C.data.startsWith("authid:"),D=y?C.data.replace("authid:",""):null;y&&(this.destinationForm.update(L=>(L[e][o]=D,L)),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_SPK_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_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 h;h=$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 M;M=$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 L;return L=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,e,o,[1,"advanced-options",3,"disallowToggle"],["title",""],["spk-button","","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"],["spk-button","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["spk-button","","type","button",1,"small"],["spk-button","","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"],["spk-button","","type","button",1,"outlined"],[3,"for"],["spkTooltip",i],[1,"primary",3,"spkTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["spkTooltip",a],["spkTooltip",r],["spkTooltip",u,1,"warn"],["spkTooltip",h,1,"error"],["spkTooltip",V,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","spkTooltip"],["prefix",""],["prefix","",3,"spkTooltip"],["spkTooltip",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"],["spkTooltip",R],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["spkTooltip",M],[3,"ngModelChange","inputType","ngModel","customId"],["spkTooltip",I],["spkTooltip",C],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["spkTooltip",y],["type","text","id","text",3,"ngModelChange","ngModel"],["spkTooltip",D],[3,"ngModelChange","ngModel","customId","placeholder"],["spkTooltip",L],["spk-button","","type","button",1,"outlined",3,"click"]]},template:function(e,o){if(e&1&&(v(0)(1),f(2,Fn,16,5)),e&2){let i=A(o.destinationType());l();let a=A(o.destinationFormConfig());l(),g(i&&a?2:-1)}},dependencies:[Qe,ue,We,Ce,ge,fe,be,Ye,tt,nt,Se,Re,me,pe,Xe,Be,ze,He,Ue,Ke],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}spk-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%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as ut}from"./chunk-WZNH4JPF.js";import{a as Oe}from"./chunk-BCHZRC5K.js";import{a as rt,b as Ke,c as _t}from"./chunk-B26UYXA3.js";import{b as re}from"./chunk-LDIZ5E5Z.js";import{a as ot}from"./chunk-2BX65XJQ.js";import{a as Te}from"./chunk-6JQM2X3B.js";import{b as fe,c as Q,d as Ae,e as Z,f as he,h as st,i as le,j as Pe,k as Ne,n as lt,o as De,p as at,q as Me,r as ye,s as ae,t as Re}from"./chunk-NSIELNIY.js";import{b as oe,d as H}from"./chunk-2W6BEUGU.js";import{A as Ee,C as nt,a as j,b as Je,e as et,g as se,l as q,p as tt,t as Y}from"./chunk-Y5IRBMLB.js";import{h as it}from"./chunk-DNJOKPEL.js";import{$b as xe,Ab as g,Bb as B,Cb as v,Eb as x,H as ke,Hc as I,Ic as ie,Kb as C,Lb as m,Mb as f,Mc as ve,Nc as Ve,Oc as Se,Pb as Ge,Qa as _,Qb as E,Rb as u,U as ge,Z as M,Zb as Ce,_b as me,ab as z,bc as Fe,da as c,ea as p,ec as U,fb as Ye,fc as be,gc as Ze,jc as $,kc as w,lc as k,na as d,rb as Qe,sb as y,sc as Be,tb as R,ub as Ie,vb as Le,wb as Ue,xb as T,yb as l,zb as a}from"./chunk-BTMXQPBB.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var $e=class s{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};function Ct(s,t){if(s&1){let e=x();l(0,"div",24)(1,"spk-form-field")(2,"label",25),f(3,7),a(),l(4,"input",26,0),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),E("focus",function(){c(e);let i=xe(5);return p(i.showPicker())}),a(),l(6,"spk-icon",27),U(7,"clock"),a()(),l(8,"spk-form-field"),g(9,"label",28),l(10,"input",29,1),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),E("focus",function(){c(e);let i=xe(11);return p(i.showPicker())}),a(),l(12,"spk-icon",27),U(13,"calendar"),a()()(),l(14,"div",24)(15,"spk-form-field")(16,"label",30),f(17,8),a(),l(18,"input",31),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),a()(),l(19,"spk-select",32)(20,"input",33),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),a()()(),l(21,"app-toggle-card",34),B(22,35),f(23,9),v(),l(24,"div",36)(25,"spk-toggle",19),C(26,10),l(27,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),a(),m(),a(),l(28,"spk-toggle",19),C(29,11),l(30,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),a(),m(),a(),l(31,"spk-toggle",19),C(32,12),l(33,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),a(),m(),a(),l(34,"spk-toggle",19),C(35,13),l(36,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),a(),m(),a(),l(37,"spk-toggle",19),C(38,14),l(39,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),a(),m(),a(),l(40,"spk-toggle",19),C(41,15),l(42,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),a(),m(),a(),l(43,"spk-toggle",19),C(44,16),l(45,"input",20),k("ngModelChange",function(i){c(e);let o=u();return w(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),a(),m(),a()()()}if(s&2){let e=u();_(4),$("ngModel",e.scheduleFields.nextTime().time),_(6),$("ngModel",e.scheduleFields.nextTime().date),_(8),$("ngModel",e.scheduleFields.runAgain().repeatValue),_(),T("options",e.unitOptions)("isClearable",!1),_(),$("ngModel",e.scheduleFields.runAgain().repeatUnit),_(),T("disallowToggle",!0),_(6),$("ngModel",e.scheduleFields.runAgain().allowedDays.mon),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.tue),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.wed),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.thu),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.fri),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.sat),_(3),$("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],te={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Xe=class s{#e=M(J);#t=M(H);#i=M(oe);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let r;r=$localize`Next time`;let F;F=$localize`Run again every`;let A;A=$localize`Allowed days`;let S;S=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,r,F,A,S,O,P,L,K,b,X,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(l(0,"h3",17),f(1,2),a(),l(2,"div",18)(3,"spk-toggle",19),C(4,3),l(5,"input",20),k("ngModelChange",function(o){return w(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),a(),m(),a(),l(6,"p"),f(7,4),a()(),y(8,Ct,46,14),l(9,"div",21)(10,"button",22),E("click",function(){return n.goBack()}),C(11,5),g(12,"spk-icon"),m(),a(),l(13,"button",23),E("click",function(){return n.next()}),C(14,6),g(15,"spk-icon"),m(),a()()),e&2&&(_(5),$("ngModel",n.scheduleFields.autoRun),_(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[ae,Q,Ne,fe,Z,le,q,Ee,j,se,Y,Oe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ft(s,t){if(s&1&&(B(0,4),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(s,t){if(s&1&&(B(0,5),U(1),v()),s&2){let e,n=u();_(),be((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],we=class s{path=Ve.required();osType=Ve();pathChange=ve();remove=ve();internalPath=d("");pathType=d("-Expression");currentExpressionOption=I(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=I(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=ie(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(l(0,"spk-select",0)(1,"input",1),k("ngModelChange",function(o){return w(n.pathType,o)||(n.pathType=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a()(),l(2,"spk-form-field",2)(3,"input",3),k("ngModelChange",function(o){return w(n.internalPath,o)||(n.internalPath=o),o}),E("ngModelChange",function(){return n.updateFilter()}),a(),y(4,Ft,2,1,"ng-container",4),y(5,St,2,1,"ng-container",5),a(),l(6,"div",6),E("click",function(){return n.removeFilter()}),l(7,"spk-icon",7),U(8,"x-circle"),a()()),e&2){let i,o;T("options",n.expressionOptions())("isClearable",!1),_(),$("ngModel",n.pathType),_(2),$("ngModel",n.internalPath),_(),R(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),_(),R(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[ae,Q,Z,le,Y,q,j],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Tt=["formRef"],ct=()=>({standalone:!0});function ft(s,t){if(s&1){let e=x();l(0,"spk-form-field",42)(1,"input",43),k("ngModelChange",function(i){c(e);let o=u(2);return w(o.editingPath,i)||(o.editingPath=i),p(i)}),a()(),l(2,"button",44),E("click",function(){c(e);let i=u(2);return p(i.updatePath())}),l(3,"spk-icon"),U(4,"floppy-disk"),a()(),l(5,"button",44),E("click",function(){c(e);let i=u(2);return p(i.cancelEditPath())}),l(6,"spk-icon"),U(7,"x-bold"),a()()}if(s&2){let e=u(2);_(),$("ngModel",e.editingPath),T("ngModelOptions",Be(2,ct))}}function At(s,t){if(s&1){let e=x();l(0,"spk-form-field",42),g(1,"input",45),a(),l(2,"button",44),E("click",function(){c(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),l(3,"spk-icon"),U(4,"pen"),a()(),l(5,"button",44),E("click",function(){c(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),l(6,"spk-icon"),U(7,"trash-simple"),a()()}if(s&2){let e=u().$implicit;Qe("readonly",!0),_(),T("ngModel",e)("ngModelOptions",Be(3,ct))}}function ht(s,t){if(s&1&&(l(0,"div",30),y(1,ft,8,3)(2,At,8,4),a()),s&2){let e=t.$implicit,n=u();_(),R(n.oldPath()===e?1:2)}}function Pt(s,t){if(s&1){let e=x();l(0,"app-new-filter",47),E("pathChange",function(i){let o=c(e).$index,r=u(2);return p(r.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return p(o.removePathAt(i))}),a()}if(s&2){let e=t.$implicit,n=u(2);T("path",e)("osType",n.osType()??"")}}function Nt(s,t){if(s&1&&Le(0,Pt,1,2,"app-new-filter",46,Ie),s&2){let e=u();Ue(e.pathArray())}}function Dt(s,t){if(s&1&&(l(0,"div",41)(1,"spk-form-field"),g(2,"input",48),a(),l(3,"spk-select",49),g(4,"input",50),a()()),s&2){let e=u();_(3),T("options",e.sizeOptions())("isClearable",!1)}}var V=new ye,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),He=class s{#e=M(J);#t=M(H);#i=M(oe);formRef=Se.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new st("");filesLargerThan=I(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=d(Mt);osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=I(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=I(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=d(null);editingPath=d(null);addingNewPath=d(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,o=e.replace(i,"");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),o=this.pathArray().map((r,F)=>F===e?`${t}`:`${r}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(o=>!o.startsWith("-")&&!o.startsWith("+")).join("\0"),i=this.pathArray().filter((o,r)=>r!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=(t??"").trim()===""?e:`${t}\0${e}`;this.sourceDataForm.controls.path.setValue(n),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,Tt,5),e&2&&me()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let r;r=$localize`Source Data`;let F;F=$localize`Folder path`;let A;A=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let S;S=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let O;O=$localize`Paths`;let P;P=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let h;h=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],r,F,A,S,O,P,L,K,b,X,D,ee,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",h,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=x();l(0,"form",16,0),E("submit",function(){return c(i),p(n.next())}),l(2,"div",17)(3,"h3",18),f(4,1),a(),l(5,"app-file-tree",19)(6,"label",20),f(7,2),a(),g(8,"input",21),a(),l(9,"div",22)(10,"button",23),E("click",function(){return c(i),p(n.goBack())}),C(11,3),g(12,"spk-icon"),m(),a(),l(13,"button",24),C(14,4),g(15,"spk-icon"),m(),a()()(),l(16,"div",25)(17,"app-toggle-card",26),B(18,27),f(19,5),v(),l(20,"p",28),f(21,6),a(),l(22,"div",29),Le(23,ht,3,1,"div",30,Ie),l(25,"div",31)(26,"spk-form-field"),g(27,"input",32),a(),l(28,"button",33),E("click",function(){return c(i),p(n.addNewPath())}),l(29,"spk-icon"),U(30,"plus"),a()()()()(),l(31,"app-toggle-card",26),B(32,27),f(33,7),v(),l(34,"p",28),f(35,8),a(),l(36,"button",34),E("click",function(){return c(i),p(n.addFilter())}),f(37,9),a(),y(38,Nt,2,0),a(),l(39,"app-toggle-card",35),B(40,27),f(41,10),v(),l(42,"p",28),f(43,11),a(),l(44,"spk-toggle",36),C(45,12),g(46,"input",37),m(),a(),l(47,"spk-toggle",36),C(48,13),g(49,"input",38),m(),a(),l(50,"spk-toggle",36),C(51,14),g(52,"input",39),m(),a(),l(53,"spk-toggle",40),E("click",function(){return c(i),p(n.toggleFilesLargerThan())}),f(54,15),a(),y(55,Dt,5,2,"div",41),a()()()}if(e&2){let i;T("formGroup",n.sourceDataForm),_(5),T("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),_(12),T("disallowToggle",!0),_(6),Ue(n.nonFilterPaths()),_(4),T("formControl",n.newPathCtrl),_(4),T("disallowToggle",!0),_(7),R((i=n.pathSignal())!=null&&i.length?38:-1),_(),T("disallowToggle",!0),_(14),Fe("active",n.filesLargerThan()),_(2),R(n.filesLargerThan()?55:-1)}},dependencies:[ae,Pe,Q,Ne,fe,Z,he,le,Re,lt,De,Me,at,q,j,se,Ee,Y,we,ut,Oe],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var dt="1W:1D,4W:1W,12M:1M",J=class s{#e=M(H);#t=M(Te);#i=M(et);#n=M(it);#s=M($e);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:d(te.autoRun),nextTime:d(te.nextTime),runAgain:d(te.runAgain)};settings=d([]);optionsFields={remoteVolumeSize:d("50MB"),backupRetention:d("all"),backupRetentionTime:d(""),backupRetentionVersions:d(0),backupRetentionCustom:d("")};targetUrlModel=d(null);backupMetadata=d(null);isDraft=d(!1);backupId=d(null);backupName=I(()=>this.generalFormSignal()?.name??"");isSubmitting=d(!1);finishedLoading=d(!1);backupDefaults=d(null);applicationOptions=d(null);isNew=I(()=>this.backupId()==="new");osType=I(()=>this.#t.systemInfo()?.OSType);selectedOptions=d([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=I(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#o=d("");#l=d(null);#a=null;testSignal=this.#o.asReadonly();testErrorMessage=this.#l.asReadonly();#p=ie(()=>{let t=this.targetUrlModel(),e=this.#o(),n=this.#a;this.#a=t,!(e==="testing"||n===null||n===t)&&(this.#o.set(""),this.#l.set(null))});setTestState(t,e){this.#o.set(t),this.#l.set(e??null)}#_(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=I(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[de,...t]});nonSelectedOptions=I(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#u(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(ke(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#r(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#r(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(F=>`${F.Include?"":"-"}${F.Expression}`)??[],i=t.Settings?.find(F=>F.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(F=>F.Name==="--skip-files-larger-than")??null,r={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(r)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(S=>S.Name==="encryption-module"),o=t.Settings?.find(S=>S.Name==="passphrase")?.Value??"",r=i?.Value&&i.Value.length?i.Value:"",F=t.Settings?.find(S=>S.Name==="compression-module")?.Value??"",A={name:t.Name??"",description:t.Description??""};e&&e!==""&&(A.name=e),n&&n!==""&&(A.description=n),r&&r!==""&&(A.encryption=r),o&&o!==""&&(A.password=o,A.repeatPassword=o),F&&F!==""&&(A.compression=F),this.generalForm.patchValue(A)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#s.fromString(t.Repeat)??null,n=this.#c(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(r=>!e.includes(r.Name)),i=t.Settings?.filter(r=>e.includes(r.Name));this.settings.set(n??[]),n?.forEach(r=>{if(r.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(r.Value??"")});var o="all";i?.forEach(r=>{if(r.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(r.Value??"50MB"),r.Name==="keep-time"&&(r.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(r.Value??"");if(r.Name==="keep-versions"&&(r.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(r.Value?parseInt(r.Value):null);if(r.Name==="retention-policy"&&(r.Value??"")!=="")if(r.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(r.Value??"")}),this.optionsFields.backupRetention.set(o)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#s.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let r=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([P,L])=>L).map(([P,L])=>P):[],F=n.path?.split("\0")??[],A=this.mapFormsToSettings(),S=Object.entries(n.excludes??{}).filter(([P,L])=>L&&P!=="filesLargerThan").map(([P])=>P),O=n.excludes?.filesLargerThan;return S.length&&A.push({Name:"--exclude-files-attributes",Value:S.join(",")}),O&&O.size!==null&&O.unit!==null&&A.push({Name:"--skip-files-larger-than",Value:`${O.size}${O.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:F.filter(P=>!P.startsWith("-")),Settings:A,Filters:F.filter(P=>P.startsWith("-")).map((P,L)=>({Order:L,Include:!1,Expression:P.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:r}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==de.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:dt});break}let F=[...t,...n],A=this.settings().filter(S=>!F.includes(S.Name)).map(S=>{let O=S.Value;return typeof S.Value=="number"&&(O=S.Value.toString()),typeof S.Value=="boolean"&&(O=S.Value?"True":"False"),{Name:S.Name?.startsWith("--")?S.Name:`--${S.Name}`,Value:O}});return[...i,...o,...r,...A]}#c(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t){this.targetUrlModel.set(t)}#r(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=ge({token:s,factory:s.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(s,t){s&1&&(l(0,"spk-alert",17),C(1,5),g(2,"spk-icon",26),m(),a())}function Ot(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function $t(s,t){if(s&1&&g(0,"spk-progress-bar",40),s&2){let e=u(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),T("value",e.calculatePasswordStrength()*(100/5))}}function wt(s,t){s&1&&(l(0,"span",35),f(1,10),a())}function kt(s,t){s&1&&(C(0,8,1),g(1,"spk-icon"),m())}function It(s,t){s&1&&(C(0,8,2),g(1,"spk-icon"),m())}function Lt(s,t){s&1&&(C(0,11,1),g(1,"spk-icon",42),m())}function Ut(s,t){s&1&&(C(0,11,2),g(1,"spk-icon"),m())}function Gt(s,t){if(s&1){let e=x();l(0,"button",41),E("click",function(){c(e);let i=u(3);return p(i.copyPassword())}),C(1,11),y(2,Lt,2,0)(3,Ut,2,0),m(),a()}if(s&2){let e=u(3);_(2),R(e.copiedPassword()?2:3)}}function xt(s,t){s&1&&(l(0,"spk-alert",39),f(1,12),a())}function bt(s,t){if(s&1){let e=x();l(0,"div",30)(1,"spk-form-field")(2,"label",31),C(3,7),g(4,"sup"),m(),a(),g(5,"input",32),a(),y(6,$t,1,9,"spk-progress-bar",33),l(7,"spk-form-field"),g(8,"input",34),y(9,wt,2,0,"span",35),a(),l(10,"div",36)(11,"button",37),E("click",function(){c(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),C(12,8),y(13,kt,2,0)(14,It,2,0),m(),a(),l(15,"button",37),E("click",function(){c(e);let i=u(2);return p(i.generatePassword())}),C(16,9),g(17,"spk-icon"),m(),a(),y(18,Gt,4,1,"button",38),a(),y(19,xt,2,0,"spk-alert",39),a()}if(s&2){let e=u(2);_(5),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.password?6:-1),_(2),T("type",e.showPassword()?"text":"password"),_(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),R(e.showPassword()?13:14),_(5),R(e.showCopyPassword()?18:-1),_(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Bt(s,t){if(s&1&&(l(0,"spk-select",27)(1,"label",28),f(2,6),a(),g(3,"input",29),Ye(4,Ot,1,1,"ng-template"),a(),y(5,bt,20,7,"div",30)),s&2){let e=u();T("options",e.encryptionOptions())("isClearable",!1),_(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function vt(s,t){if(s&1&&(l(0,"button",24),C(1,13),g(2,"spk-icon"),m(),a()),s&2){let e=u();T("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(s,t){if(s&1&&(l(0,"button",25),C(1,14),g(2,"spk-icon"),m(),a()),s&2){let e=u();T("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var ne=new ye,gt=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>ne.group({name:ne.control(s.name,[Ae.required]),description:ne.control(s.description),encryption:ne.control(s.encryption,[_t()]),password:ne.control(s.password,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),repeatPassword:ne.control(s.repeatPassword,[Ke(t=>t?.value.encryption!=="",[Ae.required])]),compression:ne.control(s.compression)}),de={Key:"-",DisplayName:"None"},je=class s{#e=M(H);#t=M(oe);#i=M(rt);#n=M(J);#s=M(Te);formRef=Se.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=d(!1);copiedPassword=d(!1);showCopyPassword=d(!1);noneOptionKey=de.Key;encryptionEffect=ie(()=>{this.encryptionFieldSignal()===de.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=I(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=I(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=z({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Ce(n.formRef,yt,5),e&2&&me()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let F;F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let S;S=$localize`Encryption`;let O;O=$localize`Encryption`;let P;P=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=Ge(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let D;D=$localize`Passwords do not match`;let ee;ee=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ee=Ge(ee);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,r,F,A,O,K,b,X,D,ee,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",S,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=x();l(0,"form",15,0),E("submit",function(){return c(i),p(n.next())}),l(2,"h3",16),f(3,1),a(),y(4,Rt,3,0,"spk-alert",17),l(5,"spk-form-field")(6,"label",18),C(7,2),g(8,"sup"),m(),a(),g(9,"input",19),a(),l(10,"spk-form-field")(11,"label",20),f(12,3),a(),g(13,"textarea",21),a(),y(14,Bt,6,3),l(15,"div",22)(16,"button",23),E("click",function(){return c(i),p(n.exit())}),C(17,4),g(18,"spk-icon"),m(),a(),y(19,vt,3,1,"button",24)(20,Vt,3,1,"button",25),a()()}if(e&2){let i;T("formGroup",n.generalForm),_(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),_(10),R(n.isNew()?14:-1),_(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,Pe,Q,Z,he,De,Me,q,Y,se,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,de as b,je as c,te as d,Xe as e,pt as f,He as g,J as h};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Ee}from"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as fe}from"./chunk-XIOHRQ3X.js";import{h as P}from"./chunk-
|
|
1
|
+
import{a as Ee}from"./chunk-N57J64DN.js";import"./chunk-2G6TVFPZ.js";import{a as fe}from"./chunk-XIOHRQ3X.js";import{h as P}from"./chunk-E2CREQ7G.js";import"./chunk-WZNH4JPF.js";import{a as Se}from"./chunk-BCHZRC5K.js";import"./chunk-B26UYXA3.js";import{b as O}from"./chunk-LDIZ5E5Z.js";import{a as le}from"./chunk-WZRDKVOR.js";import"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as se,e as me,f as de,j as pe,n as _e,o as ce,p as ue,q as Ce,r as ge,s as Ne,t as Me}from"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as q,d as Z,e as J}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,e as Y,g as ee,k as te,l as ne,p as oe,t as ie}from"./chunk-Y5IRBMLB.js";import{g as ae,h as re}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{Ab as r,Bb as A,Cb as T,Eb as v,Ic as H,Kb as N,Lb as M,Mb as c,Nb as G,Ob as U,Qa as m,Qb as x,Rb as f,Z as _,ab as $,bc as K,da as S,ea as E,jc as w,kc as X,lc as z,na as F,qc as V,rc as W,sb as h,sc as j,tb as b,ub as B,vb as R,wb as y,xb as C,yb as a,zb as n}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var Fe=()=>["backup"];function Ae(l,t){l&1&&r(0,"spk-progress-bar",12)}function Te(l,t){if(l&1&&(a(0,"spk-form-field"),r(1,"input",32),n()),l&2){let e=t.$implicit,s=t.$index;m(),C("id",V("filter-",s))("formControl",e)}}function Oe(l,t){if(l&1){let e=v();a(0,"form",13)(1,"spk-select",14)(2,"label",15),c(3,1),n(),r(4,"input",16),n(),a(5,"spk-form-field")(6,"label",17),c(7,2),n(),r(8,"textarea",18),n(),a(9,"spk-form-field")(10,"label",19),c(11,3),n(),r(12,"textarea",20),n()(),a(13,"spk-divider"),c(14,4),n(),a(15,"form",13)(16,"spk-form-field")(17,"label",21),c(18,5),n(),r(19,"input",22),n(),a(20,"spk-form-field")(21,"label",23),c(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),A(25,26),c(26,7),T(),A(27,27),R(28,Te,2,3,"spk-form-field",null,B),T(),n()(),a(30,"p"),N(31,8),r(32,"a",28),M(),n(),a(33,"app-options-list",29),z("optionsChange",function(i){S(e);let u=f();return X(u.settings,i)||(u.settings=i),E(i)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let i=f();return E(i.submit())}),N(36,9),r(37,"spk-icon"),M(),n()()}if(l&2){let e=f();C("formGroup",e.baseCmdForm),m(),C("options",e.commandOptions()??j(10,Fe))("inlineSearch",!0),m(14),C("formGroup",e.standardFields),m(9),C("disallowToggle",!0),m(4),y(e.standardFields.controls.filters.controls),m(5),w("options",e.settings),C("hasFreeTextSettings",!0),m(2),K("loader",e.isSubmitting()),m(2),G(e.baseCmdForm.value.command),U(36)}}var d=new ge,Pe=["Bytes","KB","MB","GB","TB","PB"],k=class l{#e=_(P);#t=_(re);#n=_(Z);#o=_(q);#i=_(ae);#a=_(le);#s=_(Y);#r=O(this.#o.params);commandOptions=O(this.#i.getApiV1Commandline());sizeOptions=F(Pe);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=d.group({"backup-id":d.control(""),"backup-name":d.control(""),dbpath:d.control(""),filters:d.array([])});baseCmdForm=d.group({command:d.control("backup"),targetUrl:d.control(""),arguments:d.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=H(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(d.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",s=t.arguments?.split(`
|
|
2
2
|
`).filter(o=>o.length>0)??[],i=this.standardFields.value,u=i.filters??[],g=[t.command,e,...s,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...u.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:g}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=$({type:l,selectors:[["app-commandline"]],features:[W([P])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let s;s=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let u;u=$localize`Advanced options`;let g;g=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let D;D=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,s,i,u,g,o,I,D,L,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,s){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),N(4,0),r(5,"spk-icon"),M(),n()(),h(6,Ae,1,0,"spk-progress-bar",12)(7,Oe,38,11),n()),e&2&&(m(6),b(s.finishedLoading()?7:6))},dependencies:[Ne,pe,se,me,de,fe,Ee,Se,Me,_e,ce,Ce,ue,J,ne,ee,te,ie,oe,Q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as le}from"./chunk-XIOHRQ3X.js";import{a as re,b}from"./chunk-LDIZ5E5Z.js";import"./chunk-WZRDKVOR.js";import{a as ae}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import{a as E}from"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import{c as ie,e as ne,i as oe,s as se}from"./chunk-NSIELNIY.js";import"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{b as j,e as J}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{C as ee,a as Q,e as Y,g as Z,l as x}from"./chunk-Y5IRBMLB.js";import{h as te}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{Ab as p,D as G,F as g,G as K,H as A,Hc as C,Ic as k,Kb as d,Lb as u,Mb as F,Nb as U,Ob as X,Qa as r,Qb as S,Z as h,ab as L,bc as D,dc as z,ec as P,jc as H,kc as W,lc as q,na as s,r as v,sb as V,tb as w,xb as _,yb as n,zb as i}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";function ce(c,t){c&1&&(n(0,"spk-icon",19),P(1,"spinner"),i())}function pe(c,t){c&1&&(n(0,"spk-icon",20),P(1,"check"),i())}function _e(c,t){c&1&&(n(0,"spk-icon",21),P(1,"warning"),i()),c&2&&_("spkTooltip","File not found")}function de(c,t){let a=re(c).pipe(G(t),K());return b(a,{initialValue:c()})}var f=class c{#o=h(j);#s=h(ae);#e=h(te);#a=h(Y);#t=s("");backupId=b(this.#o.params.pipe(v(t=>t.id)));activeBackup=C(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=C(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=de(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=C(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=k(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),A(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=k(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),A(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(E,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),A(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),A(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(E,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(A(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),A(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(A(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(A(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||c)};static \u0275cmp=L({type:c,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let T;T=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let m;m=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let B;B=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let I;I=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let M;M=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Create bug report database `;let $;$=$localize`Placement`;let N;N=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let R;R=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let O;O=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,a,e,o,T,m,B,I,M,$,N,R,O,y,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"spkTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(p(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),d(4,0),p(5,"spk-icon"),u(),i()(),n(6,"article")(7,"h1"),F(8,1),i(),n(9,"p"),F(10,2),i()(),n(11,"article")(12,"h2"),F(13,3),i(),n(14,"p"),F(15,4),i(),n(16,"div",16)(17,"button",17),S("click",function(){return e.repairDatabase()}),d(18,5),p(19,"spk-icon"),u(),i(),n(20,"button",17),S("click",function(){return e.deleteDatabase()}),d(21,6),p(22,"spk-icon"),u(),i(),n(23,"button",17),S("click",function(){return e.restoreDatabase()}),d(24,7),p(25,"spk-icon"),u(),i(),n(26,"button",17),S("click",function(){return e.createErrorReport()}),d(27,8),p(28,"spk-icon"),u(),i()()(),n(29,"article")(30,"h2"),F(31,9),i(),n(32,"spk-form-field")(33,"input",18),q("ngModelChange",function(T){return W(e.backupFilePath,T)||(e.backupFilePath=T),T}),i(),V(34,ce,2,0,"spk-icon",19)(35,pe,2,0,"spk-icon",20)(36,_e,2,1,"spk-icon",21),i(),n(37,"div",22)(38,"button",17),S("click",function(){return e.resetDatabasePath()}),d(39,10),p(40,"spk-icon"),u(),i(),n(41,"button",17),S("click",function(){return e.saveDatabasePath()}),d(42,11),p(43,"spk-icon"),u(),i(),n(44,"button",17),S("click",function(){return e.saveAndRepairDatabasePath()}),d(45,12),p(46,"spk-icon"),u(),i(),n(47,"button",17),S("click",function(){return e.moveDatabasePath()}),d(48,13),p(49,"spk-icon"),u(),i()()()()),a&2){let o;r(8),U((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),X(8),r(9),D("loader",e.isRepairing()),_("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isDeleting()),_("disabled",!e.isValidatedPath()||e.pathHasChanged()),r(3),D("loader",e.isRestoring()),_("disabled",e.pathHasChanged()),r(3),D("loader",e.isCreatingBugReport()),_("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),r(6),z(e.isValidatedPath()?"success":"error"),r(),H("ngModel",e.backupFilePath),r(),w(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),r(4),_("disabled",!e.pathHasChanged()),r(3),_("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),_("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),r(3),_("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[se,ie,ne,oe,le,Z,x,Q,ee,J],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-EUDKD2JW.js";var o=[{path:"",loadComponent:()=>import("./chunk-JOUBVX7V.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-
|
|
1
|
+
import"./chunk-EUDKD2JW.js";var o=[{path:"",loadComponent:()=>import("./chunk-JOUBVX7V.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-QU24HTBS.js")},{path:"live",loadComponent:()=>import("./chunk-3WCZIRMO.js")}]}],t=o;export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y,d as en}from"./chunk-V6EWWEIG.js";import{a as nn}from"./chunk-XIOHRQ3X.js";import{a as Ze}from"./chunk-WZRDKVOR.js";import{a as Ye}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import{a as Qe}from"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{e as he}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,f as Xe,g as we,h as ze,j as Ve,k as Ke,o as Ue,p as je,w as We,x as qe}from"./chunk-Y5IRBMLB.js";import{h as Je}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{$b as K,Ab as d,Ac as J,Bb as m,Cb as M,Db as f,Eb as x,H as j,Ic as ve,Kb as s,Lb as u,Mb as T,Nb as A,Ob as R,Pb as W,Qa as _,Qb as $,Rb as p,Z as h,ab as He,bc as H,da as N,ea as D,ec as r,fb as O,fc as Be,gc as E,jc as Le,kc as Ge,lc as be,na as X,pb as xe,qb as ye,sb as C,sc as q,tb as S,tc as P,ub as w,vb as z,wb as V,wc as k,xb as g,xc as y,yb as o,yc as I,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-AFLQOHXV.js").then(n=>n.NgTemplateOutlet),Q,Ve,qe,We,import("./chunk-3JKXOOME.js").then(n=>n.DurationFormatPipe),import("./chunk-HLYFP2CB.js").then(n=>n.BytesPipe),import("./chunk-NS4PAVKI.js").then(n=>n.RelativeTimePipe)],_n=()=>["/add-backup"],ln=()=>["/restore"],on=n=>({$implicit:n}),rn=n=>["/backup",n],cn=n=>["/restore",n],sn=n=>["/backup",n,"export"],un=n=>["/backup",n,"delete"],pn=n=>["/backup",n,"database"],Fn=n=>["/backup",n,"commandline"],dn=n=>["/backup",n,"log"];function gn(n,i){if(n&1){let e=x();o(0,"button",51),$("click",function(){let c=N(e).$implicit,F=p(2);return D(F.sortByColumn.set(c.value))}),T(1,15),t()}if(n&2){let e=i.$implicit,a=p(2);H("active",a.orderBy()===e.value),_(),A(e.label),R(1)}}function Tn(n,i){if(n&1&&(o(0,"spk-menu",52)(1,"button",53),s(2,14),d(3,"strong")(4,"spk-icon"),u(),t(),m(5,54),z(6,gn,2,3,"button",55,w),M(),t()),n&2){let e=p();_(4),A(e.orderBy()),R(2),_(2),V(e.sortOrderOptions())}}function Cn(n,i){if(n&1&&(o(0,"p")(1,"span"),T(2,21),t(),r(3),k(4,"relativeTime"),t()),n&2){let e=p().$implicit,a=p(4);_(3),E(" ",I(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function Sn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(4);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function En(n,i){n&1&&(m(0),r(1,"-"),M())}function mn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Mn(n,i){n&1&&(m(0),r(1,"-"),M())}function On(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(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 Nn(n,i){n&1&&f(0)}function Dn(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"spk-chip")(5,"spk-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),T(10,16),t(),r(11),k(12,"relativeTime"),t(),C(13,Cn,5,4,"p"),o(14,"p")(15,"span"),T(16,17),t(),C(17,Sn,2,4)(18,En,2,0,"ng-container"),t(),o(19,"p")(20,"span"),T(21,18),t(),C(22,mn,2,3)(23,Mn,2,0,"ng-container"),t(),o(24,"p")(25,"span"),T(26,19),t(),C(27,On,2,3)(28,kn,2,0,"ng-container"),t()(),o(29,"spk-chip",59),T(30,20),t(),o(31,"div",49),O(32,Nn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(4),c=K(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(" ",I(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 F=a.getBackupVersionCount(e);_(3),A(F)(F),R(30),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,on,e))}}function fn(n,i){if(n&1&&z(0,Dn,33,17,"div",58,w),n&2){let e=p(3);V(e.backups())}}function Pn(n,i){n&1&&(m(0),T(1,22),M())}function $n(n,i){if(n&1&&(o(0,"div",56),C(1,fn,2,0)(2,Pn,2,0,"ng-container"),t()),n&2){let e=p(2);_(),S(e.backups().length?1:2)}}function In(n,i){n&1&&(s(0,23,1),f(1),u())}function An(n,i){n&1&&(s(0,24,1),f(1),u())}function Rn(n,i){n&1&&(s(0,25,1),f(1),u())}function Hn(n,i){n&1&&(s(0,26,1),f(1),u())}function xn(n,i){n&1&&(s(0,27,1),f(1),u())}function yn(n,i){n&1&&(s(0,28,1),f(1),u())}function Bn(n,i){n&1&&(s(0,29,1),f(1),u())}function Ln(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(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),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function hn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function Xn(n,i){n&1&&(m(0),r(1,"-"),M())}function wn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function zn(n,i){n&1&&(m(0),r(1,"-"),M())}function Vn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(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 Un(n,i){n&1&&f(0)}function jn(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,hn,2,4)(13,Xn,2,0,"ng-container"),t(),o(14,"td"),C(15,wn,2,3)(16,zn,2,0,"ng-container"),t(),o(17,"td"),C(18,Vn,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),T(22,32),t()(),o(23,"td"),O(24,Un,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(3),c=K(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 F=a.getBackupVersionCount(e);_(4),A(F)(F),R(22),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,on,e))}}function Wn(n,i){if(n&1){let e=x();o(0,"spk-table",61),be("sortByColumnChange",function(c){N(e);let F=p(2);return Ge(F.sortByColumn,c)||(F.sortByColumn=c),D(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,In,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,An,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,Hn,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"),T(24,30),t(),o(25,"th"),T(26,31),t()(),z(27,jn,25,13,"tr",null,w),t()}if(n&2){let e=p(2),a=K(53);g("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(5),V(e.backups())}}function qn(n,i){if(n&1&&C(0,$n,3,1,"div",56)(1,Wn,29,10,"spk-table",57),n&2){let e=p();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Jn(n,i){n&1&&(o(0,"div",71),d(1,"spk-progress-bar",72),o(2,"div",45)(3,"h3"),T(4,33),t()()())}function Qn(n,i){n&1&&T(0,34,1)}function Yn(n,i){n&1&&(o(0,"spk-icon"),r(1,"check"),t())}function Zn(n,i){n&1&&(o(0,"spk-icon"),r(1,"dots-three-vertical"),t())}function et(n,i){if(n&1){let e=x();o(0,"button",73),$("click",function(){let c=N(e).$implicit,F=p();return D(F.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),d(2,"spk-icon"),C(3,Qn,1,0),u(),t(),o(4,"button",74)(5,"spk-icon"),r(6,"pencil-simple"),t()(),o(7,"spk-menu",75)(8,"button",46),C(9,Yn,2,0,"spk-icon")(10,Zn,2,0,"spk-icon"),t(),m(11,54),o(12,"h3",76),r(13,"Operations"),t(),o(14,"button",77),s(15,35),d(16,"spk-icon"),u(),t(),o(17,"button",77),s(18,36),d(19,"spk-icon"),u(),t(),o(20,"button",77),s(21,37),d(22,"spk-icon"),u(),t(),d(23,"spk-divider"),o(24,"h3",76),r(25,"Advanced"),t(),o(26,"button",77),s(27,38),d(28,"spk-icon"),u(),t(),o(29,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),d(34,"spk-icon"),u(),t(),o(35,"button",77),s(36,41),d(37,"spk-icon"),u(),t(),d(38,"spk-divider"),o(39,"h3",76),r(40,"Reporting"),t(),o(41,"button",77),s(42,42),d(43,"spk-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=p();H("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),g("routerLink",P(16,rn,e.Backup==null?null:e.Backup.ID)),_(3),g("right",!0),_(),H("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),g("routerLink",P(18,cn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(20,sn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(22,un,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(24,pn,e.Backup==null?null:e.Backup.ID)),_(9),g("routerLink",P(26,Fn,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(28,dn,e.Backup==null?null:e.Backup.ID))}}function nt(n,i){n&1&&(o(0,"spk-icon",78),r(1,"funnel-simple"),t(),o(2,"spk-icon",79),r(3,"sort-ascending"),t(),o(4,"spk-icon",80),r(5,"sort-descending"),t())}var tn={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=h(Je);#t=h(Ze);#e=h(Ye);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=Qe("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 tn[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=tn[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let F="http://null?"+i.split("?")[1],B=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[L,G]of Object.entries(en))if(B.endsWith(L))return G}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=He({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_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let c;c=$localize`Restores`;let F;F=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let B;B=$localize`My backups`;let L;L=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let G;G=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_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_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_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_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_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 b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let pe;pe=$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 Fe;Fe=$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 de;de=$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 v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Me;Me=$localize` ${v}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ne;Ne=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let De;De=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let fe;fe=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let $e;$e=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Ie;Ie=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Re;return Re=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,F,U,B,L,G,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,de,ge,Te,Ce,Se,Ee,me,Me,Oe,ke,Ne,De,fe,Pe,$e,Ie,Ae,Re,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",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",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","nextrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let c=x();d(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",43),d(4,"img",44),o(5,"div",45)(6,"h3"),T(7,2),t(),o(8,"p"),T(9,3),t()(),o(10,"button",46),s(11,4),d(12,"spk-icon"),u(),t()(),o(13,"spk-card",43),d(14,"img",47),o(15,"div",45)(16,"h3"),T(17,5),t(),o(18,"p"),T(19,6),t()(),o(20,"button",46),s(21,7),d(22,"spk-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),T(26,8),M(),o(27,"div",49)(28,"spk-button-group",50)(29,"button",51),$("click",function(){return N(c),D(a.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){return N(c),D(a.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),t()(),o(35,"spk-menu",52)(36,"button",53),s(37,11),d(38,"strong")(39,"spk-icon"),u(),t(),m(40,54),o(41,"button",51),$("click",function(){return N(c),D(a.setTimeType("relative"))}),T(42,12),t(),o(43,"button",51),$("click",function(){return N(c),D(a.setTimeType("actual"))}),T(44,13),t(),M(),t(),C(45,Tn,8,1,"spk-menu",52),t()(),O(46,qn,2,1)(47,Jn,5,0),xe(48,46,an,null,47),t()(),O(50,et,44,30,"ng-template",null,0,J)(52,nt,6,0,"ng-template",null,1,J)}e&2&&(_(3),g("routerLink",q(9,_n)),_(10),g("routerLink",q(10,ln)),_(16),H("active",a.viewMode()==="list"),_(3),H("active",a.viewMode()==="details"),_(7),A(a.timeType()),R(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[he,nn,ze,we,Q,Ke,Ue,je,Xe],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}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;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%] spk-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%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{Z as default};
|
|
1
|
+
import{a as Y,d as en}from"./chunk-TW56VFHP.js";import{a as nn}from"./chunk-XIOHRQ3X.js";import{a as Ze}from"./chunk-WZRDKVOR.js";import{a as Ye}from"./chunk-ULLALJQ2.js";import"./chunk-J6BHRR34.js";import"./chunk-2BX65XJQ.js";import"./chunk-RHW5QVAY.js";import"./chunk-6JQM2X3B.js";import"./chunk-WXARH2SG.js";import"./chunk-NSIELNIY.js";import{a as Qe}from"./chunk-7QJG4IIT.js";import"./chunk-3ZVSHKLD.js";import{e as he}from"./chunk-2W6BEUGU.js";import"./chunk-JFOXV66M.js";import{a as Q,f as Xe,g as we,h as ze,j as Ve,k as Ke,o as Ue,p as je,w as We,x as qe}from"./chunk-Y5IRBMLB.js";import{h as Je}from"./chunk-DNJOKPEL.js";import"./chunk-UZK7ABRM.js";import"./chunk-CWLTHXVS.js";import"./chunk-WIDMAJIO.js";import"./chunk-B6OIHB5W.js";import{$b as K,Ab as d,Ac as J,Bb as m,Cb as M,Db as f,Eb as x,H as j,Ic as ve,Kb as s,Lb as u,Mb as T,Nb as A,Ob as R,Pb as W,Qa as _,Qb as $,Rb as p,Z as h,ab as He,bc as H,da as N,ea as D,ec as r,fb as O,fc as Be,gc as E,jc as Le,kc as Ge,lc as be,na as X,pb as xe,qb as ye,sb as C,sc as q,tb as S,tc as P,ub as w,vb as z,wb as V,wc as k,xb as g,xc as y,yb as o,yc as I,zb as t}from"./chunk-BTMXQPBB.js";import"./chunk-EUDKD2JW.js";var an=()=>[import("./chunk-AFLQOHXV.js").then(n=>n.NgTemplateOutlet),Q,Ve,qe,We,import("./chunk-3JKXOOME.js").then(n=>n.DurationFormatPipe),import("./chunk-HLYFP2CB.js").then(n=>n.BytesPipe),import("./chunk-NS4PAVKI.js").then(n=>n.RelativeTimePipe)],_n=()=>["/add-backup"],ln=()=>["/restore"],on=n=>({$implicit:n}),rn=n=>["/backup",n],cn=n=>["/restore",n],sn=n=>["/backup",n,"export"],un=n=>["/backup",n,"delete"],pn=n=>["/backup",n,"database"],Fn=n=>["/backup",n,"commandline"],dn=n=>["/backup",n,"log"];function gn(n,i){if(n&1){let e=x();o(0,"button",51),$("click",function(){let c=N(e).$implicit,F=p(2);return D(F.sortByColumn.set(c.value))}),T(1,15),t()}if(n&2){let e=i.$implicit,a=p(2);H("active",a.orderBy()===e.value),_(),A(e.label),R(1)}}function Tn(n,i){if(n&1&&(o(0,"spk-menu",52)(1,"button",53),s(2,14),d(3,"strong")(4,"spk-icon"),u(),t(),m(5,54),z(6,gn,2,3,"button",55,w),M(),t()),n&2){let e=p();_(4),A(e.orderBy()),R(2),_(2),V(e.sortOrderOptions())}}function Cn(n,i){if(n&1&&(o(0,"p")(1,"span"),T(2,21),t(),r(3),k(4,"relativeTime"),t()),n&2){let e=p().$implicit,a=p(4);_(3),E(" ",I(4,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function Sn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(4);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function En(n,i){n&1&&(m(0),r(1,"-"),M())}function mn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function Mn(n,i){n&1&&(m(0),r(1,"-"),M())}function On(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(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 Nn(n,i){n&1&&f(0)}function Dn(n,i){if(n&1&&(o(0,"div",58)(1,"div",45)(2,"h3"),r(3),o(4,"spk-chip")(5,"spk-icon"),r(6),t(),r(7),t()(),o(8,"p")(9,"span"),T(10,16),t(),r(11),k(12,"relativeTime"),t(),C(13,Cn,5,4,"p"),o(14,"p")(15,"span"),T(16,17),t(),C(17,Sn,2,4)(18,En,2,0,"ng-container"),t(),o(19,"p")(20,"span"),T(21,18),t(),C(22,mn,2,3)(23,Mn,2,0,"ng-container"),t(),o(24,"p")(25,"span"),T(26,19),t(),C(27,On,2,3)(28,kn,2,0,"ng-container"),t()(),o(29,"spk-chip",59),T(30,20),t(),o(31,"div",49),O(32,Nn,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(4),c=K(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(" ",I(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 F=a.getBackupVersionCount(e);_(3),A(F)(F),R(30),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(15,on,e))}}function fn(n,i){if(n&1&&z(0,Dn,33,17,"div",58,w),n&2){let e=p(3);V(e.backups())}}function Pn(n,i){n&1&&(m(0),T(1,22),M())}function $n(n,i){if(n&1&&(o(0,"div",56),C(1,fn,2,0)(2,Pn,2,0,"ng-container"),t()),n&2){let e=p(2);_(),S(e.backups().length?1:2)}}function In(n,i){n&1&&(s(0,23,1),f(1),u())}function An(n,i){n&1&&(s(0,24,1),f(1),u())}function Rn(n,i){n&1&&(s(0,25,1),f(1),u())}function Hn(n,i){n&1&&(s(0,26,1),f(1),u())}function xn(n,i){n&1&&(s(0,27,1),f(1),u())}function yn(n,i){n&1&&(s(0,28,1),f(1),u())}function Bn(n,i){n&1&&(s(0,29,1),f(1),u())}function Ln(n,i){if(n&1&&(r(0),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(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),k(1,"relativeTime")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Schedule==null?null:e.Schedule.Time,a.timeType()==="actual")," ")}}function vn(n,i){n&1&&(m(0),r(1,"-"),M())}function hn(n,i){if(n&1&&(r(0),k(1,"durationFormat")),n&2){let e=p().$implicit,a=p(3);E(" ",I(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration,a.timeType()==="actual")," ")}}function Xn(n,i){n&1&&(m(0),r(1,"-"),M())}function wn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(1,1,e.Backup==null||e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function zn(n,i){n&1&&(m(0),r(1,"-"),M())}function Vn(n,i){if(n&1&&(r(0),k(1,"bytes")),n&2){let e=p().$implicit;E(" ",y(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 Un(n,i){n&1&&f(0)}function jn(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,hn,2,4)(13,Xn,2,0,"ng-container"),t(),o(14,"td"),C(15,wn,2,3)(16,zn,2,0,"ng-container"),t(),o(17,"td"),C(18,Vn,2,3)(19,Kn,2,0,"ng-container"),t(),o(20,"td")(21,"span"),T(22,32),t()(),o(23,"td"),O(24,Un,1,0,"ng-container",60),t()()),n&2){let e=i.$implicit,a=p(3),c=K(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 F=a.getBackupVersionCount(e);_(4),A(F)(F),R(22),_(2),g("ngTemplateOutlet",c)("ngTemplateOutletContext",P(11,on,e))}}function Wn(n,i){if(n&1){let e=x();o(0,"spk-table",61),be("sortByColumnChange",function(c){N(e);let F=p(2);return Ge(F.sortByColumn,c)||(F.sortByColumn=c),D(c)}),o(1,"tr",62)(2,"th",63),s(3,23),O(4,In,2,0,"ng-container",64),u(),t(),o(5,"th",65),s(6,24),O(7,An,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,Hn,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"),T(24,30),t(),o(25,"th"),T(26,31),t()(),z(27,jn,25,13,"tr",null,w),t()}if(n&2){let e=p(2),a=K(53);g("data",e.backups())("loading",e.backupsLoading()),Le("sortByColumn",e.sortByColumn),_(4),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(3),g("ngTemplateOutlet",a),_(5),V(e.backups())}}function qn(n,i){if(n&1&&C(0,$n,3,1,"div",56)(1,Wn,29,10,"spk-table",57),n&2){let e=p();S(e.viewMode()==="list"?0:e.viewMode()==="details"?1:-1)}}function Jn(n,i){n&1&&(o(0,"div",71),d(1,"spk-progress-bar",72),o(2,"div",45)(3,"h3"),T(4,33),t()()())}function Qn(n,i){n&1&&T(0,34,1)}function Yn(n,i){n&1&&(o(0,"spk-icon"),r(1,"check"),t())}function Zn(n,i){n&1&&(o(0,"spk-icon"),r(1,"dots-three-vertical"),t())}function et(n,i){if(n&1){let e=x();o(0,"button",73),$("click",function(){let c=N(e).$implicit,F=p();return D(F.startBackup(c.Backup==null?null:c.Backup.ID))}),s(1,34),d(2,"spk-icon"),C(3,Qn,1,0),u(),t(),o(4,"button",74)(5,"spk-icon"),r(6,"pencil-simple"),t()(),o(7,"spk-menu",75)(8,"button",46),C(9,Yn,2,0,"spk-icon")(10,Zn,2,0,"spk-icon"),t(),m(11,54),o(12,"h3",76),r(13,"Operations"),t(),o(14,"button",77),s(15,35),d(16,"spk-icon"),u(),t(),o(17,"button",77),s(18,36),d(19,"spk-icon"),u(),t(),o(20,"button",77),s(21,37),d(22,"spk-icon"),u(),t(),d(23,"spk-divider"),o(24,"h3",76),r(25,"Advanced"),t(),o(26,"button",77),s(27,38),d(28,"spk-icon"),u(),t(),o(29,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.verifyFiles(c.Backup==null?null:c.Backup.ID))}),s(30,39),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){let c=N(e).$implicit,F=p();return D(F.compressBackup(c.Backup==null?null:c.Backup.ID))}),s(33,40),d(34,"spk-icon"),u(),t(),o(35,"button",77),s(36,41),d(37,"spk-icon"),u(),t(),d(38,"spk-divider"),o(39,"h3",76),r(40,"Reporting"),t(),o(41,"button",77),s(42,42),d(43,"spk-icon"),u(),t(),M(),t()}if(n&2){let e=i.$implicit,a=p();H("loader",a.startingBackup()===(e.Backup==null?null:e.Backup.ID)),_(3),S(a.viewMode()==="list"?3:-1),_(),g("routerLink",P(16,rn,e.Backup==null?null:e.Backup.ID)),_(3),g("right",!0),_(),H("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),g("routerLink",P(18,cn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(20,sn,e.Backup==null?null:e.Backup.ID)),_(3),g("routerLink",P(22,un,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(24,pn,e.Backup==null?null:e.Backup.ID)),_(9),g("routerLink",P(26,Fn,e.Backup==null?null:e.Backup.ID)),_(6),g("routerLink",P(28,dn,e.Backup==null?null:e.Backup.ID))}}function nt(n,i){n&1&&(o(0,"spk-icon",78),r(1,"funnel-simple"),t(),o(2,"spk-icon",79),r(3,"sort-ascending"),t(),o(4,"spk-icon",80),r(5,"sort-descending"),t())}var tn={file:{Display:$localize`Local`,Icon:null}},Z=class n{#n=h(Je);#t=h(Ze);#e=h(Ye);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=Qe("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 tn[a.key]?.Icon??"database"}getBackendType(i){if(!i)return"";let e=i.split("://")[0],a=Y(e);if(!a)return"";let c=tn[a.key];if(c?.Display)return c.Display;if(a.key==="s3"){let F="http://null?"+i.split("?")[1],B=new URL(F).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[L,G]of Object.entries(en))if(B.endsWith(L))return G}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=He({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_SPK_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let c;c=$localize`Restores`;let F;F=$localize`Restores allow you to restore your data from the cloud.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let B;B=$localize`My backups`;let L;L=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: List `;let G;G=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_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_SPK_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_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_SPK_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_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 b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`No backups founds`;let pe;pe=$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 Fe;Fe=$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 de;de=$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 v;v=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=W(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Me;Me=$localize` ${v}:ICU@@3521773141017690117: `;let Oe;Oe=$localize`Loading backups...`;let ke;ke=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ne;Ne=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore `;let De;De=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Export `;let fe;fe=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let Pe;Pe=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SPK_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SPK_ICON: Database `;let $e;$e=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SPK_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SPK_ICON: Verify files `;let Ie;Ie=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SPK_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SPK_ICON: Compress now `;let Ae;Ae=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SPK_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPK_ICON: Commandline `;let Re;return Re=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Log `,[["actions",""],["sortIcons",""],i,e,a,c,F,U,B,L,G,ee,ne,te,ie,oe,ae,_e,le,re,ce,se,ue,pe,Fe,de,ge,Te,Ce,Se,Ee,me,Me,Oe,ke,Ne,De,fe,Pe,$e,Ie,Ae,Re,[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","spk-button","",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",""],["spkSort","name"],[4,"ngTemplateOutlet"],["spkSort","type"],["spkSort","lastrun"],["spkSort","nextrun"],["spkSort","duration"],["spkSort","sourcesize"],["spkSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["spk-button","",3,"click"],["type","button","spk-button","",3,"routerLink"],[3,"right"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(e,a){if(e&1){let c=x();d(0,"app-status-bar"),o(1,"section")(2,"header")(3,"spk-card",43),d(4,"img",44),o(5,"div",45)(6,"h3"),T(7,2),t(),o(8,"p"),T(9,3),t()(),o(10,"button",46),s(11,4),d(12,"spk-icon"),u(),t()(),o(13,"spk-card",43),d(14,"img",47),o(15,"div",45)(16,"h3"),T(17,5),t(),o(18,"p"),T(19,6),t()(),o(20,"button",46),s(21,7),d(22,"spk-icon"),u(),t()()(),o(23,"div",48)(24,"h2"),m(25),T(26,8),M(),o(27,"div",49)(28,"spk-button-group",50)(29,"button",51),$("click",function(){return N(c),D(a.viewMode.set("list"))}),s(30,9),d(31,"spk-icon"),u(),t(),o(32,"button",51),$("click",function(){return N(c),D(a.viewMode.set("details"))}),s(33,10),d(34,"spk-icon"),u(),t()(),o(35,"spk-menu",52)(36,"button",53),s(37,11),d(38,"strong")(39,"spk-icon"),u(),t(),m(40,54),o(41,"button",51),$("click",function(){return N(c),D(a.setTimeType("relative"))}),T(42,12),t(),o(43,"button",51),$("click",function(){return N(c),D(a.setTimeType("actual"))}),T(44,13),t(),M(),t(),C(45,Tn,8,1,"spk-menu",52),t()(),O(46,qn,2,1)(47,Jn,5,0),xe(48,46,an,null,47),t()(),O(50,et,44,30,"ng-template",null,0,J)(52,nt,6,0,"ng-template",null,1,J)}e&2&&(_(3),g("routerLink",q(9,_n)),_(10),g("routerLink",q(10,ln)),_(16),H("active",a.viewMode()==="list"),_(3),H("active",a.viewMode()==="details"),_(7),A(a.timeType()),R(37),_(6),S(a.viewMode()==="list"?45:-1),_(3),ye(!a.backupsLoading()))},dependencies:[he,nn,ze,we,Q,Ke,Ue,je,Xe],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}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;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%] spk-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%] spk-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) spk-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] spk-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] spk-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}"],changeDetection:0})};export{Z as default};
|