@duplicati/ngclient 0.0.201 → 0.0.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/sh.woff2 +0 -0
- package/{chunk-NEC5ZCCT.js → chunk-2BXGPMD6.js} +1 -1
- package/chunk-2Y2B4SFQ.js +1 -0
- package/{chunk-YDE34GTN.js → chunk-3QV6WLWV.js} +1 -1
- package/{chunk-V7OCP4NF.js → chunk-5REQ64AK.js} +1 -1
- package/{chunk-HETNGT36.js → chunk-7DCQVM6E.js} +1 -1
- package/{chunk-4GYWPC2V.js → chunk-7OT4OWQG.js} +1 -1
- package/chunk-7SNTP57H.js +1 -0
- package/chunk-BFTGDQ4K.js +1 -0
- package/{chunk-UK6PJVXG.js → chunk-C25WT56X.js} +1 -1
- package/chunk-C64L6XY3.js +1 -0
- package/{chunk-WNG24347.js → chunk-C7N24TZM.js} +1 -1
- package/{chunk-56MQ46JU.js → chunk-DJEDUAEJ.js} +1 -1
- package/{chunk-C5RNVTX6.js → chunk-DUYRB53D.js} +1 -1
- package/{chunk-F5SNXI4Q.js → chunk-EE27B3OV.js} +1 -1
- package/{chunk-ZMSYEF6G.js → chunk-GRVTXORM.js} +1 -1
- package/chunk-HRHF3TYJ.js +1 -0
- package/{chunk-XHIPGS6J.js → chunk-IGYSPFE7.js} +1 -1
- package/{chunk-MI7UAY44.js → chunk-JRLBD7M4.js} +1 -1
- package/chunk-K6G7ALTG.js +1 -0
- package/{chunk-JZRRR52Q.js → chunk-NDRKUUWC.js} +1 -1
- package/{chunk-POPZ47SS.js → chunk-OL7C46LY.js} +1 -1
- package/chunk-P3D2ZP6W.js +11 -0
- package/{chunk-44X4A7WY.js → chunk-PMRQJTYP.js} +1 -1
- package/{chunk-AMTYI2HA.js → chunk-Q2UQ5J3C.js} +1 -1
- package/{chunk-NQAH5AL7.js → chunk-QBBHHRS4.js} +1 -1
- package/{chunk-VIXVL2MX.js → chunk-S53N5WRU.js} +1 -1
- package/chunk-SXUG3CGT.js +1 -0
- package/{chunk-FRPWQ4C3.js → chunk-T4BXBCQI.js} +1 -1
- package/{chunk-ZESQ7CXK.js → chunk-TKB2SB6D.js} +1 -1
- package/{chunk-O64YAUSG.js → chunk-TX7JDBPD.js} +1 -1
- package/chunk-W3YBKYPJ.js +1 -0
- package/{chunk-BAGYEJI6.js → chunk-W67KMV7H.js} +1 -1
- package/{chunk-LODLMHG5.js → chunk-XLMLR5EV.js} +1 -1
- package/{chunk-XZH2SXWG.js → chunk-XS4CJ2AE.js} +1 -1
- package/index.html +1 -1
- package/{main-CMOWV2QF.js → main-MW67CCYR.js} +1 -1
- package/package.json +1 -1
- package/chunk-3TJKPVBA.js +0 -1
- package/chunk-4AQZL2UM.js +0 -1
- package/chunk-LPAIFT5I.js +0 -11
- package/chunk-MUFBZIQA.js +0 -1
- package/chunk-P7OUKLCO.js +0 -1
- package/chunk-PE34XFKC.js +0 -1
- package/chunk-SQNRZYPW.js +0 -1
- package/chunk-VLC2XPEM.js +0 -1
- package/chunk-VVQRXJRI.js +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{b as xt,c as Rt,d as Lt,e as Nn}from"./chunk-HRHF3TYJ.js";import{a as mn,b as Ge,c as yt,d as gn,e as Tn,f as Mt,h as Sn,i as En,j as fn}from"./chunk-IMHM7ISI.js";import{a as hn,b as Kt,c as Fn}from"./chunk-6LAXPU22.js";import{a as Cn}from"./chunk-TL4WOQKT.js";import{a as Z}from"./chunk-HSHF5HR7.js";import{a as Ot}from"./chunk-D6IP567E.js";import{a as pn,b as $e}from"./chunk-VDSX2M4H.js";import{a as Ee}from"./chunk-HUZXJWCG.js";import{B as ie,C as dn,E as ht,F as un,H as Se,K as Ft,L as Nt,O as Dt,P as we,V as At,W as je,Y as It,a as rn,b as ut,c as re,d as pt,e as se,f as Ct,h as sn,i as ge,j as mt,k as gt,n as _n,o as cn,p as Tt,q as St,r as Et,s as Te,t as He,u as Q,w as ft,z as Le}from"./chunk-UNMDSCAN.js";import{c as Pt}from"./chunk-CFNARBNK.js";import{b as We,d as Re,e as ln}from"./chunk-I27PVH6D.js";import{_ as an}from"./chunk-7AVOHYTE.js";import{$ as T,Ab as r,Ac as dt,Bb as A,D as Yt,E as Be,Fb as ae,Gb as ee,Gc as Ue,Hb as te,Ib as D,K as Qt,M as Zt,Ma as _t,Mc as M,Pa as _,Pb as P,Qb as O,Qc as be,R as xe,Rb as I,Rc as X,Sc as Xe,Ub as ve,Uc as ke,Vb as h,W as y,Xb as s,Yb as Ke,Zb as Oe,aa as S,cb as H,cc as ze,da as en,dc as Je,ec as q,f as st,fc as ct,gc as me,hb as J,jc as C,kb as tn,kc as nt,l as jt,la as F,lc as z,mc as it,na as oe,oc as b,p as qt,pc as G,qc as k,rb as nn,rc as ce,sb as m,sc as Y,tb as g,tc as f,ub as Ne,uc as Bt,wb as De,wc as on,xb as Ae,xc as ye,yb as u,yc as ne,zb as l,zc as de}from"./chunk-26Z7TPJB.js";import{a as j,b as Ce}from"./chunk-7CGTOI24.js";var wt=class n{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||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};function ot(n){if(tn(n))return n();if(Array.isArray(n))return n.map(t=>ot(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=ot(n[e]));return t}return n}function yn(n,t){if(n&1){let e=D();l(0,"div",26)(1,"sh-form-field")(2,"label",27),I(3,7),r(),l(4,"input",28,0),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),S(o)}),r(),l(6,"sh-icon",29),C(7,"clock"),r()(),l(8,"sh-datepicker-input",30)(9,"label",31),C(10,"\xA0"),r(),l(11,"input",32,1),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),S(o)}),r(),l(13,"sh-icon",29),C(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),I(18,8),r(),l(19,"input",34),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),S(o)}),r()(),l(20,"sh-select",35)(21,"input",36),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),S(o)}),r()()(),l(22,"sh-toggle-card",37),ae(23,38),I(24,9),ee(),l(25,"div",39)(26,"sh-toggle",24),P(27,10),l(28,"input",25),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),S(o)}),r(),O(),r(),l(29,"sh-toggle",24),P(30,11),l(31,"input",25),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),S(o)}),r(),O(),r(),l(32,"sh-toggle",24),P(33,12),l(34,"input",25),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),S(o)}),r(),O(),r(),l(35,"sh-toggle",24),P(36,13),l(37,"input",25),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),S(o)}),r(),O(),r(),l(38,"sh-toggle",24),P(39,14),l(40,"input",25),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),S(o)}),r(),O(),r(),l(41,"sh-toggle",24),P(42,15),l(43,"input",25),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),S(o)}),r(),O(),r(),l(44,"sh-toggle",24),P(45,16),l(46,"input",25),k("ngModelChange",function(o){T(e);let a=s(2);return G(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),S(o)}),r(),O(),r()()()}if(n&2){let e=s(2);_(4),b("ngModel",e.scheduleFields.nextTime.time),_(7),b("ngModel",e.scheduleFields.nextTime.date),_(8),b("ngModel",e.scheduleFields.runAgain.repeatValue),_(),u("options",e.unitOptions)("isClearable",!1),_(),b("ngModel",e.scheduleFields.runAgain.repeatUnit),_(),u("disallowToggle",!0),_(6),b("ngModel",e.scheduleFields.runAgain.allowedDays.mon),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.tue),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.wed),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.thu),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.fri),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.sat),_(3),b("ngModel",e.scheduleFields.runAgain.allowedDays.sun)}}function Mn(n,t){if(n&1){let e=D();l(0,"div",23)(1,"sh-toggle",24),P(2,5),l(3,"input",25),k("ngModelChange",function(o){T(e);let a=s();return G(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),S(o)}),r(),O(),r(),l(4,"p"),I(5,6),r()(),m(6,yn,47,14)}if(n&2){let e=s();_(3),b("ngModel",e.scheduleFields.autoRun),_(3),g(e.scheduleFields.autoRun()?6:-1)}}var xn=[{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`}],$t=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!1,sun:!1}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:!0,nextTime:{time:"13:00:00",date:Rn().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:!0,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:!1,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:!0,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!0,tue:!0,wed:!0,thu:!0,fri:!0,sat:!0,sun:!0}}}}];function Dn(n){if(!n.autoRun)return null;let t=[n.runAgain.allowedDays.mon?"Monday":null,n.runAgain.allowedDays.tue?"Tuesday":null,n.runAgain.allowedDays.wed?"Wednesday":null,n.runAgain.allowedDays.thu?"Thursday":null,n.runAgain.allowedDays.fri?"Friday":null,n.runAgain.allowedDays.sat?"Saturday":null,n.runAgain.allowedDays.sun?"Sunday":null].filter(c=>c!==null),e=n.nextTime.time.split(":"),i=new Date(n.nextTime.date);i.setHours(parseInt(e[0])),i.setMinutes(parseInt(e[1]));let o=n.runAgain.repeatValue,a=n.runAgain.repeatUnit;return{Time:i.toISOString(),Repeat:`${o}${a}`,AllowedDays:t}}function Rn(){let n=new Date,t=n.getDay(),e=t===1?7:(8-t)%7;return n.setDate(n.getDate()+e),n.setHours(12,0,0,0),n}var Jt=()=>({autoRun:F(!0),nextTime:{time:F("13:00"),date:F(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:F(1),repeatUnit:F("D"),allowedDays:{mon:F(!0),tue:F(!0),wed:F(!0),thu:F(!0),fri:F(!0),sat:F(!0),sun:F(!0)}}}),zt=class n{#e=y(Pe);#t=y(Re);#n=y(We);unitOptions=xn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=$t;updateScheduleType(t){let e=$t.find(i=>i.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let i=e.data;this.scheduleFields.autoRun.set(i.autoRun??!1),this.scheduleFields.nextTime.time.set(i.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(i.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(i.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(i.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(i.runAgain?.allowedDays?.mon??!0),this.scheduleFields.runAgain.allowedDays.tue.set(i.runAgain?.allowedDays?.tue??!0),this.scheduleFields.runAgain.allowedDays.wed.set(i.runAgain?.allowedDays?.wed??!0),this.scheduleFields.runAgain.allowedDays.thu.set(i.runAgain?.allowedDays?.thu??!0),this.scheduleFields.runAgain.allowedDays.fri.set(i.runAgain?.allowedDays?.fri??!0),this.scheduleFields.runAgain.allowedDays.sat.set(i.runAgain?.allowedDays?.sat??!0),this.scheduleFields.runAgain.allowedDays.sun.set(i.runAgain?.allowedDays?.sun??!0)}else this.scheduleType.set("custom")}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let i;i=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize` Automatically run backups ${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:TAG_INPUT:`;let c;c=$localize`If a date was missed, the job will run as soon as possible.`;let d;d=$localize`Next time`;let p;p=$localize`Run again every`;let E;E=$localize`Allowed days`;let x;x=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let V;V=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let B;return B=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,i,o,a,c,d,p,E,x,v,$,L,N,V,B,[1,"title-30"],["label","key","value","value",3,"isClearable","options"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","ngModel"],["suffix",""],[1,"primary","sharp"],["for","date"],["type","text","id","date",3,"ngModelChange","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,i){e&1&&(l(0,"h3",17),I(1,2),r(),l(2,"sh-select",18)(3,"input",19),h("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),m(4,Mn,7,2),l(5,"div",20)(6,"button",21),h("click",function(){return i.goBack()}),P(7,3),A(8,"sh-icon"),O(),r(),l(9,"button",22),h("click",function(){return i.next()}),P(10,4),A(11,"sh-icon"),O(),r()()),e&2&&(_(2),u("isClearable",!1)("options",i.scheduleOptions),_(),u("ngModel",i.scheduleType()),_(),g(i.scheduleType()==="custom"?4:-1))},dependencies:[Te,re,gt,ut,se,ge,Se,je,Q,ie,we,At,un],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;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})};var Ln=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],wn=["[title]","[description]","[action]","*"];function $n(n,t){n&1&&C(0,"Title")}function Gn(n,t){n&1&&(l(0,"sh-icon"),C(1,"caret-down"),r())}var at=class n{isActive=ke(!1);disallowToggle=X(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&me("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:wn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(Ke(Ln),l(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),Oe(3,0,null,$n,1,0),m(5,Gn,2,0,"sh-icon"),r(),Oe(6,1),r(),l(7,"div",2),Oe(8,2),r()(),l(9,"div",3),Oe(10,3),r()),e&2&&(_(5),g(i.disallowToggle()?-1:5))},dependencies:[Q],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};function vn(n,t){if(n&1){let e=D();l(0,"sh-select",2)(1,"input",6),k("ngModelChange",function(o){T(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.updateFilter())}),r()()}if(n&2){let e=s();u("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),b("ngModel",e.internalPath)}}function Un(n,t){if(n&1&&(ae(0,7),C(1),ee()),n&2){let e,i=s(2);_(),nt((e=i.currentExpressionOption())==null?null:e.startsWith)}}function bn(n,t){if(n&1&&(ae(0,8),C(1),ee()),n&2){let e,i=s(2);_(),nt((e=i.currentExpressionOption())==null?null:e.endsWith)}}function kn(n,t){if(n&1){let e=D();l(0,"sh-form-field",3)(1,"input",6),k("ngModelChange",function(o){T(e);let a=s();return G(a.internalPath,o)||(a.internalPath=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.updateFilter())}),r(),m(2,Un,2,1,"ng-container",7),m(3,bn,2,1,"ng-container",8),r()}if(n&2){let e,i,o=s();_(),b("ngModel",o.internalPath),_(),g(!((e=o.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),_(),g(!((i=o.currentExpressionOption())==null||i.endsWith==null)&&i.endsWith.length?3:-1)}}var Vn=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],Bn=[{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:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Gt=class n{path=X.required();osType=X();pathChange=be();remove=be();internalPath=F("");pathType=F("-Expression");currentExpressionOption=M(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(Vn);expressionOptions=M(()=>{let e=this.osType()==="Windows"?"\\":"/";return Bn.map(i=>i.value==="-Folder"||i.value==="+Folder"?Ce(j({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?Ce(j({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?Ce(j({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?Ce(j({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?Ce(j({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?Ce(j({},i),{startsWith:"*.",endsWith:""}):Ce(j({},i),{startsWith:"",endsWith:""}))});pathEffect=oe(()=>{let t=this.path(),e=t.slice(1),i=t.startsWith("-")?"-":"+",o=this.osType()==="Windows",a=o?"\\":"/";e.startsWith("%")&&e.endsWith(a)||o&&e.slice(2).startsWith(a)&&e.endsWith(a)||e.startsWith(a)&&e.endsWith(a)?(this.pathType.set(`${i}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${i}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${i}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${i}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${i}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${i}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${i}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||n)};static \u0275cmp=H({type:n,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,i){if(e&1&&(l(0,"sh-select",0)(1,"input",1),k("ngModelChange",function(a){return G(i.pathType,a)||(i.pathType=a),a}),h("ngModelChange",function(){return i.updateFilter()}),r()(),m(2,vn,2,4,"sh-select",2)(3,kn,4,3,"sh-form-field",3),l(4,"div",4),h("click",function(){return i.removeFilter()}),l(5,"sh-icon",5),C(6,"x-circle"),r()()),e&2){let o;u("options",i.expressionOptions())("isClearable",!1),_(),b("ngModel",i.pathType),_(),g(((o=i.currentExpressionOption())==null?null:o.value)=="-FileGroup"||((o=i.currentExpressionOption())==null?null:o.value)=="+FileGroup"?2:3)}},dependencies:[Te,re,se,ge,we,Se,Q],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 Kn=["*"];function zn(n,t){n&1&&(l(0,"sh-chip",4),C(1,"Special"),r())}function Jn(n,t){n&1&&(l(0,"sh-chip",5),C(1,"Deprecated"),r())}function Xn(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),A(2,"img",2),r(),l(3,"div",3),C(4),m(5,zn,2,0,"sh-chip",4)(6,Jn,2,0,"sh-chip",5),r(),l(7,"div",6),C(8),r(),l(9,"div",7),Oe(10),r()()),n&2){s();let e=f(0);_(2),u("src",Bt(e.icon),_t)("alt",Bt(e.displayName)),_(2),z(" ",e.displayName," "),_(),g((e.sortOrder??0)==-2?5:(e.sortOrder??0)<0?6:-1),_(3),nt(e.description)}}var Ye=class n{destination=X();targetUrl=X();selectedDestinationType=M(()=>{let t=this.targetUrl();return t?Ge(t)??null:null});destinationFromTargetUrl=M(()=>{let t=this.selectedDestinationType();return t?{key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon}:null});destinationItem=M(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"]},ngContentSelectors:Kn,decls:2,vars:2,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,i){if(e&1&&(Ke(),ce(0),m(1,Xn,11,7,"sh-card",0)),e&2){let o=Y(i.destinationItem());_(),g(o?1:-1)}},dependencies:[dn,ht],styles:['[_nghost-%COMP%]{display:block}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var Qe=class n{#e=y(Ee);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=gn(e.Key);if(i.length<=1){let o=yt(e.Key);return o.isDefaultEntry===!0?[Ce(j({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||""})]:o}else return i}).filter(e=>e!==null)}#n(t){return t.map(e=>({key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon,searchTerms:[e.displayName,e.description,e.key,e.searchTerms??"",e.customKey??""].join(" "),sortOrder:e.sortOrder??0}))}backendDestinationOptions=M(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=M(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=M(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=M(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(i=>i.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};function Wn(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",3)(1,"button",4),h("click",function(){let o=T(e).$implicit,a=s();return S(a.setDestination.emit(o.customKey??o.key))}),P(2,0),A(3,"sh-icon"),O(),r()()}if(n&2){let e=t.$implicit;u("destination",e)}}var vt=class n{#e=y(Qe);showAsSources=X(!1);moduleType=X("Backend");setDestination=be();destinationSearchTerm=F("");destinationTypeOptions=M(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=M(()=>{let t=this.destinationTypeOptions(),e=this.destinationSearchTerm().toLowerCase(),i=[...t].sort((o,a)=>{let c=o.sortOrder??0,d=a.sortOrder??0;return c!==d?d-c:o.displayName.localeCompare(a.displayName)}).filter(o=>{let a=o.sortOrder??0;return a<0&&e?.length&&(o.key.toLocaleLowerCase()===e.toLocaleLowerCase()||o.customKey?.toLocaleLowerCase()===e.toLocaleLowerCase())?!0:a>=0});return e?i.filter(o=>o.searchTerms.toLowerCase().includes(e)):i});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let t;t=$localize`Search for destination...`;let e;return e=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(e,i){e&1&&(l(0,"sh-form-field")(1,"input",1),k("ngModelChange",function(a){return G(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),De(3,Wn,4,1,"app-destination-list-item",3,Ne),r()),e&2&&(_(),b("ngModel",i.destinationSearchTerm),_(2),Ae(i.destinationTypeOptionsFocused()))},dependencies:[Ye,Te,re,se,ge,Se,ie,Q],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var Hn=["fileInput"],jn=[[["label"]]],qn=["label"],Ut=class n{customId=X();content=F("");readonly=F(!1);placeholder=X($localize`Drop a file here or use the browse button`);fileInputRef=Xe("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=oe(()=>{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=H({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&ze(i.fileInputRef,Hn,5),e&2&&Je()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[on([{provide:rn,useExisting:n,multi:!0}])],ngContentSelectors:qn,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,i){if(e&1){let o=D();Ke(jn),Oe(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),h("click",function(){return T(o),S(i.triggerBrowse())}),l(3,"sh-icon"),C(4,"upload"),r()()(),l(5,"div",3),h("drop",function(c){return T(o),S(i.onFileDrop(c))})("dragover",function(c){return T(o),S(i.onDragOver(c))}),l(6,"textarea",4),k("ngModelChange",function(c){return T(o),G(i.content,c)||(i.content=c),S(c)}),r()(),l(7,"input",5,0),h("change",function(c){return T(o),S(i.onFileSelected(c))}),r()}e&2&&(_(6),u("placeholder",i.placeholder()),b("ngModel",i.content),u("disabled",i.readonly()))},dependencies:[Te,re,se,ge,Q,ie],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 Yn=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),le=n=>({$implicit:n}),Qn=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Zn=()=>({updateOn:"blur"}),ei=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),fe=(n,t)=>({fieldGroup:n,formView:t}),ti=()=>["/connect/logon"];function ni(n,t){n&1&&te(0)}function ii(n,t){if(n&1&&J(0,ni,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,Yn,i,e,a,c.oauthField)))}}function oi(n,t){n&1&&te(0)}function ai(n,t){if(n&1&&J(0,oi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=q(15);s();let a=f(0),c=f(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,Qn,i,e,a,c.oauthField)))}}function li(n,t){if(n&1){let e=D();l(0,"button",25),h("click",function(){T(e);let o=s(2);return S(o.showTextArea.set(!1))}),P(1,8),A(2,"sh-icon"),O(),r()}}function ri(n,t){if(n&1){let e=D();l(0,"button",32,2),h("click",function(){let o=T(e).$implicit,a=s(3);return S(a.addAdvancedOption(o))}),C(2),r()}if(n&2){let e=t.$implicit;_(2),z(" ",e.name," ")}}function si(n,t){if(n&1){let e=D();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),P(3,9),A(4,"sh-icon"),O(),r(),ae(5,28),De(6,ri,3,1,"button",29,Ne),ee(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),C(11,"dots-three-vertical"),r()(),ae(12,28),l(13,"button",31),h("click",function(){T(e);let o=s(2);return S(o.showTextArea.set(!0))}),l(14,"sh-icon"),C(15,"link"),r(),C(16," Edit contents as text "),r(),ee(),r()()}if(n&2){s();let e=f(9);_(),u("searchable",!0),_(),u("disabled",e.length===0),_(4),Ae(e)}}function _i(n,t){if(n&1){let e=D();l(0,"textarea",33),h("ngModelChange",function(o){T(e);let a=s(2);return S(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);u("ngModel",e.settingsAsText())("ngModelOptions",ye(2,Zn))}}function ci(n,t){n&1&&te(0)}function di(n,t){if(n&1&&J(0,ci,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=q(15),a=s(),c=f(0),d=f(1),p=a.getFormView("advanced",e)??a.getDefaultFormView(e);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ne(7,le,dt(2,ei,i,p,c,d.oauthField)))}}function ui(n,t){if(n&1&&De(0,di,1,9,"ng-container",null,Ne),n&2){let e=s(2);Ae(e.advancedFormFieldNames())}}function pi(n,t){n&1&&(l(0,"sup",42),C(1,"*"),r())}function Ci(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function mi(n,t){if(n&1){let e=D();l(0,"app-file-tree",35)(1,"label",41),m(2,pi,2,0,"sup",42),C(3),m(4,Ci,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),d=f(5);u("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("id",d)("ngModel",o)}}function gi(n,t){n&1&&(l(0,"sup",45),C(1,"*"),r())}function Ti(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Si(n,t){if(n&1){let e=D();l(0,"app-file-tree",36)(1,"label",41),m(2,gi,2,0,"sup",45),C(3),m(4,Ti,2,1,"sh-icon",43),r(),l(5,"input",44),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),d=f(5);u("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("id",d)("ngModel",o)}}function Ei(n,t){n&1&&(l(0,"sup",46),C(1,"*"),r())}function fi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function hi(n,t){n&1&&(l(0,"sh-icon",47),C(1," warning "),r())}function Fi(n,t){n&1&&te(0)}function Ni(n,t){if(n&1&&(l(0,"sh-icon",51),C(1," link "),r()),n&2){s();let e=f(8),i=f(9);me("error",e&&i==="error")("warn",e&&i==="warning"),u("shTooltip",e)}}function Di(n,t){n&1&&(l(0,"sh-icon",50),C(1,"envelope"),r())}function Ai(n,t){n&1&&(l(0,"sh-icon",50),C(1,"hard-drives"),r())}function Ii(n,t){n&1&&(l(0,"sh-icon",50),C(1,"jar"),r())}function Pi(n,t){n&1&&(l(0,"sh-icon",50),C(1,"textbox"),r())}function Oi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,Ei,2,0,"sup",46),C(3),m(4,fi,2,1,"sh-icon",43),m(5,hi,2,0,"sh-icon",47),J(6,Fi,1,0,"ng-container",24),r(),l(7,"input",48),h("keydown",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),ce(8)(9),m(10,Ni,2,5,"sh-icon",49)(11,Di,2,0,"sh-icon",50)(12,Ai,2,0,"sh-icon",50)(13,Ii,2,0,"sh-icon",50)(14,Pi,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(3),c=f(4),d=f(5);s();let p=q(17);_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),g(c&&e.formView.type==="Path"?5:-1),_(),u("ngTemplateOutlet",p)("ngTemplateOutletContext",ne(16,le,de(13,fe,e.fieldGroup,e.formView))),_(),u("type",e.formView.type==="Email"?"email":"text")("id",d)("ngModel",o);let E=a,x=s().hasLeadingSlash(E??"");_(),Y(x&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),Y(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),_(),g(e.formView.type==="Path"?10:e.formView.type==="Email"?11:e.formView.type==="Hostname"?12:e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?13:14)}}function yi(n,t){n&1&&(l(0,"sup",52),C(1,"*"),r())}function Mi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function xi(n,t){n&1&&te(0)}function Ri(n,t){if(n&1){let e=D();l(0,"span",56),h("click",function(){T(e);let o=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),C(1," AuthID "),r()}}function Li(n,t){n&1&&(l(0,"sh-icon",50),C(1,"password"),r())}function wi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){T(e);let o=s(2).$implicit;return S(o.formView.showPassword=!o.formView.showPassword)}),C(1," eye "),r()}}function $i(n,t){if(n&1){let e=D();l(0,"sh-icon",57),h("click",function(){T(e);let o=s(2).$implicit;return S(o.formView.showPassword=!o.formView.showPassword)}),C(1," eye-slash "),r()}}function Gi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,yi,2,0,"sup",52),C(3),m(4,Mi,2,1,"sh-icon",43),J(5,xi,1,0,"ng-container",24),r(),l(6,"input",53),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),m(7,Ri,2,0,"span",54)(8,Li,2,0,"sh-icon",50),m(9,wi,2,0,"sh-icon",55)(10,$i,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ne(14,le,de(11,fe,e.fieldGroup,e.formView))),_(),u("type",e.formView.showPassword?"text":"password")("id",c)("ngModel",o),_(),g(e.oauthField===e.formView.name?7:8),_(2),g(e.formView.showPassword?9:10)}}function vi(n,t){n&1&&(l(0,"sup",59),C(1,"*"),r())}function Ui(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function bi(n,t){n&1&&te(0)}function ki(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Vi(n,t){if(n&1){let e=D();l(0,"sh-select",58)(1,"label",41),m(2,vi,2,0,"sup",59),C(3),m(4,Ui,2,1,"sh-icon",43),J(5,bi,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),J(7,ki,1,2,"ng-template",null,3,Ue)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),d=f(4),p=f(5);s();let E=q(17);u("options",i)("isClearable",!1)("optionTemplate",e),_(),u("for",p),_(),g(o.formView.isMandatory&&d?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",E)("ngTemplateOutletContext",ne(14,le,de(11,fe,o.fieldGroup,o.formView))),_(),u("id",p)("ngModel",c)}}function Bi(n,t){if(n&1&&(ce(0),m(1,Vi,9,16)),n&2){let e=s().$implicit,i=Y(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function Ki(n,t){n&1&&(l(0,"sup",62),C(1,"*"),r())}function zi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Ji(n,t){n&1&&te(0)}function Xi(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Wi(n,t){if(n&1){let e=D();l(0,"sh-select",61)(1,"label",41),m(2,Ki,2,0,"sup",62),C(3),m(4,zi,2,1,"sh-icon",43),J(5,Ji,1,0,"ng-container",24),r(),l(6,"input",44),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),J(7,Xi,1,2,"ng-template",null,4,Ue)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),d=f(4),p=f(5);s();let E=q(17);u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),_(),u("for",p),_(),g(o.formView.isMandatory&&d?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",E)("ngTemplateOutletContext",ne(15,le,de(12,fe,o.fieldGroup,o.formView))),_(),u("id",p)("ngModel",c)}}function Hi(n,t){n&1&&A(0,"sh-progress-bar",60)}function ji(n,t){if(n&1&&(ce(0),m(1,Wi,9,17)(2,Hi,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=f(2),o=Y(s(2).mapOptionsWithFreeText(e.formView,i));_(),g(o?1:2)}}function qi(n,t){n&1&&(l(0,"sup",64),C(1,"*"),r())}function Yi(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Qi(n,t){n&1&&te(0)}function Zi(n,t){if(n&1){let e=D();l(0,"app-size",63),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),m(2,qi,2,0,"sup",64),C(3),m(4,Yi,2,1,"sh-icon",43),J(5,Qi,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);u("inputType",e.Name)("ngModel",o)("customId",c),_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView)))}}function eo(n,t){n&1&&(l(0,"sup",65),C(1,"*"),r())}function to(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function no(n,t){n&1&&te(0)}function io(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,eo,2,0,"sup",65),C(3),m(4,to,2,1,"sh-icon",43),J(5,no,1,0,"ng-container",24),r(),l(6,"input",66),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),C(8,"numpad"),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ne(11,le,de(8,fe,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o)}}function oo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function ao(n,t){n&1&&te(0)}function lo(n,t){if(n&1){let e=D();l(0,"sh-toggle",67),h("click",function(){T(e);let o=s().$implicit,a=f(2),c=s(2);return S(c.updateFieldValue(o.fieldGroup,o.formView.name,c.isTrue(a)?"false":"true"))}),l(1,"label",41),C(2),m(3,oo,2,1,"sh-icon",43),J(4,ao,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(5);s();let c=q(17),d=s();me("active",d.isTrue(o)),_(),u("for",a),_(),z(" ",i," "),_(),g(e.formView.longDescription?3:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",ne(10,le,de(7,fe,e.fieldGroup,e.formView)))}}function ro(n,t){n&1&&(l(0,"sup",69),C(1,"*"),r())}function so(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function _o(n,t){n&1&&te(0)}function co(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function uo(n,t){if(n&1){let e=D();l(0,"sh-select",68)(1,"label",41),m(2,ro,2,0,"sup",69),C(3),m(4,so,2,1,"sh-icon",43),J(5,_o,1,0,"ng-container",24),r(),l(6,"input",70),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),J(7,co,1,2,"ng-template",null,5,Ue)}if(n&2){let e=q(8);s();let i=f(0),o=s().$implicit,a=f(1),c=f(2),d=f(4),p=f(5);s();let E=q(17);u("options",i)("selectMultiple",!0)("optionTemplate",e),_(),u("for",p),_(),g(o.formView.isMandatory&&d?2:-1),_(),z(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",E)("ngTemplateOutletContext",ne(13,le,de(10,fe,o.fieldGroup,o.formView))),_(),u("ngModel",c)}}function po(n,t){if(n&1&&(ce(0),m(1,uo,9,15)),n&2){let e=s().$implicit,i=Y(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function Co(n,t){n&1&&(l(0,"sup",71),C(1,"*"),r())}function mo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function go(n,t){n&1&&te(0)}function To(n,t){if(n&1){let e=D();l(0,"app-timespan",63),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),m(2,Co,2,0,"sup",71),C(3),m(4,mo,2,1,"sh-icon",43),J(5,go,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17);u("inputType",e.formView.name)("ngModel",o)("customId",c),_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView)))}}function So(n,t){n&1&&(l(0,"sup",73),C(1,"*"),r())}function Eo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function fo(n,t){n&1&&te(0)}function ho(n,t){if(n&1){let e=D();l(0,"app-file-drop-textarea",72),h("ngModelChange",function(o){T(e);let a=s().$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),m(2,So,2,0,"sup",73),C(3),m(4,Eo,2,1,"sh-icon",43),J(5,fo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=f(2),o=f(4),a=f(5);s();let c=q(17);u("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),_(2),g(e.formView.isMandatory&&o?2:-1),_(),z(" ",e.formView.shortDescription??e.formView.name," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",ne(11,le,de(8,fe,e.fieldGroup,e.formView)))}}function Fo(n,t){n&1&&(A(0,"sh-spinner"),l(1,"span"),I(2,10),r()),n&2&&ct("--spinner-size","16px")("--spinner-thickness","2px")}function No(n,t){n&1&&(l(0,"div",76),I(1,11),r())}function Do(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;it(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ao(n,t){if(n&1){let e=D();l(0,"sh-select",77)(1,"label",41)(2,"sup",78),C(3,"*"),r(),l(4,"span"),I(5,12),r()(),l(6,"input",44),h("ngModelChange",function(o){T(e);let a=s(4).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),J(7,Do,1,2,"ng-template",null,6,Ue)}if(n&2){s(4);let e=f(2),i=f(5),o=s(2);u("options",o.restoreBackupIdOptions())("isClearable",!1),_(),u("for",i),_(5),u("id",i)("ngModel",e)}}function Io(n,t){if(n&1&&m(0,Fo,3,4)(1,No,2,0,"div",76)(2,Ao,9,5),n&2){let e=s(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Po(n,t){n&1&&(l(0,"sup",79),C(1,"*"),r())}function Oo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(4).$implicit;u("shTooltip",e.formView.longDescription)}}function yo(n,t){n&1&&te(0)}function Mo(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){T(e),s(4);let o=f(5),a=s(2);return S(a.toggleDisabled(o))}),P(1,13),A(2,"sh-icon"),O(),r()}}function xo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),m(2,Po,2,0,"sup",79),C(3),m(4,Oo,2,1,"sh-icon",43),J(5,yo,1,0,"ng-container",24),r(),l(6,"input",80),h("ngModelChange",function(o){T(e);let a=s(3).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),C(8,"textbox"),r()(),m(9,Mo,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17),p=s();_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ne(15,le,de(12,fe,e.fieldGroup,e.formView))),_(),u("type","text")("id",c)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),_(3),g(p.getIsDisabled(c)?9:-1)}}function Ro(n,t){if(n&1&&(l(0,"div",74),m(1,Io,3,1)(2,xo,10,17),r()),n&2){let e=s(4);_(),g(e.isRestoreFlow()?1:2)}}function Lo(n,t){if(n&1){let e=D();l(0,"div",82),P(1,14),A(2,"div")(3,"div"),O(),r(),l(4,"button",81),h("click",function(){T(e);let o=s(5);return S(o.openConsole())}),P(5,15),A(6,"sh-icon"),O(),r()}}function wo(n,t){n&1&&(l(0,"div",82),I(1,16),r(),l(2,"button",83),P(3,17),A(4,"sh-icon"),O(),r()),n&2&&(_(2),u("routerLink",ye(1,ti)))}function $o(n,t){if(n&1&&(l(0,"div",75),m(1,Lo,7,0)(2,wo,5,2),r()),n&2){let e=s(4);_(),g(e.isConnectedToConsole()?1:2)}}function Go(n,t){if(n&1&&m(0,Ro,3,1,"div",74)(1,$o,3,1,"div",75),n&2){let e=s(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function vo(n,t){n&1&&(l(0,"sup",85),C(1,"*"),r())}function Uo(n,t){if(n&1&&(l(0,"sh-icon",43),C(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function bo(n,t){n&1&&te(0)}function ko(n,t){if(n&1){let e=D();l(0,"div",84)(1,"sh-form-field")(2,"label",41),m(3,vo,2,0,"sup",85),C(4),m(5,Uo,2,1,"sh-icon",43),J(6,bo,1,0,"ng-container",24),r(),l(7,"input",86),h("ngModelChange",function(o){T(e);let a=s(2).$implicit,c=s(2);return S(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),C(9,"textbox"),r()(),l(10,"button",87),h("click",function(){T(e);let o=s(4);return S(o.authenticateFilen())}),P(11,18),A(12,"sh-icon"),O(),r()()}if(n&2){let e=s(2).$implicit,i=f(1),o=f(2),a=f(4),c=f(5);s();let d=q(17),p=s();_(2),u("for",c),_(),g(e.formView.isMandatory&&a?3:-1),_(),z(" ",i," "),_(),g(e.formView.longDescription?5:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ne(12,le,de(9,fe,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o),_(3),u("disabled",p.isAuthenticatingFilen())}}function Vo(n,t){if(n&1&&m(0,ko,13,14,"div",84),n&2){let e=s(3);g(e.hasFilenApiKey()?-1:0)}}function Bo(n,t){if(n&1){let e=D();l(0,"button",81),h("click",function(){T(e);let o=s().$implicit,a=s(2);return S(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),C(2,"x-circle"),r()()}}function Ko(n,t){if(n&1&&(l(0,"div",34),ce(1)(2)(3)(4)(5),m(6,mi,6,12,"app-file-tree",35)(7,Si,6,9,"app-file-tree",36)(8,Oi,15,18,"sh-form-field")(9,Gi,11,16,"sh-form-field")(10,Bi,2,2)(11,ji,3,2)(12,Zi,6,14,"app-size",37)(13,io,9,13,"sh-form-field")(14,lo,5,12,"sh-toggle",38)(15,po,2,2)(16,To,6,14,"app-timespan",37)(17,ho,6,13,"app-file-drop-textarea",39)(18,Go,2,1)(19,Vo,1,1),m(20,Bo,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=f(0),o=s();me("single-field",e.fieldGroup!=="advanced"),_(),Y(e.formView.shortDescription??e.formView.name),_(),Y(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=Y(o.getFieldValue(e.fieldGroup,e.formView.name));_(),Y((a??"").toString().trim()===""),_(),Y("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),_(),g(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"||e.formView.type==="BucketnameB2"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:e.formView.type==="DuplicatiBackupId"?18:e.formView.type==="Filen2FACode"?19:-1),_(14),g(e.fieldGroup==="advanced"?20:-1)}}function zo(n,t){if(n&1&&(l(0,"sh-icon",88),C(1,"x-circle"),r()),n&2){s();let e=f(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Jo(n,t){if(n&1&&(l(0,"sh-icon",89),C(1,"warning"),r()),n&2){s();let e=f(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Xo(n,t){if(n&1&&(ce(0),m(1,zo,2,1,"sh-icon",88)(2,Jo,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=f(0),o=Y(e.formView.validate(i));_(),g((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function Wo(n,t){if(n&1&&(ce(0),m(1,Xo,3,2)),n&2){let e=t.$implicit,o=(Y(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),g(!o&&e.formView.validate?1:-1)}}function Ho(n,t){if(n&1&&(ce(0),De(1,ii,1,9,"ng-container",null,Ne),De(3,ai,1,9,"ng-container",null,Ne),l(5,"sh-toggle-card",19),ae(6,20)(7),I(8,7),ee(),ce(9),m(10,li,3,0,"button",21)(11,si,17,2,"div",22),ee(),m(12,_i,1,3,"textarea",23)(13,ui,2,0),r(),J(14,Ko,21,9,"ng-template",null,0,Ue)(16,Wo,2,2,"ng-template",null,1,Ue)),n&2){let e=s(),i=f(1);Y(e.destinationForm()),_(),Ae(i.custom),_(2),Ae(i.dynamic),_(2),u("disallowToggle",!0),_(4),Y(e.nonSelectedAdvancedFormViews()),_(),g(e.showTextArea()?10:11),_(2),g(e.showTextArea()?12:13)}}var bt=class n{#e=y(Pe);#t=y(Ee);#n=y(Ot);#i=y(Qe);#a=y(Cn);#r=y(mn);#o=y(Le);injector=y(en);targetUrl=ke.required();useBackupState=X(!1);#l=null;destinationType=M(()=>{let t=this.targetUrl();if(!t)return null;let e=Ge(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=M(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=M(()=>!this.useBackupState());restoreBackupIdOptions=$e(pn(this.targetUrl).pipe(qt(t=>{if(!t)return{authKey:null,url:null,isRestore:this.isRestoreFlow(),hasKey:this.hasStorageApiKey()};let e=t.indexOf("?"),i=e>=0?t.substring(e+1):"",o=new URLSearchParams(i),a=o.get("duplicati-auth-apiid")??"",c=o.get("duplicati-auth-apikey")??"";return{authKey:`${a}|${c}`,url:t}}),Yt((t,e)=>t.authKey===e.authKey),Zt(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),Qt(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#r.getDuplicatiStorageBackups(t).pipe(Be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):jt([]))),{initialValue:[]});isConnectedToConsole=M(()=>this.#a.state()==="connected");hasStorageApiKey=M(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=M(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=M(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=oe(()=>{let t=this.targetUrl(),e=Ge(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find(L=>L.Key===i)??{Key:i,DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!i)return;let c=e&&e.oauthField?e.oauthField:null,d=e&&e.customFields?e.customFields:{},p=e&&e.dynamicFields?e.dynamicFields:[],E=e&&e.advancedFields?e.advancedFields:[],x=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],v={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};d&&Object.entries(d).forEach(([L,N],V)=>{let B=N.order??V,R=N.validate;!R&&N.type==="Bucketname"&&(R=W=>En(W)?null:{type:"error",message:$localize`Invalid bucket name.`}),R&&N.type==="Hostname"&&(R=W=>fn(W)?null:{type:"error",message:$localize`Invalid hostname.`}),v.custom.push(j({order:900+B,validate:R},N))});for(let L=0;L<a.Options.length;L++){let N=a.Options[L];if(N.Deprecated)continue;let V=p.find(B=>B===N.Name||N.Aliases?.includes(B.name)||B.name===N.Name);if(V){let B=N.Aliases?.indexOf(V.name)??-1,R=N.Aliases&&B>-1?N.Aliases[B]:N.Name,W=V&&typeof V!="string",ue=W?V?.defaultValue??N.DefaultValue:N.DefaultValue,pe=W&&V?.order!==void 0?V.order:L,w={name:R,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+pe},he=W?j(j({},w),V):w;v.dynamic.push(he)}else{let B=N.Name;if(x.find(Fe=>Fe===B))continue;let W=E.find(Fe=>Fe===B||Fe.name===B),ue=W&&typeof W!="string",pe=ue&&W?.order!==void 0?W.order:L,w={name:B,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+pe},he=ue?j(j({},w),W):w;v.advanced.push(he)}}if(v.custom.sort((L,N)=>L.order-N.order),v.dynamic.sort((L,N)=>L.order-N.order),v.advanced.sort((L,N)=>L.order-N.order),this.destinationFormConfig.set(v),!t)return;let $=Mt(t);$&&this.destinationForm.set({custom:$.custom,dynamic:$.dynamic,advanced:$.advanced})});destinationFormEffect=oe(()=>{let t=this.#l,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=Tn({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});o&&this.targetUrl.set(o)});getFieldValue(t,e){let o=this.destinationForm()[t][e];return o||null}getFormView(t,e){let o=this.destinationFormConfig()?.[t].find(a=>a.name===e);return o||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(j({},e))}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,i,o){if(i==="Hostname"||i==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(o.key))return;if(o.key=="/"||o.key=="\\"||o.key==":"){o.preventDefault();return}}}updateFieldValue(t,e,i){let o=this.destinationForm();o[t][e]=i,this.destinationForm.set(j({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(j({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let i=t.options;return i?i.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let i=this.mapOptions(t);return i?(e&&e.length>0&&(i.find(a=>a.value===e)||i.push({key:e,value:e})),i):null}#_=F(!1);oauthStartTokenCreation(t,e,i,o){this.#_.set(!0);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),c=this.#n.serverSettings()?.["--oauth-url"];if(c&&c.length>0&&(a=c),this.useBackupState()){let N=this.#e.mapFormsToSettings().find(V=>V.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let d=this.destinationForm().advanced["oauth-url"];d&&d.length>0&&(a=d);let p=`${a}?type=${t}`,E=450,x=600,v=screen.width/2-E/2,$=screen.height/2-x/2,L=window.open(p,"_blank","height="+x+",width="+E+",menubar=0,status=0,titlebar=0,toolbar=0,left="+v+",top="+$);return window.addEventListener("message",N=>{let V=N.data.startsWith("authid:"),B=V?N.data.replace("authid:",""):null;V&&(this.destinationForm.update(R=>(R[e][i]=B,R)),this.#_.set(!1),this.refreshView.set(!this.refreshView()),L?.close())}),!1}settingsAsText=M(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,i])=>{let o=e??"",a="";return typeof i=="boolean"?a=this.isTrue(i)?"True":"False":(typeof i=="number"||i!=null)&&(a=i.toString()),`${o}=${a}`}).join(`
|
|
2
|
+
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Sn(t);this.destinationForm.update(i=>Ce(j({},i),{advanced:e}))}getIsDisabled(t){return document.getElementById(t)?.disabled??!0}toggleDisabled(t){let e=document.getElementById(t);e&&(e.disabled=!e.disabled)}openConsole(){this.#a.openConsole()}#s(t){var e=this.useBackupState()?this.#e.backupId():null;this.isAuthenticatingFilen.set(!0),this.#r.getFilenApiKey(t,e).pipe(Be(()=>this.isAuthenticatingFilen.set(!1))).subscribe({next:i=>{if(i.length===0){this.#o.open(Z,{data:{title:$localize`Authentication failed`,message:$localize`No API key was returned from the Filen server.`,confirmText:$localize`OK`}});return}this.destinationForm.update(o=>(o.advanced["api-key"]=i,o.dynamic["two-factor-code"]=null,o)),this.refreshView.set(!this.refreshView())},error:i=>{console.error("Error authenticating Filen",i),this.#o.open(Z,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${i.message}`,confirmText:$localize`OK`}})}})}authenticateFilen(){let t=this.targetUrl();if(!t)return;let i=this.destinationForm().advanced["api-key"];if(i&&i.length>0){this.#o.open(Z,{data:{title:$localize`Confirm re-authenticate?`,message:$localize`You already have an API key. Are you sure you want to re-authenticate?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:o=>{if(o){var a=new URL(t);a.searchParams.delete("api-key"),this.#s(a.toString())}}});return}this.#s(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let c;c=$localize`This field is mandatory`;let d;d=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let p;p=$localize`This field is mandatory`;let E;E=$localize`This field is mandatory`;let x;x=$localize`This field is mandatory`;let v;v=$localize`This field is mandatory`;let $;$=$localize`This field is mandatory`;let L;L=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let V;V=$localize`This field is mandatory`;let B;B=$localize`Loading available backups...`;let R;R=$localize`No backups found from this machine, contact support`;let W;W=$localize`This field is mandatory`;let ue;ue=$localize`Pick the backup to restore from`;let pe;pe=$localize`This field is mandatory`;let w;w=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let he;he=$localize`${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:An API key with storage access is required to use Duplicati storage.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:${"[\uFFFD#2\uFFFD|\uFFFD#3\uFFFD]"}:START_TAG_DIV:Visit the console and assign an API key to this machine.${"[\uFFFD/#2\uFFFD|\uFFFD/#3\uFFFD]"}:CLOSE_TAG_DIV:`,he=ve(he);let Fe;Fe=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ze;Ze=$localize`Connect to the console to use Duplicati storage.`;let et;et=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let tt;tt=$localize`This field is mandatory`;let U;return U=$localize` Authenticate now ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,i,B,R,ue,w,he,Fe,Ze,et,U,[1,"advanced-options",3,"disallowToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",o],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",c],["shTooltip",d,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",p],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",E],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",x],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",v],["shTooltip",$],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",L],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",N],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",V],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",W],["shTooltip",pe],["autocomplete","off",3,"ngModelChange","type","id","ngModel","placeholder","disabled"],["shButton","","type","button",1,"outlined",3,"click"],[1,"info"],["shButton","","type","button",1,"outlined",3,"routerLink"],[1,"filen-2fa-setup"],["shTooltip",tt],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["shButton","","type","button",1,"outlined",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,i){if(e&1&&(ce(0)(1),m(2,Ho,18,5)),e&2){let o=Y(i.destinationType());_();let a=Y(i.destinationFormConfig());_(),g(o&&a?2:-1)}},dependencies:[He,re,gt,se,Te,ge,an,ln,Lt,Rt,Nn,Ut,Se,ie,Q,At,Ft,we,It,je,Nt,Dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}.filen-2fa-setup[_ngcontent-%COMP%], .duplicati-backup-id[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:flex-end}.duplicati-backup-id[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{width:100%}.duplicati-backup-id-console[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center}.duplicati-backup-id-console[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:4px}"],changeDetection:0})};var kt=class n{#e=y(Pt);#t=y(Le);#n=y(Ee);testDestination(t,e,i,o,a,c){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a,c):this.testDestinationv1(t,e,i,o,a,c)}testDestinationv2(t,e,i,o,a,c){return new st(d=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:c==="create",Options:null,DestinationType:o}}).subscribe({next:p=>{if(p.Success){this.emitSuccessV2(d,t,i,p);return}this.handleGenericError(d,t,i,p.Error??"Unknown error",a)},error:p=>{let E=p?.error?.body??p?.error?.requestBody;if(E?.Data?.FolderExists===!1||E?.StatusCode==="missing-folder"){this.handleMissingFolder(d,t,e,i,a,c);return}if(E?.Data?.HostCertificate){this.handleMissingCertificate(d,t,i,E.Data?.HostCertificate,a);return}if(E?.Data?.ReportedHostKey){this.handleIncorrectKey(d,t,i,E.Data.ReportedHostKey,E.Data.AcceptedHostKey??null,a);return}this.handleGenericError(d,t,i,p?.message??"Unknown error",a)}})})}testDestinationv1(t,e,i,o,a,c){return new st(d=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e},type:o}).subscribe({next:p=>{d.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:i}),d.complete()},error:p=>{this.handleDestinationErrorv1(p.message,t,e,i,a,c).subscribe(E=>{d.next(E)})}})})}handleMissingFolder(t,e,i,o,a,c){function d(){t.next({action:"missing-folder",targetUrl:e,testAgain:!1,destinationIndex:o,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete()}if(a||c==="error"){d();return}this.#t.open(Z,{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:p=>{if(!p){this.reportNoAction(t,e,o,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null,BackupId:i=="new"?null:i}}).subscribe({next:E=>{if(E.Success){this.emitSuccessV2(t,e,o,E);return}else this.handleFolderCreateFailure(t,e,o,E.Error??$localize`Unknown error`)},error:E=>{this.handleFolderCreateFailure(t,e,o,E.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:i=="new"?null:i}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:E=>{this.handleFolderCreateFailure(t,e,o,E.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#t.open(Z,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),t.complete()}})}emitSuccessV2(t,e,i,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:i,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,i){this.#t.open(Z,{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:i}),t.complete()}})}reportNoAction(t,e,i,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:i}),t.complete()}handleMissingCertificate(t,e,i,o,a){let c=$localize`The server is using a certificate that is not trusted.
|
|
3
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
4
|
+
The server reported the certificate hash: ${o}`,d=e.includes("?");function p(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${d?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:!0,certData:o,errorMessage:c,destinationIndex:i}),t.complete()}if(a){p();return}this.#t.open(Z,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:c,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:E=>{if(!E){this.reportNoAction(t,e,i,$localize`The server certificate is not trusted.`);return}p()}})}handleIncorrectKey(t,e,i,o,a,c){if(a){let x=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:E,testAgain:!0,reportedHostKey:o,errorMessage:p,destinationIndex:i}),t.complete()};var d=x;let p=$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
5
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
6
|
+
Do you want to REPLACE your CURRENT host key ${a}
|
|
7
|
+
with the REPORTED host key: ${o}?`,E=e;try{let $=new URL(e);$.searchParams.set("ssh-fingerprint",o),E=$.toString()}catch{let $=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),L=$.includes("?");E=$+`${L?"&":"?"}ssh-fingerprint=${o}`}if(c){x();return}this.#t.open(Z,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:p,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:$=>{if(!$){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}x()}})}else{let x=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${E?"&":"?"}ssh-fingerprint=${o}`,testAgain:!0,reportedHostKey:o,errorMessage:p,destinationIndex:i}),t.complete()};var d=x;let p=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,E=e.includes("?");if(c){x();return}this.#t.open(Z,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:p,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:v=>{if(!v){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}x()}})}}handleGenericError(t,e,i,o,a){function c(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i,errorMessage:o}),t.complete()}if(a){c();return}this.#t.open(Z,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:d=>c()})}handleDestinationErrorv1(t,e,i,o,a,c){return new st(d=>{if(t==="missing-folder"){this.handleMissingFolder(d,e,i,o,a,c);return}if(t.startsWith("incorrect-cert:")){let p=t.split("incorrect-cert:")[1];this.handleMissingCertificate(d,e,o,p,a);return}if(t.startsWith("incorrect-host-key:")){let p=t.split('incorrect-host-key:"')[1].split('",')[0],E=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(d,e,o,p,E,a);return}this.handleGenericError(d,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};function jo(n,t){if(n&1){let e=D();l(0,"sh-alert",13),P(1,0),l(2,"button",14),h("click",function(){T(e);let o=s(2);return S(o.testDestinationClick())}),r(),O(),r()}}function qo(n,t){n&1&&(l(0,"sh-alert",13),P(1,1),A(2,"sh-icon"),l(3,"div",15),A(4,"sh-spinner"),r(),O(),r()),n&2&&(_(4),ct("--spinner-size","16px")("--spinner-thickness","2px"))}function Yo(n,t){n&1&&(l(0,"sh-alert",17),I(1,2),r())}function Qo(n,t){n&1&&(l(0,"sh-alert",16),I(1,3),r())}function Zo(n,t){if(n&1&&m(0,Yo,2,0,"sh-alert",17)(1,Qo,2,0,"sh-alert",16),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.containsBackup?0:1)}}function ea(n,t){n&1&&(l(0,"sh-alert",18),I(1,4),r())}function ta(n,t){n&1&&(l(0,"sh-alert",16),I(1,5),r())}function na(n,t){n&1&&(l(0,"sh-alert",17),I(1,6),r())}function ia(n,t){if(n&1&&m(0,ea,2,0,"sh-alert",18)(1,ta,2,0,"sh-alert",16)(2,na,2,0,"sh-alert",17),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.containsBackup?0:(e=i.testResponse())!=null&&e.anyFilesFound?1:2)}}function oa(n,t){n&1&&(l(0,"sh-alert",17),I(1,7),r())}function aa(n,t){n&1&&(l(0,"sh-alert",16),I(1,8),r())}function la(n,t){if(n&1&&m(0,oa,2,0,"sh-alert",17)(1,aa,2,0,"sh-alert",16),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.anyFilesFound?0:1)}}function ra(n,t){n&1&&(l(0,"sh-alert",17),I(1,9),r())}function sa(n,t){n&1&&(l(0,"sh-alert",17),I(1,10),r())}function _a(n,t){n&1&&(l(0,"sh-alert",17),I(1,11),r())}function ca(n,t){if(n&1&&m(0,ra,2,0,"sh-alert",17)(1,sa,2,0,"sh-alert",17)(2,_a,2,0,"sh-alert",17),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.containsBackup?0:(e=i.testResponse())!=null&&e.anyFilesFound?1:2)}}function da(n,t){if(n&1&&m(0,Zo,2,1)(1,ia,3,1)(2,la,2,1)(3,ca,3,1),n&2){let e=s(3);g(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3)}}function ua(n,t){if(n&1){let e=D();P(0,12,1),l(1,"button",14),h("click",function(){T(e);let o=s(4);return S(o.createFolder())}),r(),O()}}function pa(n,t){if(n&1&&(l(0,"sh-alert",16),P(1,12),m(2,ua,2,0,"button",19),O(),r()),n&2){let e=s(3);_(2),g(e.askToCreate()?2:-1)}}function Ca(n,t){if(n&1){let e=D();l(0,"sh-alert",16),C(1),l(2,"button",14),h("click",function(){T(e);let o=s(3);return S(o.useSuggestedUrl())}),C(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),z(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function ma(n,t){if(n&1){let e=D();l(0,"sh-alert",16),C(1),l(2,"button",14),h("click",function(){T(e);let o=s(3);return S(o.useSuggestedUrl())}),C(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),z(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function ga(n,t){if(n&1){let e=D();l(0,"sh-alert",16),C(1),l(2,"button",14),h("click",function(){T(e);let o=s(3);return S(o.testDestinationClick())}),C(3,"Test again"),r()()}if(n&2){let e,i=s(3);_(),z(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function Ta(n,t){if(n&1&&m(0,da,4,1)(1,pa,3,1,"sh-alert",16)(2,Ca,4,1,"sh-alert",16)(3,ma,4,1,"sh-alert",16)(4,ga,4,1,"sh-alert",16),n&2){let e,i=s(2);g(((e=i.testResponse())==null?null:e.action)==="success"?0:((e=i.testResponse())==null?null:e.action)==="missing-folder"?1:((e=i.testResponse())==null?null:e.action)==="trust-cert"?2:((e=i.testResponse())==null?null:e.action)==="approve-host-key"?3:((e=i.testResponse())==null?null:e.action)==="generic-error"?4:-1)}}function Sa(n,t){if(n&1&&m(0,jo,3,0,"sh-alert",13)(1,qo,5,4,"sh-alert",13)(2,Ta,5,1),n&2){let e=s();g(e.testSignal()===null?0:e.testSignal()==="testing"?1:2)}}var Vt=class n{#e=y(kt);targetUrl=ke.required();testSignal=ke.required();suppressErrorDialogs=X.required();askToCreate=X.required();testExpectation=X.required();moduleType=X.required();testResponse=M(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=M(()=>{let t=this.targetUrl();return!(!t||!Mt(t))});prevTargetUrl=null;targetUrlEffect=oe(()=>{let t=this.targetUrl(),e=this.prevTargetUrl;t!==e&&(this.prevTargetUrl=t,this.testSignal()!=="testing"&&e!==null&&this.testSignal.set(null))});useSuggestedUrl(){let t=this.targetUrl(),e=this.testSignal(),i=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return!t||!o||i!==t||(this.targetUrl.set(o),this.testDestinationClick()),!1}createFolder(){return this.testDestination(!0),!1}testDestinationClick(){return this.testDestination(!1),!1}testDestination(t){let e=this.targetUrl();if(!e)return;this.testSignal.set("testing");let i=t?"create":this.askToCreate()?"prompt":"error";return new Promise(o=>{this.#e.testDestination(e,null,0,this.moduleType(),this.suppressErrorDialogs(),i)?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let c=a.suggestedUrl;c&&this.targetUrl.set(c),this.testSignal.set("testing"),this.#e.testDestination(c??e,null,0,this.moduleType(),this.suppressErrorDialogs(),i)?.subscribe({next:d=>{this.testSignal.set(d),o(d)}})}else this.testSignal.set(a),o(a)}})})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-test-url"]],inputs:{targetUrl:[1,"targetUrl"],testSignal:[1,"testSignal"],suppressErrorDialogs:[1,"suppressErrorDialogs"],askToCreate:[1,"askToCreate"],testExpectation:[1,"testExpectation"],moduleType:[1,"moduleType"]},outputs:{targetUrl:"targetUrlChange",testSignal:"testSignalChange"},decls:1,vars:1,consts:()=>{let t;t=$localize` Make sure to test the configuration ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON:Test now${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV: Testing connection... ${"\uFFFD#4\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Success! Test completed, backup found.`;let o;o=$localize`No backup found at the specified destination.`;let a;a=$localize` The remote destination already contains a backup. Please use a different folder for each backup. `;let c;c=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let d;d=$localize`Success! Test completed, destination is empty.`;let p;p=$localize`Success! Test completed, destination contains files.`;let E;E=$localize`The remote destination is empty.`;let x;x=$localize`Success! Test completed, backup found.`;let v;v=$localize` Success! Test completed, destination contains non-backup files. `;let $;$=$localize`Success! Test completed, destination is empty.`;let L;return L=$localize` The specified folder does not exist. ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:Create now${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_BUTTON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:`,[t,e,i,o,a,c,d,p,E,x,v,$,L,[1,"simple","primary"],["shButton","",1,"primary","small",3,"click"],[1,"testing"],[1,"simple","warn"],[1,"simple","success"],[1,"simple","error"],["shButton","",1,"primary","small"]]},template:function(e,i){e&1&&m(0,Sa,3,1),e&2&&g(i.isExpectedValidTargetUrl()?0:-1)},dependencies:[ft,ie,Q,Dt],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"],changeDetection:0})};function Ea(n,t){if(n&1){let e=D();l(0,"app-destination-list",10),h("setDestination",function(o){T(e);let a=s();return S(a.setDestination(o))}),r()}if(n&2){let e=s();u("showAsSources",!0)("moduleType",e.moduleType())}}function fa(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",11)(1,"button",8),h("click",function(){T(e);let o=s();return S(o.removeDestination())}),I(2,3),r()(),l(3,"app-test-url",12),k("targetUrlChange",function(o){T(e);let a=s();return G(a.targetUrlModel,o)||(a.targetUrlModel=o),S(o)})("testSignalChange",function(o){T(e);let a=s();return G(a.testSignal,o)||(a.testSignal=o),S(o)}),r(),l(4,"app-single-destination",13),k("targetUrlChange",function(o){T(e);let a=s();return G(a.targetUrlModel,o)||(a.targetUrlModel=o),S(o)}),r()}if(n&2){let e=s();u("targetUrl",e.targetUrlModel()),_(3),b("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),u("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("moduleType",e.moduleType()),_(),b("targetUrl",e.targetUrlModel)}}function ha(n,t){n&1&&I(0,2,1)}function Fa(n,t){n&1&&I(0,2,2)}function Na(n,t){n&1&&I(0,2,3)}function Da(n,t){n&1&&I(0,2,4)}var lt=class n{data=X();closed=be();targetUrlModel=F(null);moduleType=F("Backend");askToCreate=F(!1);expectedResult=F("any");suppressErrorDialogs=F(!1);dataEffect=oe(()=>{let t=this.data();t?.targetUrlModel&&this.targetUrlModel.set(t.targetUrlModel),t?.moduleType&&this.moduleType.set(t.moduleType),t?.askToCreate!==null&&t?.askToCreate!==void 0&&this.askToCreate.set(t.askToCreate),t?.expectedResult&&this.expectedResult.set(t.expectedResult),t?.suppressErrorDialogs!==null&&t?.suppressErrorDialogs!==void 0&&this.suppressErrorDialogs.set(t.suppressErrorDialogs)});testSignal=F(null);setTargetUrl(t,e=!1){this.targetUrlModel.set(t)}setDestination(t){let e=yt(t??"");if(e){if(e.mapper.default){let i=e.mapper.default("");this.setTargetUrl(i,!0);return}this.setTargetUrl(`${t}://`,!0)}}submit(){this.closed.emit(this.targetUrlModel())}removeDestination(){this.setTargetUrl(null,!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-target-url-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:15,vars:6,consts:()=>{let t;t=$localize`Remote source`;let e;e=$localize`Cancel`;let i;i=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Use storage destination ${"\uFFFD/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_ELSE_IF: Use remote source ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Use remote destination ${"[\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_ELSE: Use remote URL ${"\uFFFD/*14:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,i=ve(i);let o;return o=$localize`Change`,[t,e,i,o,[1,"title-30"],["content",""],[3,"showAsSources","moduleType"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"],[3,"setDestination","showAsSources","moduleType"],[1,"current-destination",3,"targetUrl"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,i){if(e&1){let o=D();l(0,"header")(1,"h3",4),I(2,0),r()(),l(3,"section",5),m(4,Ea,1,2,"app-destination-list",6),m(5,fa,5,8),r(),l(6,"footer",7)(7,"button",8),h("click",function(){return T(o),S(i.closed.emit(null))}),I(8,1),r(),l(9,"button",9),h("click",function(){return T(o),S(i.submit())}),P(10,2),m(11,ha,1,0)(12,Fa,1,0)(13,Na,1,0)(14,Da,1,0),O(),r()()}if(e&2){let o=!!i.targetUrlModel();_(4),g(o?-1:4),_(),g(o?5:-1),_(4),me("loading",i.testSignal()==="testing"),u("disabled",!o||i.testSignal()===null||i.testSignal()==="testing"),_(2),g(i.moduleType()==="Backend"?11:i.moduleType()==="SourceProvider"?12:i.moduleType()==="RestoreDestinationProvider"?13:14)}},dependencies:[bt,vt,Ye,ie,Vt],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1.5rem 0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}footer[_ngcontent-%COMP%]{z-index:1}"],changeDetection:0})};var Aa=["formRef"],An=()=>({updateOn:"blur",standalone:!0}),Wt=()=>({standalone:!0});function Ia(n,t){if(n&1){let e=D();l(0,"button",28),h("click",function(){T(e);let o=s();return S(o.openRemoteDestinationDialog())}),P(1,15),A(2,"sh-icon"),O(),r()}}function Pa(n,t){n&1&&I(0,6,1)}function Oa(n,t){n&1&&I(0,6,2)}function ya(n,t){n&1&&(l(0,"p",37),I(1,16),r())}function Ma(n,t){n&1&&(l(0,"p",37),I(1,17),r())}function xa(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"textarea",48),k("ngModelChange",function(o){T(e);let a=s();return G(a.bulkPaths,o)||(a.bulkPaths=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.savePathBulkEdit())}),r()()}if(n&2){let e=s();_(),b("ngModel",e.bulkPaths),u("ngModelOptions",ye(2,An))}}function Ra(n,t){if(n&1){let e=D();l(0,"sh-form-field",52)(1,"input",53),k("ngModelChange",function(o){T(e);let a=s(3);return G(a.editingPath,o)||(a.editingPath=o),S(o)}),r()(),l(2,"button",36),h("click",function(){T(e);let o=s(3);return S(o.updatePath())}),l(3,"sh-icon"),C(4,"floppy-disk"),r()(),l(5,"button",36),h("click",function(){T(e);let o=s(3);return S(o.cancelEditPath())}),l(6,"sh-icon"),C(7,"x-bold"),r()()}if(n&2){let e=s(3);_(),b("ngModel",e.editingPath),u("ngModelOptions",ye(2,Wt))}}function La(n,t){if(n&1&&(l(0,"sh-chip"),A(1,"img",54),C(2),r()),n&2){let e=s(2).$implicit,i=s(2);_(),u("src",i.getBackendIcon(e),_t),_(),z(" ",i.getRemotePathDisplayName(e)," ")}}function wa(n,t){if(n&1&&(l(0,"sh-form-field",52),A(1,"input",55),r()),n&2){let e=s(2).$implicit;nn("readonly",!0),_(),u("ngModel",e)("ngModelOptions",ye(3,Wt))}}function $a(n,t){if(n&1){let e=D();m(0,La,3,2,"sh-chip")(1,wa,2,4,"sh-form-field",52),l(2,"button",36),h("click",function(){T(e);let o=s().$implicit,a=s(2);return S(a.editPath(o))}),l(3,"sh-icon"),C(4,"pen"),r()(),l(5,"button",36),h("click",function(){T(e);let o=s().$implicit,a=s(2);return S(a.removePath(o))}),l(6,"sh-icon"),C(7,"trash-simple"),r()()}if(n&2){let e=s().$implicit;g(e.startsWith("@")?0:1)}}function Ga(n,t){if(n&1&&(l(0,"div",49),m(1,Ra,8,3)(2,$a,8,1),r()),n&2){let e=t.$implicit,i=s(2);_(),g(i.oldPath()===e?1:2)}}function va(n,t){if(n&1){let e=D();De(0,Ga,3,1,"div",49,Ne),l(2,"div",47)(3,"sh-form-field"),A(4,"input",50),r(),l(5,"button",51),h("click",function(){T(e);let o=s();return S(o.addNewPath())}),l(6,"sh-icon"),C(7,"plus"),r()()()}if(n&2){let e=s();Ae(e.nonFilterPaths()),_(4),u("formControl",e.newPathCtrl)}}function Ua(n,t){if(n&1){let e=D();l(0,"button",56),h("click",function(){T(e);let o=s();return S(o.addFilter())}),P(1,18),A(2,"sh-icon"),O(),r()}}function ba(n,t){n&1&&I(0,8,1)}function ka(n,t){n&1&&I(0,8,2)}function Va(n,t){n&1&&(l(0,"p",37),I(1,19),r())}function Ba(n,t){n&1&&(l(0,"p",37),I(1,20),r())}function Ka(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"textarea",48),k("ngModelChange",function(o){T(e);let a=s();return G(a.bulkFilters,o)||(a.bulkFilters=o),S(o)}),h("ngModelChange",function(){T(e);let o=s();return S(o.saveBulkFilterEdit())}),r()()}if(n&2){let e=s();_(),b("ngModel",e.bulkFilters),u("ngModelOptions",ye(2,An))}}function za(n,t){if(n&1){let e=D();l(0,"app-new-filter",58),h("pathChange",function(o){let a=T(e).$index,c=s(3);return S(c.patchPathAt(o,a))})("remove",function(){let o=T(e).$index,a=s(3);return S(a.removePathAt(o))}),r()}if(n&2){let e=t.$implicit,i=s(3);u("path",e)("osType",i.osType()??"")}}function Ja(n,t){if(n&1&&De(0,za,1,2,"app-new-filter",57,Ne),n&2){let e=s(2);Ae(e.pathArray())}}function Xa(n,t){if(n&1&&(l(0,"div",40),m(1,Ja,2,0),r()),n&2){let e,i=s();_(),g((e=i.pathSignal())!=null&&e.length?1:-1)}}function Wa(n,t){if(n&1){let e=D();l(0,"div",47)(1,"app-size",59),h("ngModelChange",function(o){T(e);let a=s();return S(a.updateFilesLargerThan(o))}),r()()}if(n&2){let e=s();_(),u("ngModel",e.filesLargerThan())("ngModelOptions",ye(2,Wt))}}var Me=new Et,In=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Me.group({path:Me.control(n.path),excludes:Me.group({hidden:Me.control(n.excludes.hidden),system:Me.control(n.excludes.system),temporary:Me.control(n.excludes.temporary),filesLargerThan:Me.group({size:Me.control(null),unit:Me.control(null)})})}),Xt=class n{#e=y(Pe);#t=y(Le);#n=y(Re);#i=y(We);#a=y(Ee);formRef=Xe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new sn("");filesLargerThan=M(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=$e(this.sourceDataForm.controls.path.valueChanges);pathArray=M(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=M(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=F(null);editingPath=F(null);addingNewPath=F(!1);bulkPathEditMode=F(!1);bulkPaths=F("");bulkFilterEditMode=F(!1);bulkFilters=F("");openRemoteDestinationDialog(){this.#t.open(lt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0}}).closed.subscribe(e=>{if(!e)return;let i=Math.random().toString(36).substring(2,10),o=e.split("://")[0],c=`@${this.#a.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${i}|${e}`;this.addPath(c)})}togglePathBulkEdit(){if(this.bulkPathEditMode())this.bulkPathEditMode.set(!1);else{let t=this.nonFilterPaths()?.join(`
|
|
8
|
+
`)??"";this.bulkPaths.set(t),this.bulkPathEditMode.set(!0)}}savePathBulkEdit(){let t=this.bulkPaths().split(`
|
|
9
|
+
`).filter(a=>a.trim()!=="")??[],e=this.pathArray(),i=[...t,...e],o=[...new Set(i)].join("\0");this.sourceDataForm.controls.path.setValue(o)}toggleBulkFilterEdit(){if(this.bulkFilterEditMode())this.bulkFilterEditMode.set(!1);else{let t=this.pathArray().filter(e=>e!=="___none___"&&(e.startsWith("-")||e.startsWith("+"))).join(`
|
|
10
|
+
`);this.bulkFilters.set(t),this.bulkFilterEditMode.set(!0)}}saveBulkFilterEdit(){let t=this.bulkFilters().split(`
|
|
11
|
+
`).filter(a=>a.trim()!==""&&(a.startsWith("-")||a.startsWith("+")))??[],i=[...this.nonFilterPaths()??[],...t],o=[...new Set(i)].join("\0");this.sourceDataForm.controls.path.setValue(o)}editPath(t){if(t&&t.startsWith("@")){this.#t.open(lt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:t.split("|")[1]||null,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0}}).closed.subscribe(i=>{if(!i)return;let a=`${t.split("|")[0]}|${i}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,a)??"")});return}this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:i}=xt(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:i})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(i?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let i=(this.sourceDataForm.controls.path.value??"").split("\0"),o=i.indexOf(t);if(o===-1)return;i.splice(o,1);let a=i.filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}addPath(t){let i=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i)}addFilter(t="-*"){let i=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i)}patchPathAt(t,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),a=this.pathArray().map((d,p)=>p===e?`${t}`:`${d}`).join("\0"),c=[o,a].filter(d=>d&&d!=="").join("\0");this.sourceDataForm.controls.path.setValue(c)}removePathAt(t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),o=this.pathArray().filter((c,d)=>d!==t).join("\0"),a=[i,o].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(a)}getPath(){return this.sourceDataForm.value.path??null}getBackendIcon(t){if(!t)return"";let e=t.split("|")[1];return Ge(e).icon??"database"}getRemotePathDisplayName(t){if(!t)return"";let e=t.split("|")[1],i=Ge(e);return i?i.displayName:"Unknown"}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,i=t?.split("\0")||[];e&&!i.includes(e)&&i.push(e);let o=i.filter(a=>a&&a!=="").join("\0");this.sourceDataForm.controls.path.setValue(o),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-source-data"]],viewQuery:function(e,i){e&1&&ze(i.formRef,Aa,5),e&2&&Je()},decls:75,vars:18,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let a;a=$localize`Source Data`;let c;c=$localize`Folder path`;let d;d=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let p;p=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let E;E=$localize`Paths`;let x;x=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*31:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*31:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*32:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*32:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let v;v=$localize`Filters`;let $;$=$localize`${"\uFFFD#51\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#51\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*52:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*52:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*53:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*53:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let L;L=$localize`Exclude`;let N;N=$localize`Choose if there’s any files you want to exclude.`;let V;V=$localize` Files with the Hidden attribute ${"\uFFFD#65\uFFFD\uFFFD/#65\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Files with the System attribute ${"\uFFFD#68\uFFFD\uFFFD/#68\uFFFD"}:TAG_INPUT:`;let R;R=$localize` Files with the Temporary attribute ${"\uFFFD#71\uFFFD\uFFFD/#71\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Files larger than `;let ue;ue=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let pe;pe=$localize`Manually add a path.`;let w;w=$localize`Edit paths as text, one per line.`;let he;he=$localize`Add a direct path`;let Fe;Fe=$localize`Edit path`;let Ze;Ze=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let et;et=$localize`Customize your filters.`;let tt;return tt=$localize`Edit filters as text, one per line.`,[["formRef",""],a,c,d,p,E,x,v,$,L,N,V,B,R,W,ue,pe,w,Ze,et,tt,[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"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],[1,"spacer"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"],["description",""],[1,"paths"],["type","button","shButton",""],[1,"filters"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",e,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"row-inputs"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[1,"path"],["type","text","placeholder",he,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",Fe,3,"ngModelChange","ngModel","ngModelOptions"],["alt","",1,"provider-icon",3,"src"],["type","text",3,"ngModel","ngModelOptions"],["type","button","shButton","",3,"click"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,i){if(e&1){let o=D();l(0,"form",21,0),h("submit",function(){return T(o),S(i.next())}),l(2,"div",22)(3,"h3",23),I(4,1),r(),l(5,"app-file-tree",24)(6,"label",25),I(7,2),r(),A(8,"input",26),r(),l(9,"div",27)(10,"button",28),h("click",function(){return T(o),S(i.goBack())}),P(11,3),A(12,"sh-icon"),O(),r(),l(13,"button",29),P(14,4),A(15,"sh-icon"),O(),r()()(),l(16,"div",30)(17,"app-toggle-card",31),ae(18,32),l(19,"span"),I(20,5),r(),A(21,"div",33),m(22,Ia,3,0,"button",34),l(23,"sh-menu")(24,"button",34)(25,"sh-icon"),C(26,"dots-three-vertical"),r()(),ae(27,35),l(28,"button",36),h("click",function(){return T(o),S(i.togglePathBulkEdit())}),P(29,6),A(30,"sh-icon"),m(31,Pa,1,0)(32,Oa,1,0),O(),r(),ee(),r(),ee(),m(33,ya,2,0,"p",37)(34,Ma,2,0,"p",37),l(35,"div",38),m(36,xa,2,3,"sh-form-field")(37,va,8,1),r()(),l(38,"app-toggle-card",31),ae(39,32),l(40,"span"),I(41,7),r(),A(42,"div",33),m(43,Ua,3,0,"button",39),l(44,"sh-menu")(45,"button",34)(46,"sh-icon"),C(47,"dots-three-vertical"),r()(),ae(48,35),l(49,"button",36),h("click",function(){return T(o),S(i.toggleBulkFilterEdit())}),P(50,8),A(51,"sh-icon"),m(52,ba,1,0)(53,ka,1,0),O(),r(),ee(),r(),ee(),m(54,Va,2,0,"p",37)(55,Ba,2,0,"p",37),m(56,Ka,2,3,"sh-form-field")(57,Xa,2,1,"div",40),r(),l(58,"app-toggle-card",41),ae(59,32),I(60,9),ee(),l(61,"p",37),I(62,10),r(),l(63,"sh-toggle",42),P(64,11),A(65,"input",43),O(),r(),l(66,"sh-toggle",42),P(67,12),A(68,"input",44),O(),r(),l(69,"sh-toggle",42),P(70,13),A(71,"input",45),O(),r(),l(72,"sh-toggle",46),h("click",function(){return T(o),S(i.toggleFilesLargerThan())}),I(73,14),r(),m(74,Wa,2,3,"div",47),r()()()}e&2&&(u("formGroup",i.sourceDataForm),_(5),u("multiSelect",!0)("startingPath",i.getPath())("showFiles",!0),_(12),u("disallowToggle",!0),_(5),g(i.bulkPathEditMode()?-1:22),_(9),g(i.bulkPathEditMode()?31:32),_(2),g(i.bulkPathEditMode()?34:33),_(3),g(i.bulkPathEditMode()?36:37),_(2),u("disallowToggle",!0),_(5),g(i.bulkFilterEditMode()?-1:43),_(9),g(i.bulkFilterEditMode()?52:53),_(2),g(i.bulkFilterEditMode()?55:54),_(2),g(i.bulkFilterEditMode()?56:57),_(2),u("disallowToggle",!0),_(14),me("active",i.filesLargerThan()),_(2),g(i.filesLargerThan()?74:-1))},dependencies:[Te,mt,re,ut,se,Ct,ge,He,_n,St,Tt,cn,Se,Q,ie,je,Ft,Gt,Lt,at,Rt,ht],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}sh-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;grid-template-columns:1fr min-content min-content;gap:.25rem;align-items:center}.path[_ngcontent-%COMP%] sh-chip[_ngcontent-%COMP%]{width:100%}.path[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-right:.5rem}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}sh-menu[_ngcontent-%COMP%]{margin-left:.25rem}.paths[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto}"],changeDetection:0})};var Pn="1W:1D,4W:1W,12M:1M",Pe=class n{#e=y(Re);#t=y(Ee);#n=y(Le);#i=y(Pt);#a=y(Ot);#r=y(wt);generalForm=On();sourceDataForm=In();scheduleFields=Jt();scheduleType=F("daily");settings=F([]);optionsFields={remoteVolumeSize:F("50MB"),backupRetention:F("all"),backupRetentionTime:F(""),backupRetentionVersions:F(0),backupRetentionCustom:F("")};targetUrlModel=F(null);targetUrlTestSignal=F(null);backupMetadata=F(null);isDraft=F(!1);backupId=F(null);backupName=M(()=>this.generalFormSignal()?.name??"");isSubmitting=F(!1);finishedLoading=F(!1);backupDefaults=F(null);applicationOptions=F(null);isNew=M(()=>this.backupId()==="new");shouldAutoSave=M(()=>!this.isDraft()&&!this.isNew());osType=M(()=>this.#t.systemInfo()?.OSType);selectedOptions=F([]);sourceDataFormSignal=$e(this.sourceDataForm.valueChanges);generalFormSignal=$e(this.generalForm.valueChanges);encryptionFieldSignal=$e(this.generalForm.controls.encryption.valueChanges);advancedOptions=M(()=>this.#t.systemInfo()?.Options?.map(this.#s)??[]);#o=F(null);#l=null;testSignal=this.#o.asReadonly();#_=oe(()=>{let t=this.targetUrlModel(),e=this.#o(),i=this.#l;this.#l=t,!(e==="testing"||i===null||i===t)&&this.#o.set(null)});setTestState(t){this.#o.set(t)}#s(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=M(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[rt,...t]});nonSelectedOptions=M(()=>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.#c(),i=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),i==="new"||!i||this.isDraft()?this.#i.postApiV1Backups({requestBody:e}).pipe(Be(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#i.putApiV1BackupById({id:i,requestBody:e}).pipe(Be(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#c(),e=(t.Backup.Name??"").trim()!=="",o=(this.generalForm.controls.encryption.value!==""&&this.generalForm.controls.encryption.value!=="-")===!1||this.generalForm.controls.password.value===this.generalForm.controls.repeatPassword.value&&this.generalForm.controls.password.value!=="";if(!e||!o)return this.#n.open(Z,{data:{title:$localize`Validation Error`,message:this.isNew()?$localize`Please fix the errors indicated before creating the backup.`:$localize`Please fix the errors indicated before saving.`,confirmText:$localize`OK`}}),"general";if((this.targetUrlModel()??"").trim()==="")return this.#n.open(Z,{data:{title:$localize`Destination required`,message:this.isNew()?$localize`You must setup a destination before creating the backup.`:$localize`Please setup a destination before saving.`,confirmText:$localize`OK`}}),"destination";var c=(t.Backup.Sources??[]).filter(d=>d.trim()!=="").length>0;return!c||!this.sourceDataForm.valid?(this.#n.open(Z,{data:{title:$localize`Source data required`,message:this.isNew()?$localize`You must setup source data before creating the backup.`:$localize`Please add at least one source path before saving.`,confirmText:$localize`OK`}}),"source"):""}exit(t){if(!t){this.#d(),this.#e.navigate(["/"]);return}this.#n.open(Z,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#d(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",i=t.Filters?.map(d=>`${d.Include?"":"-"}${d.Expression}`)??[],o=t.Settings?.find(d=>d.Name==="--exclude-files-attributes")?.Value?.toLowerCase()?.split(",")??[],a=t.Settings?.find(d=>d.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,c={path:[...e,...i].join("\0"),excludes:{hidden:o.includes("hidden"),system:o.includes("system"),temporary:o.includes("temporary"),filesLargerThan:a===null?void 0:xt(a)}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",i=t.Description??"",o=t.Settings?.find(E=>E.Name==="encryption-module"),a=t.Settings?.find(E=>E.Name==="passphrase")?.Value??"",c=o?.Value&&o.Value.length?o.Value:"",d=t.Settings?.find(E=>E.Name==="compression-module")?.Value??"",p={name:t.Name??"",description:t.Description??""};e&&e!==""&&(p.name=e),i&&i!==""&&(p.description=i),c&&c!==""&&(p.encryption=c),a&&a!==""&&(p.password=a,p.repeatPassword=a),d&&d!==""&&(p.compression=d),this.generalForm.patchValue(p)}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(!1);return}let e=this.#r.fromString(t.Repeat)??null,i=this.#u(t.Time);this.scheduleFields.autoRun.set(!0),i.date&&this.scheduleFields.nextTime.date.set(i.date),this.scheduleFields.nextTime.time.set(i.time),this.scheduleFields.runAgain.repeatUnit.set(e?.unit??"D"),this.scheduleFields.runAgain.repeatValue.set(e?.value??1),this.scheduleFields.runAgain.allowedDays.mon.set(t.AllowedDays?.includes("mon")??!1),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??!1),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??!1),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??!1),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??!1),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??!1),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??!1);let o=ot(this.scheduleFields),a=$t.find(c=>JSON.stringify(c.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom")}mapOptionsToForms(t,e=!1){let i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],o=(t.Settings??[]).map(p=>p);if(e){let p=this.#a.serverSettings()??{};Object.keys(p).filter(E=>E.startsWith("--")).forEach(E=>{o.find(v=>v.Name===E)||o.push({Name:E,Value:p[E],Filter:null})})}let a=o.filter(p=>!i.includes(p.Name)),c=o.filter(p=>i.includes(p.Name));this.settings.set(a??[]),a?.forEach(p=>{if(p.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(p.Value??"")});var d="all";c?.forEach(p=>{if(p.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(p.Value??"50MB"),p.Name==="keep-time"&&(p.Value??"")!=="")return d="time",this.optionsFields.backupRetentionTime.set(p.Value??"");if(p.Name==="keep-versions"&&(p.Value??"")!=="")return d="versions",this.optionsFields.backupRetentionVersions.set(p.Value?parseInt(p.Value):null);if(p.Name==="retention-policy"&&(p.Value??"")!=="")if(p.Value===Pn)d="smart";else return d="custom",this.optionsFields.backupRetentionCustom.set(p.Value??"")}),this.optionsFields.backupRetention.set(d)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=ot(this.scheduleFields);return Dn(t)}#c(){let t=this.generalForm.value,e=this.getScheduleFormValue(),i=this.sourceDataForm.value,o=this.targetUrlModel(),a=i.path?.split("\0")??[],c=this.mapFormsToSettings(),d=Object.entries(i.excludes??{}).filter(([E,x])=>x&&E!=="filesLargerThan").map(([E])=>E),p=i.excludes?.filesLargerThan;return d.length&&c.push({Name:"--exclude-files-attributes",Value:d.join(",")}),p&&p.size!==null&&p.unit!==null&&c.push({Name:"--skip-files-larger-than",Value:`${p.size}${p.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:o??null,Sources:a.filter(E=>!(E.startsWith("-")||E.startsWith("+"))),Settings:c,Filters:a.filter(E=>E.startsWith("-")||E.startsWith("+")).map((E,x)=>({Order:x,Include:E.startsWith("+"),Expression:E.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,i=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],o=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==rt.Key&&(o=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let a=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(a=[]);let c=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":c.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":c.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":c.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":c.push({Name:"retention-policy",Value:Pn});break}let d=[...t,...i],p=this.settings().filter(E=>!d.includes(E.Name)).map(E=>{let x=E.Value;return typeof E.Value=="number"&&(x=E.Value.toString()),typeof E.Value=="boolean"&&(x=E.Value?"True":"False"),{Name:E.Name?.startsWith("--")?E.Name:`--${E.Name}`,Value:x}});return[...o,...a,...c,...p]}#u(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,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#d(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=Jt(),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ha=["formRef"];function ja(n,t){n&1&&(l(0,"sh-alert",17),P(1,5),A(2,"sh-icon",26),O(),r())}function qa(n,t){if(n&1&&C(0),n&2){let e=t.$implicit;z(" ",e.DisplayName," ")}}function Ya(n,t){if(n&1&&A(0,"sh-progress-bar",40),n&2){let e=s(3);me("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),u("value",e.calculatePasswordStrength()*(100/5))}}function Qa(n,t){n&1&&(l(0,"span",35),I(1,10),r())}function Za(n,t){n&1&&(P(0,8,1),A(1,"sh-icon"),O())}function el(n,t){n&1&&(P(0,8,2),A(1,"sh-icon"),O())}function tl(n,t){n&1&&(P(0,11,1),A(1,"sh-icon",42),O())}function nl(n,t){n&1&&(P(0,11,2),A(1,"sh-icon"),O())}function il(n,t){if(n&1){let e=D();l(0,"button",41),h("click",function(){T(e);let o=s(3);return S(o.copyPassword())}),P(1,11),m(2,tl,2,0)(3,nl,2,0),O(),r()}if(n&2){let e=s(3);_(2),g(e.copiedPassword()?2:3)}}function ol(n,t){n&1&&(l(0,"sh-alert",39),I(1,12),r())}function al(n,t){if(n&1){let e=D();l(0,"div",30)(1,"sh-form-field")(2,"label",31),P(3,7),A(4,"sup"),O(),r(),A(5,"input",32),r(),m(6,Ya,1,9,"sh-progress-bar",33),l(7,"sh-form-field"),A(8,"input",34),m(9,Qa,2,0,"span",35),r(),l(10,"div",36)(11,"button",37),h("click",function(){T(e);let o=s(2);return S(o.showPassword.set(!o.showPassword()))}),P(12,8),m(13,Za,2,0)(14,el,2,0),O(),r(),l(15,"button",37),h("click",function(){T(e);let o=s(2);return S(o.generatePassword())}),P(16,9),A(17,"sh-icon"),O(),r(),m(18,il,4,1,"button",38),r(),m(19,ol,2,0,"sh-alert",39),r()}if(n&2){let e=s(2);_(5),u("type",e.showPassword()?"text":"password"),_(),g(e.generalForm.value.password?6:-1),_(2),u("type",e.showPassword()?"text":"password"),_(),g(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),_(4),g(e.showPassword()?13:14),_(5),g(e.showCopyPassword()?18:-1),_(),g(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function ll(n,t){if(n&1&&(l(0,"sh-select",27)(1,"label",28),I(2,6),r(),A(3,"input",29),J(4,qa,1,1,"ng-template"),r(),m(5,al,20,7,"div",30)),n&2){let e=s();u("options",e.encryptionOptions())("isClearable",!1),_(5),g(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function rl(n,t){if(n&1&&(l(0,"button",24),P(1,13),A(2,"sh-icon"),O(),r()),n&2){let e=s();u("disabled",e.nameAndDescriptionValid()===!1)}}function sl(n,t){if(n&1&&(l(0,"button",25),P(1,14),A(2,"sh-icon"),O(),r()),n&2){let e=s();u("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Ve=new Et,On=(n={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>Ve.group({name:Ve.control(n.name,[pt.required]),description:Ve.control(n.description),encryption:Ve.control(n.encryption,[Fn()]),password:Ve.control(n.password,[Kt(t=>t?.value.encryption!=="-",[pt.required])]),repeatPassword:Ve.control(n.repeatPassword,[Kt(t=>t?.value.encryption!=="-",[pt.required])]),compression:Ve.control(n.compression)}),rt={Key:"-",DisplayName:"None"},Ht=class n{#e=y(Re);#t=y(We);#n=y(hn);#i=y(Pe);#a=y(Ee);formRef=Xe.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=F(!1);copiedPassword=F(!1);showCopyPassword=F(!1);noneOptionKey=rt.Key;encryptionEffect=oe(()=>{this.encryptionFieldSignal()===rt.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=M(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=M(()=>{let e=this.generalFormSignal()?.password??"";return this.#n.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#r(t??""),this.copiedPassword.set(!0)}async#r(t){try{await navigator.clipboard.writeText(t)}catch{try{let i=document.createElement("textarea");i.value=t,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i)}catch(i){console.error("Failed to copy text: ",i)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#n.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#i.shouldAutoSave()&&this.#i.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=H({type:n,selectors:[["app-general"]],viewQuery:function(e,i){e&1&&ze(i.formRef,Ha,5),e&2&&Je()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let i;i=$localize`Remember to copy the password`;let o;o=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let c;c=$localize`Backup description`;let d;d=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let p;p=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let E;E=$localize`Encryption`;let x;x=$localize`Encryption`;let v;v=$localize`Password`;let $;$=$localize`Repeat password`;let L;L=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let N;N=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_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_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,N=ve(N);let V;V=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let B;B=$localize`Passwords do not match`;let R;R=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,R=ve(R);let W;W=$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_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let pe;return pe=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,c,d,p,x,L,N,V,B,R,W,ue,pe,["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","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",i,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",E,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",v,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,i){if(e&1){let o=D();l(0,"form",15,0),h("submit",function(){return T(o),S(i.next())}),l(2,"h3",16),I(3,1),r(),m(4,ja,3,0,"sh-alert",17),l(5,"sh-form-field")(6,"label",18),P(7,2),A(8,"sup"),O(),r(),A(9,"input",19),r(),l(10,"sh-form-field")(11,"label",20),I(12,3),r(),A(13,"textarea",21),r(),m(14,ll,6,3),l(15,"div",22)(16,"button",23),h("click",function(){return T(o),S(i.exit())}),P(17,4),A(18,"sh-icon"),O(),r(),m(19,rl,3,1,"button",24)(20,sl,3,1,"button",25),r()()}if(e&2){let o;u("formGroup",i.generalForm),_(4),g(!i.isNew()&&((o=i.generalFormSignal())==null?null:o.encryption)!==""?4:-1),_(10),g(i.isNew()?14:-1),_(5),g(i.encryptionFieldSignal()===i.noneOptionKey||!i.isNew()?19:20)}},dependencies:[He,mt,re,se,Ct,St,Tt,Se,we,ie,Q,Nt,ft,It],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%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{On as a,rt as b,Ht as c,$t as d,Dn as e,Jt as f,zt as g,at as h,Ye as i,vt as j,bt as k,Vt as l,lt as m,In as n,Xt as o,Pe as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"./chunk-
|
|
1
|
+
import{a,b,c}from"./chunk-P3D2ZP6W.js";import"./chunk-HRHF3TYJ.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Xe}from"./chunk-F5SNXI4Q.js";import"./chunk-Q74O3CWJ.js";import{a as ee}from"./chunk-MDXSNEQZ.js";import"./chunk-3TJKPVBA.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as Ke}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as Je,c as ce}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as se,E as Be,G as be,L as Fe,U as ke,V as Ue,u as H}from"./chunk-UNMDSCAN.js";import{c as de}from"./chunk-CFNARBNK.js";import{b as ye,e as xe}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import{fa as V,ia as re}from"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as D,Ab as i,Bb as s,Cc as u,Dc as L,Ec as S,Fb as G,Fc as h,Gb as P,Ib as U,Mc as ve,Pa as a,Pb as N,Qb as m,Rb as l,Rc as le,Sb as d,Tb as c,Ub as R,Vb as I,W as x,Xb as C,aa as M,cb as X,gc as $,jc as E,kc as K,la as A,lc as f,mc as Ie,nc as $e,p as J,rc as fe,sb as g,sc as he,tb as T,tc as w,ub as B,wb as b,xb as k,yb as z,zb as o}from"./chunk-26Z7TPJB.js";import{a as _e}from"./chunk-7CGTOI24.js";function Ve(n,t){n&1&&s(0,"sh-progress-bar",32)}function He(n,t){n&1&&s(0,"div",35)}function je(n,t){n&1&&s(0,"div",35)}function We(n,t){n&1&&s(0,"div",36)}function qe(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,15),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48)(7,"p"),l(8,16),u(9,"date"),i(),o(10,"p"),l(11,17),u(12,"date"),i(),o(13,"p"),l(14,18),u(15,"durationFormat"),i(),o(16,"p"),l(17,19),i(),s(18,"sh-divider"),o(19,"p"),l(20,20),i(),o(21,"p"),l(22,21),i()()(),o(23,"details",46)(24,"summary"),N(25,22),s(26,"sh-icon"),o(27,"div",47),s(28,"sh-icon",40),i(),m(),i(),o(29,"div",48)(30,"p"),l(31,23),u(32,"date"),i(),o(33,"p"),l(34,24),u(35,"date"),i(),o(36,"p"),l(37,25),u(38,"durationFormat"),i(),s(39,"sh-divider"),o(40,"p"),l(41,26),u(42,"bytes"),i(),o(43,"p"),l(44,27),u(45,"bytes"),i(),o(46,"p"),l(47,28),u(48,"bytes"),i(),s(49,"sh-divider"),o(50,"p"),l(51,29),i(),o(52,"p"),l(53,30),i()()()),n&2){let e=C(2).$implicit;a(9),d(S(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),c(8),a(3),d(S(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),c(11),a(3),d(L(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),c(14),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),c(17),a(3),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),c(20),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),c(22),a(10),d(S(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),c(31),a(3),d(S(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),c(34),a(3),d(L(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),c(37),a(4),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(h(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),c(41),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(h(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),c(44),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(h(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),c(47),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),c(51),a(2),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),c(53)}}function Ye(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function Ze(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,31),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48),b(7,Ye,3,3,"code",null,B),i()()),n&2){let e=C(2).$implicit;a(5),d(e.data.VerificationsActualLength),c(2),a(2),k(e.data.Verifications)}}function en(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function nn(n,t){n&1&&(o(0,"p"),E(1,"No errors"),i())}function tn(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function on(n,t){if(n&1&&(o(0,"section",41)(1,"sh-toggle-card",42),G(2,43),o(3,"h3"),l(4,0),i(),P(),G(5,44),o(6,"p"),l(7,1),u(8,"date"),i(),o(9,"p"),l(10,2),u(11,"date"),i(),o(12,"p"),l(13,3),u(14,"durationFormat"),i(),P(),i(),o(15,"sh-toggle-card",42),G(16,43),o(17,"h3"),l(18,4),i(),P(),G(19,44),o(20,"p"),l(21,5),u(22,"bytes"),i(),o(23,"p"),l(24,6),u(25,"bytes"),i(),o(26,"p"),l(27,7),u(28,"bytes"),i(),o(29,"p"),l(30,8),u(31,"bytes"),i(),o(32,"p"),l(33,9),i(),o(34,"p"),l(35,10),i(),o(36,"p"),l(37,11),i(),P(),i(),o(38,"div",45),s(39,"sh-divider"),g(40,Qe,54,45),g(41,Ze,9,1,"details",46),o(42,"details",46)(43,"summary"),N(44,12),s(45,"sh-icon"),o(46,"div",47),s(47,"sh-icon",40),i(),m(),i(),o(48,"div",48),b(49,en,3,3,"code",null,B),i()(),o(51,"details",46)(52,"summary"),N(53,13),s(54,"sh-icon"),o(55,"div",47),s(56,"sh-icon",40),i(),m(),i(),o(57,"div",48),g(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,B),i()(),s(61,"sh-divider"),o(62,"details")(63,"summary"),N(64,14),s(65,"sh-icon"),o(66,"div",47),s(67,"sh-icon",40),i(),m(),i(),o(68,"code")(69,"button",49),E(70,"Copy"),i(),E(71),u(72,"json"),i()()()()),n&2){let e=C().$implicit;a(),z("disallowToggle",!0),a(7),d(S(8,22,e.data==null?null:e.data.BeginTime,"medium")),c(7),a(3),d(S(11,25,e.data==null?null:e.data.EndTime,"medium")),c(10),a(3),d(L(14,28,e.data==null?null:e.data.Duration)),c(13),a(),z("disallowToggle",!0),a(7),d(e.data==null?null:e.data.ExaminedFiles)(h(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),c(21),a(3),d(e.data==null?null:e.data.OpenedFiles)(h(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),c(24),a(3),d(e.data==null?null:e.data.AddedFiles)(h(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),c(27),a(3),d(e.data==null?null:e.data.ModifiedFiles)(h(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),c(30),a(2),d(e.data==null?null:e.data.DeletedFiles),c(33),a(2),d(e.data==null?null:e.data.TooLargeFiles),c(35),a(2),d(e.data==null?null:e.data.FilesWithError),c(37),a(3),T(e.data!=null&&e.data.TestResults?40:-1),a(),T((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),a(6),d(e.data==null?null:e.data.WarningsActualLength),c(44),a(2),k(e.data==null?null:e.data.Warnings),a(7),d(e.data==null?null:e.data.ErrorsActualLength),c(53),a(2),T((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),a(),k(e.data==null?null:e.data.Errors),a(12),f(" ",L(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=U();o(0,"article",33)(1,"header",34),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),g(2,He,1,0,"div",35)(3,je,1,0,"div",35)(4,We,1,0,"div",36)(5,qe,1,0,"div",37),o(6,"h3"),E(7),u(8,"date"),i(),o(9,"p"),E(10),i(),s(11,"div",38),o(12,"div",39)(13,"sh-icon",40),E(14,"caret-down"),i()()(),g(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,_=C(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),T(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),a(5),K(S(8,7,e.timestamp,"medium")),a(3),Ie(" ",e.data==null?null:e.data.MainOperation," ",_.getLocalizedSummary(e)," "),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?15:-1)}}var ue=class n{#e=x(de);#n=new Z;#t=new ee;backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(J(e=>e.map(_=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,type:_.Type,data:JSON.parse(_.Message),exception:JSON.stringify(_.Exception)==="{}"?null:_.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,_=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let p=this.#t.transform(t.data?.Duration,!0);p.startsWith("0h ")&&(p=p.slice(3)),p.startsWith("0m ")&&(p=p.slice(3)),r.push($localize`took ${p}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),_!==0&&r.push($localize`:@@warningCount:${_} warning${_===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _;_=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let q;q=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=R(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=R(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=R(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=R(ie);let Ce;Ce=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=R(oe);let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Re;Re=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=R(ae),[t,e,_,r,p,v,y,j,W,q,Q,Y,O,ne,te,ie,Ce,ge,Te,Oe,Le,Ne,oe,me,Se,Ge,Pe,Ae,Re,De,Me,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["shButton","",1,"small"]]},template:function(e,_){e&1&&(g(0,Ve,1,0,"sh-progress-bar",32),b(1,an,16,10,"article",33,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Ue,be,Fe,se,H,Z,V,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function _n(n,t){n&1&&s(0,"sh-progress-bar",1)}function ln(n,t){n&1&&(N(0,0,1),s(1,"sh-icon"),m())}function rn(n,t){n&1&&(N(0,0,2),s(1,"sh-icon"),m())}function sn(n,t){if(n&1){let e=U();o(0,"section",6)(1,"button",7),I("click",function(){D(e);let r=C(),p=r.$implicit,v=r.$index,y=C();return M(y.copyToClipboard(p.data,v))}),N(2,0),g(3,ln,2,0)(4,rn,2,0),m(),i(),o(5,"code"),E(6),u(7,"json"),i()()}if(n&2){let e=C(),_=e.$implicit,r=e.$index,p=C();a(),$("success",p.copiedFromIndex()===r),a(2),T(p.copiedFromIndex()===r?3:4),a(3),K(L(7,4,_.data))}}function Fn(n,t){if(n&1){let e=U();o(0,"article",2)(1,"header",3),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),o(2,"h3"),E(3),u(4,"date"),i(),o(5,"div",4)(6,"sh-icon",5),E(7,"caret-down"),i()()(),g(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,_=C();a(3),$e("",S(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?8:-1)}}var pe=class n{#e=x(de);backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});copiedFromIndex=A(null);resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(J(e=>e.map((_,r)=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,operation:_.Operation,path:_.Path,data:typeof _.Data=="string"?JSON.parse(_.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let _=JSON.stringify(t,null,2);navigator.clipboard.writeText(_),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=R(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,_){e&1&&(g(0,_n,1,0,"sh-progress-bar",1),b(1,Fn,9,9,"article",2,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Fe,H,re,V],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function dn(n,t){if(n&1&&(E(0," - "),G(1),l(2,6),P(),E(3),u(4,"durationFormat")),n&2){C(2);let e=w(6);a(3),f(" ",L(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function cn(n,t){n&1&&(G(0),l(1,7),P())}function un(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,t){n&1&&(G(0),l(1,8),P())}function En(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Cn(n,t){n&1&&(G(0),l(1,9),P())}function gn(n,t){if(n&1&&(o(0,"sh-chip",19),l(1,10),i()),n&2){C(2);let e=w(6);a(),d(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),c(1)}}function Tn(n,t){n&1&&(o(0,"sh-chip",20),l(1,11),i())}function On(n,t){if(n&1&&(o(0,"div",14)(1,"div",18)(2,"h3"),E(3),o(4,"sh-icon"),E(5,"database"),i()(),o(6,"p")(7,"span"),l(8,3),i(),E(9),u(10,"date"),g(11,dn,5,3)(12,cn,2,0,"ng-container"),i(),o(13,"p")(14,"span"),l(15,4),i(),g(16,un,2,3)(17,pn,2,0,"ng-container"),i(),o(18,"p")(19,"span"),l(20,5),i(),g(21,En,2,3)(22,Cn,2,0,"ng-container"),i()(),g(23,gn,2,1,"sh-chip",19)(24,Tn,2,0,"sh-chip",20),i()),n&2){let e=C(),_=w(6);a(3),f(" ",_.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),f(" ",S(10,6,_.Backup.Metadata==null?null:_.Backup.Metadata.LastBackupDate,"short")," "),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.LastBackupDuration?11:12),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.SourceFilesSize?16:17),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.TargetFilesSize?21:22),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.BackupListCount?23:24)}}function Ln(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=C();z("backupId",e.backupId())}}function Nn(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=C();z("backupId",e.backupId())}}var Ee=class n{#e=x(ye);#n=x(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=A("general");backupId=Je(this.#e.params.pipe(J(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let _;_=$localize` Destination `;let r;r=$localize`Last successful backup:`;let p;p=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let j;j=$localize`N/A`;let W;W=$localize`N/A`;let q;q=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,_,r,p,v,y,j,W,q,Q,Y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,_){if(e&1){let r=U();s(0,"app-status-bar"),o(1,"section")(2,"div",12)(3,"button",13),N(4,0),s(5,"sh-icon"),m(),i()(),fe(6),g(7,On,25,9,"div",14),o(8,"sh-tabs",15)(9,"button",16),I("click",function(){return D(r),M(_.activeTab.set("general"))}),l(10,1),i(),o(11,"button",16),I("click",function(){return D(r),M(_.activeTab.set("destination"))}),l(12,2),i()(),g(13,Ln,1,1,"app-general-log",17),g(14,Nn,1,1,"app-remote-log",17),i()}if(e&2){a(6);let r=he(_.backup());a(),T(r?7:-1),a(2),$("active",_.activeTab()==="general"),a(2),$("active",_.activeTab()==="destination"),a(2),T(_.activeTab()==="general"?13:-1),a(),T(_.activeTab()==="destination"?14:-1)}},dependencies:[ke,ue,pe,xe,Xe,H,se,Be,Z,ee,V],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{Ee as default};
|
|
1
|
+
import{a as Xe}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{a as ee}from"./chunk-MDXSNEQZ.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import{a as Ke}from"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import{a as Z}from"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as Je,c as ce}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as se,E as Be,G as be,L as Fe,U as ke,V as Ue,u as H}from"./chunk-UNMDSCAN.js";import{c as de}from"./chunk-CFNARBNK.js";import{b as ye,e as xe}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import{fa as V,ia as re}from"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as D,Ab as i,Bb as s,Cc as u,Dc as L,Ec as S,Fb as G,Fc as h,Gb as P,Ib as U,Mc as ve,Pa as a,Pb as N,Qb as m,Rb as l,Rc as le,Sb as d,Tb as c,Ub as R,Vb as I,W as x,Xb as C,aa as M,cb as X,gc as $,jc as E,kc as K,la as A,lc as f,mc as Ie,nc as $e,p as J,rc as fe,sb as g,sc as he,tb as T,tc as w,ub as B,wb as b,xb as k,yb as z,zb as o}from"./chunk-26Z7TPJB.js";import{a as _e}from"./chunk-7CGTOI24.js";function Ve(n,t){n&1&&s(0,"sh-progress-bar",32)}function He(n,t){n&1&&s(0,"div",35)}function je(n,t){n&1&&s(0,"div",35)}function We(n,t){n&1&&s(0,"div",36)}function qe(n,t){n&1&&s(0,"div",37)}function Qe(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,15),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48)(7,"p"),l(8,16),u(9,"date"),i(),o(10,"p"),l(11,17),u(12,"date"),i(),o(13,"p"),l(14,18),u(15,"durationFormat"),i(),o(16,"p"),l(17,19),i(),s(18,"sh-divider"),o(19,"p"),l(20,20),i(),o(21,"p"),l(22,21),i()()(),o(23,"details",46)(24,"summary"),N(25,22),s(26,"sh-icon"),o(27,"div",47),s(28,"sh-icon",40),i(),m(),i(),o(29,"div",48)(30,"p"),l(31,23),u(32,"date"),i(),o(33,"p"),l(34,24),u(35,"date"),i(),o(36,"p"),l(37,25),u(38,"durationFormat"),i(),s(39,"sh-divider"),o(40,"p"),l(41,26),u(42,"bytes"),i(),o(43,"p"),l(44,27),u(45,"bytes"),i(),o(46,"p"),l(47,28),u(48,"bytes"),i(),s(49,"sh-divider"),o(50,"p"),l(51,29),i(),o(52,"p"),l(53,30),i()()()),n&2){let e=C(2).$implicit;a(9),d(S(9,17,e.data==null||e.data.TestResults==null?null:e.data.TestResults.BeginTime,"medium")),c(8),a(3),d(S(12,20,e.data==null||e.data.TestResults==null?null:e.data.TestResults.EndTime,"medium")),c(11),a(3),d(L(15,23,e.data==null||e.data.TestResults==null?null:e.data.TestResults.Duration)),c(14),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.VerificationsActualLength),c(17),a(3),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.WarningsActualLength),c(20),a(2),d(e.data==null||e.data.TestResults==null?null:e.data.TestResults.ErrorsActualLength),c(22),a(10),d(S(32,25,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.BeginTime,"medium")),c(31),a(3),d(S(35,28,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.EndTime,"medium")),c(34),a(3),d(L(38,31,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.Duration)),c(37),a(4),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileCount)(h(42,33,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DeletedFileSize,!0,!0)),c(41),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileCount)(h(45,37,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.DownloadedFileSize,!0,!0)),c(44),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileCount)(h(48,41,e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.UploadedFileSize,!0,!0)),c(47),a(3),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.WarningsActualLength),c(51),a(2),d(e.data==null||e.data.CompactResults==null?null:e.data.CompactResults.ErrorsActualLength),c(53)}}function Ye(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function Ze(n,t){if(n&1&&(o(0,"details",46)(1,"summary"),N(2,31),s(3,"sh-icon"),o(4,"div",47),s(5,"sh-icon",40),i(),m(),i(),o(6,"div",48),b(7,Ye,3,3,"code",null,B),i()()),n&2){let e=C(2).$implicit;a(5),d(e.data.VerificationsActualLength),c(2),a(2),k(e.data.Verifications)}}function en(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function nn(n,t){n&1&&(o(0,"p"),E(1,"No errors"),i())}function tn(n,t){if(n&1&&(o(0,"code"),E(1),u(2,"json"),i()),n&2){let e=t.$implicit;a(),K(L(2,1,e))}}function on(n,t){if(n&1&&(o(0,"section",41)(1,"sh-toggle-card",42),G(2,43),o(3,"h3"),l(4,0),i(),P(),G(5,44),o(6,"p"),l(7,1),u(8,"date"),i(),o(9,"p"),l(10,2),u(11,"date"),i(),o(12,"p"),l(13,3),u(14,"durationFormat"),i(),P(),i(),o(15,"sh-toggle-card",42),G(16,43),o(17,"h3"),l(18,4),i(),P(),G(19,44),o(20,"p"),l(21,5),u(22,"bytes"),i(),o(23,"p"),l(24,6),u(25,"bytes"),i(),o(26,"p"),l(27,7),u(28,"bytes"),i(),o(29,"p"),l(30,8),u(31,"bytes"),i(),o(32,"p"),l(33,9),i(),o(34,"p"),l(35,10),i(),o(36,"p"),l(37,11),i(),P(),i(),o(38,"div",45),s(39,"sh-divider"),g(40,Qe,54,45),g(41,Ze,9,1,"details",46),o(42,"details",46)(43,"summary"),N(44,12),s(45,"sh-icon"),o(46,"div",47),s(47,"sh-icon",40),i(),m(),i(),o(48,"div",48),b(49,en,3,3,"code",null,B),i()(),o(51,"details",46)(52,"summary"),N(53,13),s(54,"sh-icon"),o(55,"div",47),s(56,"sh-icon",40),i(),m(),i(),o(57,"div",48),g(58,nn,2,0,"p"),b(59,tn,3,3,"code",null,B),i()(),s(61,"sh-divider"),o(62,"details")(63,"summary"),N(64,14),s(65,"sh-icon"),o(66,"div",47),s(67,"sh-icon",40),i(),m(),i(),o(68,"code")(69,"button",49),E(70,"Copy"),i(),E(71),u(72,"json"),i()()()()),n&2){let e=C().$implicit;a(),z("disallowToggle",!0),a(7),d(S(8,22,e.data==null?null:e.data.BeginTime,"medium")),c(7),a(3),d(S(11,25,e.data==null?null:e.data.EndTime,"medium")),c(10),a(3),d(L(14,28,e.data==null?null:e.data.Duration)),c(13),a(),z("disallowToggle",!0),a(7),d(e.data==null?null:e.data.ExaminedFiles)(h(22,30,e.data==null?null:e.data.SizeOfExaminedFiles,!0,!0)),c(21),a(3),d(e.data==null?null:e.data.OpenedFiles)(h(25,34,e.data==null?null:e.data.SizeOfOpenedFiles,!0,!0)),c(24),a(3),d(e.data==null?null:e.data.AddedFiles)(h(28,38,e.data==null?null:e.data.SizeOfAddedFiles,!0,!0)),c(27),a(3),d(e.data==null?null:e.data.ModifiedFiles)(h(31,42,e.data==null?null:e.data.SizeOfModifiedFiles,!0,!0)),c(30),a(2),d(e.data==null?null:e.data.DeletedFiles),c(33),a(2),d(e.data==null?null:e.data.TooLargeFiles),c(35),a(2),d(e.data==null?null:e.data.FilesWithError),c(37),a(3),T(e.data!=null&&e.data.TestResults?40:-1),a(),T((e.data==null?null:e.data.MainOperation)==="Test"?41:-1),a(6),d(e.data==null?null:e.data.WarningsActualLength),c(44),a(2),k(e.data==null?null:e.data.Warnings),a(7),d(e.data==null?null:e.data.ErrorsActualLength),c(53),a(2),T((e.data==null||e.data.Errors==null?null:e.data.Errors.length)===0?58:-1),a(),k(e.data==null?null:e.data.Errors),a(12),f(" ",L(72,46,e.data)," ")}}function an(n,t){if(n&1){let e=U();o(0,"article",33)(1,"header",34),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),g(2,He,1,0,"div",35)(3,je,1,0,"div",35)(4,We,1,0,"div",36)(5,qe,1,0,"div",37),o(6,"h3"),E(7),u(8,"date"),i(),o(9,"p"),E(10),i(),s(11,"div",38),o(12,"div",39)(13,"sh-icon",40),E(14,"caret-down"),i()()(),g(15,on,73,48,"section",41),i()}if(n&2){let e=t.$implicit,_=C(),r=(e.data==null?null:e.data.ParsedResult)||"Unknown";a(2),T(r=="Fatal"?2:r=="Error"?3:r=="Warning"?4:5),a(5),K(S(8,7,e.timestamp,"medium")),a(3),Ie(" ",e.data==null?null:e.data.MainOperation," ",_.getLocalizedSummary(e)," "),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?15:-1)}}var ue=class n{#e=x(de);#n=new Z;#t=new ee;backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdLog({id:t.id,pagesize:100}).pipe(J(e=>e.map(_=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,type:_.Type,data:JSON.parse(_.Message),exception:JSON.stringify(_.Exception)==="{}"?null:_.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,_=t.data?.WarningsActualLength??0,r=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let p=this.#t.transform(t.data?.Duration,!0);p.startsWith("0h ")&&(p=p.slice(3)),p.startsWith("0m ")&&(p=p.slice(3)),r.push($localize`took ${p}`)}t.data?.BackendStatistics?.BytesUploaded&&r.push($localize`uploaded ${this.#n.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&r.push($localize`backup size ${this.#n.transform(t.data?.BackendStatistics?.KnownFileSize)}`)}return e!==0&&r.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),_!==0&&r.push($localize`:@@warningCount:${_} warning${_===1?"":"s"}`),r.length===0?"":`(${r.join(", ")})`}toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _;_=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let r;r=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let p;p=$localize`Source files`;let v;v=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let y;y=$localize`Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let j;j=$localize`Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:)`;let W;W=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let q;q=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Y;Y=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let O;O=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#46\uFFFD"}:START_TAG_DIV:${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#45\uFFFD|\uFFFD/#47\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_DIV:`,O=R(O);let ne;ne=$localize`${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#55\uFFFD"}:START_TAG_DIV:${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#54\uFFFD|\uFFFD/#56\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#55\uFFFD"}:CLOSE_TAG_DIV:`,ne=R(ne);let te;te=$localize`${"\uFFFD#65\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#66\uFFFD"}:START_TAG_DIV:${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#65\uFFFD|\uFFFD/#67\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#66\uFFFD"}:CLOSE_TAG_DIV:`,te=R(te);let ie;ie=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ie=R(ie);let Ce;Ce=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ge;ge=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Te;Te=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Oe;Oe=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Le;Le=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let oe;oe=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,oe=R(oe);let me;me=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Se;Se=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ge;Ge=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Pe;Pe=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ae;Ae=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Re;Re=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let De;De=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;return ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=R(ae),[t,e,_,r,p,v,y,j,W,q,Q,Y,O,ne,te,ie,Ce,ge,Te,Oe,Le,Ne,oe,me,Se,Ge,Pe,Ae,Re,De,Me,ae,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disallowToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],[1,"actions"],[1,"content"],["shButton","",1,"small"]]},template:function(e,_){e&1&&(g(0,Ve,1,0,"sh-progress-bar",32),b(1,an,16,10,"article",33,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Ue,be,Fe,se,H,Z,V,ee,re],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}"],changeDetection:0})};function _n(n,t){n&1&&s(0,"sh-progress-bar",1)}function ln(n,t){n&1&&(N(0,0,1),s(1,"sh-icon"),m())}function rn(n,t){n&1&&(N(0,0,2),s(1,"sh-icon"),m())}function sn(n,t){if(n&1){let e=U();o(0,"section",6)(1,"button",7),I("click",function(){D(e);let r=C(),p=r.$implicit,v=r.$index,y=C();return M(y.copyToClipboard(p.data,v))}),N(2,0),g(3,ln,2,0)(4,rn,2,0),m(),i(),o(5,"code"),E(6),u(7,"json"),i()()}if(n&2){let e=C(),_=e.$implicit,r=e.$index,p=C();a(),$("success",p.copiedFromIndex()===r),a(2),T(p.copiedFromIndex()===r?3:4),a(3),K(L(7,4,_.data))}}function Fn(n,t){if(n&1){let e=U();o(0,"article",2)(1,"header",3),I("click",function(){let r=D(e).$implicit,p=C();return M(p.toggleOpenEntry(r.id))}),o(2,"h3"),E(3),u(4,"date"),i(),o(5,"div",4)(6,"sh-icon",5),E(7,"caret-down"),i()()(),g(8,sn,8,6,"section",6),i()}if(n&2){let e=t.$implicit,_=C();a(3),$e("",S(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),a(3),$("open",e.id===_.openEntry()),a(2),T(e.id===_.openEntry()?8:-1)}}var pe=class n{#e=x(de);backupId=le.required();openEntry=A(null);pagination=A({offset:0,pagesize:100});copiedFromIndex=A(null);resource=ce({params:()=>_e({id:this.backupId()},this.pagination()),stream:({params:t})=>this.#e.getApiV1BackupByIdRemotelog({id:t.id,pagesize:100}).pipe(J(e=>e.map((_,r)=>({id:_.ID,operationId:_.OperationID,timestamp:_.Timestamp*1e3,operation:_.Operation,path:_.Path,data:typeof _.Data=="string"?JSON.parse(_.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t)}copyToClipboard(t,e){let _=JSON.stringify(t,null,2);navigator.clipboard.writeText(_),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null)},3e3)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=R(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,_){e&1&&(g(0,_n,1,0,"sh-progress-bar",1),b(1,Fn,9,9,"article",2,B)),e&2&&(T(_.resource.isLoading()?0:-1),a(),k(_.resource.value()))},dependencies:[Fe,H,re,V],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"],changeDetection:0})};function dn(n,t){if(n&1&&(E(0," - "),G(1),l(2,6),P(),E(3),u(4,"durationFormat")),n&2){C(2);let e=w(6);a(3),f(" ",L(4,1,e.Backup.Metadata==null?null:e.Backup.Metadata.LastBackupDuration)," ")}}function cn(n,t){n&1&&(G(0),l(1,7),P())}function un(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.SourceFilesSize)," ")}}function pn(n,t){n&1&&(G(0),l(1,8),P())}function En(n,t){if(n&1&&(E(0),u(1,"bytes")),n&2){C(2);let e=w(6);f(" ",L(1,1,e.Backup.Metadata==null?null:e.Backup.Metadata.TargetFilesSize)," ")}}function Cn(n,t){n&1&&(G(0),l(1,9),P())}function gn(n,t){if(n&1&&(o(0,"sh-chip",19),l(1,10),i()),n&2){C(2);let e=w(6);a(),d(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount),c(1)}}function Tn(n,t){n&1&&(o(0,"sh-chip",20),l(1,11),i())}function On(n,t){if(n&1&&(o(0,"div",14)(1,"div",18)(2,"h3"),E(3),o(4,"sh-icon"),E(5,"database"),i()(),o(6,"p")(7,"span"),l(8,3),i(),E(9),u(10,"date"),g(11,dn,5,3)(12,cn,2,0,"ng-container"),i(),o(13,"p")(14,"span"),l(15,4),i(),g(16,un,2,3)(17,pn,2,0,"ng-container"),i(),o(18,"p")(19,"span"),l(20,5),i(),g(21,En,2,3)(22,Cn,2,0,"ng-container"),i()(),g(23,gn,2,1,"sh-chip",19)(24,Tn,2,0,"sh-chip",20),i()),n&2){let e=C(),_=w(6);a(3),f(" ",_.Backup.Name??e.MISSING_BACKUP_NAME," "),a(6),f(" ",S(10,6,_.Backup.Metadata==null?null:_.Backup.Metadata.LastBackupDate,"short")," "),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.LastBackupDuration?11:12),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.SourceFilesSize?16:17),a(5),T(_.Backup.Metadata!=null&&_.Backup.Metadata.TargetFilesSize?21:22),a(2),T(_.Backup.Metadata!=null&&_.Backup.Metadata.BackupListCount?23:24)}}function Ln(n,t){if(n&1&&s(0,"app-general-log",17),n&2){let e=C();z("backupId",e.backupId())}}function Nn(n,t){if(n&1&&s(0,"app-remote-log",17),n&2){let e=C();z("backupId",e.backupId())}}var Ee=class n{#e=x(ye);#n=x(Ke);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=A("general");backupId=Je(this.#e.params.pipe(J(t=>t.id)));backup=ve(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=X({type:n,selectors:[["app-log"]],decls:15,vars:8,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let _;_=$localize` Destination `;let r;r=$localize`Last successful backup:`;let p;p=$localize`Source:`;let v;v=$localize`Destination:`;let y;y=$localize`took`;let j;j=$localize`N/A`;let W;W=$localize`N/A`;let q;q=$localize`N/A`;let Q;Q=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Y;return Y=$localize`No version yet`,[t,e,_,r,p,v,y,j,W,q,Q,Y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary"],["tab","",3,"click"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,_){if(e&1){let r=U();s(0,"app-status-bar"),o(1,"section")(2,"div",12)(3,"button",13),N(4,0),s(5,"sh-icon"),m(),i()(),fe(6),g(7,On,25,9,"div",14),o(8,"sh-tabs",15)(9,"button",16),I("click",function(){return D(r),M(_.activeTab.set("general"))}),l(10,1),i(),o(11,"button",16),I("click",function(){return D(r),M(_.activeTab.set("destination"))}),l(12,2),i()(),g(13,Ln,1,1,"app-general-log",17),g(14,Nn,1,1,"app-remote-log",17),i()}if(e&2){a(6);let r=he(_.backup());a(),T(r?7:-1),a(2),$("active",_.activeTab()==="general"),a(2),$("active",_.activeTab()==="destination"),a(2),T(_.activeTab()==="general"?13:-1),a(),T(_.activeTab()==="destination"?14:-1)}},dependencies:[ke,ue,pe,xe,Xe,H,se,Be,Z,ee,V],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"],changeDetection:0})};export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as a,o as b}from"./chunk-P3D2ZP6W.js";import"./chunk-HRHF3TYJ.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as C}from"./chunk-
|
|
1
|
+
import{g as C}from"./chunk-K6G7ALTG.js";import"./chunk-OL7C46LY.js";import{a as k}from"./chunk-EE27B3OV.js";import"./chunk-Q74O3CWJ.js";import{p as w}from"./chunk-P3D2ZP6W.js";import"./chunk-HRHF3TYJ.js";import"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-BFTGDQ4K.js";import"./chunk-QHBOEY2O.js";import"./chunk-NK5WD6WE.js";import"./chunk-B62TPRVG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-SZUNW4JO.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import"./chunk-HSHF5HR7.js";import"./chunk-5LBG6MOL.js";import"./chunk-D6IP567E.js";import{b as u}from"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{M as W,R as y}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{a as A,b as $,c as M,d as I,e as G,f as v}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{Ab as n,Bb as s,Pa as r,Pb as F,Qb as l,W as c,Xb as O,cb as D,gc as L,la as f,na as P,sb as E,tb as g,wc as N,xc as R,yb as _,yc as p,zb as o}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var b=()=>["/restore-from-files/destination"],x=()=>["/restore-from-files/encryption"],H=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],z=t=>["/restore",t,"options"];function B(t,i){t&1&&(o(0,"div",7),F(1,0),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,1),s(5,"sh-radio"),l(),n(),o(6,"div",8),F(7,2),s(8,"sh-radio"),l(),n(),o(9,"div",8),F(10,3),s(11,"sh-radio"),l(),n()),t&2&&(_("routerLink",R(4,b)),r(3),_("routerLink",R(5,x)),r(3),_("routerLink",R(6,H)),r(3),_("routerLink",R(7,J)))}function U(t,i){if(t&1&&(o(0,"div",7),F(1,4),s(2,"sh-radio"),l(),n(),o(3,"div",7),F(4,5),s(5,"sh-radio"),l(),n()),t&2){let e=O(2);_("routerLink",p(2,X,e.backupId())),r(3),_("routerLink",p(4,z,e.backupId()))}}function j(t,i){if(t&1&&(o(0,"sh-stepper",6),E(1,B,12,8)(2,U,6,6),n()),t&2){let e=O();r(),g(e.isFileRestore()?1:2)}}var h=class t{#e=c($);#i=c(I);#t=c(C);#o=u(this.#e.params);#n=u(this.#e.url);#s=u(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isProgressPage=f(!1);paramsChanged=P(()=>{let i=this.#s(),e=this.#o()?.id,a=!!this.#n()?.find(S=>S.path==="restore-from-files"),T=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(T),this.#t.init(e,a)});ngOnInit(){this.#i.events.subscribe(i=>{if(i instanceof A){let e=i.urlAfterRedirects;this.isProgressPage.set(e.includes("progress"))}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=D({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,a){e&2&&L("full-width",a.isProgressPage())},features:[N([C,w])],decls:4,vars:1,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Encryption `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let T;T=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `;let S;S=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_RADIO: Select files `;let m;return m=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[i,e,a,T,S,m,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],["step","","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,a){e&1&&(s(0,"app-status-bar"),E(1,j,3,1,"sh-stepper",6),o(2,"section"),s(3,"router-outlet"),n()),e&2&&(r(),g(a.isProgressPage()?-1:1))},dependencies:[y,W,k,M,G,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"],changeDetection:0})};export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as Ce,j as pe,k as Se,l as me,p as Ne}from"./chunk-P3D2ZP6W.js";import"./chunk-HRHF3TYJ.js";import{b as ue,c as Te}from"./chunk-IMHM7ISI.js";import"./chunk-6LAXPU22.js";import"./chunk-6Q6SSTBK.js";import"./chunk-TL4WOQKT.js";import"./chunk-7LTHH6OG.js";import{a as A}from"./chunk-HSHF5HR7.js";import"./chunk-D6IP567E.js";import"./chunk-VDSX2M4H.js";import"./chunk-ZU6T3TW3.js";import"./chunk-HUZXJWCG.js";import"./chunk-7TWUW4XJ.js";import{B as ce,H as ge,K as de,c as Y,e as Z,f as ee,g as te,i as ne,j as ie,r as oe,s as ae,u as re,w as se,y as le,z as _e}from"./chunk-UNMDSCAN.js";import"./chunk-CFNARBNK.js";import{b as q,d as Q}from"./chunk-I27PVH6D.js";import"./chunk-5VE6P5U5.js";import"./chunk-PO3L6MKW.js";import"./chunk-7AVOHYTE.js";import"./chunk-KDSMLI73.js";import{$ as l,Ab as s,Bb as C,Fb as V,Gb as K,Ib as p,Mc as R,Pa as g,Pb as N,Qb as E,Rb as D,Sc as w,Vb as T,W as I,Xb as c,aa as _,cb as k,cc as z,da as v,dc as J,gc as X,jc as y,la as O,oc as F,pc as f,qc as P,rc as W,sb as S,sc as H,tb as m,tc as U,xc as j,yb as h,zb as r}from"./chunk-26Z7TPJB.js";import"./chunk-7CGTOI24.js";var Ee=["formRef"],Ie=["testUrl"],he=()=>({maxWidth:"700px",width:"100%"});function De(o,i){if(o&1){let e=p();r(0,"button",27),T("click",function(){l(e);let n=c();return _(n.openTargetUrlDialog())}),N(1,6),C(2,"sh-icon"),E(),s()}}function fe(o,i){if(o&1){let e=p();r(0,"button",27),T("click",function(){l(e);let n=c(2);return _(n.copyTargetUrl())}),N(1,8),C(2,"sh-icon"),E(),s()}}function Oe(o,i){if(o&1){let e=p();r(0,"sh-menu")(1,"button",19)(2,"sh-icon"),y(3,"dots-three-vertical"),s()(),V(4,28),r(5,"button",27),T("click",function(){l(e);let n=c();return _(n.openTargetUrlDialog())}),N(6,7),C(7,"sh-icon"),E(),s(),S(8,fe,3,0,"button",19),K(),s()}if(o&2){c();let e=U(0);g(8),m(e?8:-1)}}function Fe(o,i){if(o&1){let e=p();r(0,"app-destination-list",29),T("setDestination",function(n){l(e);let a=c();return _(a.setDestination(n))}),s()}}function Pe(o,i){if(o&1){let e=p();r(0,"app-single-destination",30),P("targetUrlChange",function(n){l(e);let a=c();return f(a.targetUrlModel,n)||(a.targetUrlModel=n),_(n)}),s()}if(o&2){let e=c();F("targetUrl",e.targetUrlModel),h("useBackupState",!0)}}function Ae(o,i){o&1&&(r(0,"h2"),D(1,11),s())}function Me(o,i){o&1&&(r(0,"h2"),D(1,12),s())}function ye(o,i){if(o&1){let e=p();r(0,"sh-dialog",31),P("isOpenChange",function(n){l(e);let a=c();return f(a.targetUrlDialogOpen,n)||(a.targetUrlDialogOpen=n),_(n)}),r(1,"header",32)(2,"div",33),S(3,Ae,2,0,"h2")(4,Me,2,0,"h2"),r(5,"sh-alert",34),D(6,9),s()()(),r(7,"div",35)(8,"sh-form-field")(9,"textarea",36),P("ngModelChange",function(n){l(e);let a=c();return f(a.targetUrlCtrl,n)||(a.targetUrlCtrl=n),_(n)}),s()()(),r(10,"footer",37)(11,"button",22),T("click",function(){l(e);let n=c();return _(n.closeTargetUrlDialog(!1))}),y(12,"Cancel"),s(),r(13,"button",38),T("click",function(){l(e);let n=c();return _(n.closeTargetUrlDialog(!0))}),N(14,10),C(15,"sh-icon"),E(),s()()()}if(o&2){let e=c(),t=U(0);F("isOpen",e.targetUrlDialogOpen),h("options",j(4,he)),g(3),m(t?4:3),g(6),F("ngModel",e.targetUrlCtrl)}}var M=new oe,je=(o={destinations:[]})=>M.group({destinations:M.array(o.destinations)}),qe=({key:o,customGroup:i,dynamicGroup:e,advancedGroup:t})=>M.group({destinationType:M.control(o),custom:i,dynamic:e,advanced:t}),$=class o{#i=I(Q);#o=I(q);#e=I(Ne);#n=I(_e);injector=I(v);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.targetUrlTestSignal;targetUrlModel=this.#e.targetUrlModel;targetUrlCtrl=O(null);targetUrlInitial=O(null);targetUrlDialogOpen=O(!1);toggleNewDestination=O(!0);isNew=this.#e.isNew;selectedDestinationType=R(()=>{let i=this.targetUrlModel();return i?ue(i)??null:null});selectedDestinationTypeOption=R(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let i=this.targetUrlModel();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),t=this.targetUrlInitial();!i||e===t||!e||this.#e.setTargetUrl(e)}setDestination(i){let e=Te(i??"");if(e){if(e.mapper.default){let t=e.mapper.default(this.#e.backupName()??"");this.#e.setTargetUrl(t,!0);return}this.#e.setTargetUrl(`${i}://`,!0)}}removeDestination(){this.#e.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.#e.isNew(),e=this.testSignal();if(!i){this.#t();return}if(e===null){this.#n.open(A,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(a=>{a.action==="success"&&!a.containsBackup&&!a.anyFilesFound?this.#t():this.#n.open(A,{data:{title:$localize`Test did not succeed`,message:a.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let t=typeof e=="string"?null:e;if(t?.action!=="success"||t.containsBackup||t.anyFilesFound){this.#n.open(A,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#t()}});return}this.#t()}#t(){this.#e.shouldAutoSave()&&this.#e.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=k({type:o,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&z(t.formRef,Ee,5)(t.testUrlComponent,Ie,5),e&2&&J(2)},decls:28,vars:15,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`Change`;let t;t=$localize`${"\uFFFD#23\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let d;d=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let x;x=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let L;L=$localize`Be careful, this will overwrite everything you have in your destination.`;let G;G=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let b;b=$localize`Set target URL`;let B;return B=$localize`Edit target URL`,[["formRef",""],["testUrl",""],i,e,t,n,a,d,x,L,G,b,B,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"targetUrl"],["shButton","","type","button",3,"click"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,t){if(e&1){let n=p();W(0),r(1,"form",13,0),T("submit",function(){return l(n),_(t.next())}),r(3,"div",14),C(4,"input",15)(5,"input",16),s(),r(6,"header")(7,"h3",17)(8,"span"),D(9,2),s(),r(10,"div",18),S(11,De,3,0,"button",19)(12,Oe,9,1,"sh-menu"),s()(),r(13,"app-test-url",20,1),P("targetUrlChange",function(d){return l(n),f(t.targetUrlModel,d)||(t.targetUrlModel=d),_(d)})("testSignalChange",function(d){return l(n),f(t.testSignal,d)||(t.testSignal=d),_(d)}),s(),r(15,"app-destination-list-item",21)(16,"button",22),T("click",function(){return l(n),_(t.removeDestination())}),D(17,3),s()()(),S(18,Fe,1,0,"app-destination-list"),S(19,Pe,1,2,"app-single-destination",23),r(20,"div",24)(21,"button",22),T("click",function(){return l(n),_(t.goBack())}),N(22,4),C(23,"sh-icon"),E(),s(),r(24,"button",25),N(25,5),C(26,"sh-icon"),E(),s()()(),S(27,ye,16,5,"sh-dialog",26)}if(e&2){let n=H(!!t.targetUrlModel());g(11),m(n?12:11),g(2),F("targetUrl",t.targetUrlModel)("testSignal",t.testSignal),h("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",t.isNew()?"destinationEmpty":"any")("moduleType","Backend"),g(2),h("targetUrl",t.targetUrlModel()),g(3),m(n?-1:18),g(),m(n?19:-1),g(5),X("loading",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing"||!n),g(3),m(t.targetUrlDialogOpen()?27:-1)}},dependencies:[Se,pe,Ce,me,ae,ie,Y,Z,ee,ne,te,ce,ge,de,re,le,se],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{je as createDestinationForm,qe as createDestinationFormGroup,$ as default};
|