@duplicati/ngclient 0.0.229 → 0.0.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-B9zNFJSv.js → chunk-3RXp81pP.js} +1 -1
- package/{chunk-D_JCqKo8.js → chunk-B0RBkC1E.js} +1 -1
- package/{chunk-BAZ5npJw.js → chunk-B2TXzbpy.js} +1 -1
- package/{chunk-BjkwnDTL.js → chunk-B728v9oc.js} +1 -1
- package/{chunk-w_Hs_Uxi.js → chunk-BB1pOOUx.js} +1 -1
- package/{chunk-dScOwyAU.js → chunk-BD9-OWSe.js} +1 -1
- package/{chunk-CwB_t7g-.js → chunk-BIL3nR4_.js} +1 -1
- package/{chunk-DDVdXEVe.js → chunk-BIOMsSHI.js} +1 -1
- package/{chunk-cLFxUFjv.js → chunk-BOOAIFTC.js} +1 -1
- package/{chunk-DiZeSQXj.js → chunk-BYJA6sbi.js} +1 -1
- package/{chunk-B12Syddi.js → chunk-BaGYaLxZ.js} +1 -1
- package/{chunk-CByrJpDb.js → chunk-Bceym75m.js} +1 -1
- package/{chunk-BtzP4vdU.js → chunk-BfZh4DNq.js} +1 -1
- package/{chunk-D4UZC_u0.js → chunk-BjAIXsAS.js} +1 -1
- package/{chunk-C1t4wbdG.js → chunk-BlSN71kd.js} +1 -1
- package/{chunk-D2XTQURr.js → chunk-Bq7wRTmy.js} +1 -1
- package/chunk-ByhuT4BS.js +14 -0
- package/{chunk-GVxWY6X-.js → chunk-BzIY4AaX.js} +1 -1
- package/{chunk-SycscfJp.js → chunk-C-NgIZiF.js} +1 -1
- package/{chunk-Cs0rlpWi.js → chunk-C1kucB1O.js} +1 -1
- package/{chunk-DaIpTiYw.js → chunk-C4kBXz3C.js} +1 -1
- package/{chunk-BcpsSgKo.js → chunk-C6QX7znk.js} +1 -1
- package/{chunk-D28lTX0k.js → chunk-C7pjkqKB.js} +1 -1
- package/{chunk-C11i_gv7.js → chunk-CBgNjPex.js} +1 -1
- package/{chunk-BDXLL1lt.js → chunk-CEyp0Xmg.js} +1 -1
- package/chunk-CFne6FXR.js +1 -0
- package/{chunk-DVgkAgur.js → chunk-CGn_EA_5.js} +1 -1
- package/{chunk-C_JveZJH.js → chunk-CJ0GoaW1.js} +1 -1
- package/{chunk-DQwpGI_E.js → chunk-CJ1mxauG.js} +1 -1
- package/chunk-CMJCX33P.js +1 -0
- package/{chunk-DQW8lSiz.js → chunk-CRAg6SRo.js} +1 -1
- package/{chunk-CBdr-6_u.js → chunk-CT9ziigM.js} +1 -1
- package/{chunk-bgWe6t7y.js → chunk-CWAvlP_u.js} +1 -1
- package/{chunk-ObToq7vh.js → chunk-CYQJGwsB.js} +1 -1
- package/{chunk-DVlpMN2Q.js → chunk-Ca-HIRNP.js} +1 -1
- package/{chunk-MvQwR7nW.js → chunk-Ca1C9pJ0.js} +1 -1
- package/chunk-CegwkGVu.js +3 -0
- package/chunk-Cgbi9MZq.js +2 -0
- package/{chunk-BYHopERA.js → chunk-CgcnOoRq.js} +1 -1
- package/chunk-Ck9c9Juw.js +1 -0
- package/{chunk-DC8QqmzV.js → chunk-CnRCpl-v.js} +1 -1
- package/{chunk-BoCnrrB4.js → chunk-CrgyDps4.js} +1 -1
- package/{chunk-Bc4gFy5W.js → chunk-D2g44FyO.js} +2 -2
- package/{chunk-JA7rUsYF.js → chunk-D2g5mSLr.js} +1 -1
- package/{chunk-BZqhgAZ-.js → chunk-D5lj-fQk.js} +1 -1
- package/{chunk-0sb5_LpD.js → chunk-D6aNT_wo.js} +1 -1
- package/{chunk-M21GJPzH.js → chunk-DDBflo2l.js} +3 -3
- package/{chunk-DV2SIgNN.js → chunk-DD_QfWih.js} +1 -1
- package/{chunk-CA-ER0DL.js → chunk-DFEb6rgg.js} +1 -1
- package/{chunk-D1wHRltX.js → chunk-DN6f5jXR.js} +1 -1
- package/{chunk-DJbAxHpK.js → chunk-DPNAj9Vc.js} +1 -1
- package/{chunk-DMJycFPC.js → chunk-DWkdK0Ib.js} +1 -1
- package/{chunk-Byb051F6.js → chunk-DaGzYsVs.js} +1 -1
- package/{chunk-BFH9sFEg.js → chunk-Df7q8ewK.js} +1 -1
- package/{chunk-Bf1diO1u.js → chunk-Dgns65Zu.js} +1 -1
- package/{chunk-B6vxBiK4.js → chunk-Dh6x3lXP.js} +1 -1
- package/{chunk-Drc5kcUX.js → chunk-DipTNkHN.js} +1 -1
- package/{chunk-2OH1SKyQ.js → chunk-Dj3xknEh.js} +1 -1
- package/{chunk-SKxVK_pD.js → chunk-DkdGEw1e.js} +1 -1
- package/{chunk-CfoJuTJX.js → chunk-DmKJmG9z.js} +1 -1
- package/{chunk-BZYVgHEz.js → chunk-DtA6Mvdt.js} +1 -1
- package/chunk-DtdFhFa9.js +1 -0
- package/{chunk-C9EdrQe6.js → chunk-DuIUmwWN.js} +1 -1
- package/{chunk-DDo7wKQT.js → chunk-DwKPz2Gn.js} +1 -1
- package/chunk-DwMhABnQ.js +2 -0
- package/{chunk-B-fklW6A.js → chunk-Fw6nFDZK.js} +2 -2
- package/{chunk-B3yuN2OH.js → chunk-HWQc1Hoa.js} +1 -1
- package/{chunk-CdKfNiwm.js → chunk-I0R6Ty-p.js} +1 -1
- package/{chunk-BIeNnIyg.js → chunk-LL0IHZns.js} +1 -1
- package/{chunk-C2bnZ62D.js → chunk-OFYkgZA1.js} +1 -1
- package/{chunk-COgNe44h.js → chunk-OLi7f6y7.js} +1 -1
- package/{chunk-CMmgPgiU.js → chunk-PVmXLw9b.js} +1 -1
- package/{chunk-CRU3lYvk.js → chunk-RQ_MoiOh.js} +1 -1
- package/chunk-Zo-grJt3.js +1 -0
- package/{chunk-DP9SoPGV.js → chunk-dmyIQdVx.js} +1 -1
- package/{chunk-wyer8fjS.js → chunk-glhLCQrb.js} +1 -1
- package/{chunk-B2fqvpov.js → chunk-khm9J_G0.js} +1 -1
- package/{chunk-D48AStVy.js → chunk-wyNyzSXi.js} +1 -1
- package/{chunk-D_A6A07f.js → chunk-yF6CJHRg.js} +1 -1
- package/index.html +1 -1
- package/locale/dayjs/ko.js +45 -0
- package/locale/dayjs/tr.js +39 -0
- package/locale/messages.de.json +168 -12
- package/locale/messages.de_CH.json +162 -6
- package/locale/messages.de_DE.json +162 -6
- package/locale/messages.en.json +1 -0
- package/locale/messages.fr.json +175 -8
- package/locale/messages.fr_CA.json +175 -8
- package/locale/messages.fr_FR.json +175 -8
- package/locale/messages.it.json +79 -5
- package/locale/messages.it_IT.json +79 -5
- package/locale/messages.ja.json +198 -15
- package/locale/messages.ja_JP.json +198 -15
- package/locale/messages.json +1 -0
- package/locale/messages.ko.json +776 -0
- package/locale/messages.nl_BE.json +174 -7
- package/locale/messages.nl_NL.json +174 -7
- package/locale/messages.tr.json +943 -0
- package/main-KFKZO6SJ.js +16 -0
- package/package.json +1 -1
- package/chunk-A5DpxPOI.js +0 -1
- package/chunk-BJ6LKfIL.js +0 -2
- package/chunk-CI78bAye.js +0 -2
- package/chunk-CQ8rm_d9.js +0 -3
- package/chunk-CUxq_s_t.js +0 -14
- package/chunk-CXEImxhE.js +0 -1
- package/chunk-CgYrHQGO.js +0 -1
- package/chunk-D0u1cyeL.js +0 -1
- package/chunk-RKTSBnYB.js +0 -1
- package/main-PXGZLKMN.js +0 -16
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {y,F,m}from'./chunk-C4kBXz3C.js';import {r as rn,S as Se$1,m as mt$1,_ as _t$2}from'./chunk-Dh6x3lXP.js';import {I}from'./chunk-DD_QfWih.js';import {J}from'./chunk-khm9J_G0.js';import'./chunk-wyNyzSXi.js';import {d as d$1,F as Fe$1,P as Pe,b as Ve,V,h,w as we,E as Ee,C as Ce,A as Ae,G,M as Me}from'./chunk-CegwkGVu.js';import {N as Nt$1,m as m$2}from'./chunk-CT9ziigM.js';import {v as ve}from'./chunk-D5lj-fQk.js';import {x}from'./chunk-D6aNT_wo.js';import'./chunk-OLi7f6y7.js';import {D}from'./chunk-B2TXzbpy.js';import {T,e as ee,aw as W,m as m$1,B as y1,U as Ue,G as Ga$1,N as Nt,d as dw,v,f as N,u as ue,Q as Qi$1,F as Fg,X as XT,H as Hl,o as oT,O as Og,j as mg,P as Pg,p as DD,z as gg,D as DE,i as iT,y as TD,t as tC,$ as $g,K as lC,a6 as be$1,k as gT,q as PC,aP as Ul,aQ as Wl,s as sm,I as Qg,w as im,ca as E,C as Bu,aZ as ee$1,af as m1,b as g1,L as oC,ak as cm,al as BC,ac as h1,ai as m$3,aj as l,l as HC,a1 as cT,a2 as lT,bE as Te,cb as Iy,aG as pt,aV as ry,ay as $u,a$ as Vs,b0 as ty,at as h$1,bZ as ei,_ as _t$1,ab as C$1,bJ as vy,cc as Ju,n as nC,S as Sd,x as xd,bt as eE,Y as iC,a3 as QC,ae as Jr$1,c6 as I1,aJ as ci$1,bV as re,bU as B,bf as ig,aD as zC,c7 as Bg,cd as go$1,bj as H,ce as Ns$1,cf as Ss$1,cg as S,ao as $C,ar as Wp,aC as hg,ap as sT,c4 as sb,ch as Nr$1,E as nm,bu as N$1,a4 as aT,aa as Gl,h as bC,ag as zg,c2 as uC,a_ as ZC,ci as KC,b_ as Ig,aF as YC,bw as TC,aB as rm}from'./main-KFKZO6SJ.js';import {f}from'./chunk-DPNAj9Vc.js';import {d}from'./chunk-CRAg6SRo.js';import {F as Fe,A as Ae$1}from'./chunk-DuIUmwWN.js';import {j as jn,m as me,G as Gn,T as Tn,Z as Ze$1,R as Rn,P as Pn,g as gn$1,h as hn,L,B as Bn,J as Jt,l as ln,f as ft,e as en$1,y as yt,b as m$4,D as D$1}from'./chunk-DipTNkHN.js';import {a as at}from'./chunk-Fw6nFDZK.js';import {C}from'./chunk-Ca1C9pJ0.js';import {O}from'./chunk-C-NgIZiF.js';import'./chunk-PVmXLw9b.js';import {L as L$1,$,F as F$1}from'./chunk-C7pjkqKB.js';var zt=class i{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||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function mt(i){if(Nr$1(i))return i();if(Array.isArray(i))return i.map(t=>mt(t));if(typeof i=="object"&&i!==null){let t={};for(let e in i)i.hasOwnProperty(e)&&(t[e]=mt(i[e]));return t}return i}var di=i=>i;function oi(i,t){let e=go$1(i,di,t?.equal),n=e[H],o=e;return o.set=a=>{let l=e();return Ns$1(n,a),()=>{Ns$1(n,l);}},o.update=a=>{let l=e();return Ss$1(n,a),()=>{Ns$1(n,l);}},e}var rt=class i{#e=T(E);isSaving=Ue(false);resourceDestinations=$({stream:()=>this.#e.getApiV2ConnectionStrings()});destinations=oi(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(true),e.Description="",(t==="new"?this.#e.postApiV2ConnectionStrings({requestBody:e}):this.#e.putApiV2ConnectionStringById({id:t.ID,requestBody:e})).pipe(Bu(()=>{this.isSaving.set(false);}))}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||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};var ci=["daysRef"];function ui(i,t){if(i&1&&PC(0),i&2){let e=nC();Gl(" - ",e.getMonthName(e.getLastVisibleMonth())," ");}}function pi(i,t){if(i&1&&(Qi$1(0,"div"),PC(1),Hl()),i&2){let e=t.$implicit;DE(),nm(e);}}function mi(i,t){if(i&1){let e=gT();Qi$1(0,"button",9,1),Fg("keydown",function(o){let a=Sd(e).$implicit,l=nC(2);return xd(l.onKeydown(o,a))})("click",function(){let o=Sd(e).$implicit,a=uC(1),l=nC(2);return xd(l.setDate(o,a))}),PC(2),Hl();}if(i&2){let e=t.$implicit,n=nC().$implicit,o=nC();bC(o.isDateSelected(e)),Qg("out-of-scope",!o.isCurrentMonth(e,n)),hg("aria-label",o.getAriaLabel(e))("tabindex",o.getTabIndex(e))("aria-selected",o.isDateSelectedBool(e)),DE(2),Gl(" ",e.getDate()," ");}}function gi(i,t){if(i&1&&(Qi$1(0,"article",7),mg(1,"div",10),Hl()),i&2){let e=nC(2);DE(),TC(e.selectedDateStylePosition());}}function Ci(i,t){if(i&1&&(Qi$1(0,"div",5)(1,"nav",6),cT(2,pi,2,1,"div",null,sT),Hl(),Qi$1(4,"div",7,0),cT(6,mi,3,8,"button",8,sT),oT(8,gi,2,2,"article",7),Hl()()),i&2){let e=t.$implicit,n=nC();DE(2),lT(n.weekdays()),DE(4),lT(n.getMonthDates(e)),DE(2),iT(n.asRange()?-1:8);}}var Ti=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","textSuffix",""]],[["","suffix",""]]],Si=["label","[prefix]","[textPrefix]","input","[textSuffix]","[suffix]"],fi=["ngProjectAs","label",5,["label"]],hi=["ngProjectAs","[prefix]",5,["","prefix",""]],Ei=["ngProjectAs","[textPrefix]",5,["","textPrefix",""]],yi=["ngProjectAs","[textSuffix]",5,["","textSuffix",""]],Ni=["ngProjectAs","[suffix]",5,["","suffix",""]];function Fi(i,t){if(i&1&&(Qi$1(0,"div",3),PC(1),Hl()),i&2){let e=nC();DE(),Gl(" ",e._maskedDate()," ");}}function Di(i,t){if(i&1){let e=gT();Qi$1(0,"sh-datepicker",7),Fg("dateChange",function(o){Sd(e);let a=nC();return xd(a.onDateChange(o))})("tabbedOut",function(){Sd(e);let o=nC();return xd(o.isOpen.set(false))}),Hl();}if(i&2){let e=nC();bC(e.currentClass()),gg("date",e.internalDate());}}function Ai(i,t){}var Ii=`sh-daterange-input sh-form-field-popover .input-wrap .input,sh-datepicker-input sh-form-field-popover .input-wrap .input{display:grid;grid-template-columns:1fr auto auto;align-items:center}sh-daterange-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap [suffix],sh-datepicker-input sh-form-field-popover .input-wrap [suffix]{margin-right:.75rem}sh-daterange-input sh-form-field-popover .masked-value,sh-datepicker-input sh-form-field-popover .masked-value{font:var(--paragraph-30B);color:var(--base-8);display:flex;gap:.25rem}sh-daterange-input sh-form-field-popover .masked-value.active-start .start-val,sh-datepicker-input sh-form-field-popover .masked-value.active-start .start-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value.active-end .end-val,sh-datepicker-input sh-form-field-popover .masked-value.active-end .end-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value+input+input,sh-daterange-input sh-form-field-popover .masked-value+input,sh-datepicker-input sh-form-field-popover .masked-value+input+input,sh-datepicker-input sh-form-field-popover .masked-value+input{opacity:0;height:0;width:0;margin:0}sh-daterange-input sh-form-field-popover [suffix]+[suffix].default-indicator,sh-datepicker-input sh-form-field-popover [suffix]+[suffix].default-indicator{display:none}sh-daterange-input sh-datepicker,sh-datepicker-input sh-datepicker{z-index:10000;position:relative;--dp-width: 15rem}sh-daterange-input sh-popover .popover-content{--dp-width: 18.75rem;min-width:var(--dp-width)}sh-daterange-input sh-form-field-popover.columns-1 sh-popover .popover-content{--dp-width: 18.75rem }sh-daterange-input sh-form-field-popover.columns-2 sh-popover .popover-content{--dp-width: 38.5rem }sh-daterange-input sh-form-field-popover.columns-3 sh-popover .popover-content{--dp-width: 58.25rem }sh-datepicker-input.sharp sh-datepicker,sh-daterange-input.sharp sh-datepicker,sh-datepicker.sharp{--dp-sel-s: var(--shape-1);--dp-ar: 1/.8;--dp-day-g: .5rem 0}sh-datepicker{--dp-sel-bg: var(--base-8);--dp-sel-bw: 0;--dp-sel-bc: transparent;--dp-sel-s: 50%;--dp-sel-c: #fff;--dp-day-c: var(--base-8);--dp-day-g: .25rem 0;--dp-day-f: var(--paragraph-20);--dp-width: 18.75rem;--dp-ar: 1/1;width:100%;padding:.5rem;max-width:var(--dp-width);display:flex;flex-direction:column}sh-datepicker.disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-datepicker.columns-1{--dp-width: 18.75rem }sh-datepicker.columns-2{--dp-width: 38.5rem }sh-datepicker.columns-3{--dp-width: 58.25rem }sh-datepicker.columns-4{--dp-width: 78rem }sh-datepicker.columns-5{--dp-width: 97.75rem }sh-datepicker.columns-6{--dp-width: 117.5rem }sh-datepicker.columns-7{--dp-width: 137.25rem }sh-datepicker.columns-8{--dp-width: 157rem }sh-datepicker.columns-9{--dp-width: 176.75rem }sh-datepicker.columns-10{--dp-width: 196.5rem }sh-datepicker.columns-11{--dp-width: 216.25rem }sh-datepicker.columns-12{--dp-width: 236rem }sh-datepicker.as-range section .days>div.sel,sh-datepicker.as-range section .days>button.sel{background:var(--dp-sel-bg);opacity:.5;border-radius:0}sh-datepicker.as-range section .days>div.month-start,sh-datepicker.as-range section .days>div.week-start,sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>button.month-start,sh-datepicker.as-range section .days>button.week-start,sh-datepicker.as-range section .days>button.first{border-top-left-radius:var(--dp-sel-s);border-bottom-left-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.month-end,sh-datepicker.as-range section .days>div.week-end,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.month-end,sh-datepicker.as-range section .days>button.week-end,sh-datepicker.as-range section .days>button.last{border-top-right-radius:var(--dp-sel-s);border-bottom-right-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.first,sh-datepicker.as-range section .days>button.last{opacity:1}sh-datepicker.as-range .month .days>div.out-of-scope,sh-datepicker.as-range .month .days>button.out-of-scope{opacity:0;pointer-events:none}sh-datepicker header{display:flex;align-items:center;justify-content:space-between;padding:.25rem 0;gap:0}sh-datepicker header .title{font:var(--paragraph-20)}sh-datepicker header button{appearance:none;background-color:transparent;border:0;cursor:pointer;height:2rem;color:var(--base-8)}sh-datepicker header button:focus{outline:none}sh-datepicker .months-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}sh-datepicker .month{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:1fr 6fr;gap:var(--dp-day-g);align-items:flex-start}sh-datepicker .month .days,sh-datepicker .month .weekdays{display:grid;grid-column:1/-1;gap:var(--dp-day-g);grid-template-columns:subgrid;position:relative}sh-datepicker .month .days>.days,sh-datepicker .month .weekdays>.days{position:absolute;top:0;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:var(--dp-day-g);z-index:0}sh-datepicker .month .days>div,sh-datepicker .month .days>button,sh-datepicker .month .weekdays>div,sh-datepicker .month .weekdays>button{appearance:none;background:transparent;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;aspect-ratio:var(--dp-ar);cursor:pointer;position:relative;z-index:1;color:var(--dp-day-c);font:var(--dp-day-f);-webkit-user-select:none;user-select:none;border-radius:var(--dp-sel-s)}sh-datepicker .month .days>div:focus-visible,sh-datepicker .month .days>button:focus-visible,sh-datepicker .month .weekdays>div:focus-visible,sh-datepicker .month .weekdays>button:focus-visible{outline:2px solid var(--primary-10, #005fcc);outline-offset:-2px}sh-datepicker .month .days>div.sel,sh-datepicker .month .days>button.sel,sh-datepicker .month .weekdays>div.sel,sh-datepicker .month .weekdays>button.sel{color:var(--dp-sel-c);transition:color 75ms linear}sh-datepicker .month .days>div.out-of-scope,sh-datepicker .month .days>button.out-of-scope,sh-datepicker .month .weekdays>div.out-of-scope,sh-datepicker .month .weekdays>button.out-of-scope{opacity:.4}sh-datepicker .month .days>div.sel-el,sh-datepicker .month .days>button.sel-el,sh-datepicker .month .weekdays>div.sel-el,sh-datepicker .month .weekdays>button.sel-el{position:relative;top:0;left:0;transition:transform 75ms linear,opacity 75ms linear;background:var(--dp-sel-bg);border-radius:var(--dp-sel-s);border:var(--dp-sel-bw) solid var(--dp-sel-bc);opacity:0;box-sizing:border-box}sh-datepicker .month .weekdays>div{color:var(--base-12)}sh-datepicker.primary{--dp-sel-bg: var(--primary-8)}sh-datepicker.accent{--dp-sel-bg: var(--accent-8)}sh-datepicker.warn{--dp-sel-bg: var(--warn-8)}sh-datepicker.error{--dp-sel-bg: var(--error-8)}sh-datepicker.success{--dp-sel-bg: var(--success-8)}sh-datepicker.raised{--dp-sel-bg: var(--base-g2)}sh-datepicker.raised.primary{--dp-sel-bg: var(--primary-g2)}sh-datepicker.raised.accent{--dp-sel-bg: var(--accent-g2)}sh-datepicker.raised.warn{--dp-sel-bg: var(--warn-g2)}sh-datepicker.raised.error{--dp-sel-bg: var(--error-g2)}sh-datepicker.raised.success{--dp-sel-bg: var(--success-g2)}
|
|
2
|
+
`;var dn=(()=>{class i{constructor(){this.#e=new Date(new Date().setHours(0,0,0,0)),this.date=m1(null),this.endDate=m1(null),this.asRange=g1(false),this.activeRangeSelection=g1(null),this.monthsToShow=g1(1),this.disabled=g1(false),this.tabbedOut=h1(),this.startOfWeek=g1(1),this.weekdayLabels=g1(["Su","Mo","Tu","We","Th","Fr","Sa"]),this.daysRef=y1("daysRef"),this.currentDate=Ue(this.date()??this.#e),this.#t=T(N$1),this.prevMonthShortcut=Nt(()=>{let e="datepicker.prev-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.nextMonthShortcut=Nt(()=>{let e="datepicker.next-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.monthOffsets=Nt(()=>Array.from({length:this.monthsToShow()},(e,n)=>n)),this.selectedDateStylePosition=Ue(null),this.weekdays=Nt(()=>{let e=this.startOfWeek(),n=this.weekdayLabels();return n.slice(e).concat(n.slice(0,e))}),this.currentClasses=re(),this.someEffect=Ga$1(()=>{this.currentClasses();this.#o();}),this.#n=Ga$1(()=>{this.monthsToShow()>1||this.#i();}),this.focusedDate=Ue(null),this.#a=T(Jr$1);}#e;#t;getLastVisibleMonth(){let e=this.monthsToShow()-1;return this.getOffsetDate(e)}getOffsetDate(e){let n=new Date(this.currentDate());return n.setMonth(n.getMonth()+e),n}getMonthDates(e){let n=this.getOffsetDate(e);return this.#r(n,this.startOfWeek())}#n;ngOnInit(){this.monthsToShow()!==1&&this.#i();}#i(){let e=this.date();e&&!isNaN(e.getTime())&&this.currentDate.set(e),this.#o();}#o(){setTimeout(()=>{let e=this.daysRef()?.nativeElement.querySelector(".sel");if(!e)return this.selectedDateStylePosition.update(n=>n?m$3(l({},n),{opacity:"0"}):null);this.setSelectedDateStylePosition(e);});}#r(e,n){let o=e.getFullYear(),a=e.getMonth(),l=new Date(o,a,1).getDay(),c=new Date(o,a+1,0).getDate(),u=[],T=l-n;T<0&&(T+=7);let D=new Date(o,a,0).getDate();for(let O=T-1;O>=0;O--)u.push(new Date(o,a-1,D-O,0,0,0,0));for(let O=1;O<=c;O++)u.push(new Date(o,a,O,0,0,0,0));let y=1;for(;u.length%7!==0;)u.push(new Date(o,a+1,y++,0,0,0,0));return u}nextMonth(){this.currentDate.update(e=>{let n=new Date(e);return n.setMonth(e.getMonth()+1),n}),this.#o();}previousMonth(){this.currentDate.update(e=>{let n=new Date(e);return n.setMonth(e.getMonth()-1),n}),this.#o();}setDate(e,n){this.focusedDate.set(e);let o=(a,l)=>{let c=0,u=0,T=0,D=0;return l&&((typeof l=="string"||typeof l=="number")&&(l=new Date(l)),l instanceof Date&&!isNaN(l.getTime())&&(c=l.getHours(),u=l.getMinutes(),T=l.getSeconds(),D=l.getMilliseconds())),new Date(a.getFullYear(),a.getMonth(),a.getDate(),c,u,T,D)};if(!this.asRange())this.date.set(o(e,this.date())),this.endDate.set(null);else {let a=this.date(),l=this.endDate(),c=this.activeRangeSelection();if(c==="start"){let u=o(e,a);this.date.set(u),l&&u>l&&this.endDate.set(null);}else if(c==="end")if(!a||e<a){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else {let u=o(e,l);this.endDate.set(u);}else if(a)if(l){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else if(e<a){let u=o(e,a);this.date.set(u),this.endDate.set(null);}else {let u=o(e,l);this.endDate.set(u);}else {let u=o(e,a);this.date.set(u);}}this.asRange()||this.setSelectedDateStylePosition(n);}isDateSelected(e){let n=this.date(),o=this.endDate();if((typeof n=="string"||typeof n=="number")&&(n=new Date(n)),(typeof o=="string"||typeof o=="number")&&(o=new Date(o)),!n||!(n instanceof Date)||isNaN(n.getTime()))return null;let a=y=>new Date(y.getFullYear(),y.getMonth(),y.getDate(),0,0,0,0),l=y=>new Date(y.getFullYear(),y.getMonth(),y.getDate(),23,59,59,999),c=a(e),u=a(n),T=o?l(o):null,D=[];if(this.asRange())if(T===null)c.getTime()===u.getTime()&&D.push("sel first last");else {if(c.getTime()===u.getTime()&&D.push("first"),c.getTime()===a(T).getTime()&&D.push("last"),c>=u&&c<=T){D.push("sel");let K=c.getDay(),J=this.startOfWeek();K===J&&D.push("week-start");let k=(J+6)%7;K===k&&D.push("week-end");}let y=new Date(c);y.setDate(c.getDate()+1),new Date(c).setDate(c.getDate()-1);let G=c.getDate()===1,A=y.getMonth()!==c.getMonth();G&&D.push("month-start"),A&&D.push("month-end");}else c.getTime()===u.getTime()&&D.push("sel");return D.join(" ")||null}setSelectedDateStylePosition(e){this.selectedDateStylePosition.set({transform:`translate(${e.offsetLeft}px, ${e.offsetTop}px)`,opacity:"1"});}getMonthName(e){return e.toLocaleString("default",{month:"long"})}getFullYear(e){return e.getFullYear()}isCurrentMonth(e,n){let o=this.getOffsetDate(n);return e.getMonth()===o.getMonth()}#a;isSameDay(e,n){return !e||!n?false:e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===n.getDate()}getAriaLabel(e){return e.toLocaleDateString(void 0,{weekday:"long",year:"numeric",month:"long",day:"numeric"})}getTabIndex(e){let n=this.focusedDate(),o=this.date(),a=new Date;return n?this.isSameDay(e,n)?0:-1:o?this.isSameDay(e,o)?0:-1:this.isSameDay(e,a)?0:-1}isDateSelectedBool(e){let n=this.isDateSelected(e);return n?n.includes("sel"):false}onKeydown(e,n){let o=new Date(n),a=false;this.#t.matches(e,"datepicker.prev-month")?(o.setMonth(n.getMonth()-1),a=true):this.#t.matches(e,"datepicker.next-month")?(o.setMonth(n.getMonth()+1),a=true):this.#t.matches(e,"datepicker.prev-year")?(o.setFullYear(n.getFullYear()-1),a=true):this.#t.matches(e,"datepicker.next-year")?(o.setFullYear(n.getFullYear()+1),a=true):this.#t.matches(e,"datepicker.month-start")?(o=new Date(n.getFullYear(),n.getMonth(),1,0,0,0,0),a=true):this.#t.matches(e,"datepicker.month-end")?(o=new Date(n.getFullYear(),n.getMonth()+1,0,0,0,0,0),a=true):this.#t.matches(e,"datepicker.day-next")?(o.setDate(n.getDate()+1),a=true):this.#t.matches(e,"datepicker.day-prev")?(o.setDate(n.getDate()-1),a=true):this.#t.matches(e,"datepicker.week-next")?(o.setDate(n.getDate()+7),a=true):this.#t.matches(e,"datepicker.week-prev")&&(o.setDate(n.getDate()-7),a=true),a&&(e.preventDefault(),this.ensureDateVisible(o),this.focusedDate.set(o),setTimeout(()=>{let l=this.#a.nativeElement.querySelectorAll("button");if(l){let c=this.getAriaLabel(o),u=null;for(let T=0;T<l.length&&!(l[T].getAttribute("aria-label")===c&&(u=l[T],!l[T].classList.contains("out-of-scope")));T++);u&&u.focus();}}));}ensureDateVisible(e){let n=this.currentDate(),o=this.getLastVisibleMonth();if(e<new Date(n.getFullYear(),n.getMonth(),1))this.currentDate.set(new Date(e.getFullYear(),e.getMonth(),1)),this.#o();else if(e>new Date(o.getFullYear(),o.getMonth()+1,0)){let a=new Date(e);a.setMonth(a.getMonth()-this.monthsToShow()+1),a.setDate(1),this.currentDate.set(a),this.#o();}}focusActiveDate(){setTimeout(()=>{let e=this.#a.nativeElement.querySelector('button[tabindex="0"]');e&&e.focus();},50);}onFocusOut(e){setTimeout(()=>{let n=document.activeElement;n&&n!==document.body&&!this.#a.nativeElement.contains(n)&&this.tabbedOut.emit();});}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=dw({type:i,selectors:[["sh-datepicker"]],viewQuery:function(n,o){n&1&&$g(o.daysRef,ci,5),n&2&&lC();},hostVars:6,hostBindings:function(n,o){n&1&&Fg("focusout",function(l){return o.onFocusOut(l)}),n&2&&(bC("columns-"+o.monthsToShow()),Qg("as-range",o.asRange())("disabled",o.disabled()));},inputs:{date:[1,"date"],endDate:[1,"endDate"],asRange:[1,"asRange"],activeRangeSelection:[1,"activeRangeSelection"],monthsToShow:[1,"monthsToShow"],disabled:[1,"disabled"],startOfWeek:[1,"startOfWeek"],weekdayLabels:[1,"weekdayLabels"]},outputs:{date:"dateChange",endDate:"endDateChange",tabbedOut:"tabbedOut"},decls:14,vars:5,consts:[["daysRef",""],["elementRef",""],["tabindex","-1",3,"click"],[1,"title"],[1,"months-container"],[1,"month"],[1,"weekdays"],[1,"days"],["type","button",3,"out-of-scope","class"],["type","button",3,"keydown","click"],[1,"sel-el"]],template:function(n,o){n&1&&(Qi$1(0,"header")(1,"button",2),Fg("click",function(){return o.previousMonth()}),Qi$1(2,"sh-icon"),PC(3,"caret-left"),Hl()(),Qi$1(4,"div",3),PC(5),oT(6,ui,1,1),PC(7),Hl(),Qi$1(8,"button",2),Fg("click",function(){return o.nextMonth()}),Qi$1(9,"sh-icon"),PC(10,"caret-right"),Hl()()(),Qi$1(11,"section",4),cT(12,Ci,9,1,"div",5,aT),Hl()),n&2&&(DE(),hg("aria-keyshortcuts",o.prevMonthShortcut()),DE(4),Gl(" ",o.getMonthName(o.currentDate())," "),DE(),iT(o.monthsToShow()>1?6:-1),DE(),Gl(" ",o.getFullYear(o.currentDate())," "),DE(),hg("aria-keyshortcuts",o.nextMonthShortcut()),DE(4),lT(o.monthOffsets()));},dependencies:[N],styles:[`sh-daterange-input sh-form-field-popover .input-wrap .input,sh-datepicker-input sh-form-field-popover .input-wrap .input{display:grid;grid-template-columns:1fr auto auto;align-items:center}sh-daterange-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-start input:first-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type,sh-datepicker-input sh-form-field-popover .input-wrap .input.active-end input:last-of-type{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .input-wrap [suffix],sh-datepicker-input sh-form-field-popover .input-wrap [suffix]{margin-right:.75rem}sh-daterange-input sh-form-field-popover .masked-value,sh-datepicker-input sh-form-field-popover .masked-value{font:var(--paragraph-30B);color:var(--base-8);display:flex;gap:.25rem}sh-daterange-input sh-form-field-popover .masked-value.active-start .start-val,sh-datepicker-input sh-form-field-popover .masked-value.active-start .start-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value.active-end .end-val,sh-datepicker-input sh-form-field-popover .masked-value.active-end .end-val{color:var(--primary-8)}sh-daterange-input sh-form-field-popover .masked-value+input+input,sh-daterange-input sh-form-field-popover .masked-value+input,sh-datepicker-input sh-form-field-popover .masked-value+input+input,sh-datepicker-input sh-form-field-popover .masked-value+input{opacity:0;height:0;width:0;margin:0}sh-daterange-input sh-form-field-popover [suffix]+[suffix].default-indicator,sh-datepicker-input sh-form-field-popover [suffix]+[suffix].default-indicator{display:none}sh-daterange-input sh-datepicker,sh-datepicker-input sh-datepicker{z-index:10000;position:relative;--dp-width: 15rem}sh-daterange-input sh-popover .popover-content{--dp-width: 18.75rem;min-width:var(--dp-width)}sh-daterange-input sh-form-field-popover.columns-1 sh-popover .popover-content{--dp-width: 18.75rem }sh-daterange-input sh-form-field-popover.columns-2 sh-popover .popover-content{--dp-width: 38.5rem }sh-daterange-input sh-form-field-popover.columns-3 sh-popover .popover-content{--dp-width: 58.25rem }sh-datepicker-input.sharp sh-datepicker,sh-daterange-input.sharp sh-datepicker,sh-datepicker.sharp{--dp-sel-s: var(--shape-1);--dp-ar: 1/.8;--dp-day-g: .5rem 0}sh-datepicker{--dp-sel-bg: var(--base-8);--dp-sel-bw: 0;--dp-sel-bc: transparent;--dp-sel-s: 50%;--dp-sel-c: #fff;--dp-day-c: var(--base-8);--dp-day-g: .25rem 0;--dp-day-f: var(--paragraph-20);--dp-width: 18.75rem;--dp-ar: 1/1;width:100%;padding:.5rem;max-width:var(--dp-width);display:flex;flex-direction:column}sh-datepicker.disabled{opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-datepicker.columns-1{--dp-width: 18.75rem }sh-datepicker.columns-2{--dp-width: 38.5rem }sh-datepicker.columns-3{--dp-width: 58.25rem }sh-datepicker.columns-4{--dp-width: 78rem }sh-datepicker.columns-5{--dp-width: 97.75rem }sh-datepicker.columns-6{--dp-width: 117.5rem }sh-datepicker.columns-7{--dp-width: 137.25rem }sh-datepicker.columns-8{--dp-width: 157rem }sh-datepicker.columns-9{--dp-width: 176.75rem }sh-datepicker.columns-10{--dp-width: 196.5rem }sh-datepicker.columns-11{--dp-width: 216.25rem }sh-datepicker.columns-12{--dp-width: 236rem }sh-datepicker.as-range section .days>div.sel,sh-datepicker.as-range section .days>button.sel{background:var(--dp-sel-bg);opacity:.5;border-radius:0}sh-datepicker.as-range section .days>div.month-start,sh-datepicker.as-range section .days>div.week-start,sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>button.month-start,sh-datepicker.as-range section .days>button.week-start,sh-datepicker.as-range section .days>button.first{border-top-left-radius:var(--dp-sel-s);border-bottom-left-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.month-end,sh-datepicker.as-range section .days>div.week-end,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.month-end,sh-datepicker.as-range section .days>button.week-end,sh-datepicker.as-range section .days>button.last{border-top-right-radius:var(--dp-sel-s);border-bottom-right-radius:var(--dp-sel-s)}sh-datepicker.as-range section .days>div.first,sh-datepicker.as-range section .days>div.last,sh-datepicker.as-range section .days>button.first,sh-datepicker.as-range section .days>button.last{opacity:1}sh-datepicker.as-range .month .days>div.out-of-scope,sh-datepicker.as-range .month .days>button.out-of-scope{opacity:0;pointer-events:none}sh-datepicker header{display:flex;align-items:center;justify-content:space-between;padding:.25rem 0;gap:0}sh-datepicker header .title{font:var(--paragraph-20)}sh-datepicker header button{appearance:none;background-color:transparent;border:0;cursor:pointer;height:2rem;color:var(--base-8)}sh-datepicker header button:focus{outline:none}sh-datepicker .months-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}sh-datepicker .month{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:1fr 6fr;gap:var(--dp-day-g);align-items:flex-start}sh-datepicker .month .days,sh-datepicker .month .weekdays{display:grid;grid-column:1/-1;gap:var(--dp-day-g);grid-template-columns:subgrid;position:relative}sh-datepicker .month .days>.days,sh-datepicker .month .weekdays>.days{position:absolute;top:0;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(7,1fr);gap:var(--dp-day-g);z-index:0}sh-datepicker .month .days>div,sh-datepicker .month .days>button,sh-datepicker .month .weekdays>div,sh-datepicker .month .weekdays>button{appearance:none;background:transparent;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;aspect-ratio:var(--dp-ar);cursor:pointer;position:relative;z-index:1;color:var(--dp-day-c);font:var(--dp-day-f);-webkit-user-select:none;user-select:none;border-radius:var(--dp-sel-s)}sh-datepicker .month .days>div:focus-visible,sh-datepicker .month .days>button:focus-visible,sh-datepicker .month .weekdays>div:focus-visible,sh-datepicker .month .weekdays>button:focus-visible{outline:2px solid var(--primary-10, #005fcc);outline-offset:-2px}sh-datepicker .month .days>div.sel,sh-datepicker .month .days>button.sel,sh-datepicker .month .weekdays>div.sel,sh-datepicker .month .weekdays>button.sel{color:var(--dp-sel-c);transition:color 75ms linear}sh-datepicker .month .days>div.out-of-scope,sh-datepicker .month .days>button.out-of-scope,sh-datepicker .month .weekdays>div.out-of-scope,sh-datepicker .month .weekdays>button.out-of-scope{opacity:.4}sh-datepicker .month .days>div.sel-el,sh-datepicker .month .days>button.sel-el,sh-datepicker .month .weekdays>div.sel-el,sh-datepicker .month .weekdays>button.sel-el{position:relative;top:0;left:0;transition:transform 75ms linear,opacity 75ms linear;background:var(--dp-sel-bg);border-radius:var(--dp-sel-s);border:var(--dp-sel-bw) solid var(--dp-sel-bc);opacity:0;box-sizing:border-box}sh-datepicker .month .weekdays>div{color:var(--base-12)}sh-datepicker.primary{--dp-sel-bg: var(--primary-8)}sh-datepicker.accent{--dp-sel-bg: var(--accent-8)}sh-datepicker.warn{--dp-sel-bg: var(--warn-8)}sh-datepicker.error{--dp-sel-bg: var(--error-8)}sh-datepicker.success{--dp-sel-bg: var(--success-8)}sh-datepicker.raised{--dp-sel-bg: var(--base-g2)}sh-datepicker.raised.primary{--dp-sel-bg: var(--primary-g2)}sh-datepicker.raised.accent{--dp-sel-bg: var(--accent-g2)}sh-datepicker.raised.warn{--dp-sel-bg: var(--warn-g2)}sh-datepicker.raised.error{--dp-sel-bg: var(--error-g2)}sh-datepicker.raised.success{--dp-sel-bg: var(--success-g2)}
|
|
3
|
+
`],encapsulation:2});}}return i})(),ai=(()=>{class i{constructor(){this.#e=T(Jr$1),this.ngControl=I1(m$4),this.#t=T(ci$1),this.#n=Ue(null),this.masking=g1("mediumDate"),this.closed=h1(),this._maskedDate=Nt(()=>{let e=this.internalDate(),n=this.masking();return n?e?this.#t.transform(e,n):null:e}),this.internalDate=Ue(null),this.isOpen=m1(false),this.currentClass=re(),this.#i=B("#input-wrap input"),this.datepicker=y1(dn),this.#o=Ga$1(()=>{this.isOpen()&&setTimeout(()=>{this.datepicker()?.focusActiveDate();},50);}),this.#r=Ga$1(()=>{let e=this.#i();if(!e.length)return;let n=e[0];n&&(this.#a(n),n.addEventListener("inputValueChanged",o=>{let a=o.detail.value;if(!a){this.internalDate.set(null);return}let l=new Date(a);if(isNaN(l.getTime())&&typeof a=="string"&&/^(\d{2}):(\d{2})/.test(a)){let c=a.match(/^(\d{2}):(\d{2})(?::(\d{2}))?/);if(c){let u=this.internalDate()||new Date;l=new Date(u),l.setHours(parseInt(c[1],10),parseInt(c[2],10),c[3]?parseInt(c[3],10):0,0);}}isNaN(l.getTime())||this.internalDate.set(l);}),n.addEventListener("focus",()=>{this.isOpen.set(true);}),this.#n.set(n),n.autocomplete="off",typeof n.value=="string"&&this.internalDate.set(n.value?new Date(n.value):null));});}#e;#t;#n;#i;#o;onFocusOut(e){setTimeout(()=>{let n=document.activeElement;n&&n!==document.body&&!this.#e.nativeElement.contains(n)&&this.isOpen.set(false);});}onDateChange(e){this.internalDate.set(e);let n=this.ngControl()?.control;if(n)n.setValue(e);else {let o=this.#n();o&&(o.value=e?e.toString():"",o.dispatchEvent(new Event("input")));}}close(){this.closed.emit(this.internalDate());}#r;#a(e){return Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(n){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,n);let a=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:n}});return this.dispatchEvent(a),n}}),e}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=dw({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(n,o,a){n&1&&Bg(a,o.ngControl,m$4,5),n&2&&lC();},viewQuery:function(n,o){n&1&&$g(o.datepicker,dn,5),n&2&&lC();},hostBindings:function(n,o){n&1&&Fg("focusout",function(l){return o.onFocusOut(l)});},inputs:{masking:[1,"masking"],isOpen:[1,"isOpen"]},outputs:{closed:"closed",isOpen:"isOpenChange"},features:[zC([ci$1])],ngContentSelectors:Si,decls:15,vars:3,consts:[["defaultIndicator",""],[3,"closed","isOpenChange","isOpen"],["id","input-wrap","ngProjectAs","input",5,["input"],1,"input"],[1,"masked-value"],["suffix","",1,"default-indicator"],["popoverContent",""],[3,"date","class"],[3,"dateChange","tabbedOut","date"]],template:function(n,o){if(n&1){let a=gT();oC(Ti),Qi$1(0,"sh-form-field-popover",1),Fg("closed",function(){return o.close()}),sm("isOpenChange",function(c){return Sd(a),HC(o.isOpen,c)||(o.isOpen=c),xd(c)}),iC(1,0,fi),iC(2,1,hi),iC(3,2,Ei),Qi$1(4,"div",2),oT(5,Fi,2,1,"div",3),iC(6,3),Hl(),iC(7,4,yi),iC(8,5,Ni),Qi$1(9,"sh-icon",4),PC(10,"calendar"),Hl(),Qi$1(11,"div",5),oT(12,Di,1,3,"sh-datepicker",6),Hl()(),ig(13,Ai,0,0,"ng-template",null,0,sb);}n&2&&(im("isOpen",o.isOpen),DE(5),iT(o.masking()?5:-1),DE(7),iT(o.isOpen()?12:-1));},dependencies:[dn,Ae$1,N],styles:[Ii],encapsulation:2});}}return i})();function Oi(i,t){if(i&1){let e=gT();Qi$1(0,"div",26)(1,"sh-form-field")(2,"label",27),XT(3,7),Hl(),Qi$1(4,"input",28,0),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),xd(o)}),Hl(),DD(),Qi$1(6,"sh-icon",29),PC(7,"clock"),Hl()(),Qi$1(8,"sh-datepicker-input",30)(9,"label",31),PC(10,"\xA0"),Hl(),Qi$1(11,"input",32,1),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),xd(o)}),Hl(),DD(),Qi$1(13,"sh-icon",29),PC(14,"calendar"),Hl()()(),Qi$1(15,"div",26)(16,"sh-form-field")(17,"label",33),XT(18,8),Hl(),Qi$1(19,"input",34),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),xd(o)}),Hl(),DD(),Hl(),Qi$1(20,"sh-select",35)(21,"input",36),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),xd(o)}),Hl(),DD(),Hl()(),Qi$1(22,"sh-toggle-card",37),Ul(23,38),XT(24,9),Wl(),Qi$1(25,"div",39)(26,"sh-toggle",24),Og(27,10),Qi$1(28,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),xd(o)}),Hl(),DD(),Pg(),Hl(),Qi$1(29,"sh-toggle",24),Og(30,11),Qi$1(31,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),xd(o)}),Hl(),DD(),Pg(),Hl(),Qi$1(32,"sh-toggle",24),Og(33,12),Qi$1(34,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),xd(o)}),Hl(),DD(),Pg(),Hl(),Qi$1(35,"sh-toggle",24),Og(36,13),Qi$1(37,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),xd(o)}),Hl(),DD(),Pg(),Hl(),Qi$1(38,"sh-toggle",24),Og(39,14),Qi$1(40,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),xd(o)}),Hl(),DD(),Pg(),Hl(),Qi$1(41,"sh-toggle",24),Og(42,15),Qi$1(43,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),xd(o)}),Hl(),DD(),Pg(),Hl(),Qi$1(44,"sh-toggle",24),Og(45,16),Qi$1(46,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC(2);return HC(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),xd(o)}),Hl(),DD(),Pg(),Hl()()();}if(i&2){let e=nC(2);DE(4),im("ngModel",e.scheduleFields.nextTime.time),TD(),DE(7),im("ngModel",e.scheduleFields.nextTime.date),TD(),DE(8),im("ngModel",e.scheduleFields.runAgain.repeatValue),TD(),DE(),gg("options",e.unitOptions)("isClearable",false),DE(),im("ngModel",e.scheduleFields.runAgain.repeatUnit),TD(),DE(),gg("disableToggle",true),DE(6),im("ngModel",e.scheduleFields.runAgain.allowedDays.mon),TD(),DE(3),im("ngModel",e.scheduleFields.runAgain.allowedDays.tue),TD(),DE(3),im("ngModel",e.scheduleFields.runAgain.allowedDays.wed),TD(),DE(3),im("ngModel",e.scheduleFields.runAgain.allowedDays.thu),TD(),DE(3),im("ngModel",e.scheduleFields.runAgain.allowedDays.fri),TD(),DE(3),im("ngModel",e.scheduleFields.runAgain.allowedDays.sat),TD(),DE(3),im("ngModel",e.scheduleFields.runAgain.allowedDays.sun),TD();}}function Pi(i,t){if(i&1){let e=gT();Qi$1(0,"div",23)(1,"sh-toggle",24),Og(2,5),Qi$1(3,"input",25),sm("ngModelChange",function(o){Sd(e);let a=nC();return HC(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),xd(o)}),Hl(),DD(),Pg(),Hl(),Qi$1(4,"p"),XT(5,6),Hl()(),oT(6,Oi,47,14);}if(i&2){let e=nC();DE(3),im("ngModel",e.scheduleFields.autoRun),TD(),DE(3),iT(e.scheduleFields.autoRun()?6:-1);}}var Mi=[{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`}],Wt=[{key:$localize`Daily 13:00`,value:"daily",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}},{key:$localize`Weekdays 13:00`,value:"weekdays",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:false,sun:false}}}},{key:$localize`Weekly monday 13:00`,value:"weekly",data:{autoRun:true,nextTime:{time:"13:00:00",date:Ri().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"W",allowedDays:{mon:true,tue:false,wed:false,thu:false,fri:false,sat:false,sun:false}}}},{key:$localize`Don't run automatically`,value:"disabled",data:{autoRun:false,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}},{key:$localize`Custom`,value:"custom",data:{autoRun:true,nextTime:{time:"13:00:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:true,tue:true,wed:true,thu:true,fri:true,sat:true,sun:true}}}}];function ri(i){if(!i.autoRun)return null;let t=[i.runAgain.allowedDays.mon?"Monday":null,i.runAgain.allowedDays.tue?"Tuesday":null,i.runAgain.allowedDays.wed?"Wednesday":null,i.runAgain.allowedDays.thu?"Thursday":null,i.runAgain.allowedDays.fri?"Friday":null,i.runAgain.allowedDays.sat?"Saturday":null,i.runAgain.allowedDays.sun?"Sunday":null].filter(G=>G!==null),e=new Date(i.nextTime.date),n=i.nextTime.time.split(":"),o=e.getFullYear(),a=e.getMonth(),l=e.getDate(),c=parseInt(n[0]??"0"),u=parseInt(n[1]??"0"),T=parseInt(n[2]??"0"),D=new Date(o,a,l,c,u,T,0),y=i.runAgain.repeatValue,O=i.runAgain.repeatUnit;return {Time:D.toISOString(),Repeat:`${y}${O}`,AllowedDays:t}}function Ri(){let i=new Date,t=i.getDay(),e=t===1?7:(8-t)%7;return i.setDate(i.getDate()+e),i.setHours(12,0,0,0),i}var un=()=>({autoRun:Ue(true),nextTime:{time:Ue("13:00"),date:Ue(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:Ue(1),repeatUnit:Ue("D"),allowedDays:{mon:Ue(true),tue:Ue(true),wed:Ue(true),thu:Ue(true),fri:Ue(true),sat:Ue(true),sun:Ue(true)}}}),cn=class i{#e=T(ke);#t=T(ee);#n=T(W);unitOptions=Mi;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=Wt;updateScheduleType(t){let e=Wt.find(n=>n.value===t);if(e&&e?.value!=="custom"){this.scheduleType.set(e.value);let n=e.data;this.scheduleFields.autoRun.set(n.autoRun??false),this.scheduleFields.nextTime.time.set(n.nextTime?.time??"13:00"),this.scheduleFields.nextTime.date.set(n.nextTime?.date??new Date().toISOString().split("T")[0]),this.scheduleFields.runAgain.repeatValue.set(n.runAgain?.repeatValue??1),this.scheduleFields.runAgain.repeatUnit.set(n.runAgain?.repeatUnit??"D"),this.scheduleFields.runAgain.allowedDays.mon.set(n.runAgain?.allowedDays?.mon??true),this.scheduleFields.runAgain.allowedDays.tue.set(n.runAgain?.allowedDays?.tue??true),this.scheduleFields.runAgain.allowedDays.wed.set(n.runAgain?.allowedDays?.wed??true),this.scheduleFields.runAgain.allowedDays.thu.set(n.runAgain?.allowedDays?.thu??true),this.scheduleFields.runAgain.allowedDays.fri.set(n.runAgain?.allowedDays?.fri??true),this.scheduleFields.runAgain.allowedDays.sat.set(n.runAgain?.allowedDays?.sat??true),this.scheduleFields.runAgain.allowedDays.sun.set(n.runAgain?.allowedDays?.sun??true);}else this.scheduleType.set("custom");}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent});}next(){this.#e.shouldAutoSave()&&this.#e.submit(true),this.#t.navigate(["options"],{relativeTo:this.#n.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-schedule"]],decls:12,vars:4,consts:()=>{let t;t=$localize`Select an option...`;let e;e=$localize`Schedule`;let n;n=$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 l;l=$localize`If a date was missed, the job will run as soon as possible.`;let c;c=$localize`Next time`;let u;u=$localize`Run again every`;let T;T=$localize`Allowed days`;let D;D=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let G;G=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let A;A=$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,n,o,a,l,c,u,T,D,y,O,G,A,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,n){e&1&&(Qi$1(0,"h3",17),XT(1,2),Hl(),Qi$1(2,"sh-select",18)(3,"input",19),Fg("ngModelChange",function(a){return n.updateScheduleType(a)}),Hl(),DD(),Hl(),oT(4,Pi,7,2),Qi$1(5,"div",20)(6,"button",21),Fg("click",function(){return n.goBack()}),Og(7,3),mg(8,"sh-icon"),Pg(),Hl(),Qi$1(9,"button",22),Fg("click",function(){return n.next()}),Og(10,4),mg(11,"sh-icon"),Pg(),Hl()()),e&2&&(DE(2),gg("isClearable",false)("options",n.scheduleOptions),DE(),gg("ngModel",n.scheduleType()),TD(),DE(),iT(n.scheduleType()==="custom"?4:-1));},dependencies:[Bn,Ze$1,en$1,yt,Rn,Jt,Fe,J,N,v,Nt$1,I,ai],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}"]})};var xi=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],Li=["[title]","[description]","[action]","*"];function bi(i,t){i&1&&PC(0,"Title");}function vi(i,t){i&1&&(Qi$1(0,"sh-icon"),PC(1,"caret-down"),Hl());}var Ze=class i{isActive=m1(false);disableToggle=g1(false);ngOnInit(){this.disableToggle()&&this.isActive.set(true);}toggle(){this.isActive.set(!this.isActive());}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&Qg("active",n.isActive());},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Li,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(oC(xi),Qi$1(0,"header")(1,"div",0)(2,"h3",1),Fg("click",function(){return n.disableToggle()||n.toggle()}),iC(3,0,null,bi,1,0),oT(5,vi,2,0,"sh-icon"),Hl(),iC(6,1),Hl(),Qi$1(7,"div",2),iC(8,2),Hl()(),Qi$1(9,"div",3),iC(10,3),Hl()),e&2&&(DE(5),iT(n.disableToggle()?-1:5));},dependencies:[N],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;gap:.25rem;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}"]})};var wi=["textInput"];function Gi(i,t){if(i&1){let e=gT();Qi$1(0,"sh-select",3)(1,"input",7),sm("ngModelChange",function(o){Sd(e);let a=nC();return HC(a.internalPath,o)||(a.internalPath=o),xd(o)}),Fg("ngModelChange",function(){Sd(e);let o=nC();return xd(o.updateFilter())}),Hl(),DD(),Hl();}if(i&2){let e=nC();gg("options",e.fileGroupOptions())("isClearable",false)("selectMultiple",true),DE(),im("ngModel",e.internalPath),TD();}}function ki(i,t){if(i&1&&(Qi$1(0,"div",8),PC(1),Hl()),i&2){let e=nC(2);DE(),nm(e.currentExpressionOption()?.startsWith);}}function $i(i,t){if(i&1&&(Qi$1(0,"div",9),PC(1),Hl()),i&2){let e=nC(2);DE(),nm(e.currentExpressionOption()?.endsWith);}}function Ui(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field",4)(1,"input",7,0),sm("ngModelChange",function(o){Sd(e);let a=nC();return HC(a.internalPath,o)||(a.internalPath=o),xd(o)}),Fg("ngModelChange",function(){Sd(e);let o=nC();return xd(o.updateFilter())}),Hl(),DD(),oT(3,ki,2,1,"div",8),oT(4,$i,2,1,"div",9),Hl();}if(i&2){let e=nC();DE(),im("ngModel",e.internalPath),TD(),DE(2),iT(e.currentExpressionOption()?.startsWith?.length?3:-1),DE(),iT(e.currentExpressionOption()?.endsWith?.length?4:-1);}}var Bi=[{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"}],Vi=[{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"}],Ht=class i{#e=T(Te);path=g1.required();osType=g1();isNew=g1(false);pathChange=h1();remove=h1();internalPath=Ue("");pathType=Ue("-Expression");textInput=y1("textInput");currentExpressionOption=Nt(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=Ue(Bi);expressionOptions=Nt(()=>{let e=this.osType()==="Windows"?"\\":"/";return Vi.map(n=>n.value==="-Folder"||n.value==="+Folder"?m$3(l({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?m$3(l({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?m$3(l({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?m$3(l({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?m$3(l({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?m$3(l({},n),{startsWith:"*.",endsWith:""}):m$3(l({},n),{startsWith:"",endsWith:""}))});pathEffect=Ga$1(()=>{let t=this.path(),e=t.slice(1),n=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(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${a}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${a}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e)),this.isNew()&&eE(()=>{this.focusInput();},{injector:this.#e});});focusInput(){let t=this.textInput()?.nativeElement;t&&(t.focus(),t.select());}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||i)};static \u0275cmp=dw({type:i,selectors:[["app-new-filter"]],viewQuery:function(e,n){e&1&&$g(n.textInput,wi,5),e&2&&lC();},inputs:{path:[1,"path"],osType:[1,"osType"],isNew:[1,"isNew"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["textInput",""],["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,n){e&1&&(Qi$1(0,"sh-select",1)(1,"input",2),sm("ngModelChange",function(a){return HC(n.pathType,a)||(n.pathType=a),a}),Fg("ngModelChange",function(){return n.updateFilter()}),Hl(),DD(),Hl(),oT(2,Gi,2,4,"sh-select",3)(3,Ui,5,3,"sh-form-field",4),Qi$1(4,"div",5),Fg("click",function(){return n.removeFilter()}),Qi$1(5,"sh-icon",6),PC(6,"x-circle"),Hl()()),e&2&&(gg("options",n.expressionOptions())("isClearable",false),DE(),im("ngModel",n.pathType),TD(),DE(),iT(n.currentExpressionOption()?.value=="-FileGroup"||n.currentExpressionOption()?.value=="+FileGroup"?2:3));},dependencies:[Bn,Ze$1,Rn,Jt,Nt$1,Fe,N],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}"]})};var Ki=["filtersContainer"],Ji=()=>({updateOn:"blur",standalone:true});function Xi(i,t){if(i&1){let e=gT();Qi$1(0,"button",15),Fg("click",function(){Sd(e);let o=nC();return xd(o.addFilter())}),Og(1,3),mg(2,"sh-icon"),Pg(),Hl();}}function zi(i,t){i&1&&XT(0,2,1);}function Wi(i,t){i&1&&XT(0,2,2);}function Hi(i,t){i&1&&(Qi$1(0,"p",13),XT(1,4),Hl());}function ji(i,t){i&1&&(Qi$1(0,"p",13),XT(1,5),Hl());}function qi(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field")(1,"textarea",16),sm("ngModelChange",function(o){Sd(e);let a=nC();return HC(a.bulkFilters,o)||(a.bulkFilters=o),xd(o)}),Fg("ngModelChange",function(){Sd(e);let o=nC();return xd(o.saveBulkFilterEdit())}),Hl(),DD(),Hl();}if(i&2){let e=nC();DE(),im("ngModel",e.bulkFilters),gg("ngModelOptions",QC(2,Ji)),TD();}}function Yi(i,t){if(i&1){let e=gT();Qi$1(0,"app-new-filter",18),Fg("pathChange",function(o){let a=Sd(e).$index,l=nC(2);return xd(l.updateFilterAt(o,a))})("remove",function(){let o=Sd(e).$index,a=nC(2);return xd(a.removeFilterAt(o))}),Hl();}if(i&2){let e=t.$implicit,n=t.$index,o=nC(2);gg("path",e)("osType",o.osType())("isNew",o.lastAddedIndex()===n);}}function Qi(i,t){if(i&1&&(Qi$1(0,"div",14,0),cT(2,Yi,1,3,"app-new-filter",17,sT),Hl()),i&2){let e=nC();DE(2),lT(e.filters());}}var jt=class i{#e=T(Te);filters=m1.required();osType=g1("");disableToggle=g1(true);bulkFilterEditMode=Ue(false);bulkFilters=Ue("");lastAddedIndex=Ue(null);filtersContainer=y1.required("filtersContainer");hasFilters=Nt(()=>this.filters().length>0);toggleBulkFilterEdit(){this.bulkFilterEditMode()?this.bulkFilterEditMode.set(false):(this.bulkFilters.set(this.filters().join(`
|
|
4
|
+
`)),this.bulkFilterEditMode.set(true));}saveBulkFilterEdit(){let t=this.bulkFilters().split(`
|
|
5
|
+
`).map(n=>n.trim()).filter(n=>n!==""&&(n.startsWith("-")||n.startsWith("+"))),e=[...new Set(t)];this.filters.set(e),this.bulkFilterEditMode.set(false);}addFilter(){let t=this.filters(),e=t.length;this.filters.set([...t,"-*"]),this.lastAddedIndex.set(e),eE(()=>{this.scrollToFilter(e);},{injector:this.#e});}scrollToFilter(t){let e=this.filtersContainer()?.nativeElement;if(!e)return;let n=e.querySelectorAll("app-new-filter");n[t]&&n[t].scrollIntoView({behavior:"smooth",block:"nearest"});}updateFilterAt(t,e){let o=[...this.filters()];o[e]=t,this.filters.set(o),this.lastAddedIndex.set(null);}removeFilterAt(t){let n=this.filters().filter((o,a)=>a!==t);this.filters.set(n),this.lastAddedIndex.set(null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-filters"]],viewQuery:function(e,n){e&1&&$g(n.filtersContainer,Ki,5),e&2&&lC();},inputs:{filters:[1,"filters"],osType:[1,"osType"],disableToggle:[1,"disableToggle"]},outputs:{filters:"filtersChange"},decls:20,vars:5,consts:()=>{let t;t=$localize`Filters`;let e;e=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_IF: Edit contents as list ${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*15:2\uFFFD"}:START_BLOCK_ELSE: Edit contents as text ${"\uFFFD/*15:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let o;o=$localize`Customize your filters.`;let a;return a=$localize`Edit filters as text, one per line.`,[["filtersContainer",""],t,e,n,o,a,[3,"disableToggle"],["title",""],[1,"spacer"],["type","button","shButton","",1,"small"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],["description",""],[1,"filters"],["type","button","shButton","",1,"small",3,"click"],["wrap","off","rows","10",1,"bulk-textarea",3,"ngModelChange","ngModel","ngModelOptions"],[3,"path","osType","isNew"],[3,"pathChange","remove","path","osType","isNew"]]},template:function(e,n){e&1&&(Qi$1(0,"app-toggle-card",6),Ul(1,7),Qi$1(2,"span"),XT(3,1),Hl(),mg(4,"div",8),oT(5,Xi,3,0,"button",9),Qi$1(6,"sh-menu")(7,"button",10)(8,"sh-icon"),PC(9,"dots-three-vertical"),Hl()(),Ul(10,11),Qi$1(11,"button",12),Fg("click",function(){return n.toggleBulkFilterEdit()}),Og(12,2),mg(13,"sh-icon"),oT(14,zi,1,0)(15,Wi,1,0),Pg(),Hl(),Wl(),Hl(),Wl(),oT(16,Hi,2,0,"p",13)(17,ji,2,0,"p",13),oT(18,qi,2,3,"sh-form-field")(19,Qi,4,0,"div",14),Hl()),e&2&&(gg("disableToggle",n.disableToggle()),DE(5),iT(n.bulkFilterEditMode()?-1:5),DE(9),iT(n.bulkFilterEditMode()?14:15),DE(2),iT(n.bulkFilterEditMode()?17:16),DE(2),iT(n.bulkFilterEditMode()?18:19));},dependencies:[Bn,Ze$1,Rn,Jt,v,N,ve,Fe,Ze,Ht],styles:["[_nghost-%COMP%]{display:block}.spacer[_ngcontent-%COMP%]{flex:1}.bulk-textarea[_ngcontent-%COMP%]{width:100%;font-family:monospace;min-height:12.5rem}.filters[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"]})};function Zi(i,t){i&1&&(Qi$1(0,"div",22)(1,"sh-icon"),PC(2,"spinner"),Hl(),Qi$1(3,"span"),XT(4,2),Hl()());}function eo(i,t){if(i&1&&(Qi$1(0,"div",23)(1,"sh-icon"),PC(2,"warning"),Hl(),Qi$1(3,"span"),PC(4),Hl()()),i&2){let e=nC();DE(4),nm(e.error());}}function to(i,t){if(i&1&&(Qi$1(0,"div",24)(1,"section",27)(2,"h4"),XT(3,3),Hl(),Qi$1(4,"dl")(5,"div")(6,"dt"),XT(7,4),Hl(),Qi$1(8,"dd"),PC(9),Hl()(),Qi$1(10,"div")(11,"dt"),XT(12,5),Hl(),Qi$1(13,"dd"),PC(14),Hl()(),Qi$1(15,"div")(16,"dt"),XT(17,6),Hl(),Qi$1(18,"dd"),PC(19),Hl()(),Qi$1(20,"div")(21,"dt"),XT(22,7),Hl(),Qi$1(23,"dd"),PC(24),Hl()(),Qi$1(25,"div",28)(26,"dt"),XT(27,8),Hl(),Qi$1(28,"dd"),PC(29),Hl()()()(),Qi$1(30,"section",27)(31,"h4"),XT(32,9),Hl(),Qi$1(33,"dl")(34,"div")(35,"dt"),XT(36,10),Hl(),Qi$1(37,"dd"),PC(38),Hl()(),Qi$1(39,"div")(40,"dt"),XT(41,11),Hl(),Qi$1(42,"dd"),PC(43),Hl()(),Qi$1(44,"div",28)(45,"dt"),XT(46,12),Hl(),Qi$1(47,"dd"),PC(48),Hl()()()(),Qi$1(49,"section",27)(50,"h4"),XT(51,13),Hl(),Qi$1(52,"dl")(53,"div")(54,"dt"),XT(55,14),Hl(),Qi$1(56,"dd"),PC(57),Hl()(),Qi$1(58,"div")(59,"dt"),XT(60,15),Hl(),Qi$1(61,"dd"),PC(62),Hl()(),Qi$1(63,"div")(64,"dt"),XT(65,16),Hl(),Qi$1(66,"dd"),PC(67),Hl()(),Qi$1(68,"div")(69,"dt"),XT(70,17),Hl(),Qi$1(71,"dd"),PC(72),Hl()(),Qi$1(73,"div")(74,"dt"),XT(75,18),Hl(),Qi$1(76,"dd"),PC(77),Hl()(),Qi$1(78,"div",28)(79,"dt"),XT(80,19),Hl(),Qi$1(81,"dd"),PC(82),Hl()()()()()),i&2){let e=nC().counts();DE(9),nm(e.users.licensed),DE(5),nm(e.users.unlicensed),DE(5),nm(e.users.sharedMailboxWithStorage),DE(5),nm(e.users.sharedMailboxWithoutStorage),DE(5),nm(e.users.total),DE(9),nm(e.groups.unified),DE(5),nm(e.groups.notUnified),DE(5),nm(e.groups.total),DE(9),nm(e.sites.group),DE(5),nm(e.sites.classic),DE(5),nm(e.sites.communication),DE(5),nm(e.sites.personal),DE(5),nm(e.sites.other),DE(5),nm(e.sites.total);}}var qt=class i{#e=T(d$1);data=g1();closed=h1();status=Ue("loading");error=Ue(null);counts=Ue(null);#t=Ga$1(()=>{let t=this.data(),e=t?.url,n=t?.sourcePrefix,o=t?.backupId??null;if(!e||!n){this.status.set("error"),this.error.set($localize`No URL provided`);return}this.status.set("loading"),this.#e.getOffice365Counts(e,n,o).subscribe({next:a=>{this.counts.set(a),this.status.set("success");},error:a=>{this.error.set(a?.message??$localize`Failed to load counts`),this.status.set("error");}});});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-office365-counts-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:1,consts:()=>{let t;t=$localize`Microsoft 365 tenant items found`;let e;e=$localize`Close`;let n;n=$localize`Loading counts…`;let o;o=$localize`Users`;let a;a=$localize`Licensed`;let l;l=$localize`Unlicensed`;let c;c=$localize`Shared mailbox (with storage)`;let u;u=$localize`Shared mailbox (without storage)`;let T;T=$localize`Total`;let D;D=$localize`Groups`;let y;y=$localize`Unified`;let O;O=$localize`Not unified`;let G;G=$localize`Total`;let A;A=$localize`Sites`;let K;K=$localize`Group`;let J;J=$localize`Classic`;let k;k=$localize`Communication`;let Q;Q=$localize`Personal`;let z;z=$localize`Other`;let xe;return xe=$localize`Total`,[t,e,n,o,a,l,c,u,T,D,y,O,G,A,K,J,k,Q,z,xe,[1,"title-30"],["content",""],[1,"state","loading"],[1,"state","error"],[1,"counts"],["footer",""],["shButton","","type","button",3,"click"],[1,"group"],[1,"total"]]},template:function(e,n){if(e&1&&(Qi$1(0,"header")(1,"h3",20),XT(2,0),Hl()(),Qi$1(3,"section",21),oT(4,Zi,5,0,"div",22)(5,eo,5,1,"div",23)(6,to,83,14,"div",24),Hl(),Qi$1(7,"footer",25)(8,"button",26),Fg("click",function(){return n.closed.emit()}),XT(9,1),Hl()()),e&2){let o;DE(4),iT((o=n.status())==="loading"?4:o==="error"?5:o==="success"?6:-1);}},dependencies:[v,N],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}.state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.5rem 0}.state.loading[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1s linear infinite}.state.error[_ngcontent-%COMP%]{color:var(--color-danger, #c0392b)}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.counts[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.group[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .5rem}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;gap:.25rem;margin:0}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.25rem 0;border-bottom:1px solid var(--color-border, #e0e0e0)}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{border-bottom:none}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.total[_ngcontent-%COMP%]{font-weight:700}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{margin:0;color:var(--color-text-secondary, #666)}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;font-weight:600}footer[_ngcontent-%COMP%]{z-index:1}"]})};var gt=class i{data=g1();closed=h1();path=Ue("");isValid=Nt(()=>this.path().length>0);dataEffect=Ga$1(()=>{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||i)};static \u0275cmp=dw({type:i,selectors:[["app-target-disk-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:4,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Full disk source`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this disk `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","destinationUrl"],["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,n){e&1&&(Qi$1(0,"header")(1,"h3",3),XT(2,0),Hl()(),Qi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),sm("ngModelChange",function(a){return HC(n.path,a)||(n.path=a),a}),Hl(),DD(),Hl()(),Qi$1(6,"footer",7)(7,"button",8),Fg("click",function(){return n.closed.emit(null)}),XT(8,1),Hl(),Qi$1(9,"button",9),Fg("click",function(){return n.submit()}),XT(10,2),Hl()()),e&2&&(DE(4),gg("customRemoteMode","diskimage")("destinationUrl","diskimage://"),DE(),im("ngModel",n.path),TD(),DE(4),gg("disabled",!n.isValid()));},dependencies:[v,Se$1,Bn,Ze$1,Rn,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}"]})};var no=[[["","displayName",""]],[["","description",""]],"*"],io=["[displayName]","[description]","*"];function oo(i,t){if(i&1&&PC(0),i&2){nC(2);let e=$C(1);Gl(" ",e.Name," ");}}function ao(i,t){if(i&1&&PC(0),i&2){nC(2);let e=$C(0);Gl(" ",e.displayName," ");}}function ro(i,t){i&1&&(Qi$1(0,"sh-chip",6),PC(1,"Untested"),Hl());}function so(i,t){i&1&&(Qi$1(0,"sh-chip",6),PC(1,"Special"),Hl());}function lo(i,t){i&1&&(Qi$1(0,"sh-chip",7),PC(1,"Deprecated"),Hl());}function _o(i,t){if(i&1&&PC(0),i&2){nC();let e=$C(16);Gl(" ",e," ");}}function co(i,t){if(i&1&&PC(0),i&2){nC(2);let e=$C(0);Gl(" ",e.description," ");}}function uo(i,t){if(i&1&&(Qi$1(0,"sh-card",0)(1,"div",1),mg(2,"img",2),Hl(),Qi$1(3,"div",3)(4,"div",4),iC(5),Hl(),Qi$1(6,"div",5),oT(7,oo,1,1)(8,ao,1,1),oT(9,ro,2,0,"sh-chip",6)(10,so,2,0,"sh-chip",6)(11,lo,2,0,"sh-chip",7),Hl()(),Qi$1(12,"div",8)(13,"div",4),iC(14,1),Hl(),Qi$1(15,"div",5),cm(16),oT(17,_o,1,1)(18,co,1,1),Hl()(),Qi$1(19,"div",9),iC(20,2),Hl()()),i&2){let e=nC(),n=$C(0),o=$C(1);gg("variant",e.variant()),DE(2),gg("src",n.icon,Wp),hg("alt",n.displayName),DE(5),iT(o&&o.Name?7:8),DE(2),iT((n.sortOrder??0)==-3?9:(n.sortOrder??0)==-2?10:(n.sortOrder??0)<0?11:-1),DE(7);let a=BC(e.getSimplePath(o?.BaseUrl));DE(),iT(a&&a.length>0?17:18);}}var st=class i{destination=g1();targetUrl=g1();variant=g1("type-b");connectionStringId=g1();#e=T(rt);connectionString=Nt(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=Nt(()=>{let t=this.targetUrl();return t?V(t)??null:null});destinationFromTargetUrl=Nt(()=>{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=Nt(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});getSimplePath(t){return t?h(t):""}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"]},ngContentSelectors:io,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,n){if(e&1&&(oC(no),cm(0)(1),oT(2,uo,21,7,"sh-card",0)),e&2){let o=BC(n.destinationItem());DE(),BC(n.connectionString()),DE(),iT(o?2:-1);}},dependencies:[f,D],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}']})};var lt=class i{#e=T(m$1);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let n=Me(e.Key);if(n.length<=1){let o=G(e.Key);return o.isDefaultEntry===true?[m$3(l({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||""})]:o}else return n}).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=Nt(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=Nt(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=Nt(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=Nt(()=>[...this.#e.backendModules(),...this.#e.sourceProviderModules(),...this.#e.restoreDestinationProviderModules()].reduce((t,e)=>(t.find(n=>n.Key===e.Key)||t.push(e),t),[]));static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function po(i,t){if(i&1){let e=gT();Qi$1(0,"app-destination-list-item",7),Fg("click",function(){let o=Sd(e).$implicit,a=nC();return xd(a.setDestination.emit(o.customKey??o.key))})("keydown.enter",function(o){return o.target.click()})("keydown.space",function(o){return o.target.click()}),Qi$1(1,"button",8),Og(2,1),mg(3,"sh-icon"),Pg(),Hl()();}if(i&2){let e=t.$implicit;gg("destination",e);}}var Yt=class i{#e=T(lt);#t=T(m$1);showAsSources=g1(false);moduleType=g1("Backend");setDestination=h1();destinationSearchTerm=Ue("");showAllDestinations=Ue(false);destinationTypeOptions=Nt(()=>{switch(this.moduleType()){case "SourceProvider":return this.#e.sourceProviderOptions();case "RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=Nt(()=>{let t=this.#t.backendModules(),e=this.destinationTypeOptions().map(l$1=>{let c=t.find(u=>u.Key==l$1.key);return c&&(l$1=m$3(l({},l$1),{sortOrder:c.IsDeprecated?-1:c.IsUntested?-3:l$1.sortOrder})),l$1}),n=this.destinationSearchTerm().toLowerCase(),o=this.showAllDestinations(),a=[...e].sort((l,c)=>{let u=l.sortOrder??0,T=c.sortOrder??0;return u!==T?T-u:l.displayName.localeCompare(c.displayName)}).filter(l=>{if(o)return true;let c=l.sortOrder??0;return c<0&&n?.length&&(l.key.toLocaleLowerCase()===n.toLocaleLowerCase()||l.customKey?.toLocaleLowerCase()===n.toLocaleLowerCase())?true:c>=0});return n?a.filter(l=>l.searchTerms.toLowerCase().includes(n)):a});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:8,vars:2,consts:()=>{let t;t=$localize`Search for destination...`;let e;e=$localize`Show all`;let n;return n=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[e,n,[1,"search-area"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"raised","primary",3,"checkedChange","checked"],[1,"list"],["tabindex","0",3,"destination"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination"],["shButton","","tabindex","-1","type","button"]]},template:function(e,n){e&1&&(Qi$1(0,"div",2)(1,"sh-form-field")(2,"input",3),sm("ngModelChange",function(a){return HC(n.destinationSearchTerm,a)||(n.destinationSearchTerm=a),a}),Hl(),DD(),Hl(),Qi$1(3,"sh-toggle",4),sm("checkedChange",function(a){return HC(n.showAllDestinations,a)||(n.showAllDestinations=a),a}),XT(4,0),Hl()(),Qi$1(5,"div",5),cT(6,po,4,1,"app-destination-list-item",6,sT),Hl()),e&2&&(DE(2),im("ngModel",n.destinationSearchTerm),TD(),DE(),im("checked",n.showAllDestinations),DE(3),lT(n.destinationTypeOptionsFocused()));},dependencies:[st,Bn,Ze$1,Rn,Jt,Fe,v,N,J],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden;padding:.25rem;min-height:250px}.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)}.search-area[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}"]})};var mo=["fileInput"],go=[[["label"]]],Co=["label"],To=["ngProjectAs","label",5,["label"]],Qt=class i{customId=g1();content=Ue("");readonly=Ue(false);placeholder=g1($localize`Drop a file here or use the browse button`);fileInputRef=y1("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(),false}onChange=()=>{};onTouched=()=>{};onChangeEffect=Ga$1(()=>{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||i)};static \u0275cmp=dw({type:i,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){e&1&&$g(n.fileInputRef,mo,5),e&2&&lC();},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[zC([{provide:D$1,useExisting:i,multi:true}])],ngContentSelectors:Co,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,n){if(e&1){let o=gT();oC(go),iC(0,0,To),Qi$1(1,"div",1)(2,"button",2),Fg("click",function(){return n.triggerBrowse()}),Qi$1(3,"sh-icon"),PC(4,"upload"),Hl()()(),Qi$1(5,"div",3),Fg("drop",function(l){return n.onFileDrop(l)})("dragover",function(l){return n.onDragOver(l)}),Qi$1(6,"textarea",4),sm("ngModelChange",function(l){return Sd(o),HC(n.content,l)||(n.content=l),xd(l)}),Hl(),DD(),Hl(),Qi$1(7,"input",5,0),Fg("change",function(l){return n.onFileSelected(l)}),Hl();}e&2&&(DE(6),gg("placeholder",n.placeholder()),im("ngModel",n.content),gg("disabled",n.readonly()),TD());},dependencies:[Bn,Ze$1,Rn,Jt,N,v],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}']})};var Zt=class i{data=g1();closed=h1();path=Ue("");destinationUrl=Ue("");backupId=Ue("");connectionStringId=Ue(null);isValid=Nt(()=>this.path().length>0);dataEffect=Ga$1(()=>{let t=this.data();t?.destinationUrl&&this.destinationUrl.set(t.destinationUrl),t?.backupId&&this.backupId.set(t.backupId),t?.connectionStringId&&this.connectionStringId.set(t.connectionStringId);});submit(){this.closed.emit(this.path()||null);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-browse-path-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:11,vars:8,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Select destination folder`;let n;n=$localize`Cancel`;let o;return o=$localize` Use this folder `,[e,n,o,[1,"title-30"],["content",""],[3,"customRemoteMode","backupId","destinationUrl","connectionStringId","onlySelectFolder","selectFiles"],["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,n){e&1&&(Qi$1(0,"header")(1,"h3",3),XT(2,0),Hl()(),Qi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),sm("ngModelChange",function(a){return HC(n.path,a)||(n.path=a),a}),Hl(),DD(),Hl()(),Qi$1(6,"footer",7)(7,"button",8),Fg("click",function(){return n.closed.emit(null)}),XT(8,1),Hl(),Qi$1(9,"button",9),Fg("click",function(){return n.submit()}),XT(10,2),Hl()()),e&2&&(DE(4),gg("customRemoteMode","backend")("backupId",n.backupId())("destinationUrl",n.destinationUrl())("connectionStringId",n.connectionStringId())("onlySelectFolder",true)("selectFiles",false),DE(),im("ngModel",n.path),TD(),DE(4),gg("disabled",!n.isValid()));},dependencies:[v,Se$1,Bn,Ze$1,Rn,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}"]})};var So=(i,t,e,n)=>({index:i,fieldGroup:"custom",formView:t,destinationType:e,oauthField:n}),Se=i=>({$implicit:i}),fo=(i,t,e,n)=>({index:i,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:n}),ho=()=>({updateOn:"blur"}),Eo=(i,t,e,n)=>({index:i,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:n}),be=(i,t)=>({fieldGroup:i,formView:t}),yo=()=>["/connect/logon"];function No(i,t){i&1&&Ig(0);}function Fo(i,t){if(i&1&&ig(0,No,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;nC();let o=uC(15);nC();let a=$C(0),l=$C(1);gg("ngTemplateOutlet",o)("ngTemplateOutletContext",ZC(7,Se,KC(2,So,n,e,a,l.oauthField)));}}function Do(i,t){i&1&&Ig(0);}function Ao(i,t){if(i&1&&ig(0,Do,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;nC();let o=uC(15);nC();let a=$C(0),l=$C(1);gg("ngTemplateOutlet",o)("ngTemplateOutletContext",ZC(7,Se,KC(2,fo,n,e,a,l.oauthField)));}}function Io(i,t){if(i&1){let e=gT();Qi$1(0,"button",26),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.showTextArea.set(false))}),Og(1,8),mg(2,"sh-icon"),Pg(),Hl();}}function Oo(i,t){if(i&1){let e=gT();Qi$1(0,"button",33,2),Fg("click",function(){let o=Sd(e).$implicit,a=nC(3);return xd(a.addAdvancedOption(o))}),PC(2),Hl();}if(i&2){let e=t.$implicit;DE(2),Gl(" ",e.name," ");}}function Po(i,t){if(i&1){let e=gT();Qi$1(0,"div",23)(1,"sh-menu",27)(2,"button",28),Og(3,9),mg(4,"sh-icon"),Pg(),Hl(),Ul(5,29),cT(6,Oo,3,1,"button",30,sT),Wl(),Hl(),Qi$1(8,"sh-menu")(9,"button",31)(10,"sh-icon"),PC(11,"dots-three-vertical"),Hl()(),Ul(12,29),Qi$1(13,"button",32),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.showTextArea.set(true))}),Qi$1(14,"sh-icon"),PC(15,"link"),Hl(),PC(16," Edit contents as text "),Hl(),Wl(),Hl()();}if(i&2){nC();let e=$C(9);DE(),gg("searchable",true),DE(),gg("disabled",e.length===0),DE(4),lT(e);}}function Mo(i,t){if(i&1){let e=gT();Qi$1(0,"textarea",34),Fg("ngModelChange",function(o){Sd(e);let a=nC(2);return xd(a.updateSettingsFromText(o))}),Hl(),DD();}if(i&2){let e=nC(2);gg("ngModel",e.settingsAsText())("ngModelOptions",QC(2,ho)),TD();}}function Ro(i,t){i&1&&Ig(0);}function xo(i,t){if(i&1&&ig(0,Ro,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;nC(2);let o=uC(15),a=nC(),l=$C(0),c=$C(1),u=a.getFormView("advanced",e)??a.getDefaultFormView(e);gg("ngTemplateOutlet",o)("ngTemplateOutletContext",ZC(7,Se,KC(2,Eo,n,u,l,c.oauthField)));}}function Lo(i,t){if(i&1&&cT(0,xo,1,9,"ng-container",null,sT),i&2){let e=nC(2);lT(e.advancedFormFieldNames());}}function bo(i,t){i&1&&(Qi$1(0,"sup",43),PC(1,"*"),Hl());}function vo(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function wo(i,t){if(i&1){let e=gT();Qi$1(0,"app-file-tree",36)(1,"label",42),oT(2,bo,2,0,"sup",43),PC(3),oT(4,vo,2,1,"sh-icon",44),Hl(),Qi$1(5,"input",45),Fg("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Hl();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(3),l=$C(4),c=$C(5);gg("startingPath",a)("accepts",e.formView.accepts)("showFiles",true)("hideShortcuts",false)("showHiddenNodes",true)("selectFiles",true)("resolvePaths",true),DE(),gg("for",c),DE(),iT(e.formView.isMandatory&&l?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("id",c)("ngModel",o),TD();}}function Go(i,t){i&1&&(Qi$1(0,"sup",46),PC(1,"*"),Hl());}function ko(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function $o(i,t){if(i&1){let e=gT();Qi$1(0,"app-file-tree",37)(1,"label",42),oT(2,Go,2,0,"sup",46),PC(3),oT(4,ko,2,1,"sh-icon",44),Hl(),Qi$1(5,"input",45),Fg("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Hl();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(3),l=$C(4),c=$C(5);gg("hideShortcuts",false)("enableCreateFolder",true)("startingPath",a)("resolvePaths",true),DE(),gg("for",c),DE(),iT(e.formView.isMandatory&&l?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("id",c)("ngModel",o),TD();}}function Uo(i,t){i&1&&(Qi$1(0,"sup",47),PC(1,"*"),Hl());}function Bo(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function Vo(i,t){i&1&&(Qi$1(0,"sh-icon",48),PC(1," warning "),Hl());}function Ko(i,t){i&1&&Ig(0);}function Jo(i,t){if(i&1&&(Qi$1(0,"sh-icon",53),PC(1," link "),Hl()),i&2){nC();let e=$C(8),n=$C(9);Qg("error",e&&n==="error")("warn",e&&n==="warning"),gg("shTooltip",e);}}function Xo(i,t){i&1&&(Qi$1(0,"sh-icon",51),PC(1,"envelope"),Hl());}function zo(i,t){i&1&&(Qi$1(0,"sh-icon",51),PC(1,"hard-drives"),Hl());}function Wo(i,t){i&1&&(Qi$1(0,"sh-icon",51),PC(1,"jar"),Hl());}function Ho(i,t){i&1&&(Qi$1(0,"sh-icon",51),PC(1,"textbox"),Hl());}function jo(i,t){if(i&1){let e=gT();Qi$1(0,"button",54),Fg("click",function(o){Sd(e);let a=nC(2).$implicit,l=nC(2);return xd(l.browse(a.fieldGroup,a.formView.name,o))}),PC(1," Browse ... "),Hl();}}function qo(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field")(1,"label",42),oT(2,Uo,2,0,"sup",47),PC(3),oT(4,Bo,2,1,"sh-icon",44),oT(5,Vo,2,0,"sh-icon",48),ig(6,Ko,1,0,"ng-container",25),Hl(),Qi$1(7,"input",49),Fg("keydown",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),cm(8)(9),oT(10,Jo,2,5,"sh-icon",50)(11,Xo,2,0,"sh-icon",51)(12,zo,2,0,"sh-icon",51)(13,Wo,2,0,"sh-icon",51)(14,Ho,2,0,"sh-icon",51),oT(15,jo,2,0,"button",52),Hl();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(3),l=$C(4),c=$C(5);nC();let u=uC(17),T=nC();DE(),gg("for",c),DE(),iT(e.formView.isMandatory&&l?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),iT(l&&e.formView.type==="Path"?5:-1),DE(),gg("ngTemplateOutlet",u)("ngTemplateOutletContext",ZC(17,Se,YC(14,be,e.fieldGroup,e.formView))),DE(),gg("type",e.formView.type==="Email"?"email":"text")("id",c)("ngModel",o),TD();let D=a,y=T.hasLeadingSlash(D??"");DE(),BC(y&&e.formView.doubleSlash?.message),DE(),BC(e.formView.doubleSlash?.type),DE(),iT(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),DE(5),iT(e.formView.type==="Path"&&T.hasV2ListBackendOperations()?15:-1);}}function Yo(i,t){i&1&&(Qi$1(0,"sup",55),PC(1,"*"),Hl());}function Qo(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function Zo(i,t){i&1&&Ig(0);}function ea(i,t){if(i&1){let e=gT();Qi$1(0,"span",59),Fg("click",function(){Sd(e);let o=nC(2).$implicit,a=nC(2);return xd(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),PC(1," AuthID "),Hl();}}function ta(i,t){i&1&&(Qi$1(0,"sh-icon",51),PC(1,"password"),Hl());}function na(i,t){if(i&1){let e=gT();Qi$1(0,"sh-icon",60),Fg("click",function(){Sd(e);let o=nC(2).$implicit;return xd(o.formView.showPassword=!o.formView.showPassword)}),PC(1," eye "),Hl();}}function ia(i,t){if(i&1){let e=gT();Qi$1(0,"sh-icon",60),Fg("click",function(){Sd(e);let o=nC(2).$implicit;return xd(o.formView.showPassword=!o.formView.showPassword)}),PC(1," eye-slash "),Hl();}}function oa(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field")(1,"label",42),oT(2,Yo,2,0,"sup",55),PC(3),oT(4,Qo,2,1,"sh-icon",44),ig(5,Zo,1,0,"ng-container",25),Hl(),Qi$1(6,"input",56),Fg("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),oT(7,ea,2,0,"span",57)(8,ta,2,0,"sh-icon",51),oT(9,na,2,0,"sh-icon",58)(10,ia,2,0,"sh-icon",58),Hl();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(4),l=$C(5);nC();let c=uC(17);DE(),gg("for",l),DE(),iT(e.formView.isMandatory&&a?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(14,Se,YC(11,be,e.fieldGroup,e.formView))),DE(),gg("type",e.formView.showPassword?"text":"password")("id",l)("ngModel",o),TD(),DE(),iT(e.oauthField===e.formView.name?7:8),DE(2),iT(e.formView.showPassword?9:10);}}function aa(i,t){i&1&&(Qi$1(0,"sup",62),PC(1,"*"),Hl());}function ra(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(3).$implicit;gg("shTooltip",e.formView.longDescription);}}function sa(i,t){i&1&&Ig(0);}function la(i,t){if(i&1&&PC(0),i&2){let e=t.$implicit;rm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function _a(i,t){if(i&1){let e=gT();Qi$1(0,"sh-select",61)(1,"label",42),oT(2,aa,2,0,"sup",62),PC(3),oT(4,ra,2,1,"sh-icon",44),ig(5,sa,1,0,"ng-container",25),Hl(),Qi$1(6,"input",45),Fg("ngModelChange",function(o){Sd(e);let a=nC(2).$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Hl(),ig(7,la,1,2,"ng-template",null,3,sb);}if(i&2){let e=uC(8);nC();let n=$C(0),o=nC().$implicit,a=$C(1),l=$C(2),c=$C(4),u=$C(5);nC();let T=uC(17);gg("options",n)("isClearable",false)("optionTemplate",e),DE(),gg("for",u),DE(),iT(o.formView.isMandatory&&c?2:-1),DE(),Gl(" ",a," "),DE(),iT(o.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",T)("ngTemplateOutletContext",ZC(14,Se,YC(11,be,o.fieldGroup,o.formView))),DE(),gg("id",u)("ngModel",l),TD();}}function da(i,t){if(i&1&&(cm(0),oT(1,_a,9,16)),i&2){let e=nC().$implicit,n=BC(nC(2).mapOptions(e.formView));DE(),iT(n?1:-1);}}function ca(i,t){i&1&&(Qi$1(0,"sup",65),PC(1,"*"),Hl());}function ua(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(3).$implicit;gg("shTooltip",e.formView.longDescription);}}function pa(i,t){i&1&&Ig(0);}function ma(i,t){if(i&1&&PC(0),i&2){let e=t.$implicit;rm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function ga(i,t){if(i&1){let e=gT();Qi$1(0,"sh-select",64)(1,"label",42),oT(2,ca,2,0,"sup",65),PC(3),oT(4,ua,2,1,"sh-icon",44),ig(5,pa,1,0,"ng-container",25),Hl(),Qi$1(6,"input",45),Fg("ngModelChange",function(o){Sd(e);let a=nC(2).$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Hl(),ig(7,ma,1,2,"ng-template",null,4,sb);}if(i&2){let e=uC(8);nC();let n=$C(0),o=nC().$implicit,a=$C(1),l=$C(2),c=$C(4),u=$C(5);nC();let T=uC(17);gg("options",n)("asFreeText",true)("inlineSearch",true)("optionTemplate",e),DE(),gg("for",u),DE(),iT(o.formView.isMandatory&&c?2:-1),DE(),Gl(" ",a," "),DE(),iT(o.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",T)("ngTemplateOutletContext",ZC(15,Se,YC(12,be,o.fieldGroup,o.formView))),DE(),gg("id",u)("ngModel",l),TD();}}function Ca(i,t){i&1&&mg(0,"sh-progress-bar",63);}function Ta(i,t){if(i&1&&(cm(0),oT(1,ga,9,17)(2,Ca,1,0,"sh-progress-bar",63)),i&2){let e=nC().$implicit,n=$C(2),o=BC(nC(2).mapOptionsWithFreeText(e.formView,n));DE(),iT(o?1:2);}}function Sa(i,t){i&1&&(Qi$1(0,"sup",67),PC(1,"*"),Hl());}function fa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function ha(i,t){i&1&&Ig(0);}function Ea(i,t){if(i&1){let e=gT();Qi$1(0,"app-size",66),Fg("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label",42),oT(2,Sa,2,0,"sup",67),PC(3),oT(4,fa,2,1,"sh-icon",44),ig(5,ha,1,0,"ng-container",25),Hl()(),DD();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(4),l=$C(5);nC();let c=uC(17);gg("inputType",e.Name)("ngModel",o)("customId",l),TD(),DE(),gg("for",l),DE(),iT(e.formView.isMandatory&&a?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(12,Se,YC(9,be,e.fieldGroup,e.formView)));}}function ya(i,t){i&1&&(Qi$1(0,"sup",68),PC(1,"*"),Hl());}function Na(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function Fa(i,t){i&1&&Ig(0);}function Da(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field")(1,"label",42),oT(2,ya,2,0,"sup",68),PC(3),oT(4,Na,2,1,"sh-icon",44),ig(5,Fa,1,0,"ng-container",25),Hl(),Qi$1(6,"input",69),Fg("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Qi$1(7,"sh-icon",51),PC(8,"numpad"),Hl()();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(4),l=$C(5);nC();let c=uC(17);DE(),gg("for",l),DE(),iT(e.formView.isMandatory&&a?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(11,Se,YC(8,be,e.fieldGroup,e.formView))),DE(),gg("id",l)("ngModel",o),TD();}}function Aa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function Ia(i,t){i&1&&Ig(0);}function Oa(i,t){if(i&1){let e=gT();Qi$1(0,"sh-toggle",39)(1,"label",42),PC(2),oT(3,Aa,2,1,"sh-icon",44),ig(4,Ia,1,0,"ng-container",25),Hl(),Qi$1(5,"input",70),Fg("change",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),Hl()();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(5);nC();let l=uC(17),c=nC();DE(),gg("for",a),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?3:-1),DE(),gg("ngTemplateOutlet",l)("ngTemplateOutletContext",ZC(9,Se,YC(6,be,e.fieldGroup,e.formView))),DE(),gg("checked",c.isTrue(o));}}function Pa(i,t){i&1&&(Qi$1(0,"sup",72),PC(1,"*"),Hl());}function Ma(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(3).$implicit;gg("shTooltip",e.formView.longDescription);}}function Ra(i,t){i&1&&Ig(0);}function xa(i,t){if(i&1&&PC(0),i&2){let e=t.$implicit;rm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function La(i,t){if(i&1){let e=gT();Qi$1(0,"sh-select",71)(1,"label",42),oT(2,Pa,2,0,"sup",72),PC(3),oT(4,Ma,2,1,"sh-icon",44),ig(5,Ra,1,0,"ng-container",25),Hl(),Qi$1(6,"input",73),Fg("ngModelChange",function(o){Sd(e);let a=nC(2).$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Hl(),ig(7,xa,1,2,"ng-template",null,5,sb);}if(i&2){let e=uC(8);nC();let n=$C(0),o=nC().$implicit,a=$C(1),l=$C(2),c=$C(4),u=$C(5);nC();let T=uC(17);gg("options",n)("selectMultiple",true)("optionTemplate",e),DE(),gg("for",u),DE(),iT(o.formView.isMandatory&&c?2:-1),DE(),Gl(" ",a," "),DE(),iT(o.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",T)("ngTemplateOutletContext",ZC(13,Se,YC(10,be,o.fieldGroup,o.formView))),DE(),gg("ngModel",l),TD();}}function ba(i,t){if(i&1&&(cm(0),oT(1,La,9,15)),i&2){let e=nC().$implicit,n=BC(nC(2).mapOptions(e.formView));DE(),iT(n?1:-1);}}function va(i,t){i&1&&(Qi$1(0,"sup",74),PC(1,"*"),Hl());}function wa(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function Ga(i,t){i&1&&Ig(0);}function ka(i,t){if(i&1){let e=gT();Qi$1(0,"app-timespan",66),Fg("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label",42),oT(2,va,2,0,"sup",74),PC(3),oT(4,wa,2,1,"sh-icon",44),ig(5,Ga,1,0,"ng-container",25),Hl()(),DD();}if(i&2){let e=nC().$implicit,n=$C(1),o=$C(2),a=$C(4),l=$C(5);nC();let c=uC(17);gg("inputType",e.formView.name)("ngModel",o)("customId",l),TD(),DE(),gg("for",l),DE(),iT(e.formView.isMandatory&&a?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(12,Se,YC(9,be,e.fieldGroup,e.formView)));}}function $a(i,t){i&1&&(Qi$1(0,"sup",76),PC(1,"*"),Hl());}function Ua(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(2).$implicit;gg("shTooltip",e.formView.longDescription);}}function Ba(i,t){i&1&&Ig(0);}function Va(i,t){if(i&1){let e=gT();Qi$1(0,"app-file-drop-textarea",75),Fg("ngModelChange",function(o){Sd(e);let a=nC().$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Qi$1(1,"label"),oT(2,$a,2,0,"sup",76),PC(3),oT(4,Ua,2,1,"sh-icon",44),ig(5,Ba,1,0,"ng-container",25),Hl()(),DD();}if(i&2){let e=nC().$implicit,n=$C(2),o=$C(4),a=$C(5);nC();let l=uC(17);gg("ngModel",n)("customId",a)("placeholder",e.formView.longDescription),TD(),DE(2),iT(e.formView.isMandatory&&o?2:-1),DE(),Gl(" ",e.formView.shortDescription??e.formView.name," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",l)("ngTemplateOutletContext",ZC(11,Se,YC(8,be,e.fieldGroup,e.formView)));}}function Ka(i,t){i&1&&(mg(0,"sh-spinner"),Qi$1(1,"span"),XT(2,10),Hl()),i&2&&zg("--spinner-size","16px")("--spinner-thickness","2px");}function Ja(i,t){if(i&1){let e=gT();Qi$1(0,"div",79)(1,"span"),XT(2,11),Hl(),Qi$1(3,"button",32),Fg("click",function(){Sd(e);let o=nC(6);return xd(o.reloadTrigger.set(!o.reloadTrigger()))}),XT(4,12),Hl()();}}function Xa(i,t){if(i&1&&PC(0),i&2){let e=t.$implicit;rm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function za(i,t){if(i&1){let e=gT();Qi$1(0,"sh-select",80)(1,"label",42)(2,"sup",81),PC(3,"*"),Hl(),Qi$1(4,"span"),XT(5,13),Hl()(),Qi$1(6,"input",45),Fg("ngModelChange",function(o){Sd(e);let a=nC(4).$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Hl(),ig(7,Xa,1,2,"ng-template",null,6,sb);}if(i&2){nC(4);let e=$C(2),n=$C(5),o=nC(2);gg("options",o.restoreBackupIdOptions())("isClearable",false),DE(),gg("for",n),DE(5),gg("id",n)("ngModel",e),TD();}}function Wa(i,t){if(i&1&&oT(0,Ka,3,4)(1,Ja,5,0,"div",79)(2,za,9,5),i&2){let e=nC(5);iT(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2);}}function Ha(i,t){i&1&&(Qi$1(0,"sup",82),PC(1,"*"),Hl());}function ja(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(4).$implicit;gg("shTooltip",e.formView.longDescription);}}function qa(i,t){i&1&&Ig(0);}function Ya(i,t){if(i&1){let e=gT();Qi$1(0,"button",84),Fg("click",function(){Sd(e),nC(4);let o=$C(5),a=nC(2);return xd(a.toggleDisabled(o))}),Og(1,14),mg(2,"sh-icon"),Pg(),Hl();}}function Qa(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field")(1,"label",42),oT(2,Ha,2,0,"sup",82),PC(3),oT(4,ja,2,1,"sh-icon",44),ig(5,qa,1,0,"ng-container",25),Hl(),Qi$1(6,"input",83),Fg("ngModelChange",function(o){Sd(e);let a=nC(3).$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Qi$1(7,"sh-icon",51),PC(8,"textbox"),Hl()(),oT(9,Ya,3,0,"button",41);}if(i&2){let e=nC(3).$implicit,n=$C(1),o=$C(2),a=$C(4),l=$C(5);nC();let c=uC(17),u=nC();DE(),gg("for",l),DE(),iT(e.formView.isMandatory&&a?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(15,Se,YC(12,be,e.fieldGroup,e.formView))),DE(),gg("type","text")("id",l)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",true),TD(),DE(3),iT(u.getIsDisabled(l)?9:-1);}}function Za(i,t){if(i&1&&(Qi$1(0,"div",77),oT(1,Wa,3,1)(2,Qa,10,17),Hl()),i&2){let e=nC(4);DE(),iT(e.isRestoreFlow()?1:2);}}function er(i,t){if(i&1){let e=gT();Qi$1(0,"div",85),Og(1,15),mg(2,"div")(3,"div"),Pg(),Hl(),Qi$1(4,"button",84),Fg("click",function(){Sd(e);let o=nC(5);return xd(o.openConsole())}),Og(5,16),mg(6,"sh-icon"),Pg(),Hl();}}function tr(i,t){i&1&&(Qi$1(0,"div",85),XT(1,17),Hl(),Qi$1(2,"button",86),Og(3,18),mg(4,"sh-icon"),Pg(),Hl()),i&2&&(DE(2),gg("routerLink",QC(1,yo)));}function nr(i,t){if(i&1&&(Qi$1(0,"div",78),oT(1,er,7,0)(2,tr,5,2),Hl()),i&2){let e=nC(4);DE(),iT(e.isConnectedToConsole()?1:2);}}function ir(i,t){if(i&1&&oT(0,Za,3,1,"div",77)(1,nr,3,1,"div",78),i&2){let e=nC(3);iT(e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1);}}function or(i,t){i&1&&(Qi$1(0,"sup",87),PC(1,"*"),Hl());}function ar(i,t){if(i&1&&(Qi$1(0,"sh-icon",44),PC(1,"question"),Hl()),i&2){let e=nC(3).$implicit;gg("shTooltip",e.formView.longDescription);}}function rr(i,t){i&1&&Ig(0);}function sr(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field")(1,"label",42),oT(2,or,2,0,"sup",87),PC(3),oT(4,ar,2,1,"sh-icon",44),ig(5,rr,1,0,"ng-container",25),Hl(),Qi$1(6,"input",88),Fg("ngModelChange",function(o){Sd(e);let a=nC(2).$implicit,l=nC(2);return xd(l.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Hl(),DD(),Qi$1(7,"sh-icon",51),PC(8,"textbox"),Hl(),Qi$1(9,"button",89),Fg("click",function(){Sd(e);let o=nC(4);return xd(o.authenticateFilen())}),XT(10,19),Hl()();}if(i&2){let e=nC(2).$implicit,n=$C(1),o=$C(2),a=$C(4),l=$C(5);nC();let c=uC(17),u=nC();DE(),gg("for",l),DE(),iT(e.formView.isMandatory&&a?2:-1),DE(),Gl(" ",n," "),DE(),iT(e.formView.longDescription?4:-1),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(12,Se,YC(9,be,e.fieldGroup,e.formView))),DE(),gg("id",l)("ngModel",o),TD(),DE(3),gg("disabled",u.isAuthenticatingFilen());}}function lr(i,t){if(i&1&&oT(0,sr,11,14,"sh-form-field"),i&2){let e=nC(3);iT(e.hasFilenApiKey()?-1:0);}}function _r(i,t){if(i&1){let e=gT();Qi$1(0,"button",84),Fg("click",function(){Sd(e);let o=nC().$implicit,a=nC(2);return xd(a.removeAdvancedOption(o.formView.name))}),Qi$1(1,"sh-icon"),PC(2,"x-circle"),Hl()();}}function dr(i,t){if(i&1&&(Qi$1(0,"div",35),cm(1)(2)(3)(4)(5),oT(6,wo,6,13,"app-file-tree",36)(7,$o,6,10,"app-file-tree",37)(8,qo,16,19,"sh-form-field")(9,oa,11,16,"sh-form-field")(10,da,2,2)(11,Ta,3,2)(12,Ea,6,14,"app-size",38)(13,Da,9,13,"sh-form-field")(14,Oa,6,11,"sh-toggle",39)(15,ba,2,2)(16,ka,6,14,"app-timespan",38)(17,Va,6,13,"app-file-drop-textarea",40)(18,ir,2,1)(19,lr,1,1),oT(20,_r,3,0,"button",41),Hl()),i&2){let e=t.$implicit;nC();let n=$C(0),o=nC();Qg("single-field",e.fieldGroup!=="advanced"),DE(),BC(e.formView.shortDescription??e.formView.name),DE(),BC(o.getFieldGroup(n,e.fieldGroup)[e.formView.name]),DE();let a=BC(o.getFieldValue(e.fieldGroup,e.formView.name));DE(),BC((a??"").toString().trim()===""),DE(),BC("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),DE(),iT(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),DE(14),iT(e.fieldGroup==="advanced"?20:-1);}}function cr(i,t){if(i&1&&(Qi$1(0,"sh-icon",90),PC(1,"x-circle"),Hl()),i&2){nC();let e=$C(0);gg("shTooltip",e?.message??"Invalid value");}}function ur(i,t){if(i&1&&(Qi$1(0,"sh-icon",91),PC(1,"warning"),Hl()),i&2){nC();let e=$C(0);gg("shTooltip",e?.message??"Invalid value");}}function pr(i,t){if(i&1&&(cm(0),oT(1,cr,2,1,"sh-icon",90)(2,ur,2,1,"sh-icon",91)),i&2){let e=nC().$implicit,n=$C(0),o=BC(e.formView.validate(n));DE(),iT(o?.type==="error"?1:o?.type==="warning"?2:-1);}}function mr(i,t){if(i&1&&(cm(0),oT(1,pr,3,2)),i&2){let e=t.$implicit,o=(BC(nC(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";DE(),iT(!o&&e.formView.validate?1:-1);}}function gr(i,t){if(i&1&&(cm(0),cT(1,Fo,1,9,"ng-container",null,sT),cT(3,Ao,1,9,"ng-container",null,sT),Qi$1(5,"sh-toggle-card",20),Ul(6,21)(7),XT(8,7),Wl(),cm(9),oT(10,Io,3,0,"button",22)(11,Po,17,2,"div",23),Wl(),oT(12,Mo,1,3,"textarea",24)(13,Lo,2,0),Hl(),ig(14,dr,21,9,"ng-template",null,0,sb)(16,mr,2,2,"ng-template",null,1,sb)),i&2){let e=nC(),n=$C(1);BC(e.destinationForm()),DE(),lT(n.custom),DE(2),lT(n.dynamic),DE(2),gg("disableToggle",true),DE(4),BC(e.nonSelectedAdvancedFormViews()),DE(),iT(e.showTextArea()?10:11),DE(2),iT(e.showTextArea()?12:13);}}var en=class i{#e=T(ke);#t=T(m$1);#n=T(O);#i=T(lt);#o=T(C);#r=T(d$1);#a=T(be$1);injector=T(Te);targetUrl=m1.required();useBackupState=g1(false);#s=null;destinationType=Nt(()=>{let t=this.targetUrl();if(!t)return null;let e=V(t);return this.#s=e?.customKey??e?.key,this.#s});refreshView=Ue(false);destinationForm=Ue({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=Nt(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=Ue(null);showTextArea=Ue(false);hasV2ListBackendOperations=this.#t.hasV2ListBackendOperations;isLoadingRestoreBackupIdOptions=Ue(false);isRestoreFlow=Nt(()=>!this.useBackupState());reloadTrigger=Ue(false);hasLoadedBackupIdOptions=Ue(false);restoreBackupIdOptions=L$1(Iy(F$1(this.targetUrl).pipe(ry(),pt(t=>({url:t,isReload:false}))),F$1(this.reloadTrigger).pipe(pt(()=>({url:this.targetUrl(),isReload:true})))).pipe($u(({url:t,isReload:e})=>t&&t.startsWith("duplicati://")&&this.hasStorageApiKey()&&this.isRestoreFlow()&&(e||!this.hasLoadedBackupIdOptions())?(this.hasLoadedBackupIdOptions.set(true),this.isLoadingRestoreBackupIdOptions.set(true),this.#r.getDuplicatiStorageBackups(t).pipe(Vs(a=>(console.error("Error loading Duplicati storage backups",a),ty([]))),Bu(()=>this.isLoadingRestoreBackupIdOptions.set(false)))):ty([]))),{initialValue:[]});isConnectedToConsole=Nt(()=>this.#o.state()==="connected");hasStorageApiKey=Nt(()=>{let t=this.destinationForm();return (this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0||t.advanced["duplicati-auth-apiid"]});isAuthenticatingFilen=Ue(false);hasFilenApiKey=Nt(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=Nt(()=>{let t=this.destinationFormConfig();if(!t)return [];let e=this.advancedFormFieldNames();return t.advanced.filter(n=>e.findIndex(o=>o===n.name)===-1)});destinationTypeEffect=Ga$1(()=>{let t=this.targetUrl(),e=V(t??""),n=e.key,o=e.customKey??n,a=this.#i.allModules().find(G=>G.Key===n)??{DisplayName:e.displayName,Description:e.description,Options:[]};if(!a||!a.Options||!n)return;let l$1=e&&e.oauthField?e.oauthField:null,c=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],T=e&&e.advancedFields?e.advancedFields:[],D=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],y={destinationType:o,oauthField:l$1,custom:[],dynamic:[],advanced:[]};c&&Object.entries(c).forEach(([G,A],K)=>{let J=A.order??K,k=A.validate;!k&&A.type==="Bucketname"&&(k=Q=>we(Q)?null:{type:"error",message:$localize`Invalid bucket name.`}),k&&A.type==="Hostname"&&(k=Q=>Ee(Q)?null:{type:"error",message:$localize`Invalid hostname.`}),y.custom.push(l({order:900+J,validate:k},A));});for(let G=0;G<a.Options.length;G++){let A=a.Options[G];if(A.Deprecated)continue;let K=u.find(J=>J===A.Name||A.Aliases?.includes(J.name)||J.name===A.Name);if(K){let J=A.Aliases?.indexOf(K.name)??-1,k=A.Aliases&&J>-1?A.Aliases[J]:A.Name,Q=K&&typeof K!="string";Q?K?.defaultValue??A.DefaultValue:A.DefaultValue;let xe=Q&&K?.order!==void 0?K.order:G,W={name:k,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,order:900+xe},ve=Q?l(l({},W),K):W;y.dynamic.push(ve);}else {let J=A.Name;if(D.find(Le=>Le===J))continue;let Q=T.find(Le=>Le===J||Le.name===J),z=Q&&typeof Q!="string",xe=z&&Q?.order!==void 0?Q.order:G,W={name:J,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,defaultValue:A.DefaultValue,order:900+xe},ve=z?l(l({},W),Q):W;y.advanced.push(ve);}}if(y.custom.sort((G,A)=>G.order-A.order),y.dynamic.sort((G,A)=>G.order-A.order),y.advanced.sort((G,A)=>G.order-A.order),this.destinationFormConfig.set(y),!t)return;let O=Ve(t);O&&this.destinationForm.set({custom:O.custom,dynamic:O.dynamic,advanced:O.advanced});});destinationFormEffect=Ga$1(()=>{let t=this.#s,e=this.destinationForm();this.refreshView();if(!e||!t)return;let o=Ce({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("/")??false}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(l({},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 false}onKeyDown(t,e,n,o){if(n==="Hostname"||n==="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,n){let o=this.destinationForm();o[t][e]=n,this.destinationForm.set(l({},o));}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(l({},e));}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let n=t.options;return n?n.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let n=this.mapOptions(t);return n?(e&&e.length>0&&(n.find(a=>a.value===e)||n.push({key:e,value:e})),n):null}#l=Ue(false);browse(t,e,n){let o=this.useBackupState()?this.#e.backupId():null,a=this.useBackupState()?this.#e.connectionStringId():null;this.#a.open(Zt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{backupId:o,destinationUrl:this.targetUrl(),connectionStringId:a}}).closed.subscribe(c=>{c&&(c=c.replace(/^\/+/,""),this.destinationForm.update(u=>(u[t][e]=c,l({},u))));});}oauthStartTokenCreation(t,e,n,o){this.#l.set(true);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),l$1=this.#n.serverSettings()?.["--oauth-url"];if(l$1&&l$1.length>0&&(a=l$1),this.useBackupState()){let A=this.#e.mapFormsToSettings().find(K=>K.Name==="--oauth-url")?.Value;A&&A.length>0&&(a=A);}let c=this.destinationForm().advanced["oauth-url"];c&&c.length>0&&(a=c);let u=`${a}?type=${t}`,T=450,D=600,y=screen.width/2-T/2,O=screen.height/2-D/2,G=window.open(u,"_blank","height="+D+",width="+T+",menubar=0,status=0,titlebar=0,toolbar=0,left="+y+",top="+O);return window.addEventListener("message",A=>{let K=A.data.startsWith("authid:"),J=K?A.data.replace("authid:",""):null;K&&(this.destinationForm.update(k=>(k[e][n]=J,l({},k))),this.#l.set(false),this.refreshView.set(!this.refreshView()),G?.close());}),false}settingsAsText=Nt(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,n])=>{let o=e??"",a="";return typeof n=="boolean"?a=this.isTrue(n)?"True":"False":(typeof n=="number"||n!=null)&&(a=n.toString()),`${o}=${a}`}).join(`
|
|
6
|
+
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=Ae(t);this.destinationForm.update(n=>m$3(l({},n),{advanced:e}));}getIsDisabled(t){return document.getElementById(t)?.disabled??true}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(true),this.#r.getFilenApiKey(t,e).pipe(Bu(()=>this.isAuthenticatingFilen.set(false))).subscribe({next:n=>{if(n.length===0){this.#a.open(h$1,{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"]=n,o.dynamic["two-factor-code"]=null,l({},o))),this.refreshView.set(!this.refreshView());},error:n=>{console.error("Error authenticating Filen",n),this.#a.open(h$1,{data:{title:$localize`Authentication failed`,message:$localize`An error occurred while requesting the Filen API key: ${n.message}`,confirmText:$localize`OK`}});}});}authenticateFilen(){let t=this.targetUrl();if(!t)return;let n=this.destinationForm().advanced["api-key"];if(n&&n.length>0){this.#a.open(h$1,{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||i)};static \u0275cmp=dw({type:i,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 n;n=$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 l;l=$localize`This field is mandatory`;let c;c=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let u;u=$localize`This field is mandatory`;let T;T=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let O;O=$localize`This field is mandatory`;let G;G=$localize`This field is mandatory`;let A;A=$localize`This field is mandatory`;let K;K=$localize`This field is mandatory`;let J;J=$localize`Loading available backups...`;let k;k=$localize`No backups found from this machine, contact support`;let Q;Q=$localize` Try again `;let z;z=$localize`This field is mandatory`;let xe;xe=$localize`Pick the backup to restore from`;let W;W=$localize`This field is mandatory`;let ve;ve=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Le;Le=$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:`,Le=tC(Le);let dt;dt=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ct;ct=$localize`Connect to the console to use Duplicati storage.`;let q;q=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Tn;Tn=$localize`This field is mandatory`;let Sn;return Sn=$localize` Authenticate now `,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,n,J,k,Q,xe,ve,Le,dt,ct,q,Sn,[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","resolvePaths"],[3,"hideShortcuts","enableCreateFolder","startingPath","resolvePaths"],[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",l],["shTooltip",c,1,"warn"],["autocomplete","off",3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["suffix","","shButton","","type","button",1,"outlined","small","browse"],["prefix","",3,"shTooltip"],["suffix","","shButton","","type","button",1,"outlined","small","browse",3,"click"],["shTooltip",u],["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",D],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",y],["shTooltip",O],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"change","checked"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",G],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",A],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",K],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",z],["shTooltip",W],["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"],["shTooltip",Tn],["type","text","autocomplete","off",3,"ngModelChange","id","ngModel"],["suffix","","shButton","","type","button",1,"outlined","small",3,"click","disabled"],[1,"error",3,"shTooltip"],[1,"warn",3,"shTooltip"]]},template:function(e,n){if(e&1&&(cm(0)(1),oT(2,gr,18,5)),e&2){let o=BC(n.destinationType());DE();let a=BC(n.destinationFormConfig());DE(),iT(o&&a?2:-1);}},dependencies:[Gn,Ze$1,en$1,Rn,Bn,Jt,ei,_t$1,Se$1,mt$1,_t$2,Qt,Fe,v,N,I,ve,Nt$1,at,J,d,m$2],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}.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}.no-backups-found[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:4px;margin-right:4px}.browse[_ngcontent-%COMP%]{padding:.25rem}"]})};var tn=class i{#e=T(C$1);#t=T(be$1);#n=T(m$1);testDestination(t,e,n,o,a,l,c,u,T){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,n,o,a,l,c,u,T):this.testDestinationv1(t,e,n,o,a,l,c,u,T)}testDestinationv2(t,e,n,o,a,l,c,u,T){return new S(D=>{this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:t,ConnectionStringId:n??null,BackupId:e=="new"?null:e,AutoCreate:u==="create",ReadOnlyTest:T,Options:null,DestinationType:l,SourcePrefix:e=="new"?null:o}}).subscribe({next:y=>{if(y.Success){this.emitSuccessV2(D,t,a,y);return}this.handleGenericError(D,t,a,y.Error??"Unknown error",c);},error:y=>{let O=y?.error?.body??y?.error?.requestBody;if(O?.Data?.FolderExists===false||O?.StatusCode==="missing-folder"){this.handleMissingFolder(D,t,e,n,a,c,u,T);return}if(O?.Data?.HostCertificate){this.handleMissingCertificate(D,t,a,O.Data?.HostCertificate,c);return}if(O?.Data?.ReportedHostKey){this.handleIncorrectKey(D,t,a,O.Data.ReportedHostKey,O.Data.AcceptedHostKey??null,c);return}this.handleGenericError(D,t,a,y?.message??"Unknown error",c);}});})}testDestinationv1(t,e,n,o,a,l,c,u,T){return new S(D=>{this.#e.postApiV1RemoteoperationTest({readOnlyTest:T,requestBody:{path:t,backupId:e=="new"?null:e,connectionStringId:n??null,sourcePrefix:e=="new"?null:o},type:l}).subscribe({next:y=>{D.next({action:"success",targetUrl:t,testAgain:false,destinationIndex:a}),D.complete();},error:y=>{this.handleDestinationErrorv1(y.message,t,e,n,a,c,u,T).subscribe(O=>{D.next(O);});}});})}handleMissingFolder(t,e,n,o,a,l,c,u){function T(){t.next({action:"missing-folder",targetUrl:e,testAgain:false,destinationIndex:a,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete();}if(l||c==="error"){T();return}this.#t.open(h$1,{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:D=>{if(!D){this.reportNoAction(t,e,a,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#e.postApiV2DestinationTest({requestBody:{DestinationUrl:e,ConnectionStringId:o,AutoCreate:true,ReadOnlyTest:u,Options:null,BackupId:n=="new"?null:n}}).subscribe({next:y=>{if(y.Success){this.emitSuccessV2(t,e,a,y);return}else this.handleFolderCreateFailure(t,e,a,y.Error??$localize`Unknown error`);},error:y=>{this.handleFolderCreateFailure(t,e,a,y.message??$localize`Unknown error`);}}):this.#e.postApiV1RemoteoperationCreate({requestBody:{path:e,backupId:n=="new"?null:n}}).subscribe({next:()=>{this.handleFolderCreated(t,e,a);},error:y=>{this.handleFolderCreateFailure(t,e,a,y.message??$localize`Unknown error`);}});}});}handleFolderCreateFailure(t,e,n,o){this.#t.open(h$1,{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:false,destinationIndex:n}),t.complete();}});}emitSuccessV2(t,e,n,o){t.next({action:"success",targetUrl:e,testAgain:false,destinationIndex:n,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete();}handleFolderCreated(t,e,n){this.#t.open(h$1,{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:true,destinationIndex:n}),t.complete();}});}reportNoAction(t,e,n,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:false,destinationIndex:n}),t.complete();}handleMissingCertificate(t,e,n,o,a){let l=$localize`The server is using a certificate that is not trusted.
|
|
7
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
8
|
+
The server reported the certificate hash: ${o}`,c=e.includes("?");function u(){t.next({action:"trust-cert",targetUrl:e,suggestedUrl:e+`${c?"&":"?"}accept-specified-ssl-hash=${o}`,testAgain:true,certData:o,errorMessage:l,destinationIndex:n}),t.complete();}if(a){u();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:l,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:T=>{if(!T){this.reportNoAction(t,e,n,$localize`The server certificate is not trusted.`);return}u();}});}handleIncorrectKey(t,e,n,o,a,l){if(a){let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:T,testAgain:true,reportedHostKey:o,errorMessage:u,destinationIndex:n}),t.complete();};let u=$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
9
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
10
|
+
Do you want to REPLACE your CURRENT host key ${a}
|
|
11
|
+
with the REPORTED host key: ${o}?`,T=e;try{let O=new URL(e);O.searchParams.set("ssh-fingerprint",o),T=O.toString();}catch{let O=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),G=O.includes("?");T=O+`${G?"&":"?"}ssh-fingerprint=${o}`;}if(l){D();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:O=>{if(!O){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}D();}});}else {let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:e+`${T?"&":"?"}ssh-fingerprint=${o}`,testAgain:true,reportedHostKey:o,errorMessage:u,destinationIndex:n}),t.complete();};let u=$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,T=e.includes("?");if(l){D();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:y=>{if(!y){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}D();}});}}handleGenericError(t,e,n,o,a){function l(){t.next({action:"generic-error",targetUrl:e,testAgain:false,destinationIndex:n,errorMessage:o}),t.complete();}if(a){l();return}this.#t.open(h$1,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:c=>l()});}handleDestinationErrorv1(t,e,n,o,a,l,c,u){return new S(T=>{if(t==="missing-folder"){this.handleMissingFolder(T,e,n,o,a,l,c,u);return}if(t.startsWith("incorrect-cert:")){let D=t.split("incorrect-cert:")[1];this.handleMissingCertificate(T,e,a,D,l);return}if(t.startsWith("incorrect-host-key:")){let D=t.split('incorrect-host-key:"')[1].split('",')[0],y=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(T,e,a,D,y,l);return}this.handleGenericError(T,e,a,t,l);})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function Cr(i,t){if(i&1){let e=gT();Qi$1(0,"sh-alert",13),Og(1,0),Qi$1(2,"button",14),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.testDestinationClick())}),Hl(),Pg(),Hl();}}function Tr(i,t){i&1&&(Qi$1(0,"sh-alert",13),Og(1,1),mg(2,"sh-icon"),Qi$1(3,"div",15),mg(4,"sh-spinner"),Hl(),Pg(),Hl()),i&2&&(DE(4),zg("--spinner-size","16px")("--spinner-thickness","2px"));}function Sr(i,t){i&1&&(Qi$1(0,"sh-alert",17),XT(1,2),Hl());}function fr(i,t){i&1&&(Qi$1(0,"sh-alert",16),XT(1,3),Hl());}function hr(i,t){if(i&1&&oT(0,Sr,2,0,"sh-alert",17)(1,fr,2,0,"sh-alert",16),i&2){let e=nC(4);iT(e.testResponse()?.containsBackup?0:1);}}function Er(i,t){i&1&&(Qi$1(0,"sh-alert",18),XT(1,4),Hl());}function yr(i,t){i&1&&(Qi$1(0,"sh-alert",16),XT(1,5),Hl());}function Nr(i,t){i&1&&(Qi$1(0,"sh-alert",17),XT(1,6),Hl());}function Fr(i,t){if(i&1&&oT(0,Er,2,0,"sh-alert",18)(1,yr,2,0,"sh-alert",16)(2,Nr,2,0,"sh-alert",17),i&2){let e=nC(4);iT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function Dr(i,t){i&1&&(Qi$1(0,"sh-alert",17),XT(1,7),Hl());}function Ar(i,t){i&1&&(Qi$1(0,"sh-alert",16),XT(1,8),Hl());}function Ir(i,t){if(i&1&&oT(0,Dr,2,0,"sh-alert",17)(1,Ar,2,0,"sh-alert",16),i&2){let e=nC(4);iT(e.testResponse()?.anyFilesFound?0:1);}}function Or(i,t){i&1&&(Qi$1(0,"sh-alert",17),XT(1,9),Hl());}function Pr(i,t){i&1&&(Qi$1(0,"sh-alert",17),XT(1,10),Hl());}function Mr(i,t){i&1&&(Qi$1(0,"sh-alert",17),XT(1,11),Hl());}function Rr(i,t){if(i&1&&oT(0,Or,2,0,"sh-alert",17)(1,Pr,2,0,"sh-alert",17)(2,Mr,2,0,"sh-alert",17),i&2){let e=nC(4);iT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function xr(i,t){if(i&1&&oT(0,hr,2,1)(1,Fr,3,1)(2,Ir,2,1)(3,Rr,3,1),i&2){let e=nC(3);iT(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3);}}function Lr(i,t){if(i&1){let e=gT();Og(0,12,1),Qi$1(1,"button",14),Fg("click",function(){Sd(e);let o=nC(4);return xd(o.createFolder())}),Hl(),Pg();}}function br(i,t){if(i&1&&(Qi$1(0,"sh-alert",16),Og(1,12),oT(2,Lr,2,0,"button",19),Pg(),Hl()),i&2){let e=nC(3);DE(2),iT(e.askToCreate()?2:-1);}}function vr(i,t){if(i&1){let e=gT();Qi$1(0,"sh-alert",16),PC(1),Qi$1(2,"button",14),Fg("click",function(){Sd(e);let o=nC(3);return xd(o.useSuggestedUrl())}),PC(3,"Approve"),Hl()();}if(i&2){let e=nC(3);DE(),Gl(" ",e.testResponse()?.errorMessage," ");}}function wr(i,t){if(i&1){let e=gT();Qi$1(0,"sh-alert",16),PC(1),Qi$1(2,"button",14),Fg("click",function(){Sd(e);let o=nC(3);return xd(o.useSuggestedUrl())}),PC(3,"Approve"),Hl()();}if(i&2){let e=nC(3);DE(),Gl(" ",e.testResponse()?.errorMessage," ");}}function Gr(i,t){if(i&1){let e=gT();Qi$1(0,"sh-alert",16),PC(1),Qi$1(2,"button",14),Fg("click",function(){Sd(e);let o=nC(3);return xd(o.testDestinationClick())}),PC(3,"Test again"),Hl()();}if(i&2){let e=nC(3);DE(),Gl(" ",e.testResponse()?.errorMessage," ");}}function kr(i,t){if(i&1&&oT(0,xr,4,1)(1,br,3,1,"sh-alert",16)(2,vr,4,1,"sh-alert",16)(3,wr,4,1,"sh-alert",16)(4,Gr,4,1,"sh-alert",16),i&2){let e=nC(2);iT(e.testResponse()?.action==="success"?0:e.testResponse()?.action==="missing-folder"?1:e.testResponse()?.action==="trust-cert"?2:e.testResponse()?.action==="approve-host-key"?3:e.testResponse()?.action==="generic-error"?4:-1);}}function $r(i,t){if(i&1&&oT(0,Cr,3,0,"sh-alert",13)(1,Tr,5,4,"sh-alert",13)(2,kr,5,1),i&2){let e=nC();iT(e.testSignal()===null?0:e.testSignal()==="testing"?1:2);}}var nn=class i{#e=T(tn);targetUrl=m1.required();testSignal=m1.required();connectionStringId=g1(null);backupId=g1.required();sourcePrefix=g1.required();suppressErrorDialogs=g1.required();askToCreate=g1.required();readOnlyTest=g1.required();testExpectation=g1.required();moduleType=g1.required();testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=Nt(()=>{let t=this.targetUrl();return !(!t||!Ve(t))});prevTargetUrl=null;targetUrlEffect=Ga$1(()=>{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(),n=e&&typeof e!="string"?e?.targetUrl:null,o=e&&typeof e!="string"?e?.suggestedUrl:null;return !t||!o||n!==t||(this.targetUrl.set(o),this.testDestinationClick()),false}createFolder(){return this.testDestination(true),false}testDestinationClick(){return this.testDestination(false),false}testDestination(t){let e=this.targetUrl();if(!e)return;this.testSignal.set("testing");let n=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(),n,this.readOnlyTest())?.subscribe({next:a=>{if(!this.suppressErrorDialogs()&&a.testAgain){let l=a.suggestedUrl;l&&this.targetUrl.set(l),this.testSignal.set("testing"),this.#e.testDestination(l??e,this.backupId(),this.connectionStringId(),this.sourcePrefix(),0,this.moduleType(),this.suppressErrorDialogs(),n,this.readOnlyTest())?.subscribe({next:c=>{this.testSignal.set(c),o(c);}});}else this.testSignal.set(a),o(a);}});})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,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"],readOnlyTest:[1,"readOnlyTest"],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 n;n=$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 l;l=$localize` The remote destination is not empty. It is recommended to use an empty folder for the backup. `;let c;c=$localize`Success! Test completed, destination is empty.`;let u;u=$localize`Success! Test completed, destination contains files.`;let T;T=$localize`The remote destination is empty.`;let D;D=$localize`Success! Test completed, backup found.`;let y;y=$localize`Success! Test completed, destination contains files.`;let O;O=$localize`Success! Test completed, destination is empty.`;let G;return G=$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,n,o,a,l,c,u,T,D,y,O,G,[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,n){e&1&&oT(0,$r,3,1),e&2&&iT(n.isExpectedValidTargetUrl()?0:-1);},dependencies:[ue,v,N,m$2],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"]})};function Ur(i,t){if(i&1){let e=gT();Qi$1(0,"app-destination-list",10),Fg("setDestination",function(o){Sd(e);let a=nC();return xd(a.setDestination(o))}),Hl();}if(i&2){let e=nC();gg("showAsSources",true)("moduleType",e.moduleType());}}function Br(i,t){if(i&1){let e=gT();Qi$1(0,"app-destination-list-item",11)(1,"button",8),Fg("click",function(){Sd(e);let o=nC();return xd(o.removeDestination())}),XT(2,3),Hl()(),Qi$1(3,"app-test-url",12),sm("targetUrlChange",function(o){Sd(e);let a=nC();return HC(a.targetUrlModel,o)||(a.targetUrlModel=o),xd(o)})("testSignalChange",function(o){Sd(e);let a=nC();return HC(a.testSignal,o)||(a.testSignal=o),xd(o)}),Hl(),Qi$1(4,"app-single-destination",13),sm("targetUrlChange",function(o){Sd(e);let a=nC();return HC(a.targetUrlModel,o)||(a.targetUrlModel=o),xd(o)}),Hl();}if(i&2){let e=nC();gg("targetUrl",e.targetUrlModel()),DE(3),im("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),gg("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("readOnlyTest",true)("moduleType",e.moduleType()),DE(),im("targetUrl",e.targetUrlModel);}}function Vr(i,t){i&1&&XT(0,2,1);}function Kr(i,t){i&1&&XT(0,2,2);}function Jr(i,t){i&1&&XT(0,2,3);}function Xr(i,t){i&1&&XT(0,2,4);}var Ct=class i{data=g1();closed=h1();targetUrlModel=Ue(null);moduleType=Ue("Backend");askToCreate=Ue(false);expectedResult=Ue("any");suppressErrorDialogs=Ue(false);backupId=Ue(null);sourcePrefix=Ue(null);dataEffect=Ga$1(()=>{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=Ue(null);setTargetUrl(t,e=false){this.targetUrlModel.set(t);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.setTargetUrl(n,true);return}this.setTargetUrl(`${t}://`,true);}}submit(){this.closed.emit(this.targetUrlModel());}removeDestination(){this.setTargetUrl(null,true);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,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 n;n=$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:`,n=tC(n);let o;return o=$localize`Change`,[t,e,n,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","readOnlyTest","moduleType"],[3,"targetUrlChange","targetUrl"]]},template:function(e,n){if(e&1&&(Qi$1(0,"header")(1,"h3",4),XT(2,0),Hl()(),Qi$1(3,"section",5),oT(4,Ur,1,2,"app-destination-list",6),oT(5,Br,5,11),Hl(),Qi$1(6,"footer",7)(7,"button",8),Fg("click",function(){return n.closed.emit(null)}),XT(8,1),Hl(),Qi$1(9,"button",9),Fg("click",function(){return n.submit()}),Og(10,2),oT(11,Vr,1,0)(12,Kr,1,0)(13,Jr,1,0)(14,Xr,1,0),Pg(),Hl()()),e&2){let o=!!n.targetUrlModel();DE(4),iT(o?-1:4),DE(),iT(o?5:-1),DE(4),Qg("loading",n.testSignal()==="testing"),gg("disabled",!o||n.testSignal()===null||n.testSignal()==="testing"),DE(2),iT(n.moduleType()==="Backend"?11:n.moduleType()==="SourceProvider"?12:n.moduleType()==="RestoreDestinationProvider"?13:14);}},dependencies:[en,Yt,st,v,nn],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}"]})};var zr=["formRef"],Wr=()=>({updateOn:"blur",standalone:true}),mn=()=>({standalone:true});function Hr(i,t){if(i&1){let e=gT();Qi$1(0,"button",41),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.openLocalDiskDialog())}),Og(1,12),mg(2,"sh-icon"),Pg(),Hl();}}function jr(i,t){if(i&1){let e=gT();oT(0,Hr,3,0,"button",40),Qi$1(1,"button",41),Fg("click",function(){Sd(e);let o=nC();return xd(o.openRemoteDestinationDialog())}),Og(2,11),mg(3,"sh-icon"),Pg(),Hl();}if(i&2){let e=nC();iT(e.isLocalDiskSupported()?0:-1);}}function qr(i,t){i&1&&XT(0,7,1);}function Yr(i,t){i&1&&XT(0,7,2);}function Qr(i,t){i&1&&(Qi$1(0,"p",34),XT(1,13),Hl());}function Zr(i,t){i&1&&(Qi$1(0,"p",34),XT(1,14),Hl());}function es(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field")(1,"textarea",42),sm("ngModelChange",function(o){Sd(e);let a=nC();return HC(a.bulkPaths,o)||(a.bulkPaths=o),xd(o)}),Fg("ngModelChange",function(){Sd(e);let o=nC();return xd(o.savePathBulkEdit())}),Hl(),DD(),Hl();}if(i&2){let e=nC();DE(),im("ngModel",e.bulkPaths),gg("ngModelOptions",QC(2,Wr)),TD();}}function ts(i,t){if(i&1){let e=gT();Qi$1(0,"sh-form-field",46)(1,"input",47),sm("ngModelChange",function(o){Sd(e);let a=nC(3);return HC(a.editingPath,o)||(a.editingPath=o),xd(o)}),Hl(),DD(),Hl(),Qi$1(2,"button",24),Fg("click",function(){Sd(e);let o=nC(3);return xd(o.updatePath())}),Qi$1(3,"sh-icon"),PC(4,"floppy-disk"),Hl()(),Qi$1(5,"button",24),Fg("click",function(){Sd(e);let o=nC(3);return xd(o.cancelEditPath())}),Qi$1(6,"sh-icon"),PC(7,"x-bold"),Hl()();}if(i&2){let e=nC(3);DE(),im("ngModel",e.editingPath),gg("ngModelOptions",QC(2,mn)),TD();}}function ns(i,t){if(i&1){let e=gT();Qi$1(0,"button",50),Fg("click",function(){Sd(e);let o=nC(3).$implicit,a=nC(2);return xd(a.openOffice365Counts(o))}),Qi$1(1,"sh-icon"),PC(2,"info"),Hl()();}}function is(i,t){if(i&1&&(Qi$1(0,"sh-chip"),mg(1,"img",48),PC(2),Hl(),oT(3,ns,3,0,"button",49)),i&2){let e=nC(2).$implicit,n=nC(2);DE(),gg("src",n.getBackendIcon(e),Wp),DE(),Gl(" ",n.getRemotePathDisplayName(e)," "),DE(),iT(e.includes("|office365://")?3:-1);}}function os(i,t){if(i&1&&(Qi$1(0,"sh-form-field",46),mg(1,"input",51),DD(),Hl()),i&2){let e=nC(2).$implicit;hg("readonly",true),DE(),gg("ngModel",e)("ngModelOptions",QC(3,mn)),TD();}}function as(i,t){if(i&1){let e=gT();oT(0,is,4,3)(1,os,2,4,"sh-form-field",46),Qi$1(2,"button",24),Fg("click",function(){Sd(e);let o=nC().$implicit,a=nC(2);return xd(a.editPath(o))}),Qi$1(3,"sh-icon"),PC(4,"pen"),Hl()(),Qi$1(5,"button",24),Fg("click",function(){Sd(e);let o=nC().$implicit,a=nC(2);return xd(a.removePath(o))}),Qi$1(6,"sh-icon"),PC(7,"trash-simple"),Hl()();}if(i&2){let e=nC().$implicit;iT(e.startsWith("@")?0:1);}}function rs(i,t){if(i&1&&(Qi$1(0,"div",43),oT(1,ts,8,3)(2,as,8,1),Hl()),i&2){let e=t.$implicit,n=nC(2);DE(),iT(n.oldPath()===e?1:2);}}function ss(i,t){if(i&1){let e=gT();cT(0,rs,3,1,"div",43,sT),Qi$1(2,"div",39)(3,"sh-form-field"),mg(4,"input",44),DD(),Hl(),Qi$1(5,"button",45),Fg("click",function(){Sd(e);let o=nC();return xd(o.addNewPath())}),Qi$1(6,"sh-icon"),PC(7,"plus"),Hl()()();}if(i&2){let e=nC();lT(e.nonFilterPaths()),DE(4),gg("formControl",e.newPathCtrl),TD();}}function ls(i,t){if(i&1){let e=gT();Qi$1(0,"div",39)(1,"app-size",52),Fg("ngModelChange",function(o){Sd(e);let a=nC();return xd(a.updateFilesLargerThan(o))}),Hl(),DD(),Hl();}if(i&2){let e=nC();DE(),gg("ngModel",e.filesLargerThan())("ngModelOptions",QC(2,mn)),TD();}}var _t=new jn,si=(i={path:"",filters:[],excludes:{filesLargerThan:null}})=>_t.group({path:_t.control(i.path),excludes:_t.group({filesLargerThan:_t.group({size:_t.control(null),unit:_t.control(null)})})}),pn=class i{#e=T(ke);#t=T(be$1);#n=T(ee);#i=T(W);#o=T(m$1);#r=T(d$1);formRef=y1.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new L("");filesLargerThan=Nt(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=L$1(this.sourceDataForm.controls.path.valueChanges);pathArray=Nt(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=Nt(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=Ue(null);editingPath=Ue(null);addingNewPath=Ue(false);bulkPathEditMode=Ue(false);bulkPaths=Ue("");mobileMenuOpen=Ue(false);backupId=this.#e.backupId();isLocalDiskSupported=Nt(()=>this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));filters=Ue([]);#a=Ga$1(()=>{let e=this.pathSignal()?.split("\0").filter(n=>n!=="___none___"&&(n.startsWith("-")||n.startsWith("+")))??[];this.filters.set(e);});openRemoteDestinationDialog(){this.#t.open(Ct,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:null,moduleType:"SourceProvider",askToCreate:false,expectedResult:"destinationNotEmpty",suppressErrorDialogs:true,backupId:null,sourcePrefix:null}}).component.closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),o=e.split("://")[0],l=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${n}|${e}`;this.addPath(l);});}openLocalDiskDialog(){this.#t.open(gt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{initialPath:null}}).closed.subscribe(e=>{if(!e)return;let n=Math.random().toString(36).substring(2,10),a=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-disk-${n}|diskimage://${e}`;this.addPath(a);});}togglePathBulkEdit(){if(this.bulkPathEditMode())this.bulkPathEditMode.set(false);else {let t=this.nonFilterPaths()?.join(`
|
|
12
|
+
`)??"";this.bulkPaths.set(t),this.bulkPathEditMode.set(true);}}savePathBulkEdit(){let t=this.bulkPaths().split(`
|
|
13
|
+
`).filter(a=>a.trim()!=="")??[],e=this.pathArray(),n=[...t,...e],o=[...new Set(n)].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,n){this.#t.open(gt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{initialPath:n}}).closed.subscribe(a=>{if(!a)return;let l=`${e}|diskimage://${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,l)??"");});}editTargetUrlPath(t,e,n){this.#t.open(Ct,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:n,moduleType:"SourceProvider",askToCreate:false,expectedResult:"destinationNotEmpty",suppressErrorDialogs:true,backupId:this.#e.backupId(),sourcePrefix:e}}).closed.subscribe(a=>{if(!a)return;let l=`${e}|${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,l)??"");});}updateFilesLargerThan(t){let{size:e,unit:n}=rn(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n});}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null);}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null);}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),o=n.indexOf(t);if(o===-1)return;n.splice(o,1);let a=n.filter(l=>l&&l!=="").join("\0");this.sourceDataForm.controls.path.setValue(a);}addPath(t){let n=[this.sourceDataForm.controls.path.value,t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n);}updateFilters(t){let n=[...this.nonFilterPaths()??[],...t].filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(n);}getPath(){return this.sourceDataForm.value.path??null}getBackendIcon(t){if(!t)return "";let e=t.split("|")[1];return Fe$1(e)}getRemotePathDisplayName(t){if(!t)return "";let e=t.split("|")[1];return Pe(e)}openOffice365Counts(t){if(!t||!t.startsWith("@"))return;let e=t.split("|");if(e.length!==2||!e[1].startsWith("office365://"))return;let n=e[0],o=e[1];this.#t.open(qt,{maxWidth:"500px",width:"100%",closeOnOutsideClick:true,data:{url:o,sourcePrefix:n,backupId:this.backupId}});}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,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let o=n.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(true),this.#n.navigate(["schedule"],{relativeTo:this.#i.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&$g(n.formRef,zr,5),e&2&&lC();},decls:57,vars:18,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Source Data`;let n;n=$localize`Folder path`;let o;o=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let l;l=$localize`Options`;let c;c=$localize`Paths`;let u;u=$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 T;T=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let y;y=$localize` Files larger than `;let O;O=$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 A;A=$localize`Manually add a path.`;let K;K=$localize`Edit paths as text, one per line.`;let J;J=$localize`Add a direct path`;let k;k=$localize`Edit path`;let Q;return Q=$localize`Show item counts`,[["formRef",""],e,n,o,a,l,c,u,T,D,y,O,G,A,K,[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","showUnrootedSources","backupId"],["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"],[3,"filtersChange","filters","osType"],["formGroupName","excludes",3,"disableToggle"],[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",J,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",k,3,"ngModelChange","ngModel","ngModelOptions"],["alt","Provider icon",1,"provider-icon",3,"src"],["shButton","","type","button","title",Q,1,"small"],["shButton","","type","button","title",Q,1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let o=gT();Qi$1(0,"form",15,0),Fg("submit",function(){return n.next()}),Qi$1(2,"div",16)(3,"div",17)(4,"h3",18),XT(5,1),Hl(),Qi$1(6,"button",19),Fg("click",function(){return n.mobileMenuOpen.set(true)}),Qi$1(7,"sh-icon"),PC(8,"sliders"),Hl()()(),Qi$1(9,"app-file-tree",20)(10,"label",21),XT(11,2),Hl(),mg(12,"input",22),DD(),Hl(),Qi$1(13,"div",23)(14,"button",24),Fg("click",function(){return n.goBack()}),Og(15,3),mg(16,"sh-icon"),Pg(),Hl(),Qi$1(17,"button",25),Og(18,4),mg(19,"sh-icon"),Pg(),Hl()()(),Qi$1(20,"div",26)(21,"div",27)(22,"span",18),XT(23,5),Hl(),Qi$1(24,"button",28),Fg("click",function(){return n.mobileMenuOpen.set(false)}),Qi$1(25,"sh-icon"),PC(26,"x-bold"),Hl()()(),Qi$1(27,"app-toggle-card",29),Ul(28,30),Qi$1(29,"span"),XT(30,6),Hl(),mg(31,"div",31),oT(32,jr,4,1),Qi$1(33,"sh-menu")(34,"button",32)(35,"sh-icon"),PC(36,"dots-three-vertical"),Hl()(),Ul(37,33),Qi$1(38,"button",24),Fg("click",function(){return n.togglePathBulkEdit()}),Og(39,7),mg(40,"sh-icon"),oT(41,qr,1,0)(42,Yr,1,0),Pg(),Hl(),Wl(),Hl(),Wl(),oT(43,Qr,2,0,"p",34)(44,Zr,2,0,"p",34),Qi$1(45,"div",35),oT(46,es,2,3,"sh-form-field")(47,ss,8,1),Hl()(),Qi$1(48,"app-filters",36),sm("filtersChange",function(l){return Sd(o),HC(n.filters,l)||(n.filters=l),xd(l)}),Fg("filtersChange",function(l){return n.updateFilters(l)}),Hl(),Qi$1(49,"app-toggle-card",37),Ul(50,30),XT(51,8),Wl(),Qi$1(52,"p",34),XT(53,9),Hl(),Qi$1(54,"sh-toggle",38),Fg("checkedChange",function(l){return n.toggleFilesLargerThan(l)}),XT(55,10),Hl(),oT(56,ls,2,3,"div",39),Hl()()();}e&2&&(gg("formGroup",n.sourceDataForm),DE(9),gg("multiSelect",true)("startingPath",n.getPath())("showFiles",true)("showUnrootedSources",true)("backupId",n.backupId),DE(3),TD(),DE(8),Qg("open",n.mobileMenuOpen()),DE(7),gg("disableToggle",true),DE(5),iT(n.bulkPathEditMode()?-1:32),DE(9),iT(n.bulkPathEditMode()?41:42),DE(2),iT(n.bulkPathEditMode()?44:43),DE(3),iT(n.bulkPathEditMode()?46:47),DE(2),im("filters",n.filters),gg("osType",n.osType()??""),DE(),gg("disableToggle",true),DE(5),gg("checked",n.filesLargerThan()!==null),DE(2),iT(n.filesLargerThan()?56:-1));},dependencies:[Bn,Tn,Ze$1,Rn,Pn,Jt,Gn,ln,gn$1,hn,ft,Fe,N,v,J,ve,jt,Se$1,Ze,mt$1,D],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 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}.paths[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}"]})};var li="1W:1D,4W:1W,12M:1M",gn=false,ke=class i{#e=T(ee);#t=T(m$1);#n=T(be$1);#i=T(C$1);#o=T(O);#r=T(zt);#a=T(rt);generalForm=_i();sourceDataForm=si();scheduleFields=un();scheduleType=Ue("daily");settings=Ue([]);optionsFields={backupRetention:Ue("all"),backupRetentionTime:Ue(""),backupRetentionVersions:Ue(0),backupRetentionCustom:Ue("")};targetUrls=Ue([]);targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);connectionStringId=Nt(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=Ue(null);backupMetadata=Ue(null);isDraft=Ue(false);backupId=Ue(null);backupName=Nt(()=>this.generalFormSignal()?.name??"");isSubmitting=Ue(false);finishedLoading=Ue(false);backupDefaults=Ue(null);applicationOptions=Ue(null);isNew=Nt(()=>this.backupId()==="new");shouldAutoSave=Nt(()=>!this.isDraft()&&!this.isNew());osType=Nt(()=>this.#t.systemInfo()?.OSType);isSyncMode=Nt(()=>this.generalForm.controls.operationType.value==="Sync");isConnectionStringSaved=Nt(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):false});selectedOptions=Ue([]);sourceDataFormSignal=L$1(this.sourceDataForm.valueChanges);generalFormSignal=L$1(this.generalForm.valueChanges);encryptionFieldSignal=L$1(this.generalForm.controls.encryption.valueChanges);operationTypeFieldSignal=L$1(this.generalForm.controls.operationType.valueChanges);advancedOptions=Nt(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#s=Ue(null);#l=null;testSignal=this.#s.asReadonly();#_=Ga$1(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&this.#s.set(null);});#g=Ga$1(()=>{this.targetUrlModel();let e=this.connectionStringId();if(e){let n=this.#a.destinations();if(n.length===0)return;let o=n.find(a=>a.ID===e);!o||o.BaseUrl;}});setTestState(t){this.#s.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=Nt(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return [Tt,...t]});nonSelectedOptions=Nt(()=>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=false){this.isSubmitting.set(true),this.#p().pipe($u(e=>{let n=this.#d(),o=this.backupId(),a=n;if(a.Backup){e.length>0&&e[0]!==null?n.Backup.ConnectionStringID=e[0]:e.length>0&&e[0]===null&&(n.Backup.ConnectionStringID=void 0);let c=this.targetUrls().slice(1).map((u,T)=>{let D=e[T+1];return {TargetUrl:u.url,ConnectionStringID:D??void 0,UrlKey:u.urlKey}});c.length>0&&(a.Backup.AdditionalTargetURLs=c);}return this.isDraft()&&n.Backup&&(n.Backup.Metadata=this.backupMetadata()),o==="new"||!o||this.isDraft()?this.#i.postApiV1Backups({requestBody:n}):this.#i.putApiV1BackupById({id:o,requestBody:n})}),Bu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{t||this.exit(false);},error:()=>{}});}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#d(),e=(t.Backup.Name??"").trim()!=="",a=(!(this.generalForm.controls.operationType.value==="Sync")&&this.generalForm.controls.encryption.value!==""&&this.generalForm.controls.encryption.value!=="-")===false||this.generalForm.controls.password.value===this.generalForm.controls.repeatPassword.value&&this.generalForm.controls.password.value!=="";if(!e||!a)return this.#n.open(h$1,{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 l=this.targetUrls();if(!(l.length>0&&l.some(T=>T.url.trim()!=="")))return this.#n.open(h$1,{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 u=(t.Backup.Sources??[]).filter(T=>T.trim()!=="").length>0;return !u||!this.sourceDataForm.valid?(this.#n.open(h$1,{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.#c(),this.#e.navigate(["/"]);return}this.#n.open(h$1,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#c(),this.#e.navigate(["/"]));}});}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(l=>`${l.Include?"+":"-"}${l.Expression}`)??[],o=t.Settings?.find(l=>l.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,a={path:[...e,...n].join("\0"),excludes:{filesLargerThan:o===null?void 0:rn(o)}};this.sourceDataForm.patchValue(a);}mapDestinationToForm(t){let e=t,n=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=n?[{url:n,connectionStringId:o,urlKey:null,save:!!o}]:[],l=e.AdditionalTargetURLs?.map(c=>({url:c.TargetUrl,urlKey:c.UrlKey,connectionStringId:c.ConnectionStringID??null,save:!!c.ConnectionStringID}))??[];this.targetUrls.set([...a,...l]);}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",o=t.Settings?.find(T=>T.Name==="encryption-module"),a=t.Settings?.find(T=>T.Name==="passphrase")?.Value??"",l=o?.Value&&o.Value.length?o.Value:"",c=t.OperationType??"Backup",u={name:t.Name??"",description:t.Description??"",operationType:c};e&&e!==""&&(u.name=e),n&&n!==""&&(u.description=n),l&&l!==""&&(u.encryption=l),a&&a!==""&&(u.password=a,u.repeatPassword=a),this.generalForm.patchValue(u);}mapScheduleToForm(t){if(!t){this.scheduleType.set("disabled"),this.scheduleFields.autoRun.set(false);return}let e=this.#r.fromString(t.Repeat)??null,n=this.#m(t.Time);this.scheduleFields.autoRun.set(true),n.date&&this.scheduleFields.nextTime.date.set(n.date),this.scheduleFields.nextTime.time.set(n.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")??false),this.scheduleFields.runAgain.allowedDays.tue.set(t.AllowedDays?.includes("tue")??false),this.scheduleFields.runAgain.allowedDays.wed.set(t.AllowedDays?.includes("wed")??false),this.scheduleFields.runAgain.allowedDays.thu.set(t.AllowedDays?.includes("thu")??false),this.scheduleFields.runAgain.allowedDays.fri.set(t.AllowedDays?.includes("fri")??false),this.scheduleFields.runAgain.allowedDays.sat.set(t.AllowedDays?.includes("sat")??false),this.scheduleFields.runAgain.allowedDays.sun.set(t.AllowedDays?.includes("sun")??false);let o=mt(this.scheduleFields),a=Wt.find(l=>JSON.stringify(l.data)===JSON.stringify(o));a?this.scheduleType.set(a.value):this.scheduleType.set("custom");}mapOptionsToForms(t,e=false){let n=["--no-encryption","--skip-files-larger-than","passphrase","keep-time","keep-versions","retention-policy"],o=(t.Settings??[]).map(u=>u);if(e){let u=this.#o.serverSettings()??{};Object.keys(u).filter(T=>T.startsWith("--")).forEach(T=>{o.find(y=>y.Name===T)||o.push({Name:T,Value:u[T],Filter:null});});}let a=o.filter(u=>!n.includes(u.Name)),l=o.filter(u=>n.includes(u.Name));this.settings.set(a??[]),a?.forEach(u=>{if(u.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(u.Value??"")});var c="all";l?.forEach(u=>{if(u.Name==="keep-time"&&(u.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(u.Value??"");if(u.Name==="keep-versions"&&(u.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(u.Value?parseInt(u.Value):null);if(u.Name==="retention-policy"&&(u.Value??"")!=="")if(u.Value===li)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(u.Value??"")}),this.optionsFields.backupRetention.set(c);}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null);}getScheduleFormValue(){let t=mt(this.scheduleFields);return ri(t)}#d(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.targetUrls()[0],l=a?.url??null,c=n.path?.split("\0")??[],u=this.mapFormsToSettings(),T=n.excludes?.filesLargerThan;return T&&T.size!==null&&T.unit!==null&&u.push({Name:"--skip-files-larger-than",Value:`${T.size}${T.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:l??null,ConnectionStringID:a?.connectionStringId??null,OperationType:t.operationType??"Backup",Sources:c.filter(D=>!(D.startsWith("-")||D.startsWith("+"))),Settings:u,Filters:c.filter(D=>D.startsWith("-")||D.startsWith("+")).map((D,y)=>({Order:y,Include:D.startsWith("+"),Expression:D.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["dblock-size","compression-module"],o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy",...n,...n.map(y=>`--${y}`)],a=[{Name:"--no-encryption",Value:"True"}];!(e.operationType==="Sync")&&e.encryption!==""&&e.encryption!==Tt.Key&&(a=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let c=n.map(y=>{let O=this.settings().find(G=>G.Name===y||G.Name==="--"+y);return O?{Name:y,Value:O.Value}:null}).filter(y=>y!==null),u=[];if(!this.isSyncMode())switch(this.optionsFields.backupRetention()){case "time":u.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case "versions":u.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case "custom":u.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case "smart":u.push({Name:"retention-policy",Value:li});break}let T=[...t,...o],D=this.settings().filter(y=>!T.includes(y.Name)).map(y=>{let O=y.Value;return typeof y.Value=="number"&&(O=y.Value.toString()),typeof y.Value=="boolean"&&(O=y.Value?"True":"False"),{Name:y.Name?.startsWith("--")?y.Name:`--${y.Name}`,Value:O}});return [...a,...c,...u,...D]}#p(){let t=this.targetUrls();if(t.length===0)return ty([]);let e=t.map(n=>{if(n.connectionStringId)return ty(n.connectionStringId);if(!n.save)return ty(null);let o=n.url,l=V(o)?.displayName??"Destination";this.#a.destinations().filter(y=>y.Name?.startsWith(l)).length;let D={Name:`${l} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",D).pipe(pt(y=>y.Data?.ID??null))});return vy(e).pipe(Ju(n=>{let o=this.targetUrls();n.forEach((a,l)=>{if(a&&l<o.length&&(this.#a.reload(),o[l].connectionStringId!==a)){let c=o[l].urlKey;this.updateTargetUrl(l,o[l].url,a,c);}});}))}#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.getFullYear()).padStart(4,"0")}-${(""+(e.getMonth()+1)).padStart(2,"0")}-${(""+e.getDate()).padStart(2,"0")}`}}setTargetUrl(t,e=false,n=null,o=null){if(e&&(this.#l=null),t===null){this.targetUrls.set([]);return}this.targetUrls.update(a=>{let l=[...a];return l.length===0?l.push({url:t,urlKey:o,connectionStringId:n,save:n?true:gn}):l[0]={url:t,urlKey:o,connectionStringId:n,save:n?true:gn},l});}addTargetUrl(t,e,n){this.targetUrls.update(o=>[...o,{url:t,connectionStringId:e,urlKey:n,save:e?true:gn}]);}updateTargetUrl(t,e,n,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let l=[...a],c=l[t].save;return l[t]={url:e,connectionStringId:n,urlKey:o,save:n?true:c},l});}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let n=[...e];return n[t]=m$3(l({},n[t]),{save:!n[t].save}),n});}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((n,o)=>o!==t));}#c(){this.generalForm.reset({operationType:"Backup"}),this.sourceDataForm.reset(),this.scheduleFields=un(),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrls.set([]);}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};var _s=["formRef"];function ds(i,t){i&1&&(Qi$1(0,"sh-alert",31),Og(1,5),mg(2,"sh-icon",33),Pg(),Hl());}function cs(i,t){i&1&&(Qi$1(0,"sh-alert",32),Og(1,6),mg(2,"sh-icon",33),Pg(),Hl());}function us(i,t){if(i&1&&oT(0,ds,3,0,"sh-alert",31)(1,cs,3,0,"sh-alert",32),i&2){let e=nC();iT(e.generalFormSignal()?.operationType==="Sync"?0:e.generalFormSignal()?.encryption!==""?1:-1);}}function ps(i,t){if(i&1){let e=gT();Qi$1(0,"div",26)(1,"label"),XT(2,7),Hl(),Qi$1(3,"sh-button-group",34),sm("valueChange",function(o){Sd(e);let a=nC();return HC(a.operationTypeFieldSignal,o)||(a.operationTypeFieldSignal=o),xd(o)}),Qi$1(4,"button",35),Og(5,8),mg(6,"sh-icon",36),Pg(),Hl(),Qi$1(7,"button",37),Og(8,9),mg(9,"sh-icon",36),Pg(),Hl()()();}if(i&2){let e=nC();DE(3),im("value",e.operationTypeFieldSignal),DE(3),gg("shTooltip","Store backups with version history, deduplication, compression and encryption"),DE(3),gg("shTooltip","Copy files from the source to the destination without compression or encryption");}}function ms(i,t){i&1&&(Qi$1(0,"sh-alert",38),Og(1,10),mg(2,"sh-icon",33),Pg(),Hl());}function gs(i,t){if(i&1&&oT(0,ms,3,0,"sh-alert",38),i&2){let e=nC();iT(e.isNew()?0:-1);}}function Cs(i,t){if(i&1&&PC(0),i&2){let e=t.$implicit;Gl(" ",e.DisplayName," ");}}function Ts(i,t){if(i&1&&mg(0,"sh-progress-bar",52),i&2){let e=nC(4);Qg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),gg("value",e.calculatePasswordStrength()*(100/5));}}function Ss(i,t){i&1&&(Qi$1(0,"span",47),XT(1,15),Hl());}function fs(i,t){i&1&&(Og(0,13,1),mg(1,"sh-icon"),Pg());}function hs(i,t){i&1&&(Og(0,13,2),mg(1,"sh-icon"),Pg());}function Es(i,t){i&1&&(Og(0,16,1),mg(1,"sh-icon",54),Pg());}function ys(i,t){i&1&&(Og(0,16,2),mg(1,"sh-icon"),Pg());}function Ns(i,t){if(i&1){let e=gT();Qi$1(0,"button",53),Fg("click",function(){Sd(e);let o=nC(4);return xd(o.copyPassword())}),Og(1,16),oT(2,Es,2,0)(3,ys,2,0),Pg(),Hl();}if(i&2){let e=nC(4);DE(2),iT(e.copiedPassword()?2:3);}}function Fs(i,t){i&1&&(Qi$1(0,"sh-alert",51),XT(1,17),Hl());}function Ds(i,t){if(i&1){let e=gT();Qi$1(0,"div",42)(1,"sh-form-field")(2,"label",43),Og(3,12),mg(4,"sup"),Pg(),Hl(),mg(5,"input",44),DD(),Hl(),oT(6,Ts,1,9,"sh-progress-bar",45),Qi$1(7,"sh-form-field"),mg(8,"input",46),DD(),oT(9,Ss,2,0,"span",47),Hl(),Qi$1(10,"div",48)(11,"button",49),Fg("click",function(){Sd(e);let o=nC(3);return xd(o.showPassword.set(!o.showPassword()))}),Og(12,13),oT(13,fs,2,0)(14,hs,2,0),Pg(),Hl(),Qi$1(15,"button",49),Fg("click",function(){Sd(e);let o=nC(3);return xd(o.generatePassword())}),Og(16,14),mg(17,"sh-icon"),Pg(),Hl(),oT(18,Ns,4,1,"button",50),Hl(),oT(19,Fs,2,0,"sh-alert",51),Hl();}if(i&2){let e=nC(3);DE(5),gg("type",e.showPassword()?"text":"password"),TD(),DE(),iT(e.generalForm.value.password?6:-1),DE(2),gg("type",e.showPassword()?"text":"password"),TD(),DE(),iT(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),DE(4),iT(e.showPassword()?13:14),DE(5),iT(e.showCopyPassword()?18:-1),DE(),iT(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1);}}function As(i,t){if(i&1&&(Qi$1(0,"sh-select",39)(1,"label",40),XT(2,11),Hl(),mg(3,"input",41),DD(),ig(4,Cs,1,1,"ng-template"),Hl(),oT(5,Ds,20,7,"div",42)),i&2){let e=nC(2);gg("options",e.encryptionOptions())("isClearable",false),DE(3),TD(),DE(2),iT(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1);}}function Is(i,t){if(i&1&&oT(0,As,6,3),i&2){let e=nC();iT(e.isNew()?0:-1);}}function Os(i,t){if(i&1&&(Qi$1(0,"button",29),Og(1,18),mg(2,"sh-icon"),Pg(),Hl()),i&2){let e=nC();gg("disabled",e.nameAndDescriptionValid()===false);}}function Ps(i,t){if(i&1&&(Qi$1(0,"button",30),Og(1,19),mg(2,"sh-icon"),Pg(),Hl()),i&2){let e=nC();gg("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword());}}var et=new jn,_i=(i={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:"",operationType:"Backup"})=>et.group({name:et.control(i.name,[me.required]),description:et.control(i.description),encryption:et.control(i.encryption,[F()]),password:et.control(i.password,[y(t=>t?.value.encryption!=="-",[me.required])]),repeatPassword:et.control(i.repeatPassword,[y(t=>t?.value.encryption!=="-",[me.required])]),operationType:et.control(i.operationType)}),Tt={Key:"-",DisplayName:"None"},Cn=class i{#e=T(ee);#t=T(W);#n=T(m);#i=T(ke);#o=T(m$1);formRef=y1.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;operationTypeFieldSignal=Ue("Backup");encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;syncModeSupported=this.#o.hasSyncMode;showPassword=Ue(false);copiedPassword=Ue(false);showCopyPassword=Ue(false);noneOptionKey=Tt.Key;encryptionEffect=Ga$1(()=>{this.encryptionFieldSignal()===Tt.Key&&(this.copiedPassword.set(false),this.showCopyPassword.set(false));});#r=Ga$1(()=>{let t=this.#i.operationTypeFieldSignal();this.operationTypeFieldSignal.set(t??"Backup");});#a=Ga$1(()=>{let t=this.operationTypeFieldSignal();this.generalForm.controls.operationType.setValue(t);});nameAndDescriptionValid=Nt(()=>{this.generalFormSignal();let e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=Nt(()=>{let e=this.generalFormSignal()?.password??"";return this.#n.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus();}exit(){this.#i.exit(true);}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#s(t??""),this.copiedPassword.set(true);}async#s(t){try{await navigator.clipboard.writeText(t);}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n);}catch(n){console.error("Failed to copy text: ",n);}}}generatePassword(){this.copiedPassword.set(false);let t=this.#n.generate(41);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(true);}next(){this.#i.shouldAutoSave()&&this.#i.submit(true),this.#e.navigate(["destination"],{relativeTo:this.#t.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&$g(n.formRef,_s,5),e&2&&lC();},decls:23,vars:5,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let o;o=$localize`General backup settings`;let a;a=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let l;l=$localize`Backup description`;let c;c=$localize`${"\uFFFD#20\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrows-left-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Synchronization job - files are not encrypted `;let T;T=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let D;D=$localize`Operation mode`;let y;y=$localize` Backup ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let O;O=$localize` Sync ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let G;G=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: This is a synchronization job. Files are copied without encryption. `;let A;A=$localize`Encryption`;let K;K=$localize`Encryption`;let J;J=$localize`Password`;let k;k=$localize`Repeat password`;let Q;Q=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let z;z=$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:`,z=tC(z);let xe;xe=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let W;W=$localize`Passwords do not match`;let ve;ve=$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:`,ve=tC(ve);let Le;Le=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let dt;dt=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ct;return ct=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,l,c,u,T,D,y,O,G,K,Q,z,xe,W,ve,Le,dt,ct,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"mode-toggle"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],[1,"primary","accent"],[1,"primary"],["icon",""],[3,"valueChange","value"],["value","Backup","type","button"],[3,"shTooltip"],["value","Sync","type","button"],[1,"accent"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",A,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",J,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",k,"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,n){e&1&&(Qi$1(0,"form",20,0),Fg("submit",function(){return n.next()}),Qi$1(2,"h3",21),XT(3,1),Hl(),oT(4,us,2,1),Qi$1(5,"sh-form-field")(6,"label",22),Og(7,2),mg(8,"sup"),Pg(),Hl(),mg(9,"input",23),DD(),Hl(),Qi$1(10,"sh-form-field")(11,"label",24),XT(12,3),Hl(),mg(13,"textarea",25),DD(),Hl(),oT(14,ps,10,3,"div",26),oT(15,gs,1,1)(16,Is,1,1),Qi$1(17,"div",27)(18,"button",28),Fg("click",function(){return n.exit()}),Og(19,4),mg(20,"sh-icon"),Pg(),Hl(),oT(21,Os,3,1,"button",29)(22,Ps,3,1,"button",30),Hl()()),e&2&&(gg("formGroup",n.generalForm),DE(4),iT(n.isNew()?-1:4),DE(5),TD(),DE(4),TD(),DE(),iT(n.isNew()&&n.syncModeSupported()?14:-1),DE(),iT(n.generalFormSignal()?.operationType==="Sync"?15:16),DE(6),iT(n.generalFormSignal()?.operationType==="Sync"||n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?21:22));},dependencies:[Gn,Tn,Ze$1,Rn,Pn,gn$1,hn,Fe,Nt$1,v,N,d,ue,at,x],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)}.mode-toggle[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1);gap:.25rem}.mode-toggle[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{width:100%}"]})};
|
|
14
|
+
var chunkEMV7BNPC=/*#__PURE__*/Object.freeze({__proto__:null,NONE_OPTION:Tt,createGeneralForm:_i,default:Cn});var chunkG3BBXEBF=/*#__PURE__*/Object.freeze({__proto__:null,createSourceDataForm:si,default:pn});var chunkELZQYEUY=/*#__PURE__*/Object.freeze({__proto__:null,SCHEDULE_DEFAULT_OPTIONS:Wt,SCHEDULE_FIELD_DEFAULTS:un,default:cn,scheduleOptionToSchedule:ri});export{Ct as C,Yt as Y,Ze as Z,chunkG3BBXEBF as a,chunkELZQYEUY as b,chunkEMV7BNPC as c,en as e,jt as j,ke as k,nn as n,rt as r,st as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e as ee}from'./chunk-
|
|
1
|
+
import {e as ee}from'./chunk-B0RBkC1E.js';import'./chunk-BB1pOOUx.js';import'./chunk-DN6f5jXR.js';import'./chunk-3RXp81pP.js';import'./chunk-CT9ziigM.js';import'./chunk-D5lj-fQk.js';import'./chunk-OLi7f6y7.js';import'./chunk-B2TXzbpy.js';import {T,m,d as dw,v,f as N,_ as _t,j as mg,Q as Qi,X as XT,H as Hl,O as Og,P as Pg,o as oT,D as DE,I as Qg,z as gg,a3 as QC,i as iT}from'./main-KFKZO6SJ.js';import {f}from'./chunk-DPNAj9Vc.js';import'./chunk-CRAg6SRo.js';import'./chunk-DuIUmwWN.js';import'./chunk-DipTNkHN.js';import'./chunk-Fw6nFDZK.js';import'./chunk-Ca1C9pJ0.js';import'./chunk-C-NgIZiF.js';import'./chunk-PVmXLw9b.js';import'./chunk-C7pjkqKB.js';var B=()=>["/backup/new"],G=()=>["/backup/import"],K=()=>["/backup/import-destination"];function U(r,s){r&1&&(Qi(0,"sh-card",11),mg(1,"img",15),Qi(2,"h3"),XT(3,7),Hl(),Qi(4,"p"),XT(5,8),Hl(),Qi(6,"button",13),Og(7,9),mg(8,"sh-icon"),Pg(),Hl()()),r&2&&(DE(6),gg("routerLink",QC(1,K)));}var p=class r{hasRestoreControlFilesOperation=T(m).hasRestoreControlFilesOperation;static \u0275fac=function(i){return new(i||r)};static \u0275cmp=dw({type:r,selectors:[["app-add-backup"]],decls:24,vars:7,consts:()=>{let s;s=$localize`Add a new backup`;let i;i=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let m;m=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let S;S=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let P;P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize`Import from destination`;let g;g=$localize`Import one or more backup configurations from a remote destination.`;let E;return E=$localize` Import from destination ${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:download-simple${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON:`,[s,i,C,m,A,S,P,T,g,E,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"],["src","assets/images/backup-from-config.png"],["src","assets/images/backup-from-remote.png"]]},template:function(i,C){i&1&&(mg(0,"app-status-bar"),Qi(1,"section")(2,"h2"),XT(3,0),Hl(),Qi(4,"div",10)(5,"sh-card",11),mg(6,"img",12),Qi(7,"h3"),XT(8,1),Hl(),Qi(9,"p"),XT(10,2),Hl(),Qi(11,"button",13),Og(12,3),mg(13,"sh-icon"),Pg(),Hl()(),Qi(14,"sh-card",11),mg(15,"img",14),Qi(16,"h3"),XT(17,4),Hl(),Qi(18,"p"),XT(19,5),Hl(),Qi(20,"button",13),Og(21,6),mg(22,"sh-icon"),Pg(),Hl()(),oT(23,U,9,2,"sh-card",11),Hl()()),i&2&&(DE(4),Qg("three-column",C.hasRestoreControlFilesOperation()),DE(7),gg("routerLink",QC(5,B)),DE(9),gg("routerLink",QC(6,G)),DE(3),iT(C.hasRestoreControlFilesOperation()?23:-1));},dependencies:[ee,v,f,N,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}div.backup-types.three-column[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr;max-width:65.625rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"]})};export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {L}from'./chunk-
|
|
1
|
+
import {L}from'./chunk-C7pjkqKB.js';import {T as T$1,ab as C$1,a as T$2,bg as Q,m as m$1,U as Ue,N as Nt,G as Ga,aj as l,a$ as Vs,aZ as ee}from'./main-KFKZO6SJ.js';var _="shown-welcome-page-v1",m="hide-console-connection-status",A="use-out-of-process-controller",R="disable-console-control",b="disable-tray-icon-login",c="server-listen-interface",T="allowed-hostnames",D="server-passphrase",N="update-channel",w="startup-delay",y="usage-reporter-level",P="power-mode-provider",I="autogenerated-passphrase",C="has-asked-for-password-change",O=class o{#s=T$1(C$1);#r=T$1(T$2);#n=T$1(Q);#i=T$1(m$1);#o=L(this.#s.getApiV1Serversettings());#e=Ue(void 0);#t(e,t){if(!t)return false;let s=t[e];if((s??"").trim().length==0)return false;let r=s.trim().toLowerCase();return r==="true"||r==="1"||r==="yes"||r==="on"}serverSettings=Nt(()=>this.#e()||this.#o());askForInitialPasswordConfig=Nt(()=>{let e=(this.#i.systemInfo()?.StartedBy??"").trim().toLowerCase();if(e==="tray icon"||e=="trayicon")return false;let t=this.#e(),s=this.#t(I,t),r=this.#t(C,t);return s&&!r});showWelcomePage=Nt(()=>{let e=this.#e();if(!e)return false;let t=this.#t(C,e),s=this.#t(_,e);return !(t||s)});#c=Ga(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e);});constructor(){this.#r.subscribe("serversettings");}isConsoleConnectionStatusHidden=Nt(()=>this.#t(m,this.serverSettings()));isControllerIpcEnabled=Nt(()=>this.#t(A,this.serverSettings()));refreshServerSettings(){this.#n.getConnectionMethod()!=="websocket"&&this.#s.getApiV1Serversettings().subscribe({next:e=>{this.#e.set(e);}});}#a(e,t){var s=l({},e);for(let[r,S]of Object.entries(t))S===null?delete s[r]:s[r]=S;return s}patchServerSettings(e){let t=l({},this.serverSettings());return this.#e.set(this.#a(this.serverSettings()??{},e)),this.#s.patchApiV1Serversettings({requestBody:e}).pipe(Vs(s=>{throw this.#e.set(t),s}))}patchServerSetting(e,t){let s={};return s[e]=t,this.patchServerSettings(s)}setShownWelcomePage(){return this.patchServerSetting(_,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(m,e?"True":"False")}setControllerIpcState(e){return this.patchServerSetting(A,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(b,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(R,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(c,e)}setRemoteAccessAllowedHostnames(e){var t={[T]:e};return this.serverSettings()?.[c]==="loopback"&&(t[c]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(D,e)}setUpdateChannel(e){return this.patchServerSetting(N,e)}setStartupDelay(e){return this.patchServerSetting(w,e)}setUsageReporterLevel(e){return this.patchServerSetting(y,e)}setPowerModeProvider(e){return this.patchServerSetting(P,e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"})};export{O};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {T,N as Nt,d as dw,R as Bl,q as PC,W as $l,o as oT,D as DE,i as iT,ab as C,U as Ue,C as Bu,aZ as ee,a1 as cT,n as nC,ag as zg,a2 as lT,E as nm,ap as sT}from'./main-
|
|
1
|
+
import {T,N as Nt,d as dw,R as Bl,q as PC,W as $l,o as oT,D as DE,i as iT,ab as C,U as Ue,C as Bu,aZ as ee,a1 as cT,n as nC,ag as zg,a2 as lT,E as nm,ap as sT}from'./main-KFKZO6SJ.js';var l=class e{#e=T(C);isLoaded=Ue(false);crashLog=Ue(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(Bu(()=>this.isLoaded.set(true))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null);}});}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};function P(e,t){e&1&&(Bl(0,"div",0),PC(1,"Loading ..."),$l());}function O(e,t){e&1&&(Bl(0,"div",0),PC(1,"No crash log found"),$l());}function S(e,t){if(e&1&&(Bl(0,"li"),PC(1),$l()),e&2){let n=t.$implicit;DE(),nm(n);}}function w(e,t){if(e&1&&(Bl(0,"div",2)(1,"code")(2,"ol",3),cT(3,S,2,1,"li",null,sT),$l()()()),e&2){let n=nC();zg("grid-column","1 / -1")("height","auto"),DE(3),lT(n.breakIntoLines(n.crashLog()));}}var m=class e{#e=T(l);logsLoading=Nt(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load();}breakIntoLines(t){return t?t.split(`
|
|
2
2
|
`):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=dw({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,d){n&1&&(Bl(0,"h3"),PC(1,"Crash log"),$l(),oT(2,P,2,0,"div",0)(3,O,2,0,"div",0)(4,w,5,4,"div",1)),n&2&&(DE(2),iT(d.logsLoading()?2:d.crashLog()==null||d.crashLog()?.length===0?3:4));},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c1 as e,aZ as ee,aj as l}from'./main-
|
|
1
|
+
import {c1 as e,aZ as ee,aj as l}from'./main-KFKZO6SJ.js';var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(e()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ee({token:n,factory:n.\u0275fac,providedIn:"root"})};function y(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o;}return e}}function F(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity();}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l$1=e.parent.get(n);if(!l$1)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l$1.value?.includes(r):l$1.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=l(l({},p),u);break}}}return o}}export{C,F,m,y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {T,ab as C,U as Ue,N as Nt,G as Ga,C as Bu,aZ as ee}from'./main-
|
|
1
|
+
import {T,ab as C,U as Ue,N as Nt,G as Ga,C as Bu,aZ as ee}from'./main-KFKZO6SJ.js';var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=T(C);#e=Ue([]);LOG_LEVELS=u;logLevel=Ue("Disabled");logLevelByLabel=Nt(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=Ue(null);backupIdFilter=Ue(null);id=Ue(0);logs=Nt(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=Ue(false);isPolling=Ue(false);pagination=Ue({offset:0,pagesize:100});logLevelEffect=Ga(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs();},3e3)):this.clearPolling();});setWhenFilter(e){this.whenFilter.set(e);}setBackupIdFilter(e){this.backupIdFilter.set(e);}loadLogs(){this.logsLoading.set(true),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(Bu(()=>this.logsLoading.set(false))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()]);}});}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling();}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling();}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0;}static \u0275fac=function(i){return new(i||a)};static \u0275prov=ee({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v};
|