@duplicati/ngclient 0.0.211 → 0.0.212
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-SUY5AQLW.js → chunk-22PELS6R.js} +1 -1
- package/chunk-2A5USVIH.js +1 -0
- package/{chunk-N35VE3MO.js → chunk-2D2IMXRC.js} +1 -1
- package/chunk-2JEQ7BV6.js +1 -0
- package/{chunk-U3SGWHNI.js → chunk-2NLWVJNK.js} +1 -1
- package/{chunk-RFB5A3B7.js → chunk-35APLYI4.js} +1 -1
- package/chunk-36UMECQ6.js +1 -0
- package/{chunk-MI32HHLT.js → chunk-3AZTY4MH.js} +1 -1
- package/chunk-3PUCEFO5.js +1 -0
- package/{chunk-LGILJ5LY.js → chunk-3XCT4PYH.js} +1 -1
- package/{chunk-COT66FJB.js → chunk-52REVNJZ.js} +1 -1
- package/chunk-5ENU22GJ.js +1 -0
- package/{chunk-DV7RWC4G.js → chunk-5FQ5SDPZ.js} +1 -1
- package/{chunk-ITA7DTN3.js → chunk-5L2OOKRZ.js} +1 -1
- package/chunk-5RK6PXUG.js +1 -0
- package/chunk-6DZ74HAA.js +1 -0
- package/chunk-6EOMDYWB.js +1 -0
- package/chunk-6HSYT4DG.js +11 -0
- package/{chunk-KAZ3YMHR.js → chunk-7735MTTP.js} +1 -1
- package/{chunk-SLS3DCJP.js → chunk-ADB5QRUO.js} +1 -1
- package/{chunk-C6RVYQ4M.js → chunk-AMSFSVKQ.js} +1 -1
- package/{chunk-MNK3XRJD.js → chunk-AOMXVXMB.js} +1 -1
- package/{chunk-IZCDGVXJ.js → chunk-APAWDC4O.js} +1 -1
- package/{chunk-I7HI454U.js → chunk-AZRNX5LU.js} +1 -1
- package/{chunk-OQ6BKP5N.js → chunk-BDQJFOCO.js} +1 -1
- package/chunk-BME6TJIR.js +1 -0
- package/{chunk-NBTTYKXH.js → chunk-BRL4YYWO.js} +1 -1
- package/{chunk-CCUGG5E4.js → chunk-CJVAK3WV.js} +1 -1
- package/{chunk-6FBNKISB.js → chunk-CNYY7AQK.js} +1 -1
- package/{chunk-WOZTK7S5.js → chunk-CYY7RVDE.js} +1 -1
- package/{chunk-3KMV4PTJ.js → chunk-DTIGWCAE.js} +1 -1
- package/{chunk-X64LSE6Y.js → chunk-EQNDYV43.js} +1 -1
- package/chunk-EU6N52DH.js +1 -0
- package/{chunk-YIM56S4M.js → chunk-FMDSOHVR.js} +1 -1
- package/{chunk-VAQ435AR.js → chunk-FSHBOASN.js} +1 -1
- package/{chunk-7HXPIZN6.js → chunk-G6V7E6VM.js} +1 -1
- package/{chunk-VTFVTC7O.js → chunk-GE3DHZ5E.js} +1 -1
- package/chunk-GO22QPW4.js +1 -0
- package/{chunk-YQD4QIGG.js → chunk-HHDCI6IF.js} +1 -1
- package/chunk-HVFJYWAN.js +1 -0
- package/chunk-IJY7JGOL.js +1 -0
- package/{chunk-BKQA64HZ.js → chunk-J6WVOYQ6.js} +1 -1
- package/{chunk-Z772CHAB.js → chunk-JTPUS6BT.js} +1 -1
- package/{chunk-3ZCJK7PY.js → chunk-KHFOQETZ.js} +1 -1
- package/{chunk-BMWZYMK6.js → chunk-KHZ5AXGT.js} +1 -1
- package/chunk-L26PO2OC.js +1 -0
- package/chunk-L2QOWZDR.js +1 -0
- package/chunk-LOFKRPRH.js +1 -0
- package/{chunk-HUJGWHH6.js → chunk-LU7TIW3P.js} +1 -1
- package/chunk-M5RTYP7N.js +2 -0
- package/{chunk-I4XRVBRQ.js → chunk-MRSBKQQM.js} +1 -1
- package/{chunk-SA6PEMWL.js → chunk-N5ZBB5VR.js} +1 -1
- package/chunk-NCXKMSRH.js +1 -0
- package/chunk-NK2B3YKP.js +1 -0
- package/{chunk-JTO22TJU.js → chunk-NRQEZLYN.js} +1 -1
- package/{chunk-NXF5BMPG.js → chunk-OBF6ZSYT.js} +1 -1
- package/chunk-OO32MPRQ.js +1 -0
- package/{chunk-36J3WTHV.js → chunk-OZEGNE5W.js} +1 -1
- package/chunk-PHN2W7W7.js +1 -0
- package/{chunk-2LSZ2I43.js → chunk-QAQMMCTH.js} +1 -1
- package/{chunk-GROPRXXJ.js → chunk-QQLV7J6T.js} +1 -1
- package/chunk-QRABW3YV.js +1 -0
- package/{chunk-DGPSGSEP.js → chunk-QRLREAIK.js} +1 -1
- package/chunk-QUXPHHDZ.js +1 -0
- package/{chunk-BEXYTIOL.js → chunk-R6TFME5I.js} +1 -1
- package/{chunk-KQZRDX7C.js → chunk-S3FBC24H.js} +1 -1
- package/{chunk-GCFBX62M.js → chunk-SHZXLIG5.js} +1 -1
- package/chunk-SI4C7DCS.js +1 -0
- package/chunk-ST6HBZ55.js +1 -0
- package/{chunk-PSRISEFO.js → chunk-STGN2W4U.js} +1 -1
- package/chunk-TJNL6F5S.js +1 -0
- package/{chunk-LIDIFLHF.js → chunk-TVA237PQ.js} +1 -1
- package/{chunk-NBPZDFGF.js → chunk-TZEOQBIX.js} +2 -2
- package/chunk-UH2E7MMT.js +4 -0
- package/{chunk-ZY64T3CX.js → chunk-V2NDJVRA.js} +1 -1
- package/{chunk-3DFXRSFL.js → chunk-VDHWNNO7.js} +1 -1
- package/chunk-VEXVMT3W.js +1 -0
- package/{chunk-3A4HTZ7B.js → chunk-VGBTP4QP.js} +1 -1
- package/{chunk-YIKPWYEP.js → chunk-VI7MBIGT.js} +1 -1
- package/{chunk-64W3VKAP.js → chunk-WALKMFYR.js} +1 -1
- package/chunk-WLU7TGVD.js +1 -0
- package/chunk-WPVSY5MT.js +2 -0
- package/chunk-WT5O6MNC.js +1 -0
- package/{chunk-WBTDGQME.js → chunk-XCVBN7EK.js} +1 -1
- package/chunk-XZNYCTQB.js +1 -0
- package/chunk-Y3BYCXUX.js +1 -0
- package/{chunk-GSDHTV3P.js → chunk-Y4EMWRGE.js} +1 -1
- package/{chunk-LJBFPDG2.js → chunk-YGHS3INE.js} +1 -1
- package/{chunk-UY2WEUKC.js → chunk-YMUS7QSB.js} +1 -1
- package/{chunk-AYOFR344.js → chunk-ZXQSQRKN.js} +1 -1
- package/index.html +2 -2
- package/{main-4RMOPKNF.js → main-SIS2YGAN.js} +1 -1
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +118 -47
- package/styles-43GHZ572.css +1 -0
- package/chunk-2DOT6WAE.js +0 -1
- package/chunk-2TGB7FK7.js +0 -1
- package/chunk-5MOLXRIQ.js +0 -1
- package/chunk-5N2VOOTZ.js +0 -11
- package/chunk-7FYL7MVA.js +0 -1
- package/chunk-A7BE7GAK.js +0 -1
- package/chunk-ANLSBAWJ.js +0 -1
- package/chunk-AXBVBB2B.js +0 -1
- package/chunk-BKEVAAWN.js +0 -1
- package/chunk-CJ5SZZQC.js +0 -1
- package/chunk-CVTB53TL.js +0 -1
- package/chunk-EGJL4XXZ.js +0 -1
- package/chunk-ERITO7WM.js +0 -4
- package/chunk-FCVVFGU2.js +0 -1
- package/chunk-FXZ3K2FU.js +0 -1
- package/chunk-G6ZV6LAU.js +0 -1
- package/chunk-HDJL2F2F.js +0 -1
- package/chunk-IHB6NRMQ.js +0 -1
- package/chunk-IV3M3Q6B.js +0 -1
- package/chunk-KEHA3UWS.js +0 -1
- package/chunk-NDLPNBGE.js +0 -1
- package/chunk-NQIZGFSO.js +0 -1
- package/chunk-PAPOSE5G.js +0 -1
- package/chunk-Q72Y55NB.js +0 -1
- package/chunk-SP3KG7FO.js +0 -1
- package/chunk-SSUCTZ3H.js +0 -1
- package/chunk-UCR4I5MD.js +0 -1
- package/chunk-W4HWOC3K.js +0 -1
- package/chunk-WQVQC2MC.js +0 -2
- package/chunk-WSFAOFM3.js +0 -1
- package/chunk-XE42CXGY.js +0 -1
- package/chunk-XRSDTFDU.js +0 -2
- package/chunk-YCLTQEU6.js +0 -1
- package/chunk-ZVWTSTR6.js +0 -1
- package/styles-6WG7TD6T.css +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as Ln,b as Yt,c as wn}from"./chunk-5L2OOKRZ.js";import{a as Qe,b as kt,c as Vt,d as xn}from"./chunk-OO32MPRQ.js";import{a as An,b as In,c as ye,d as bt,e as Pn,f as On,g as Ut,i as yn,j as Mn,k as Rn}from"./chunk-OBF6ZSYT.js";import{a as Dn}from"./chunk-3AZTY4MH.js";import{a as te}from"./chunk-35APLYI4.js";import{a as vt}from"./chunk-YMUS7QSB.js";import{a as Fn,b as ve,c as Nn}from"./chunk-ZXQSQRKN.js";import{a as Se}from"./chunk-R6TFME5I.js";import{B as ee,C as En,E as Mt,F as fn,H as Te,K as Rt,L as xt,O as Lt,P as Ge,V as wt,W as Ye,Y as $t,a as Cn,b as ht,c as oe,d as Ft,e as ae,f as Nt,h as gn,i as ce,j as Dt,k as At,n as Tn,o as Sn,p as It,q as Pt,r as Ot,s as de,t as qe,v as Z,w as yt,z as $e}from"./chunk-NCXKMSRH.js";import{c as hn,d as Gt}from"./chunk-QAQMMCTH.js";import{b as je,d as we,e as mn}from"./chunk-KHZ5AXGT.js";import{aa as pn}from"./chunk-BDQJFOCO.js";import{$b as s,$c as Ve,Ab as Pe,Ac as un,Bb as Oe,Bc as Re,Cb as u,Cc as ie,Db as l,Dc as pe,E as rn,Eb as r,Ec as ft,F as be,Fb as O,Jb as ge,Kb as ue,Kc as ke,L as mt,Lb as ne,Mb as D,N as Ct,O as sn,P as gt,Pa as Tt,Q as _n,Rc as R,Sa as _,Tb as y,Ub as M,V as Ae,Vb as A,Wc as xe,Xc as k,Yb as Ue,Yc as He,Zb as E,_ as x,a as an,ac as Xe,bc as he,da as f,ea as h,f as ut,gb as z,gc as ze,ha as cn,hc as We,ic as Y,jc as Et,kc as Fe,l as Je,lb as W,nc as p,ob as dn,oc as qt,pa as F,pc as B,q as pt,qc as lt,ra as Q,sc as b,tc as v,uc as U,vb as St,vc as _e,w as ln,wb as C,wc as q,xb as g,xc as S,yb as Ie}from"./chunk-UH2E7MMT.js";import{a as j,b as se}from"./chunk-7CGTOI24.js";var Bt=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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function rt(n){if(dn(n))return n();if(Array.isArray(n))return n.map(t=>rt(t));if(typeof n=="object"&&n!==null){let t={};for(let e in n)n.hasOwnProperty(e)&&(t[e]=rt(n[e]));return t}return n}var Vn=n=>n;function $n(n,t){let e=sn(n,Vn,t?.equal),i=e[an],o=e;return o.set=a=>{let c=e();return gt(i,a),()=>{gt(i,c)}},o.update=a=>{let c=e();return _n(i,a),()=>{gt(i,c)}},e}var Ze=class n{#e=x(hn);isSaving=F(!1);resourceDestinations=Nn({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=$n(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(!0),e.Description="",(t==="new"?this.#e.postApiV2ConnectionStrings({requestBody:e}):this.#e.putApiV2ConnectionStringById({id:t.ID,requestBody:e})).pipe(be(()=>{this.isSaving.set(!1)}))}getById(t){return this.#e.getApiV2ConnectionStringById({id:t})}delete(t){return this.#e.deleteApiV2ConnectionStringById({id:t})}reload(){this.resourceDestinations.reload()}updateBackups(t,e){return this.#e.postApiV2ConnectionStringByIdUpdateBackups({id:t,requestBody:{BackupIDs:e}})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function Bn(n,t){if(n&1){let e=D();l(0,"div",26)(1,"sh-form-field")(2,"label",27),A(3,7),r(),l(4,"input",28,0),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),h(o)}),r(),l(6,"sh-icon",29),p(7,"clock"),r()(),l(8,"sh-datepicker-input",30)(9,"label",31),p(10,"\xA0"),r(),l(11,"input",32,1),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),h(o)}),r(),l(13,"sh-icon",29),p(14,"calendar"),r()()(),l(15,"div",26)(16,"sh-form-field")(17,"label",33),A(18,8),r(),l(19,"input",34),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),h(o)}),r()(),l(20,"sh-select",35)(21,"input",36),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),h(o)}),r()()(),l(22,"sh-toggle-card",37),ge(23,38),A(24,9),ue(),l(25,"div",39)(26,"sh-toggle",24),y(27,10),l(28,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),h(o)}),r(),M(),r(),l(29,"sh-toggle",24),y(30,11),l(31,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),h(o)}),r(),M(),r(),l(32,"sh-toggle",24),y(33,12),l(34,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),h(o)}),r(),M(),r(),l(35,"sh-toggle",24),y(36,13),l(37,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),h(o)}),r(),M(),r(),l(38,"sh-toggle",24),y(39,14),l(40,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),h(o)}),r(),M(),r(),l(41,"sh-toggle",24),y(42,15),l(43,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),h(o)}),r(),M(),r(),l(44,"sh-toggle",24),y(45,16),l(46,"input",25),U("ngModelChange",function(o){f(e);let a=s(2);return v(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),h(o)}),r(),M(),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("disableToggle",!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 Kn(n,t){if(n&1){let e=D();l(0,"div",23)(1,"sh-toggle",24),y(2,5),l(3,"input",25),U("ngModelChange",function(o){f(e);let a=s();return v(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),h(o)}),r(),M(),r(),l(4,"p"),A(5,6),r()(),C(6,Bn,47,14)}if(n&2){let e=s();_(3),b("ngModel",e.scheduleFields.autoRun),_(3),g(e.scheduleFields.autoRun()?6:-1)}}var Jn=[{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`}],Kt=[{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:Xn().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 Gn(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 Xn(){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 Zt=()=>({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)}}}),Qt=class n{#e=x(Me);#t=x(we);#n=x(je);unitOptions=Jn;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Kt;updateScheduleType(t){let e=Kt.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=z({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 m;m=$localize`Run again every`;let T;T=$localize`Allowed days`;let I;I=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let P;P=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let N;N=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let J;return J=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,i,o,a,c,d,m,T,I,P,w,$,N,K,J,[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,"disableToggle"],["title",""],[1,"days-wrap"]]},template:function(e,i){e&1&&(l(0,"h3",17),A(1,2),r(),l(2,"sh-select",18)(3,"input",19),E("ngModelChange",function(a){return i.updateScheduleType(a)}),r()(),C(4,Kn,7,2),l(5,"div",20)(6,"button",21),E("click",function(){return i.goBack()}),y(7,3),O(8,"sh-icon"),M(),r(),l(9,"button",22),E("click",function(){return i.next()}),y(10,4),O(11,"sh-icon"),M(),r()()),e&2&&(_(2),u("isClearable",!1)("options",i.scheduleOptions),_(),u("ngModel",i.scheduleType()),_(),g(i.scheduleType()==="custom"?4:-1))},dependencies:[de,oe,At,ht,ae,ce,Te,Ye,Z,ee,Ge,wt,fn],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 zn=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Wn=["[title]","[description]","[action]","*"];function Hn(n,t){n&1&&p(0,"Title")}function jn(n,t){n&1&&(l(0,"sh-icon"),p(1,"caret-down"),r())}var st=class n{isActive=Ve(!1);disableToggle=k(!1);ngOnInit(){this.disableToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&Fe("active",i.isActive())},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Wn,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,i){e&1&&(Xe(zn),l(0,"header")(1,"div",0)(2,"h3",1),E("click",function(){return i.disableToggle()||i.toggle()}),he(3,0,null,Hn,1,0),C(5,jn,2,0,"sh-icon"),r(),he(6,1),r(),l(7,"div",2),he(8,2),r()(),l(9,"div",3),he(10,3),r()),e&2&&(_(5),g(i.disableToggle()?-1:5))},dependencies:[Z],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 qn(n,t){if(n&1){let e=D();l(0,"sh-select",2)(1,"input",6),U("ngModelChange",function(o){f(e);let a=s();return v(a.internalPath,o)||(a.internalPath=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.updateFilter())}),r()()}if(n&2){let e=s();u("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),_(),b("ngModel",e.internalPath)}}function Yn(n,t){if(n&1&&(l(0,"div",7),p(1),r()),n&2){let e,i=s(2);_(),qt((e=i.currentExpressionOption())==null?null:e.startsWith)}}function Qn(n,t){if(n&1&&(l(0,"div",8),p(1),r()),n&2){let e,i=s(2);_(),qt((e=i.currentExpressionOption())==null?null:e.endsWith)}}function Zn(n,t){if(n&1){let e=D();l(0,"sh-form-field",3)(1,"input",6),U("ngModelChange",function(o){f(e);let a=s();return v(a.internalPath,o)||(a.internalPath=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.updateFilter())}),r(),C(2,Yn,2,1,"div",7),C(3,Qn,2,1,"div",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 ei=[{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"}],ti=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Includes folders where name contains",value:"+FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Includes folder",value:"+Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Includes files where name contains",value:"+FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Include 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:"Include file groups",value:"+FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Jt=class n{path=k.required();osType=k();pathChange=xe();remove=xe();internalPath=F("");pathType=F("-Expression");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=F(ei);expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return ti.map(i=>i.value==="-Folder"||i.value==="+Folder"?se(j({},i),{startsWith:"",endsWith:""}):i.value==="-FolderName"||i.value==="+FolderName"?se(j({},i),{startsWith:"*",endsWith:`*${e}`}):i.value==="-FileName"||i.value==="+FileName"?se(j({},i),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):i.value==="-FileGroup"||i.value==="+FileGroup"?se(j({},i),{startsWith:"{",endsWith:"}"}):i.value==="-Regex"||i.value==="+Regex"?se(j({},i),{startsWith:"[",endsWith:"]"}):i.value==="-Extension"||i.value==="+Extension"?se(j({},i),{startsWith:"*.",endsWith:""}):se(j({},i),{startsWith:"",endsWith:""}))});pathEffect=Q(()=>{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!==""&&(t==="*"&&(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=z({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"],["boxPrefix",""],["boxSuffix",""]]},template:function(e,i){if(e&1&&(l(0,"sh-select",0)(1,"input",1),U("ngModelChange",function(a){return v(i.pathType,a)||(i.pathType=a),a}),E("ngModelChange",function(){return i.updateFilter()}),r()(),C(2,qn,2,4,"sh-select",2)(3,Zn,4,3,"sh-form-field",3),l(4,"div",4),E("click",function(){return i.removeFilter()}),l(5,"sh-icon",5),p(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:[de,oe,ae,ce,Ge,Te,Z],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 _t=class n{data=k();closed=xe();path=F("");isValid=R(()=>this.path().length>0);dataEffect=Q(()=>{let t=this.data();t?.initialPath&&this.path.set(t.initialPath)});submit(){this.closed.emit(this.path()||null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:13,vars:3,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Local disk source`;let i;i=$localize`Folder path`;let o;o=$localize`Cancel`;let a;return a=$localize` Use this source `,[e,i,o,a,[1,"title-30"],["content",""],[3,"customRemoteMode"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,3,"ngModelChange","ngModel"],["footer","",1,"sticky"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised","primary",3,"click","disabled"]]},template:function(e,i){e&1&&(l(0,"header")(1,"h3",4),A(2,0),r()(),l(3,"section",5)(4,"app-file-tree",6)(5,"label",7),A(6,1),r(),l(7,"input",8),U("ngModelChange",function(a){return v(i.path,a)||(i.path=a),a}),r()()(),l(8,"footer",9)(9,"button",10),E("click",function(){return i.closed.emit(null)}),A(10,2),r(),l(11,"button",11),E("click",function(){return i.submit()}),A(12,3),r()()),e&2&&(_(4),u("customRemoteMode","diskimage"),_(3),b("ngModel",i.path),_(4),u("disabled",!i.isValid()))},dependencies:[ee,Qe,de,oe,ae,ce],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 ni=[[["","displayName",""]],[["","description",""]],"*"],ii=["[displayName]","[description]","*"];function oi(n,t){if(n&1&&p(0),n&2){s(2);let e=S(1);B(" ",e.Name," ")}}function ai(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);B(" ",e.displayName," ")}}function li(n,t){n&1&&(l(0,"sh-chip",6),p(1,"Special"),r())}function ri(n,t){n&1&&(l(0,"sh-chip",7),p(1,"Deprecated"),r())}function si(n,t){if(n&1&&p(0),n&2){s();let e=S(15);B(" ",e," ")}}function _i(n,t){if(n&1&&p(0),n&2){s(2);let e=S(0);B(" ",e.description," ")}}function ci(n,t){if(n&1&&(l(0,"sh-card",0)(1,"div",1),O(2,"img",2),r(),l(3,"div",3)(4,"div",4),he(5),r(),l(6,"div",5),C(7,oi,1,1)(8,ai,1,1),r(),C(9,li,2,0,"sh-chip",6)(10,ri,2,0,"sh-chip",7),r(),l(11,"div",8)(12,"div",4),he(13,1),r(),l(14,"div",5),_e(15),C(16,si,1,1)(17,_i,1,1),r()(),l(18,"div",9),he(19,2),r()()),n&2){let e=s(),i=S(0),o=S(1);u("variant",e.variant()),_(2),u("src",i.icon,Tt),St("alt",i.displayName),_(5),g(o&&o.Name?7:8),_(2),g((i.sortOrder??0)==-2?9:(i.sortOrder??0)<0?10:-1),_(6);let a=q(e.getSimplePath(o==null?null:o.BaseUrl));_(),g(a&&a.length>0?16:17)}}var et=class n{destination=k();targetUrl=k();variant=k("type-b");connectionStringId=k();#e=x(Ze);connectionString=R(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=R(()=>{let t=this.targetUrl();return t?ye(t)??null:null});destinationFromTargetUrl=R(()=>{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=R(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?In(t):""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:ii,decls:3,vars:3,consts:[[3,"variant"],[1,"icon"],[3,"src"],[1,"name"],[1,"projected"],[1,"default"],[1,"small","simple","primary"],[1,"small","simple","warn"],[1,"description"],[1,"actions"]],template:function(e,i){if(e&1&&(Xe(ni),_e(0)(1),C(2,ci,20,7,"sh-card",0)),e&2){let o=q(i.destinationItem());_(),q(i.connectionString()),_(),g(o?2:-1)}},dependencies:[En,Mt],styles:['[_nghost-%COMP%]{display:block;border-radius:var(--shape-3)}[_nghost-%COMP%]:focus-visible{outline:2px solid var(--primary-8);outline-offset:2px}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%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:empty{display:none}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .projected[_ngcontent-%COMP%]:not(:empty) + .default[_ngcontent-%COMP%]{display:none}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};var tt=class n{#e=x(Se);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let i=Pn(e.Key);if(i.length<=1){let o=bt(e.Key);return o.isDefaultEntry===!0?[se(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=R(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=R(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=R(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=R(()=>[...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=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function di(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",4),E("click",function(){let o=f(e).$implicit,a=s();return h(a.setDestination.emit(o.customKey??o.key))})("keydown.enter",function(o){return o.target.click()})("keydown.space",function(o){return o.target.click()}),l(1,"button",5),y(2,0),O(3,"sh-icon"),M(),r()()}if(n&2){let e=t.$implicit;u("destination",e)}}var Xt=class n{#e=x(tt);showAsSources=k(!1);moduleType=k("Backend");setDestination=xe();destinationSearchTerm=F("");destinationTypeOptions=R(()=>{switch(this.moduleType()){case"SourceProvider":return this.#e.sourceProviderOptions();case"RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=R(()=>{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=z({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"],["tabindex","0",3,"destination"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination"],["shButton","","tabindex","-1","type","button"]]},template:function(e,i){e&1&&(l(0,"sh-form-field")(1,"input",1),U("ngModelChange",function(a){return v(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),r()(),l(2,"div",2),Pe(3,di,4,1,"app-destination-list-item",3,Ie),r()),e&2&&(_(),b("ngModel",i.destinationSearchTerm),_(2),Oe(i.destinationTypeOptionsFocused()))},dependencies:[et,de,oe,ae,ce,Te,ee,Z],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden;padding:.25rem}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding:.25rem .375rem 1rem;width:calc(100% + .5rem);margin-left:-.375rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var ui=["fileInput"],pi=[[["label"]]],mi=["label"],zt=class n{customId=k();content=F("");readonly=F(!1);placeholder=k($localize`Drop a file here or use the browse button`);fileInputRef=He("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=Q(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t??"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&ze(i.fileInputRef,ui,5),e&2&&We()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[un([{provide:Cn,useExisting:n,multi:!0}])],ngContentSelectors:mi,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();Xe(pi),he(0,0,["ngProjectAs","label",5,["label"]]),l(1,"div",1)(2,"button",2),E("click",function(){return i.triggerBrowse()}),l(3,"sh-icon"),p(4,"upload"),r()()(),l(5,"div",3),E("drop",function(c){return i.onFileDrop(c)})("dragover",function(c){return i.onDragOver(c)}),l(6,"textarea",4),U("ngModelChange",function(c){return f(o),v(i.content,c)||(i.content=c),h(c)}),r()(),l(7,"input",5,0),E("change",function(c){return i.onFileSelected(c)}),r()}e&2&&(_(6),u("placeholder",i.placeholder()),b("ngModel",i.content),u("disabled",i.readonly()))},dependencies:[de,oe,ae,ce,Z,ee],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 Ci=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),re=n=>({$implicit:n}),gi=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Ti=()=>({updateOn:"blur"}),Si=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i}),Ee=(n,t)=>({fieldGroup:n,formView:t}),Ei=()=>["/connect/logon"];function fi(n,t){n&1&&ne(0)}function hi(n,t){if(n&1&&W(0,fi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=Y(15);s();let a=S(0),c=S(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,Ci,i,e,a,c.oauthField)))}}function Fi(n,t){n&1&&ne(0)}function Ni(n,t){if(n&1&&W(0,Fi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s();let o=Y(15);s();let a=S(0),c=S(1);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,gi,i,e,a,c.oauthField)))}}function Di(n,t){if(n&1){let e=D();l(0,"button",25),E("click",function(){f(e);let o=s(2);return h(o.showTextArea.set(!1))}),y(1,8),O(2,"sh-icon"),M(),r()}}function Ai(n,t){if(n&1){let e=D();l(0,"button",32,2),E("click",function(){let o=f(e).$implicit,a=s(3);return h(a.addAdvancedOption(o))}),p(2),r()}if(n&2){let e=t.$implicit;_(2),B(" ",e.name," ")}}function Ii(n,t){if(n&1){let e=D();l(0,"div",22)(1,"sh-menu",26)(2,"button",27),y(3,9),O(4,"sh-icon"),M(),r(),ge(5,28),Pe(6,Ai,3,1,"button",29,Ie),ue(),r(),l(8,"sh-menu")(9,"button",30)(10,"sh-icon"),p(11,"dots-three-vertical"),r()(),ge(12,28),l(13,"button",31),E("click",function(){f(e);let o=s(2);return h(o.showTextArea.set(!0))}),l(14,"sh-icon"),p(15,"link"),r(),p(16," Edit contents as text "),r(),ue(),r()()}if(n&2){s();let e=S(9);_(),u("searchable",!0),_(),u("disabled",e.length===0),_(4),Oe(e)}}function Pi(n,t){if(n&1){let e=D();l(0,"textarea",33),E("ngModelChange",function(o){f(e);let a=s(2);return h(a.updateSettingsFromText(o))}),r()}if(n&2){let e=s(2);u("ngModel",e.settingsAsText())("ngModelOptions",Re(2,Ti))}}function Oi(n,t){n&1&&ne(0)}function yi(n,t){if(n&1&&W(0,Oi,1,0,"ng-container",24),n&2){let e=t.$implicit,i=t.$index;s(2);let o=Y(15),a=s(),c=S(0),d=S(1),m=a.getFormView("advanced",e)??a.getDefaultFormView(e);u("ngTemplateOutlet",o)("ngTemplateOutletContext",ie(7,re,ft(2,Si,i,m,c,d.oauthField)))}}function Mi(n,t){if(n&1&&Pe(0,yi,1,9,"ng-container",null,Ie),n&2){let e=s(2);Oe(e.advancedFormFieldNames())}}function Ri(n,t){n&1&&(l(0,"sup",42),p(1,"*"),r())}function xi(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Li(n,t){if(n&1){let e=D();l(0,"app-file-tree",35)(1,"label",41),C(2,Ri,2,0,"sup",42),p(3),C(4,xi,2,1,"sh-icon",43),r(),l(5,"input",44),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(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),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("id",d)("ngModel",o)}}function wi(n,t){n&1&&(l(0,"sup",45),p(1,"*"),r())}function $i(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Gi(n,t){if(n&1){let e=D();l(0,"app-file-tree",36)(1,"label",41),C(2,wi,2,0,"sup",45),p(3),C(4,$i,2,1,"sh-icon",43),r(),l(5,"input",44),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(5);u("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("id",d)("ngModel",o)}}function vi(n,t){n&1&&(l(0,"sup",46),p(1,"*"),r())}function bi(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Ui(n,t){n&1&&(l(0,"sh-icon",47),p(1," warning "),r())}function ki(n,t){n&1&&ne(0)}function Vi(n,t){if(n&1&&(l(0,"sh-icon",51),p(1," link "),r()),n&2){s();let e=S(8),i=S(9);Fe("error",e&&i==="error")("warn",e&&i==="warning"),u("shTooltip",e)}}function Bi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"envelope"),r())}function Ki(n,t){n&1&&(l(0,"sh-icon",50),p(1,"hard-drives"),r())}function Ji(n,t){n&1&&(l(0,"sh-icon",50),p(1,"jar"),r())}function Xi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"textbox"),r())}function zi(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,vi,2,0,"sup",46),p(3),C(4,bi,2,1,"sh-icon",43),C(5,Ui,2,0,"sh-icon",47),W(6,ki,1,0,"ng-container",24),r(),l(7,"input",48),E("keydown",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),_e(8)(9),C(10,Vi,2,5,"sh-icon",49)(11,Bi,2,0,"sh-icon",50)(12,Ki,2,0,"sh-icon",50)(13,Ji,2,0,"sh-icon",50)(14,Xi,2,0,"sh-icon",50),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(3),c=S(4),d=S(5);s();let m=Y(17);_(),u("for",d),_(),g(e.formView.isMandatory&&c?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),g(c&&e.formView.type==="Path"?5:-1),_(),u("ngTemplateOutlet",m)("ngTemplateOutletContext",ie(16,re,pe(13,Ee,e.fieldGroup,e.formView))),_(),u("type",e.formView.type==="Email"?"email":"text")("id",d)("ngModel",o);let T=a,I=s().hasLeadingSlash(T??"");_(),q(I&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),_(),q(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 Wi(n,t){n&1&&(l(0,"sup",52),p(1,"*"),r())}function Hi(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function ji(n,t){n&1&&ne(0)}function qi(n,t){if(n&1){let e=D();l(0,"span",56),E("click",function(){f(e);let o=s(2).$implicit,a=s(2);return h(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),r()}}function Yi(n,t){n&1&&(l(0,"sh-icon",50),p(1,"password"),r())}function Qi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),E("click",function(){f(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),r()}}function Zi(n,t){if(n&1){let e=D();l(0,"sh-icon",57),E("click",function(){f(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),r()}}function eo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Wi,2,0,"sup",52),p(3),C(4,Hi,2,1,"sh-icon",43),W(5,ji,1,0,"ng-container",24),r(),l(6,"input",53),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),C(7,qi,2,0,"span",54)(8,Yi,2,0,"sh-icon",50),C(9,Qi,2,0,"sh-icon",55)(10,Zi,2,0,"sh-icon",55),r()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(14,re,pe(11,Ee,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 to(n,t){n&1&&(l(0,"sup",59),p(1,"*"),r())}function no(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function io(n,t){n&1&&ne(0)}function oo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function ao(n,t){if(n&1){let e=D();l(0,"sh-select",58)(1,"label",41),C(2,to,2,0,"sup",59),p(3),C(4,no,2,1,"sh-icon",43),W(5,io,1,0,"ng-container",24),r(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,oo,1,2,"ng-template",null,3,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(17);u("options",i)("isClearable",!1)("optionTemplate",e),_(),u("for",m),_(),g(o.formView.isMandatory&&d?2:-1),_(),B(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",T)("ngTemplateOutletContext",ie(14,re,pe(11,Ee,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function lo(n,t){if(n&1&&(_e(0),C(1,ao,9,16)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function ro(n,t){n&1&&(l(0,"sup",62),p(1,"*"),r())}function so(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function _o(n,t){n&1&&ne(0)}function co(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function uo(n,t){if(n&1){let e=D();l(0,"sh-select",61)(1,"label",41),C(2,ro,2,0,"sup",62),p(3),C(4,so,2,1,"sh-icon",43),W(5,_o,1,0,"ng-container",24),r(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,co,1,2,"ng-template",null,4,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(17);u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),_(),u("for",m),_(),g(o.formView.isMandatory&&d?2:-1),_(),B(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",T)("ngTemplateOutletContext",ie(15,re,pe(12,Ee,o.fieldGroup,o.formView))),_(),u("id",m)("ngModel",c)}}function po(n,t){n&1&&O(0,"sh-progress-bar",60)}function mo(n,t){if(n&1&&(_e(0),C(1,uo,9,17)(2,po,1,0,"sh-progress-bar",60)),n&2){let e=s().$implicit,i=S(2),o=q(s(2).mapOptionsWithFreeText(e.formView,i));_(),g(o?1:2)}}function Co(n,t){n&1&&(l(0,"sup",64),p(1,"*"),r())}function go(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function To(n,t){n&1&&ne(0)}function So(n,t){if(n&1){let e=D();l(0,"app-size",63),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,Co,2,0,"sup",64),p(3),C(4,go,2,1,"sh-icon",43),W(5,To,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);u("inputType",e.Name)("ngModel",o)("customId",c),_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(12,re,pe(9,Ee,e.fieldGroup,e.formView)))}}function Eo(n,t){n&1&&(l(0,"sup",65),p(1,"*"),r())}function fo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function ho(n,t){n&1&&ne(0)}function Fo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Eo,2,0,"sup",65),p(3),C(4,fo,2,1,"sh-icon",43),W(5,ho,1,0,"ng-container",24),r(),l(6,"input",66),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"numpad"),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(11,re,pe(8,Ee,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o)}}function No(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function Do(n,t){n&1&&ne(0)}function Ao(n,t){if(n&1){let e=D();l(0,"sh-toggle",38)(1,"label",41),p(2),C(3,No,2,1,"sh-icon",43),W(4,Do,1,0,"ng-container",24),r(),l(5,"input",67),E("change",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(5);s();let c=Y(17),d=s();_(),u("for",a),_(),B(" ",i," "),_(),g(e.formView.longDescription?3:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",ie(9,re,pe(6,Ee,e.fieldGroup,e.formView))),_(),u("checked",d.isTrue(o))}}function Io(n,t){n&1&&(l(0,"sup",69),p(1,"*"),r())}function Po(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function Oo(n,t){n&1&&ne(0)}function yo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Mo(n,t){if(n&1){let e=D();l(0,"sh-select",68)(1,"label",41),C(2,Io,2,0,"sup",69),p(3),C(4,Po,2,1,"sh-icon",43),W(5,Oo,1,0,"ng-container",24),r(),l(6,"input",70),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,yo,1,2,"ng-template",null,5,ke)}if(n&2){let e=Y(8);s();let i=S(0),o=s().$implicit,a=S(1),c=S(2),d=S(4),m=S(5);s();let T=Y(17);u("options",i)("selectMultiple",!0)("optionTemplate",e),_(),u("for",m),_(),g(o.formView.isMandatory&&d?2:-1),_(),B(" ",a," "),_(),g(o.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",T)("ngTemplateOutletContext",ie(13,re,pe(10,Ee,o.fieldGroup,o.formView))),_(),u("ngModel",c)}}function Ro(n,t){if(n&1&&(_e(0),C(1,Mo,9,15)),n&2){let e=s().$implicit,i=q(s(2).mapOptions(e.formView));_(),g(i?1:-1)}}function xo(n,t){n&1&&(l(0,"sup",71),p(1,"*"),r())}function Lo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function wo(n,t){n&1&&ne(0)}function $o(n,t){if(n&1){let e=D();l(0,"app-timespan",63),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label",41),C(2,xo,2,0,"sup",71),p(3),C(4,Lo,2,1,"sh-icon",43),W(5,wo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17);u("inputType",e.formView.name)("ngModel",o)("customId",c),_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(12,re,pe(9,Ee,e.fieldGroup,e.formView)))}}function Go(n,t){n&1&&(l(0,"sup",73),p(1,"*"),r())}function vo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(2).$implicit;u("shTooltip",e.formView.longDescription)}}function bo(n,t){n&1&&ne(0)}function Uo(n,t){if(n&1){let e=D();l(0,"app-file-drop-textarea",72),E("ngModelChange",function(o){f(e);let a=s().$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),l(1,"label"),C(2,Go,2,0,"sup",73),p(3),C(4,vo,2,1,"sh-icon",43),W(5,bo,1,0,"ng-container",24),r()()}if(n&2){let e=s().$implicit,i=S(2),o=S(4),a=S(5);s();let c=Y(17);u("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),_(2),g(e.formView.isMandatory&&o?2:-1),_(),B(" ",e.formView.shortDescription??e.formView.name," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",c)("ngTemplateOutletContext",ie(11,re,pe(8,Ee,e.fieldGroup,e.formView)))}}function ko(n,t){n&1&&(O(0,"sh-spinner"),l(1,"span"),A(2,10),r()),n&2&&Et("--spinner-size","16px")("--spinner-thickness","2px")}function Vo(n,t){n&1&&(l(0,"div",76),A(1,11),r())}function Bo(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;lt(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function Ko(n,t){if(n&1){let e=D();l(0,"sh-select",77)(1,"label",41)(2,"sup",78),p(3,"*"),r(),l(4,"span"),A(5,12),r()(),l(6,"input",44),E("ngModelChange",function(o){f(e);let a=s(4).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r()(),W(7,Bo,1,2,"ng-template",null,6,ke)}if(n&2){s(4);let e=S(2),i=S(5),o=s(2);u("options",o.restoreBackupIdOptions())("isClearable",!1),_(),u("for",i),_(5),u("id",i)("ngModel",e)}}function Jo(n,t){if(n&1&&C(0,ko,3,4)(1,Vo,2,0,"div",76)(2,Ko,9,5),n&2){let e=s(5);g(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2)}}function Xo(n,t){n&1&&(l(0,"sup",79),p(1,"*"),r())}function zo(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(4).$implicit;u("shTooltip",e.formView.longDescription)}}function Wo(n,t){n&1&&ne(0)}function Ho(n,t){if(n&1){let e=D();l(0,"button",81),E("click",function(){f(e),s(4);let o=S(5),a=s(2);return h(a.toggleDisabled(o))}),y(1,13),O(2,"sh-icon"),M(),r()}}function jo(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"label",41),C(2,Xo,2,0,"sup",79),p(3),C(4,zo,2,1,"sh-icon",43),W(5,Wo,1,0,"ng-container",24),r(),l(6,"input",80),E("ngModelChange",function(o){f(e);let a=s(3).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(7,"sh-icon",50),p(8,"textbox"),r()(),C(9,Ho,3,0,"button",40)}if(n&2){let e=s(3).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17),m=s();_(),u("for",c),_(),g(e.formView.isMandatory&&a?2:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?4:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(15,re,pe(12,Ee,e.fieldGroup,e.formView))),_(),u("type","text")("id",c)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",!0),_(3),g(m.getIsDisabled(c)?9:-1)}}function qo(n,t){if(n&1&&(l(0,"div",74),C(1,Jo,3,1)(2,jo,10,17),r()),n&2){let e=s(4);_(),g(e.isRestoreFlow()?1:2)}}function Yo(n,t){if(n&1){let e=D();l(0,"div",82),y(1,14),O(2,"div")(3,"div"),M(),r(),l(4,"button",81),E("click",function(){f(e);let o=s(5);return h(o.openConsole())}),y(5,15),O(6,"sh-icon"),M(),r()}}function Qo(n,t){n&1&&(l(0,"div",82),A(1,16),r(),l(2,"button",83),y(3,17),O(4,"sh-icon"),M(),r()),n&2&&(_(2),u("routerLink",Re(1,Ei)))}function Zo(n,t){if(n&1&&(l(0,"div",75),C(1,Yo,7,0)(2,Qo,5,2),r()),n&2){let e=s(4);_(),g(e.isConnectedToConsole()?1:2)}}function ea(n,t){if(n&1&&C(0,qo,3,1,"div",74)(1,Zo,3,1,"div",75),n&2){let e=s(3);g(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1)}}function ta(n,t){n&1&&(l(0,"sup",85),p(1,"*"),r())}function na(n,t){if(n&1&&(l(0,"sh-icon",43),p(1,"question"),r()),n&2){let e=s(3).$implicit;u("shTooltip",e.formView.longDescription)}}function ia(n,t){n&1&&ne(0)}function oa(n,t){if(n&1){let e=D();l(0,"div",84)(1,"sh-form-field")(2,"label",41),C(3,ta,2,0,"sup",85),p(4),C(5,na,2,1,"sh-icon",43),W(6,ia,1,0,"ng-container",24),r(),l(7,"input",86),E("ngModelChange",function(o){f(e);let a=s(2).$implicit,c=s(2);return h(c.updateFieldValue(a.fieldGroup,a.formView.name,o))}),r(),l(8,"sh-icon",50),p(9,"textbox"),r()(),l(10,"button",87),E("click",function(){f(e);let o=s(4);return h(o.authenticateFilen())}),y(11,18),O(12,"sh-icon"),M(),r()()}if(n&2){let e=s(2).$implicit,i=S(1),o=S(2),a=S(4),c=S(5);s();let d=Y(17),m=s();_(2),u("for",c),_(),g(e.formView.isMandatory&&a?3:-1),_(),B(" ",i," "),_(),g(e.formView.longDescription?5:-1),_(),u("ngTemplateOutlet",d)("ngTemplateOutletContext",ie(12,re,pe(9,Ee,e.fieldGroup,e.formView))),_(),u("id",c)("ngModel",o),_(3),u("disabled",m.isAuthenticatingFilen())}}function aa(n,t){if(n&1&&C(0,oa,13,14,"div",84),n&2){let e=s(3);g(e.hasFilenApiKey()?-1:0)}}function la(n,t){if(n&1){let e=D();l(0,"button",81),E("click",function(){f(e);let o=s().$implicit,a=s(2);return h(a.removeAdvancedOption(o.formView.name))}),l(1,"sh-icon"),p(2,"x-circle"),r()()}}function ra(n,t){if(n&1&&(l(0,"div",34),_e(1)(2)(3)(4)(5),C(6,Li,6,12,"app-file-tree",35)(7,Gi,6,9,"app-file-tree",36)(8,zi,15,18,"sh-form-field")(9,eo,11,16,"sh-form-field")(10,lo,2,2)(11,mo,3,2)(12,So,6,14,"app-size",37)(13,Fo,9,13,"sh-form-field")(14,Ao,6,11,"sh-toggle",38)(15,Ro,2,2)(16,$o,6,14,"app-timespan",37)(17,Uo,6,13,"app-file-drop-textarea",39)(18,ea,2,1)(19,aa,1,1),C(20,la,3,0,"button",40),r()),n&2){let e=t.$implicit;s();let i=S(0),o=s();Fe("single-field",e.fieldGroup!=="advanced"),_(),q(e.formView.shortDescription??e.formView.name),_(),q(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),_();let a=q(o.getFieldValue(e.fieldGroup,e.formView.name));_(),q((a??"").toString().trim()===""),_(),q("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 sa(n,t){if(n&1&&(l(0,"sh-icon",88),p(1,"x-circle"),r()),n&2){s();let e=S(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function _a(n,t){if(n&1&&(l(0,"sh-icon",89),p(1,"warning"),r()),n&2){s();let e=S(0);u("shTooltip",(e==null?null:e.message)??"Invalid value")}}function ca(n,t){if(n&1&&(_e(0),C(1,sa,2,1,"sh-icon",88)(2,_a,2,1,"sh-icon",89)),n&2){let e=s().$implicit,i=S(0),o=q(e.formView.validate(i));_(),g((o==null?null:o.type)==="error"?1:(o==null?null:o.type)==="warning"?2:-1)}}function da(n,t){if(n&1&&(_e(0),C(1,ca,3,2)),n&2){let e=t.$implicit,o=(q(s(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";_(),g(!o&&e.formView.validate?1:-1)}}function ua(n,t){if(n&1&&(_e(0),Pe(1,hi,1,9,"ng-container",null,Ie),Pe(3,Ni,1,9,"ng-container",null,Ie),l(5,"sh-toggle-card",19),ge(6,20)(7),A(8,7),ue(),_e(9),C(10,Di,3,0,"button",21)(11,Ii,17,2,"div",22),ue(),C(12,Pi,1,3,"textarea",23)(13,Mi,2,0),r(),W(14,ra,21,9,"ng-template",null,0,ke)(16,da,2,2,"ng-template",null,1,ke)),n&2){let e=s(),i=S(1);q(e.destinationForm()),_(),Oe(i.custom),_(2),Oe(i.dynamic),_(2),u("disableToggle",!0),_(4),q(e.nonSelectedAdvancedFormViews()),_(),g(e.showTextArea()?10:11),_(2),g(e.showTextArea()?12:13)}}var Wt=class n{#e=x(Me);#t=x(Se);#n=x(vt);#i=x(tt);#o=x(Dn);#r=x(An);#a=x($e);injector=x(cn);targetUrl=Ve.required();useBackupState=k(!1);#l=null;destinationType=R(()=>{let t=this.targetUrl();if(!t)return null;let e=ye(t);return this.#l=e?.customKey??e?.key,this.#l});refreshView=F(!1);destinationForm=F({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=R(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=F(null);showTextArea=F(!1);isLoadingRestoreBackupIdOptions=F(!1);isRestoreFlow=R(()=>!this.useBackupState());restoreBackupIdOptions=ve(Fn(this.targetUrl).pipe(pt(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}}),rn((t,e)=>t.authKey===e.authKey),Ct(({url:t})=>{this.lastRestoreAuthQueryUrl=t}),mt(({url:t})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()?(this.isLoadingRestoreBackupIdOptions.set(!0),this.#r.getDuplicatiStorageBackups(t).pipe(be(()=>this.isLoadingRestoreBackupIdOptions.set(!1)))):Je([]))),{initialValue:[]});isConnectedToConsole=R(()=>this.#o.state()==="connected");hasStorageApiKey=R(()=>(this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0);isAuthenticatingFilen=F(!1);hasFilenApiKey=R(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=R(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=Q(()=>{let t=this.targetUrl(),e=ye(t??""),i=e.key,o=e.customKey??i,a=this.#i.allModules().find($=>$.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:{},m=e&&e.dynamicFields?e.dynamicFields:[],T=e&&e.advancedFields?e.advancedFields:[],I=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],P={destinationType:o,oauthField:c,custom:[],dynamic:[],advanced:[]};d&&Object.entries(d).forEach(([$,N],K)=>{let J=N.order??K,L=N.validate;!L&&N.type==="Bucketname"&&(L=H=>Mn(H)?null:{type:"error",message:$localize`Invalid bucket name.`}),L&&N.type==="Hostname"&&(L=H=>Rn(H)?null:{type:"error",message:$localize`Invalid hostname.`}),P.custom.push(j({order:900+J,validate:L},N))});for(let $=0;$<a.Options.length;$++){let N=a.Options[$];if(N.Deprecated)continue;let K=m.find(J=>J===N.Name||N.Aliases?.includes(J.name)||J.name===N.Name);if(K){let J=N.Aliases?.indexOf(K.name)??-1,L=N.Aliases&&J>-1?N.Aliases[J]:N.Name,H=K&&typeof K!="string",me=H?K?.defaultValue??N.DefaultValue:N.DefaultValue,Ce=H&&K?.order!==void 0?K.order:$,G={name:L,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,order:900+Ce},fe=H?j(j({},G),K):G;P.dynamic.push(fe)}else{let J=N.Name;if(I.find(De=>De===J))continue;let H=T.find(De=>De===J||De.name===J),me=H&&typeof H!="string",Ce=me&&H?.order!==void 0?H.order:$,G={name:J,type:N.Type,shortDescription:N.ShortDescription??void 0,longDescription:N.LongDescription??void 0,options:N.ValidValues,defaultValue:N.DefaultValue,order:900+Ce},fe=me?j(j({},G),H):G;P.advanced.push(fe)}}if(P.custom.sort(($,N)=>$.order-N.order),P.dynamic.sort(($,N)=>$.order-N.order),P.advanced.sort(($,N)=>$.order-N.order),this.destinationFormConfig.set(P),!t)return;let w=Ut(t);w&&this.destinationForm.set({custom:w.custom,dynamic:w.dynamic,advanced:w.advanced})});destinationFormEffect=Q(()=>{let t=this.#l,e=this.destinationForm(),i=this.refreshView();if(!e||!t)return;let o=On({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}#s=F(!1);oauthStartTokenCreation(t,e,i,o){this.#s.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(K=>K.Name==="--oauth-url")?.Value;N&&N.length>0&&(a=N)}let d=this.destinationForm().advanced["oauth-url"];d&&d.length>0&&(a=d);let m=`${a}?type=${t}`,T=450,I=600,P=screen.width/2-T/2,w=screen.height/2-I/2,$=window.open(m,"_blank","height="+I+",width="+T+",menubar=0,status=0,titlebar=0,toolbar=0,left="+P+",top="+w);return window.addEventListener("message",N=>{let K=N.data.startsWith("authid:"),J=K?N.data.replace("authid:",""):null;K&&(this.destinationForm.update(L=>(L[e][i]=J,L)),this.#s.set(!1),this.refreshView.set(!this.refreshView()),$?.close())}),!1}settingsAsText=R(()=>{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=yn(t);this.destinationForm.update(i=>se(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.#o.openConsole()}#_(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.#a.open(te,{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.#a.open(te,{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.#a.open(te,{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.#_(a.toString())}}});return}this.#_(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=z({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let 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 m;m=$localize`This field is mandatory`;let T;T=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let P;P=$localize`This field is mandatory`;let w;w=$localize`This field is mandatory`;let $;$=$localize`This field is mandatory`;let N;N=$localize`This field is mandatory`;let K;K=$localize`This field is mandatory`;let J;J=$localize`Loading available backups...`;let L;L=$localize`No backups found from this machine, contact support`;let H;H=$localize`This field is mandatory`;let me;me=$localize`Pick the backup to restore from`;let Ce;Ce=$localize`This field is mandatory`;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let fe;fe=$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:`,fe=Ue(fe);let De;De=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let nt;nt=$localize`Connect to the console to use Duplicati storage.`;let it;it=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ot;ot=$localize`This field is mandatory`;let at;return at=$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,J,L,me,G,fe,De,nt,it,at,[1,"advanced-options",3,"disableToggle"],["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,"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",m],["autocomplete","new-password",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",T],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",I],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",P],["shTooltip",w],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"change","checked"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",$],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",N],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",K],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",H],["shTooltip",Ce],["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",ot],["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&&(_e(0)(1),C(2,ua,18,5)),e&2){let o=q(i.destinationType());_();let a=q(i.destinationFormConfig());_(),g(o&&a?2:-1)}},dependencies:[qe,oe,At,ae,de,ce,pn,mn,Qe,Vt,xn,zt,Te,ee,Z,wt,Rt,Ge,$t,Ye,xt,Lt],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 Ht=class n{#e=x(Gt);#t=x($e);#n=x(Se);testDestination(t,e,i,o,a,c,d,m){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a,c,d,m):this.testDestinationv1(t,e,i,o,a,c,d,m)}testDestinationv2(t,e,i,o,a,c,d,m){return new ut(T=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:i??null,BackupId:e=="new"?null:e,AutoCreate:m==="create",Options:null,DestinationType:c,SourcePrefix:e=="new"?null:o}}).subscribe({next:I=>{if(I.Success){this.emitSuccessV2(T,t,a,I);return}this.handleGenericError(T,t,a,I.Error??"Unknown error",d)},error:I=>{let P=I?.error?.body??I?.error?.requestBody;if(P?.Data?.FolderExists===!1||P?.StatusCode==="missing-folder"){this.handleMissingFolder(T,t,e,a,d,m);return}if(P?.Data?.HostCertificate){this.handleMissingCertificate(T,t,a,P.Data?.HostCertificate,d);return}if(P?.Data?.ReportedHostKey){this.handleIncorrectKey(T,t,a,P.Data.ReportedHostKey,P.Data.AcceptedHostKey??null,d);return}this.handleGenericError(T,t,a,I?.message??"Unknown error",d)}})})}testDestinationv1(t,e,i,o,a,c,d,m){return new ut(T=>{this.#e.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:i??null,sourcePrefix:e=="new"?null:o},type:c}).subscribe({next:I=>{T.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:a}),T.complete()},error:I=>{this.handleDestinationErrorv1(I.message,t,e,a,d,m).subscribe(P=>{T.next(P)})}})})}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(te,{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:m=>{if(!m){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:T=>{if(T.Success){this.emitSuccessV2(t,e,o,T);return}else this.handleFolderCreateFailure(t,e,o,T.Error??$localize`Unknown error`)},error:T=>{this.handleFolderCreateFailure(t,e,o,T.message??$localize`Unknown error`)}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:i=="new"?null:i}}).subscribe({next:()=>{this.handleFolderCreated(t,e,o)},error:T=>{this.handleFolderCreateFailure(t,e,o,T.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#t.open(te,{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(te,{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 m(){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){m();return}this.#t.open(te,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:c,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:T=>{if(!T){this.reportNoAction(t,e,i,$localize`The server certificate is not trusted.`);return}m()}})}handleIncorrectKey(t,e,i,o,a,c){if(a){let I=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:T,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:i}),t.complete()};var d=I;let m=$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}?`,T=e;try{let w=new URL(e);w.searchParams.set("ssh-fingerprint",o),T=w.toString()}catch{let w=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),$=w.includes("?");T=w+`${$?"&":"?"}ssh-fingerprint=${o}`}if(c){I();return}this.#t.open(te,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:w=>{if(!w){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}I()}})}else{let I=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${T?"&":"?"}ssh-fingerprint=${o}`,testAgain:!0,reportedHostKey:o,errorMessage:m,destinationIndex:i}),t.complete()};var d=I;let m=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,T=e.includes("?");if(c){I();return}this.#t.open(te,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:m,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:P=>{if(!P){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}I()}})}}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(te,{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 ut(d=>{if(t==="missing-folder"){this.handleMissingFolder(d,e,i,o,a,c);return}if(t.startsWith("incorrect-cert:")){let m=t.split("incorrect-cert:")[1];this.handleMissingCertificate(d,e,o,m,a);return}if(t.startsWith("incorrect-host-key:")){let m=t.split('incorrect-host-key:"')[1].split('",')[0],T=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(d,e,o,m,T,a);return}this.handleGenericError(d,e,o,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};function pa(n,t){if(n&1){let e=D();l(0,"sh-alert",13),y(1,0),l(2,"button",14),E("click",function(){f(e);let o=s(2);return h(o.testDestinationClick())}),r(),M(),r()}}function ma(n,t){n&1&&(l(0,"sh-alert",13),y(1,1),O(2,"sh-icon"),l(3,"div",15),O(4,"sh-spinner"),r(),M(),r()),n&2&&(_(4),Et("--spinner-size","16px")("--spinner-thickness","2px"))}function Ca(n,t){n&1&&(l(0,"sh-alert",17),A(1,2),r())}function ga(n,t){n&1&&(l(0,"sh-alert",16),A(1,3),r())}function Ta(n,t){if(n&1&&C(0,Ca,2,0,"sh-alert",17)(1,ga,2,0,"sh-alert",16),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.containsBackup?0:1)}}function Sa(n,t){n&1&&(l(0,"sh-alert",18),A(1,4),r())}function Ea(n,t){n&1&&(l(0,"sh-alert",16),A(1,5),r())}function fa(n,t){n&1&&(l(0,"sh-alert",17),A(1,6),r())}function ha(n,t){if(n&1&&C(0,Sa,2,0,"sh-alert",18)(1,Ea,2,0,"sh-alert",16)(2,fa,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 Fa(n,t){n&1&&(l(0,"sh-alert",17),A(1,7),r())}function Na(n,t){n&1&&(l(0,"sh-alert",16),A(1,8),r())}function Da(n,t){if(n&1&&C(0,Fa,2,0,"sh-alert",17)(1,Na,2,0,"sh-alert",16),n&2){let e,i=s(4);g((e=i.testResponse())!=null&&e.anyFilesFound?0:1)}}function Aa(n,t){n&1&&(l(0,"sh-alert",17),A(1,9),r())}function Ia(n,t){n&1&&(l(0,"sh-alert",17),A(1,10),r())}function Pa(n,t){n&1&&(l(0,"sh-alert",17),A(1,11),r())}function Oa(n,t){if(n&1&&C(0,Aa,2,0,"sh-alert",17)(1,Ia,2,0,"sh-alert",17)(2,Pa,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 ya(n,t){if(n&1&&C(0,Ta,2,1)(1,ha,3,1)(2,Da,2,1)(3,Oa,3,1),n&2){let e=s(3);g(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3)}}function Ma(n,t){if(n&1){let e=D();y(0,12,1),l(1,"button",14),E("click",function(){f(e);let o=s(4);return h(o.createFolder())}),r(),M()}}function Ra(n,t){if(n&1&&(l(0,"sh-alert",16),y(1,12),C(2,Ma,2,0,"button",19),M(),r()),n&2){let e=s(3);_(2),g(e.askToCreate()?2:-1)}}function xa(n,t){if(n&1){let e=D();l(0,"sh-alert",16),p(1),l(2,"button",14),E("click",function(){f(e);let o=s(3);return h(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),B(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function La(n,t){if(n&1){let e=D();l(0,"sh-alert",16),p(1),l(2,"button",14),E("click",function(){f(e);let o=s(3);return h(o.useSuggestedUrl())}),p(3,"Approve"),r()()}if(n&2){let e,i=s(3);_(),B(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function wa(n,t){if(n&1){let e=D();l(0,"sh-alert",16),p(1),l(2,"button",14),E("click",function(){f(e);let o=s(3);return h(o.testDestinationClick())}),p(3,"Test again"),r()()}if(n&2){let e,i=s(3);_(),B(" ",(e=i.testResponse())==null?null:e.errorMessage," ")}}function $a(n,t){if(n&1&&C(0,ya,4,1)(1,Ra,3,1,"sh-alert",16)(2,xa,4,1,"sh-alert",16)(3,La,4,1,"sh-alert",16)(4,wa,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 Ga(n,t){if(n&1&&C(0,pa,3,0,"sh-alert",13)(1,ma,5,4,"sh-alert",13)(2,$a,5,1),n&2){let e=s();g(e.testSignal()===null?0:e.testSignal()==="testing"?1:2)}}var jt=class n{#e=x(Ht);targetUrl=Ve.required();testSignal=Ve.required();connectionStringId=k(null);backupId=k.required();sourcePrefix=k.required();suppressErrorDialogs=k.required();askToCreate=k.required();testExpectation=k.required();moduleType=k.required();testResponse=R(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=R(()=>{let t=this.targetUrl();return!(!t||!Ut(t))});prevTargetUrl=null;targetUrlEffect=Q(()=>{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,this.backupId(),this.connectionStringId(),this.sourcePrefix(),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,this.backupId(),this.connectionStringId(),this.sourcePrefix(),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=z({type:n,selectors:[["app-test-url"]],inputs:{targetUrl:[1,"targetUrl"],testSignal:[1,"testSignal"],connectionStringId:[1,"connectionStringId"],backupId:[1,"backupId"],sourcePrefix:[1,"sourcePrefix"],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 m;m=$localize`Success! Test completed, destination contains files.`;let T;T=$localize`The remote destination is empty.`;let I;I=$localize`Success! Test completed, backup found.`;let P;P=$localize`Success! Test completed, destination contains files.`;let w;w=$localize`Success! Test completed, destination is empty.`;let $;return $=$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,m,T,I,P,w,$,[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&&C(0,Ga,3,1),e&2&&g(i.isExpectedValidTargetUrl()?0:-1)},dependencies:[yt,ee,Z,Lt],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 va(n,t){if(n&1){let e=D();l(0,"app-destination-list",10),E("setDestination",function(o){f(e);let a=s();return h(a.setDestination(o))}),r()}if(n&2){let e=s();u("showAsSources",!0)("moduleType",e.moduleType())}}function ba(n,t){if(n&1){let e=D();l(0,"app-destination-list-item",11)(1,"button",8),E("click",function(){f(e);let o=s();return h(o.removeDestination())}),A(2,3),r()(),l(3,"app-test-url",12),U("targetUrlChange",function(o){f(e);let a=s();return v(a.targetUrlModel,o)||(a.targetUrlModel=o),h(o)})("testSignalChange",function(o){f(e);let a=s();return v(a.testSignal,o)||(a.testSignal=o),h(o)}),r(),l(4,"app-single-destination",13),U("targetUrlChange",function(o){f(e);let a=s();return v(a.targetUrlModel,o)||(a.targetUrlModel=o),h(o)}),r()}if(n&2){let e=s();u("targetUrl",e.targetUrlModel()),_(3),b("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),u("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("moduleType",e.moduleType()),_(),b("targetUrl",e.targetUrlModel)}}function Ua(n,t){n&1&&A(0,2,1)}function ka(n,t){n&1&&A(0,2,2)}function Va(n,t){n&1&&A(0,2,3)}function Ba(n,t){n&1&&A(0,2,4)}var ct=class n{data=k();closed=xe();targetUrlModel=F(null);moduleType=F("Backend");askToCreate=F(!1);expectedResult=F("any");suppressErrorDialogs=F(!1);backupId=F(null);sourcePrefix=F(null);dataEffect=Q(()=>{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),t?.backupId&&this.backupId.set(t.backupId),t?.sourcePrefix&&this.sourcePrefix.set(t.sourcePrefix)});testSignal=F(null);setTargetUrl(t,e=!1){this.targetUrlModel.set(t)}setDestination(t){let e=bt(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=z({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=Ue(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","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,i){if(e&1&&(l(0,"header")(1,"h3",4),A(2,0),r()(),l(3,"section",5),C(4,va,1,2,"app-destination-list",6),C(5,ba,5,10),r(),l(6,"footer",7)(7,"button",8),E("click",function(){return i.closed.emit(null)}),A(8,1),r(),l(9,"button",9),E("click",function(){return i.submit()}),y(10,2),C(11,Ua,1,0)(12,ka,1,0)(13,Va,1,0)(14,Ba,1,0),M(),r()()),e&2){let o=!!i.targetUrlModel();_(4),g(o?-1:4),_(),g(o?5:-1),_(4),Fe("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:[Wt,Xt,et,ee,jt],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 Ka=["formRef"],vn=()=>({updateOn:"blur",standalone:!0}),tn=()=>({standalone:!0});function Ja(n,t){if(n&1){let e=D();l(0,"button",54),E("click",function(){f(e);let o=s(2);return h(o.openLocalDiskDialog())}),y(1,17),O(2,"sh-icon"),M(),r()}}function Xa(n,t){if(n&1){let e=D();C(0,Ja,3,0,"button",53),l(1,"button",54),E("click",function(){f(e);let o=s();return h(o.openRemoteDestinationDialog())}),y(2,16),O(3,"sh-icon"),M(),r()}if(n&2){let e=s();g(e.isLocalDiskSupported()?0:-1)}}function za(n,t){n&1&&A(0,7,1)}function Wa(n,t){n&1&&A(0,7,2)}function Ha(n,t){n&1&&(l(0,"p",42),A(1,18),r())}function ja(n,t){n&1&&(l(0,"p",42),A(1,19),r())}function qa(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"textarea",55),U("ngModelChange",function(o){f(e);let a=s();return v(a.bulkPaths,o)||(a.bulkPaths=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.savePathBulkEdit())}),r()()}if(n&2){let e=s();_(),b("ngModel",e.bulkPaths),u("ngModelOptions",Re(2,vn))}}function Ya(n,t){if(n&1){let e=D();l(0,"sh-form-field",59)(1,"input",60),U("ngModelChange",function(o){f(e);let a=s(3);return v(a.editingPath,o)||(a.editingPath=o),h(o)}),r()(),l(2,"button",32),E("click",function(){f(e);let o=s(3);return h(o.updatePath())}),l(3,"sh-icon"),p(4,"floppy-disk"),r()(),l(5,"button",32),E("click",function(){f(e);let o=s(3);return h(o.cancelEditPath())}),l(6,"sh-icon"),p(7,"x-bold"),r()()}if(n&2){let e=s(3);_(),b("ngModel",e.editingPath),u("ngModelOptions",Re(2,tn))}}function Qa(n,t){if(n&1&&(l(0,"sh-chip"),O(1,"img",61),p(2),r()),n&2){let e=s(2).$implicit,i=s(2);_(),u("src",i.getBackendIcon(e),Tt),_(),B(" ",i.getRemotePathDisplayName(e)," ")}}function Za(n,t){if(n&1&&(l(0,"sh-form-field",59),O(1,"input",62),r()),n&2){let e=s(2).$implicit;St("readonly",!0),_(),u("ngModel",e)("ngModelOptions",Re(3,tn))}}function el(n,t){if(n&1){let e=D();C(0,Qa,3,2,"sh-chip")(1,Za,2,4,"sh-form-field",59),l(2,"button",32),E("click",function(){f(e);let o=s().$implicit,a=s(2);return h(a.editPath(o))}),l(3,"sh-icon"),p(4,"pen"),r()(),l(5,"button",32),E("click",function(){f(e);let o=s().$implicit,a=s(2);return h(a.removePath(o))}),l(6,"sh-icon"),p(7,"trash-simple"),r()()}if(n&2){let e=s().$implicit;g(e.startsWith("@")?0:1)}}function tl(n,t){if(n&1&&(l(0,"div",56),C(1,Ya,8,3)(2,el,8,1),r()),n&2){let e=t.$implicit,i=s(2);_(),g(i.oldPath()===e?1:2)}}function nl(n,t){if(n&1){let e=D();Pe(0,tl,3,1,"div",56,Ie),l(2,"div",52)(3,"sh-form-field"),O(4,"input",57),r(),l(5,"button",58),E("click",function(){f(e);let o=s();return h(o.addNewPath())}),l(6,"sh-icon"),p(7,"plus"),r()()()}if(n&2){let e=s();Oe(e.nonFilterPaths()),_(4),u("formControl",e.newPathCtrl)}}function il(n,t){if(n&1){let e=D();l(0,"button",63),E("click",function(){f(e);let o=s();return h(o.addFilter())}),y(1,20),O(2,"sh-icon"),M(),r()}}function ol(n,t){n&1&&A(0,9,1)}function al(n,t){n&1&&A(0,9,2)}function ll(n,t){n&1&&(l(0,"p",42),A(1,21),r())}function rl(n,t){n&1&&(l(0,"p",42),A(1,22),r())}function sl(n,t){if(n&1){let e=D();l(0,"sh-form-field")(1,"textarea",55),U("ngModelChange",function(o){f(e);let a=s();return v(a.bulkFilters,o)||(a.bulkFilters=o),h(o)}),E("ngModelChange",function(){f(e);let o=s();return h(o.saveBulkFilterEdit())}),r()()}if(n&2){let e=s();_(),b("ngModel",e.bulkFilters),u("ngModelOptions",Re(2,vn))}}function _l(n,t){if(n&1){let e=D();l(0,"app-new-filter",65),E("pathChange",function(o){let a=f(e).$index,c=s(3);return h(c.patchPathAt(o,a))})("remove",function(){let o=f(e).$index,a=s(3);return h(a.removePathAt(o))}),r()}if(n&2){let e=t.$implicit,i=s(3);u("path",e)("osType",i.osType()??"")}}function cl(n,t){if(n&1&&Pe(0,_l,1,2,"app-new-filter",64,Ie),n&2){let e=s(2);Oe(e.pathArray())}}function dl(n,t){if(n&1&&(l(0,"div",45),C(1,cl,2,0),r()),n&2){let e,i=s();_(),g((e=i.pathSignal())!=null&&e.length?1:-1)}}function ul(n,t){if(n&1){let e=D();l(0,"div",52)(1,"app-size",66),E("ngModelChange",function(o){f(e);let a=s();return h(a.updateFilesLargerThan(o))}),r()()}if(n&2){let e=s();_(),u("ngModel",e.filesLargerThan())("ngModelOptions",Re(2,tn))}}var Le=new Ot,bn=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>Le.group({path:Le.control(n.path),excludes:Le.group({hidden:Le.control(n.excludes.hidden),system:Le.control(n.excludes.system),temporary:Le.control(n.excludes.temporary),filesLargerThan:Le.group({size:Le.control(null),unit:Le.control(null)})})}),en=class n{#e=x(Me);#t=x($e);#n=x(we);#i=x(je);#o=x(Se);formRef=He.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new gn("");filesLargerThan=R(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=ve(this.sourceDataForm.controls.path.valueChanges);pathArray=R(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=R(()=>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("");mobileMenuOpen=F(!1);isLocalDiskSupported=R(()=>this.osType()==="Windows"&&this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));openRemoteDestinationDialog(){this.#t.open(ct,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:null,sourcePrefix:null}}).component.closed.subscribe(e=>{if(!e)return;let i=Math.random().toString(36).substring(2,10),o=e.split("://")[0],c=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${i}|${e}`;this.addPath(c)})}openLocalDiskDialog(){this.#t.open(_t,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:null}}).closed.subscribe(e=>{if(!e)return;let i=Math.random().toString(36).substring(2,10),a=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-disk-${i}|diskimage://${e}`;this.addPath(a)})}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("@")){let e=t.split("|");if(e.length!==2)return;e[1].startsWith("diskimage://")?this.editLocalDiskSource(t,e[0],e[1].substring(12)):this.editTargetUrlPath(t,e[0],e[1]);return}this.oldPath.set(t),this.editingPath.set(t)}editLocalDiskSource(t,e,i){this.#t.open(_t,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{initialPath:i}}).closed.subscribe(a=>{if(!a)return;let c=`${e}|diskimage://${a}`,d=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(d?.replace(t,c)??"")})}editTargetUrlPath(t,e,i){this.#t.open(ct,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:!1,data:{targetUrlModel:i,moduleType:"SourceProvider",askToCreate:!1,expectedResult:"destinationNotEmpty",suppressErrorDialogs:!0,backupId:this.#e.backupId(),sourcePrefix:e}}).closed.subscribe(a=>{if(!a)return;let c=`${e}|${a}`,d=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(d?.replace(t,c)??"")})}updateFilesLargerThan(t){let{size:e,unit:i}=kt(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,m)=>m===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 e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":ye(e).icon??"database"}getRemotePathDisplayName(t){if(!t)return"";let e=t.split("|")[1];if(e.startsWith("diskimage:"))return $localize`Local disk`;let i=ye(e);return i?i.displayName:"Unknown"}toggleFilesLargerThan(t){t?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=z({type:n,selectors:[["app-source-data"]],viewQuery:function(e,i){e&1&&ze(i.formRef,Ka,5),e&2&&We()},decls:85,vars:19,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#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let m;m=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let T;T=$localize`Options`;let I;I=$localize`Paths`;let P;P=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*41:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*41:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*42:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*42:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Filters`;let $;$=$localize`${"\uFFFD#61\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#61\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*62:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*62:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*63:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*63:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let N;N=$localize`Exclude`;let K;K=$localize`Choose if there’s any files you want to exclude.`;let J;J=$localize` Files with the Hidden attribute ${"\uFFFD#75\uFFFD\uFFFD/#75\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Files with the System attribute ${"\uFFFD#78\uFFFD\uFFFD/#78\uFFFD"}:TAG_INPUT:`;let H;H=$localize` Files with the Temporary attribute ${"\uFFFD#81\uFFFD\uFFFD/#81\uFFFD"}:TAG_INPUT:`;let me;me=$localize` Files larger than `;let Ce;Ce=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:cloud-arrow-down${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add remote path `;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:hard-drive${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add local disk `;let fe;fe=$localize`Manually add a path.`;let De;De=$localize`Edit paths as text, one per line.`;let nt;nt=$localize`Add a direct path`;let it;it=$localize`Edit path`;let ot;ot=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let at;at=$localize`Customize your filters.`;let V;return V=$localize`Edit filters as text, one per line.`,[["formRef",""],a,c,d,m,T,I,P,w,$,N,K,J,L,H,me,Ce,G,fe,De,ot,at,V,[3,"submit","formGroup"],[1,"left"],[1,"header-row"],[1,"title-30"],["shButton","","type","button",1,"small","ghost","mobile-menu-toggle",3,"click"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","submit",1,"raised","primary","small"],[1,"right"],[1,"mobile-header"],["shButton","","type","button",1,"small","ghost",3,"click"],[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["description",""],[1,"paths"],["type","button","shButton","",1,"small"],[1,"filters"],["formGroupName","excludes",3,"disableToggle"],[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,"checkedChange","checked"],[1,"row-inputs"],["shButton","","type","button",1,"small","rowbutton"],["shButton","","type","button",1,"small","rowbutton",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[1,"path"],["type","text","placeholder",nt,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",it,3,"ngModelChange","ngModel","ngModelOptions"],["alt","",1,"provider-icon",3,"src"],["type","text",3,"ngModel","ngModelOptions"],["type","button","shButton","",1,"small",3,"click"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,i){e&1&&(l(0,"form",23,0),E("submit",function(){return i.next()}),l(2,"div",24)(3,"div",25)(4,"h3",26),A(5,1),r(),l(6,"button",27),E("click",function(){return i.mobileMenuOpen.set(!0)}),l(7,"sh-icon"),p(8,"sliders"),r()()(),l(9,"app-file-tree",28)(10,"label",29),A(11,2),r(),O(12,"input",30),r(),l(13,"div",31)(14,"button",32),E("click",function(){return i.goBack()}),y(15,3),O(16,"sh-icon"),M(),r(),l(17,"button",33),y(18,4),O(19,"sh-icon"),M(),r()()(),l(20,"div",34)(21,"div",35)(22,"span",26),A(23,5),r(),l(24,"button",36),E("click",function(){return i.mobileMenuOpen.set(!1)}),l(25,"sh-icon"),p(26,"x-bold"),r()()(),l(27,"app-toggle-card",37),ge(28,38),l(29,"span"),A(30,6),r(),O(31,"div",39),C(32,Xa,4,1),l(33,"sh-menu")(34,"button",40)(35,"sh-icon"),p(36,"dots-three-vertical"),r()(),ge(37,41),l(38,"button",32),E("click",function(){return i.togglePathBulkEdit()}),y(39,7),O(40,"sh-icon"),C(41,za,1,0)(42,Wa,1,0),M(),r(),ue(),r(),ue(),C(43,Ha,2,0,"p",42)(44,ja,2,0,"p",42),l(45,"div",43),C(46,qa,2,3,"sh-form-field")(47,nl,8,1),r()(),l(48,"app-toggle-card",37),ge(49,38),l(50,"span"),A(51,8),r(),O(52,"div",39),C(53,il,3,0,"button",44),l(54,"sh-menu")(55,"button",40)(56,"sh-icon"),p(57,"dots-three-vertical"),r()(),ge(58,41),l(59,"button",32),E("click",function(){return i.toggleBulkFilterEdit()}),y(60,9),O(61,"sh-icon"),C(62,ol,1,0)(63,al,1,0),M(),r(),ue(),r(),ue(),C(64,ll,2,0,"p",42)(65,rl,2,0,"p",42),C(66,sl,2,3,"sh-form-field")(67,dl,2,1,"div",45),r(),l(68,"app-toggle-card",46),ge(69,38),A(70,10),ue(),l(71,"p",42),A(72,11),r(),l(73,"sh-toggle",47),y(74,12),O(75,"input",48),M(),r(),l(76,"sh-toggle",47),y(77,13),O(78,"input",49),M(),r(),l(79,"sh-toggle",47),y(80,14),O(81,"input",50),M(),r(),l(82,"sh-toggle",51),E("checkedChange",function(a){return i.toggleFilesLargerThan(a)}),A(83,15),r(),C(84,ul,2,3,"div",52),r()()()),e&2&&(u("formGroup",i.sourceDataForm),_(9),u("multiSelect",!0)("startingPath",i.getPath())("showFiles",!0),_(11),Fe("open",i.mobileMenuOpen()),_(7),u("disableToggle",!0),_(5),g(i.bulkPathEditMode()?-1:32),_(9),g(i.bulkPathEditMode()?41:42),_(2),g(i.bulkPathEditMode()?44:43),_(3),g(i.bulkPathEditMode()?46:47),_(2),u("disableToggle",!0),_(5),g(i.bulkFilterEditMode()?-1:53),_(9),g(i.bulkFilterEditMode()?62:63),_(2),g(i.bulkFilterEditMode()?65:64),_(2),g(i.bulkFilterEditMode()?66:67),_(2),u("disableToggle",!0),_(14),u("checked",i.filesLargerThan()!==null),_(2),g(i.filesLargerThan()?84:-1))},dependencies:[de,Dt,oe,ht,ae,Nt,ce,qe,Tn,Pt,It,Sn,Te,Z,ee,Ye,Rt,Jt,Qe,st,Vt,Mt],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}@media only screen and (max-width:768px){form[_ngcontent-%COMP%]{display:block;position:relative}}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.header-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.mobile-header[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}}.mobile-menu-toggle[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.mobile-menu-toggle[_ngcontent-%COMP%]{display:inline-flex}}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{border-right:none;padding:1.5rem 1.5rem 4.5rem;height:100%;width:100%}}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}@media only screen and (max-width:768px){.right[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:10;background:var(--base-1);padding:1.5rem;transform:translate(100%);transition:transform .3s cubic-bezier(.4,0,.2,1)}.right.open[_ngcontent-%COMP%]{transform:translate(0)}}.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}.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;display:flex;flex-direction:column;gap:.5rem}.rowbutton[_ngcontent-%COMP%]{margin-left:.25rem}"],changeDetection:0})};var Un="1W:1D,4W:1W,12M:1M",nn=!1,Me=class n{#e=x(we);#t=x(Se);#n=x($e);#i=x(Gt);#o=x(vt);#r=x(Bt);#a=x(Ze);generalForm=kn();sourceDataForm=bn();scheduleFields=Zt();scheduleType=F("daily");settings=F([]);optionsFields={backupRetention:F("all"),backupRetentionTime:F(""),backupRetentionVersions:F(0),backupRetentionCustom:F("")};targetUrls=F([]);targetUrlModel=R(()=>this.targetUrls()[0]?.url??null);connectionStringId=R(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=F(null);backupMetadata=F(null);isDraft=F(!1);backupId=F(null);backupName=R(()=>this.generalFormSignal()?.name??"");isSubmitting=F(!1);finishedLoading=F(!1);backupDefaults=F(null);applicationOptions=F(null);isNew=R(()=>this.backupId()==="new");shouldAutoSave=R(()=>!this.isDraft()&&!this.isNew());osType=R(()=>this.#t.systemInfo()?.OSType);isConnectionStringSaved=R(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):!1});selectedOptions=F([]);sourceDataFormSignal=ve(this.sourceDataForm.valueChanges);generalFormSignal=ve(this.generalForm.valueChanges);encryptionFieldSignal=ve(this.generalForm.controls.encryption.valueChanges);advancedOptions=R(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#l=F(null);#s=null;testSignal=this.#l.asReadonly();#_=Q(()=>{let t=this.targetUrlModel(),e=this.#l(),i=this.#s;this.#s=t,!(e==="testing"||i===null||i===t)&&this.#l.set(null)});#C=Q(()=>{let t=this.targetUrlModel(),e=this.connectionStringId();if(e){let i=this.#a.destinations();if(i.length===0)return;let o=i.find(a=>a.ID===e);!o||o.BaseUrl}});setTestState(t){this.#l.set(t)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=R(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[dt,...t]});nonSelectedOptions=R(()=>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),this.#p().pipe(mt(e=>{let i=this.#c(),o=this.backupId(),a=i;if(a.Backup){e.length>0&&e[0]!==null?i.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(i.Backup.ConnectionStringID=void 0);let d=this.targetUrls().slice(1).map((m,T)=>{let I=e[T+1];return{TargetUrl:m.url,ConnectionStringID:I??void 0,UrlKey:m.urlKey}});d.length>0&&(a.Backup.AdditionalTargetURLs=d)}return this.isDraft()&&i.Backup&&(i.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}):this.#i.putApiV1BackupById({id:o,requestBody:i})}),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(te,{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";let a=this.targetUrls();if(!(a.length>0&&a.some(m=>m.url.trim()!=="")))return this.#n.open(te,{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 d=(t.Backup.Sources??[]).filter(m=>m.trim()!=="").length>0;return!d||!this.sourceDataForm.valid?(this.#n.open(te,{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(te,{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:kt(a)}};this.sourceDataForm.patchValue(c)}mapDestinationToForm(t){let e=t,i=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=i?[{url:i,connectionStringId:o,urlKey:null,save:!!o}]:[],c=e.AdditionalTargetURLs?.map(d=>({url:d.TargetUrl,urlKey:d.UrlKey,connectionStringId:d.ConnectionStringID??null,save:!!d.ConnectionStringID}))??[];this.targetUrls.set([...a,...c])}mapGeneralToForm(t){let e=t.Name??"",i=t.Description??"",o=t.Settings?.find(T=>T.Name==="encryption-module"),a=t.Settings?.find(T=>T.Name==="passphrase")?.Value??"",c=o?.Value&&o.Value.length?o.Value:"",d=t.Settings?.find(T=>T.Name==="compression-module")?.Value??"",m={name:t.Name??"",description:t.Description??""};e&&e!==""&&(m.name=e),i&&i!==""&&(m.description=i),c&&c!==""&&(m.encryption=c),a&&a!==""&&(m.password=a,m.repeatPassword=a),d&&d!==""&&(m.compression=d),this.generalForm.patchValue(m)}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(!1);return}let e=this.#r.fromString(t.Repeat)??null,i=this.#m(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=rt(this.scheduleFields),a=Kt.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(m=>m);if(e){let m=this.#o.serverSettings()??{};Object.keys(m).filter(T=>T.startsWith("--")).forEach(T=>{o.find(P=>P.Name===T)||o.push({Name:T,Value:m[T],Filter:null})})}let a=o.filter(m=>!i.includes(m.Name)),c=o.filter(m=>i.includes(m.Name));this.settings.set(a??[]),a?.forEach(m=>{if(m.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(m.Value??"")});var d="all";c?.forEach(m=>{if(m.Name==="keep-time"&&(m.Value??"")!=="")return d="time",this.optionsFields.backupRetentionTime.set(m.Value??"");if(m.Name==="keep-versions"&&(m.Value??"")!=="")return d="versions",this.optionsFields.backupRetentionVersions.set(m.Value?parseInt(m.Value):null);if(m.Name==="retention-policy"&&(m.Value??"")!=="")if(m.Value===Un)d="smart";else return d="custom",this.optionsFields.backupRetentionCustom.set(m.Value??"")}),this.optionsFields.backupRetention.set(d)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){let t=rt(this.scheduleFields);return Gn(t)}#c(){let t=this.generalForm.value,e=this.getScheduleFormValue(),i=this.sourceDataForm.value,a=this.targetUrls()[0],c=a?.url??null,d=i.path?.split("\0")??[],m=this.mapFormsToSettings(),T=Object.entries(i.excludes??{}).filter(([P,w])=>w&&P!=="filesLargerThan").map(([P])=>P),I=i.excludes?.filesLargerThan;return T.length&&m.push({Name:"--exclude-files-attributes",Value:T.join(",")}),I&&I.size!==null&&I.unit!==null&&m.push({Name:"--skip-files-larger-than",Value:`${I.size}${I.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:c??null,ConnectionStringID:a?.connectionStringId??null,Sources:d.filter(P=>!(P.startsWith("-")||P.startsWith("+"))),Settings:m,Filters:d.filter(P=>P.startsWith("-")||P.startsWith("+")).map((P,w)=>({Order:w,Include:P.startsWith("+"),Expression:P.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!==dt.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=[];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:Un});break}let d=[...t,...i],m=this.settings().filter(T=>!d.includes(T.Name)).map(T=>{let I=T.Value;return typeof T.Value=="number"&&(I=T.Value.toString()),typeof T.Value=="boolean"&&(I=T.Value?"True":"False"),{Name:T.Name?.startsWith("--")?T.Name:`--${T.Name}`,Value:I}});return[...o,...a,...c,...m]}#p(){let t=this.targetUrls();if(t.length===0)return Je([]);let e=t.map(i=>{if(i.connectionStringId)return Je(i.connectionStringId);if(!i.save)return Je(null);let o=i.url,c=ye(o)?.displayName??"Destination",m=this.#a.destinations().filter(P=>P.Name?.startsWith(c)).length,I={Name:`${c} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",I).pipe(pt(P=>P.Data?.ID??null))});return ln(e).pipe(Ct(i=>{let o=this.targetUrls();i.forEach((a,c)=>{if(a&&c<o.length&&(this.#a.reload(),o[c].connectionStringId!==a)){let d=o[c].urlKey;this.updateTargetUrl(c,o[c].url,a,d)}})}))}#m(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,i=null,o=null){if(e&&(this.#s=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let c=[...a];return c.length===0?c.push({url:t,urlKey:o,connectionStringId:i,save:i?!0:nn}):c[0]={url:t,urlKey:o,connectionStringId:i,save:i?!0:nn},c})}addTargetUrl(t,e,i){this.targetUrls.update(o=>[...o,{url:t,connectionStringId:e,urlKey:i,save:e?!0:nn}])}updateTargetUrl(t,e,i,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let c=[...a],d=c[t].save;return c[t]={url:e,connectionStringId:i,urlKey:o,save:i?!0:d},c})}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let i=[...e];return i[t]=se(j({},i[t]),{save:!i[t].save}),i})}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((i,o)=>o!==t))}#d(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields=Zt(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([])}static \u0275fac=function(e){return new(e||n)};static \u0275prov=Ae({token:n,factory:n.\u0275fac,providedIn:"root"})};var pl=["formRef"];function ml(n,t){n&1&&(l(0,"sh-alert",17),y(1,5),O(2,"sh-icon",26),M(),r())}function Cl(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;B(" ",e.DisplayName," ")}}function gl(n,t){if(n&1&&O(0,"sh-progress-bar",40),n&2){let e=s(3);Fe("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),u("value",e.calculatePasswordStrength()*(100/5))}}function Tl(n,t){n&1&&(l(0,"span",35),A(1,10),r())}function Sl(n,t){n&1&&(y(0,8,1),O(1,"sh-icon"),M())}function El(n,t){n&1&&(y(0,8,2),O(1,"sh-icon"),M())}function fl(n,t){n&1&&(y(0,11,1),O(1,"sh-icon",42),M())}function hl(n,t){n&1&&(y(0,11,2),O(1,"sh-icon"),M())}function Fl(n,t){if(n&1){let e=D();l(0,"button",41),E("click",function(){f(e);let o=s(3);return h(o.copyPassword())}),y(1,11),C(2,fl,2,0)(3,hl,2,0),M(),r()}if(n&2){let e=s(3);_(2),g(e.copiedPassword()?2:3)}}function Nl(n,t){n&1&&(l(0,"sh-alert",39),A(1,12),r())}function Dl(n,t){if(n&1){let e=D();l(0,"div",30)(1,"sh-form-field")(2,"label",31),y(3,7),O(4,"sup"),M(),r(),O(5,"input",32),r(),C(6,gl,1,9,"sh-progress-bar",33),l(7,"sh-form-field"),O(8,"input",34),C(9,Tl,2,0,"span",35),r(),l(10,"div",36)(11,"button",37),E("click",function(){f(e);let o=s(2);return h(o.showPassword.set(!o.showPassword()))}),y(12,8),C(13,Sl,2,0)(14,El,2,0),M(),r(),l(15,"button",37),E("click",function(){f(e);let o=s(2);return h(o.generatePassword())}),y(16,9),O(17,"sh-icon"),M(),r(),C(18,Fl,4,1,"button",38),r(),C(19,Nl,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 Al(n,t){if(n&1&&(l(0,"sh-select",27)(1,"label",28),A(2,6),r(),O(3,"input",29),W(4,Cl,1,1,"ng-template"),r(),C(5,Dl,20,7,"div",30)),n&2){let e=s();u("options",e.encryptionOptions())("isClearable",!1),_(5),g(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Il(n,t){if(n&1&&(l(0,"button",24),y(1,13),O(2,"sh-icon"),M(),r()),n&2){let e=s();u("disabled",e.nameAndDescriptionValid()===!1)}}function Pl(n,t){if(n&1&&(l(0,"button",25),y(1,14),O(2,"sh-icon"),M(),r()),n&2){let e=s();u("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Ke=new Ot,kn=(n={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>Ke.group({name:Ke.control(n.name,[Ft.required]),description:Ke.control(n.description),encryption:Ke.control(n.encryption,[wn()]),password:Ke.control(n.password,[Yt(t=>t?.value.encryption!=="-",[Ft.required])]),repeatPassword:Ke.control(n.repeatPassword,[Yt(t=>t?.value.encryption!=="-",[Ft.required])]),compression:Ke.control(n.compression)}),dt={Key:"-",DisplayName:"None"},on=class n{#e=x(we);#t=x(je);#n=x(Ln);#i=x(Me);#o=x(Se);formRef=He.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=dt.Key;encryptionEffect=Q(()=>{this.encryptionFieldSignal()===dt.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=R(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=R(()=>{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=z({type:n,selectors:[["app-general"]],viewQuery:function(e,i){e&1&&ze(i.formRef,pl,5),e&2&&We()},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 m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let T;T=$localize`Encryption`;let I;I=$localize`Encryption`;let P;P=$localize`Password`;let w;w=$localize`Repeat password`;let $;$=$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=Ue(N);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords do not match`;let L;L=$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:`,L=Ue(L);let H;H=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let me;me=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ce;return Ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,c,d,m,I,$,N,K,J,L,H,me,Ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","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",T,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",P,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",w,"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&&(l(0,"form",15,0),E("submit",function(){return i.next()}),l(2,"h3",16),A(3,1),r(),C(4,ml,3,0,"sh-alert",17),l(5,"sh-form-field")(6,"label",18),y(7,2),O(8,"sup"),M(),r(),O(9,"input",19),r(),l(10,"sh-form-field")(11,"label",20),A(12,3),r(),O(13,"textarea",21),r(),C(14,Al,6,3),l(15,"div",22)(16,"button",23),E("click",function(){return i.exit()}),y(17,4),O(18,"sh-icon"),M(),r(),C(19,Il,3,1,"button",24)(20,Pl,3,1,"button",25),r()()),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:[qe,Dt,oe,ae,Nt,Pt,It,Te,Ge,ee,Z,xt,yt,$t],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{Ze as a,et as b,Xt as c,kn as d,dt as e,on as f,Kt as g,Gn as h,Zt as i,Qt as j,st as k,jt as l,ct as m,bn as n,en as o,Me as p,Wt as q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _e}from"./chunk-
|
|
1
|
+
import{a as _e}from"./chunk-52REVNJZ.js";import"./chunk-GO22QPW4.js";import"./chunk-FMDSOHVR.js";import"./chunk-AOMXVXMB.js";import"./chunk-Y4EMWRGE.js";import{a as se}from"./chunk-XCVBN7EK.js";import"./chunk-ADB5QRUO.js";import"./chunk-22PELS6R.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MRSBKQQM.js";import"./chunk-3AZTY4MH.js";import"./chunk-EQNDYV43.js";import{a as b}from"./chunk-35APLYI4.js";import"./chunk-LU7TIW3P.js";import"./chunk-YMUS7QSB.js";import{a as le,b as m}from"./chunk-ZXQSQRKN.js";import"./chunk-XZNYCTQB.js";import"./chunk-R6TFME5I.js";import"./chunk-AZRNX5LU.js";import{B as ae,H as ie,Y as ne,c as Q,e as Y,i as Z,s as x,v as ee,z as te}from"./chunk-NCXKMSRH.js";import{d as oe}from"./chunk-QAQMMCTH.js";import{b as q,e as j}from"./chunk-KHZ5AXGT.js";import"./chunk-L2QOWZDR.js";import"./chunk-BRL4YYWO.js";import"./chunk-BDQJFOCO.js";import"./chunk-FSHBOASN.js";import{C as G,Cb as d,D as g,Db as n,E as L,Eb as i,F as p,Fb as c,Rc as E,Sa as _,Tb as u,Ub as h,Vb as A,Wb as H,Xb as J,Zb as T,_ as F,gb as V,kc as C,mc as K,nc as D,pa as s,q as y,ra as P,sc as X,tc as z,uc as W,wb as w,xb as U}from"./chunk-UH2E7MMT.js";import"./chunk-7CGTOI24.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=F(q);#s=F(se);#e=F(oe);#a=F(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{refresh_lock_info:!0}}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),C("loading",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loading",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),C("loading",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),C("loading",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-22PELS6R.js";import{ha as o}from"./chunk-BDQJFOCO.js";import{_ as e,jb as n}from"./chunk-UH2E7MMT.js";var m=class i{#t=e(s);#r=e(o);convertTimestamp(t){let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(t);if(r){let[a,p,f,c,d,u,h]=r;return`${p}-${f}-${c}T${d}:${u}:${h}Z`}return t}transform(t,r=!1,...a){return t?r?this.#r.transform(t,"short"):(this.#t.locale(),typeof t=="string"&&(t=this.convertTimestamp(t)),this.#t(t).fromNow()):"N/A"}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=n({name:"relativeTime",type:i,pure:!0})};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as V,H as x,X as J,c as B,e as G,f as y,j as b,p as $,q as P,r as v,t as L,v as k,x as w}from"./chunk-
|
|
1
|
+
import{B as V,H as x,X as J,c as B,e as G,f as y,j as b,p as $,q as P,r as v,t as L,v as k,x as w}from"./chunk-NCXKMSRH.js";import{d as X}from"./chunk-QAQMMCTH.js";import{d as I,e as A}from"./chunk-KHZ5AXGT.js";import"./chunk-L2QOWZDR.js";import"./chunk-BRL4YYWO.js";import"./chunk-BDQJFOCO.js";import"./chunk-FSHBOASN.js";import{Bc as M,Cb as _,Db as r,Eb as i,F as g,Fb as p,L as T,Sa as F,Tb as E,Ub as C,Vb as d,Yb as O,Zb as m,_ as u,gb as R,kc as h,nc as N,pa as c,wb as S,xb as D}from"./chunk-UH2E7MMT.js";import"./chunk-7CGTOI24.js";var j=()=>["/"];function H(l,e){l&1&&(r(0,"sh-form-field")(1,"label",11),d(2,2),i(),p(3,"input",12),i())}var a=new v,f=class l{#t=u(w);#e=u(X);#o=u(I);isRestoring=c(!1);isSecureFile=c(!1);importForm=a.group({config:a.control(""),cmdline:a.control(!1),importMetadata:a.control(!1),direct:a.control(!1),passphrase:a.control("")});selectedFile=c(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let n=new FileReader;this.isSecureFile.set(t.type!=="application/json"),n.onload=this.#n.bind(this),n.readAsArrayBuffer(t)}}#n(e){let o=e.target?.result;this.importForm.patchValue({config:this.#i(o)})}#i(e){let o=new Uint8Array(e),t=o.byteLength,n="";for(let s=0;s<t;s++)n+=String.fromCharCode(o[s]);return btoa(n)}submit(){this.isRestoring.set(!0),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(T(e=>{let t={Backup:e.data.Backup};return this.#e.postApiV1Backups({requestBody:t,temporary:!0})}),g(()=>this.isRestoring.set(!1))).subscribe({next:e=>{this.#o.navigate(["/restore-draft",e.ID])},error:e=>{this.#t.error(e.message)}})}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=R({type:l,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let e;e=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;return t=$localize`Passphrase`,[e,o,t,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),E(2,0),r(3,"div",3)(4,"button",4),p(5,"sh-icon"),i(),r(6,"button",5),m("click",function(){return t.submit()}),p(7,"sh-icon"),i()(),C(),i()(),r(8,"form",6)(9,"sh-form-field",7),m("fileDropped",function(s){return t.onFileDropped(s)}),r(10,"label",8),d(11,1),i(),r(12,"input",9),m("change",function(s){return t.onFileDropped(s)}),i(),r(13,"sh-icon",10),N(14,"upload"),i()(),S(15,H,4,0,"sh-form-field"),i()),o&2&&(F(4),_("routerLink",M(6,j)),F(2),h("loading",t.isRestoring()),_("disabled",t.isRestoring()),F(2),_("formGroup",t.importForm),F(7),D(t.isSecureFile()?15:-1))},dependencies:[L,b,B,G,y,P,$,A,J,x,k,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as q}from"./chunk-
|
|
1
|
+
import{b as q}from"./chunk-Y4EMWRGE.js";import{a as j}from"./chunk-XCVBN7EK.js";import{a as Q}from"./chunk-ADB5QRUO.js";import{a as H}from"./chunk-MRSBKQQM.js";import{B as V,L as z,O as J,Y as X,v as U}from"./chunk-NCXKMSRH.js";import{ha as K}from"./chunk-BDQJFOCO.js";import{$b as r,Ac as y,Cb as d,Db as a,Eb as s,Fb as g,Gc as F,Hc as $,Ic as G,Kc as L,Mb as N,Rc as _,Sa as o,Tb as T,Ub as P,Vb as b,Wb as R,Xb as v,Xc as w,Zb as B,_ as C,da as x,ea as h,gb as O,ic as M,jc as D,kc as I,lb as k,nc as l,oc as A,pa as S,pc as m,ra as E,wb as p,xb as c}from"./chunk-UH2E7MMT.js";function Y(e,i){if(e&1&&l(0),e&2){let t=r(3);m(" ",t.statusData().actionText," - ")}}function Z(e,i){e&1&&(a(0,"sh-icon"),l(1,"check"),s())}function tt(e,i){e&1&&(a(0,"sh-icon"),l(1,"copy"),s())}function et(e,i){if(e&1){let t=N();a(0,"div",9)(1,"button",10),B("click",function(u){x(t);let f=r(4);return h(f.copyToClipboard(u,f.tooltipText()))}),p(2,Z,2,0,"sh-icon")(3,tt,2,0,"sh-icon"),l(4," Copy "),s(),a(5,"p",11),l(6),s()()}if(e&2){let t=r(4);o(),d("color",t.copied()?"success":null),o(),c(t.copied()===!0?2:3),o(4),A(t.tooltipText())}}function it(e,i){if(e&1&&(a(0,"div",8),l(1),s(),k(2,et,7,3,"ng-template",null,0,L)),e&2){let t=M(3),n=r(3);d("shTooltip",t),o(),m(" ",n.statusData().fileStatusText," ")}}function nt(e,i){if(e&1&&(a(0,"div"),p(1,Y,1,1),l(2),s(),p(3,it,4,2),g(4,"sh-progress-bar",7)),e&2){let t,n=r(2);o(),c(n.backupId()===null?1:-1),o(),m(" ",n.statusData().statusText," "),o(),c((t=n.statusData())!=null&&t.BackendFileSize?3:-1),o(),d("value",n.statusData().progress*100)}}function ot(e,i){if(e&1&&(a(0,"div",5),T(1,1),g(2,"sh-icon"),F(3,"relativeTime"),F(4,"date"),P(),s()),e&2){let t,n=r(2);o(4),R((t=n.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name)($(3,3,n.nextBackup().time))(G(4,5,n.nextBackup().time,"shortTime")),v(1)}}function at(e,i){e&1&&(a(0,"div",5),b(1,2),s())}function st(e,i){e&1&&(a(0,"div",6),T(1,3),g(2,"sh-spinner"),P(),s()),e&2&&(o(2),D("--spinner-size","12px")("--spinner-thickness","2px"))}function rt(e,i){if(e&1&&(a(0,"div",4),p(1,nt,5,4)(2,ot,5,8,"div",5)(3,at,2,0,"div",5)(4,st,3,4,"div",6),s()),e&2){let t,n=r();o(),c(n.isActive()?1:!n.backupId()&&(n.nextBackup().backup||n.nextBackup().time)?2:!n.backupId()&&!((t=n.serverState())!=null&&t.ActiveTask)?3:n.backupId()?-1:4)}}var W=class e{backupId=w(null);#t=C(q);#e=C(j);statusData=this.#t.statusData;serverState=this.#t.serverState;isActive=_(()=>this.#t.runningBackupId()!==null);isTargetRunningTask=_(()=>{let i=this.backupId();return i?String(this.#t.runningBackupId())===String(i):!0});isVisible=_(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():!1:!0);nextBackup=_(()=>{let i=this.#e.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=_(()=>{let i=this.statusData();return i?.CurrentFilename?`${i.CurrentFilename}`:""});copied=S(!1);copiedTimeout;copyToClipboard(i,t){i.stopPropagation(),navigator.clipboard.writeText(t),this.copied.set(!0),this.copiedTimeout=setTimeout(()=>{this.copied.set(!1)},2e3)}tooltipTrigger=S(!0);tooltipTriggerEffect=E(()=>{this.tooltipText(),this.tooltipTrigger.update(i=>!i),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(!1))});static \u0275fac=function(t){return new(t||e)};static \u0275cmp=O({type:e,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(t,n){t&2&&I("is-visible",n.isVisible())},inputs:{backupId:[1,"backupId"]},features:[y([H])],decls:1,vars:1,consts:()=>{let i;i=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let t;t=$localize`No scheduled tasks`;let n;return n=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],i,t,n,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(t,n){t&1&&p(0,rt,5,1,"div",4),t&2&&c(n.isVisible()?0:-1)},dependencies:[U,V,J,z,X,Q,K],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{W as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as be}from"./chunk-
|
|
1
|
+
import{b as be}from"./chunk-ZXQSQRKN.js";import{d as xe}from"./chunk-QAQMMCTH.js";import{c as fe}from"./chunk-L2QOWZDR.js";import"./chunk-BRL4YYWO.js";import"./chunk-BDQJFOCO.js";import"./chunk-FSHBOASN.js";import{Ac as de,Gb as he,Hb as pe,Ib as ue,Nb as ge,Oa as ae,Sa as oe,Vb as ke,Y as le,_ as v,gb as ce,q as ie}from"./chunk-UH2E7MMT.js";import{a as b,b as T}from"./chunk-7CGTOI24.js";function j(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=j();function Te(n){R=n}var P={exec:()=>null};function p(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),r=r.replace(t,i),s},getRegex:()=>new RegExp(r,e)};return s}var Ne=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Oe=/^(?:[ \t]*(?:\n|$))+/,Ze=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,De=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,ze=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ae=p(ze).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),He=p(ze).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,je=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Qe=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fe=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",X=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ue=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",X).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e=p(F).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),Xe=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_e).getRegex(),W={blockquote:Xe,code:Ze,def:Qe,fences:De,heading:Ge,hr:E,html:Ue,lheading:Ae,list:Fe,newline:Oe,paragraph:_e,table:P,text:je},me=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),We=T(b({},W),{lheading:He,table:me,paragraph:p(F).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex()}),Ve=T(b({},W),{html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",X).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:P,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(F).replace("hr",E).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Je=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ke=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ce=/^( {2,}|\\)\n(?!\s*$)/,Ye=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,V=/[\s\p{P}\p{S}]/u,Pe=/[^\s\p{P}\p{S}]/u,et=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,V).getRegex(),Ee=/(?!~)[\p{P}\p{S}]/u,tt=/(?!~)[\s\p{P}\p{S}]/u,rt=/(?:[^\s\p{P}\p{S}]|~)/u,nt=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ne?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ve=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,st=p(ve,"u").replace(/punct/g,N).getRegex(),it=p(ve,"u").replace(/punct/g,Ee).getRegex(),Ie="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lt=p(Ie,"gu").replace(/notPunctSpace/g,Pe).replace(/punctSpace/g,V).replace(/punct/g,N).getRegex(),at=p(Ie,"gu").replace(/notPunctSpace/g,rt).replace(/punctSpace/g,tt).replace(/punct/g,Ee).getRegex(),ot=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pe).replace(/punctSpace/g,V).replace(/punct/g,N).getRegex(),ct=p(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),ht=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pt=p(X).replace("(?:-->|$)","-->").getRegex(),ut=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",pt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),L=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gt=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",L).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Le=p(/^!?\[(label)\]\[(ref)\]/).replace("label",L).replace("ref",U).getRegex(),Be=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),kt=p("reflink|nolink(?!\\()","g").replace("reflink",Le).replace("nolink",Be).getRegex(),we=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:P,anyPunctuation:ct,autolink:ht,blockSkip:nt,br:Ce,code:Ke,del:P,emStrongLDelim:st,emStrongRDelimAst:lt,emStrongRDelimUnd:ot,escape:Je,link:gt,nolink:Be,punctuation:et,reflink:Le,reflinkSearch:kt,tag:ut,text:Ye,url:P},dt=T(b({},J),{link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",L).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L).getRegex()}),D=T(b({},J),{emStrongRDelimAst:at,emStrongLDelim:it,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",we).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",we).getRegex()}),ft=T(b({},D),{br:p(Ce).replace("{2,}","*").getRegex(),text:p(D.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),I={normal:W,gfm:We,pedantic:Ve},A={normal:J,gfm:D,breaks:ft,pedantic:dt},xt={"&":"&","<":"<",">":">",'"':""","'":"'"},ye=n=>xt[n];function S(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ye)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ye);return n}function Se(n){try{n=encodeURI(n).replace(x.percentDecode,"%")}catch{return null}return n}function $e(n,e){let r=n.replace(x.findPipe,(l,i,o)=>{let a=!1,h=i;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),s=r.split(x.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(x.slashPipe,"|");return s}function _(n,e,r){let s=n.length;if(s===0)return"";let t=0;for(;t<s;){let l=n.charAt(s-t-1);if(l===e&&!r)t++;else if(l!==e&&r)t++;else break}return n.slice(0,s-t)}function bt(n,e){if(n.indexOf(e[1])===-1)return-1;let r=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])r++;else if(n[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function Re(n,e,r,s,t){let l=e.href,i=e.title||null,o=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}function mt(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
|
|
3
3
|
`).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[o]=i;return o.length>=t.length?l.slice(t.length):l}).join(`
|
|
4
4
|
`)}var B=class{options;rules;lexer;constructor(n){this.options=n||R}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:_(r,`
|