@duplicati/ngclient 0.0.234 → 0.0.235
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/sh.woff2 +0 -0
- package/chunk-29_4gGIi.js +2 -0
- package/{chunk-D5zSyubd.js → chunk-3YzyUT-a.js} +1 -1
- package/chunk-6-sszNfh.js +1 -0
- package/chunk-7T5O8Syb.js +1 -0
- package/{chunk-5kQsbzck.js → chunk-B61kkU_h.js} +1 -1
- package/chunk-B891gwjc.js +1 -0
- package/chunk-BDJqKfxm.js +1 -0
- package/chunk-BEUeHgR9.js +1 -0
- package/chunk-BEzhTDp8.js +2 -0
- package/{chunk-BnFO-7ok.js → chunk-BGuvkLC9.js} +1 -1
- package/{chunk-Dyq6iPbF.js → chunk-BJOhC2d8.js} +1 -1
- package/chunk-BOKNwzSl.js +2 -0
- package/chunk-BSCc2xDv.js +1 -0
- package/chunk-BWSg9cLt.js +2 -0
- package/chunk-BWvawawS.js +2 -0
- package/chunk-B_I_9Y7k.js +1 -0
- package/chunk-Bgd5lu61.js +1 -0
- package/chunk-BjqgOGb9.js +2 -0
- package/chunk-Bq_vr6Q3.js +2 -0
- package/{chunk-B-c3Zv6R.js → chunk-Brfc2m61.js} +1 -1
- package/{chunk-B0ETfgeR.js → chunk-Btvi2S15.js} +11 -11
- package/chunk-C0KXp4hd.js +1 -0
- package/chunk-C0XQD9NK.js +1 -0
- package/chunk-C1-31fA7.js +1 -0
- package/chunk-C185qUb-.js +1 -0
- package/{chunk-GKdOPH_4.js → chunk-C1py21yb.js} +2 -2
- package/chunk-C4Uv1C-T.js +1 -0
- package/{chunk-CTH9uShX.js → chunk-CFgDqLU0.js} +1 -1
- package/{chunk-FZcbbWYC.js → chunk-CGnjVnmu.js} +1 -1
- package/{chunk-Cv4o9u3S.js → chunk-CKUlUN3q.js} +1 -1
- package/chunk-CLlZiOaO.js +2 -0
- package/chunk-CQVPqpMp.js +2 -0
- package/chunk-CSrYlKTK.js +2 -0
- package/chunk-CdzKkYEw.js +2 -0
- package/chunk-Cj_yOpND.js +1 -0
- package/chunk-ClFp7JLZ.js +1 -0
- package/{chunk-DCsYP4vf.js → chunk-Cm7JSdTO.js} +1 -1
- package/{chunk-BaknLOqq.js → chunk-CnZx831x.js} +1 -1
- package/chunk-CsVpmA6t.js +1 -0
- package/chunk-Css7wqTG.js +2 -0
- package/chunk-CxbeRJcJ.js +1 -0
- package/chunk-CzoH_Agx.js +1 -0
- package/chunk-CzsiJ0k-.js +1 -0
- package/chunk-D04TnMUn.js +2 -0
- package/{chunk-pxcB56N0.js → chunk-D2P9ER0I.js} +1 -1
- package/{chunk-B-T54LAJ.js → chunk-D38QrkIM.js} +1 -1
- package/chunk-D4g_OF7M.js +1 -0
- package/chunk-D5V6OY_2.js +2 -0
- package/{chunk-DP2sLJDC.js → chunk-D6IQFx6m.js} +1 -1
- package/chunk-D6y9RCQD.js +1 -0
- package/chunk-D7UddV5F.js +1 -0
- package/chunk-D9jPw9Ov.js +1 -0
- package/chunk-DA7rrIf8.js +1 -0
- package/chunk-DB0aGcRM.js +1 -0
- package/{chunk-DqoYKCmi.js → chunk-DBkkb6OR.js} +3 -3
- package/chunk-DE8p9-HP.js +1 -0
- package/chunk-DFLxy15J.js +1 -0
- package/chunk-DHkdQ4u3.js +3 -0
- package/chunk-DKRWta24.js +2 -0
- package/chunk-DSeMtMg3.js +1 -0
- package/chunk-DWCofCiP.js +14 -0
- package/chunk-DXLQftDm.js +1 -0
- package/{chunk-BaNH2nfC.js → chunk-DYV1Pbu1.js} +1 -1
- package/chunk-DaXXLSfy.js +2 -0
- package/chunk-Dbq-qyNL.js +3 -0
- package/{chunk-xwdrpTfz.js → chunk-DkVHfoYw.js} +2 -2
- package/chunk-DmCJ7w-M.js +1 -0
- package/{chunk-UUMQmD5I.js → chunk-DneBfCBh.js} +2 -2
- package/{chunk-KNmRQWOM.js → chunk-DuRr4rDS.js} +1 -1
- package/chunk-Dv_fBX0w.js +1 -0
- package/chunk-IqMUABbN.js +1 -0
- package/chunk-Kq2ZFJSk.js +1 -0
- package/chunk-NAAMYA7J.js +1 -0
- package/chunk-NiMN4Rl6.js +1 -0
- package/chunk-OQ_HQ9EL.js +1 -0
- package/chunk-W1dL7dqQ.js +4 -0
- package/chunk-_OzpLe0L.js +1 -0
- package/chunk-ayE11Iz-.js +1 -0
- package/chunk-fDWfSg6Y.js +3 -0
- package/chunk-gId840Er.js +1 -0
- package/{chunk-BDhLEYas.js → chunk-iGzJokt-.js} +1 -1
- package/{chunk-BFquKzMb.js → chunk-iU19kwHx.js} +1 -1
- package/chunk-m8vMm7S6.js +1 -0
- package/chunk-xD8qjoz4.js +1 -0
- package/chunk-xI8Kkqgy.js +1 -0
- package/{chunk-0lYdrxte.js → chunk-zOY5leQB.js} +1 -1
- package/index.html +1 -1
- package/main-2ZYVV4C4.js +21 -0
- package/package.json +1 -1
- package/assets/dest-icons/sia_logo_dark.92db63f5.svg +0 -6
- package/chunk-1-oPQ4n-.js +0 -1
- package/chunk-5EFCeqK3.js +0 -3
- package/chunk-AHhgJqe4.js +0 -2
- package/chunk-B1dNb-QT.js +0 -1
- package/chunk-B8PnvglY.js +0 -2
- package/chunk-BAmgFjXY.js +0 -1
- package/chunk-BFVhQEGw.js +0 -1
- package/chunk-BGcVKmjp.js +0 -1
- package/chunk-BHrABvoK.js +0 -1
- package/chunk-BNG7N21y.js +0 -1
- package/chunk-BQapkAzp.js +0 -1
- package/chunk-BRqx-u9-.js +0 -2
- package/chunk-BaR3Dslz.js +0 -1
- package/chunk-Bg98dUtr.js +0 -2
- package/chunk-BiSIt2zb.js +0 -2
- package/chunk-BkLND74M.js +0 -1
- package/chunk-BqbJuWHd.js +0 -3
- package/chunk-C4zj812G.js +0 -1
- package/chunk-C5G4RPpS.js +0 -1
- package/chunk-CA-0mTsq.js +0 -1
- package/chunk-CAEYxmzQ.js +0 -1
- package/chunk-CGnsbLNG.js +0 -1
- package/chunk-CPjYiawK.js +0 -1
- package/chunk-CQHKuUqk.js +0 -2
- package/chunk-CSYDDxaa.js +0 -2
- package/chunk-CUNe6D-d.js +0 -2
- package/chunk-CUaDFQyH.js +0 -1
- package/chunk-CnyuuWJ3.js +0 -1
- package/chunk-CsgB8OpN.js +0 -1
- package/chunk-CspKioFm.js +0 -4
- package/chunk-CxOam2tf.js +0 -1
- package/chunk-CxUx2RFx.js +0 -1
- package/chunk-D0qGkLVr.js +0 -1
- package/chunk-D4S_1RMU.js +0 -1
- package/chunk-D6WUhpxO.js +0 -14
- package/chunk-D7C8xyJI.js +0 -1
- package/chunk-D9dEfxn4.js +0 -1
- package/chunk-DB1KeglF.js +0 -1
- package/chunk-DGO0_pkA.js +0 -2
- package/chunk-DKOaWS_j.js +0 -2
- package/chunk-DXh9g32e.js +0 -1
- package/chunk-DYfv4gJW.js +0 -1
- package/chunk-DZMTCfoN.js +0 -1
- package/chunk-DcU0yXkQ.js +0 -1
- package/chunk-Dg-uYwbp.js +0 -2
- package/chunk-DmwtL4h3.js +0 -2
- package/chunk-DnTA-m4k.js +0 -2
- package/chunk-Du0Hd0t6.js +0 -1
- package/chunk-DzYR8wiz.js +0 -2
- package/chunk-OIDsf_Aq.js +0 -1
- package/chunk-S-sgDIKw.js +0 -1
- package/chunk-UCY_7-Of.js +0 -1
- package/chunk-X3dwwJIr.js +0 -2
- package/chunk-_J1lTnCH.js +0 -1
- package/chunk-i6kMmbhY.js +0 -1
- package/chunk-oobMnyEm.js +0 -3
- package/chunk-sgM_r5NM.js +0 -1
- package/chunk-umUQn7LQ.js +0 -1
- package/main-XKLDSNLY.js +0 -16
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {b,g,m}from'./chunk-6-sszNfh.js';import {l as le,q,Z}from'./chunk-Kq2ZFJSk.js';import {I}from'./chunk-zOY5leQB.js';import {l as le$1}from'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import {J}from'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import {d as d$1,L as Le,N as Ne,j as je,G,f as f$1,W as We,H as He,B as Be,R as Re,A,x as xe}from'./chunk-fDWfSg6Y.js';import {v as ve}from'./chunk-DuRr4rDS.js';import {N as Nt$2,m as m$1}from'./chunk-C1py21yb.js';import {x}from'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import {D}from'./chunk-CKUlUN3q.js';import {T,e as ee,ax as W,f,B as w1,G as Ge,N as Nt$1,Q as Qa$1,g as gw,v,a as N,u as ue,Z as Zi$1,w as Hg,o as oC,W as Wl,l as lT,F as Fg,d as Ig,j as jg,t as bD,z as vg,b as bE,c as uT,M as MD,s as sC,O as qg,R as hC,a6 as be,i as ET,H as HC,aR as zl,aS as Ql,n as lm,K as Kg,y as cm,ce as Vt,cf as Q,ad as sy,C as Zu,a_ as ee$1,ag as D1,E as E1,S as lC,al as dm,am as GC,ac as I1,aj as m$2,ak as l,p as qC,a1 as pT,a2 as hT,by as ve$1,cg as Ty,aI as pt,aW as cy,az as Yu,b1 as Bs$1,b2 as iy,ch as id,au as h,bS as ei,_ as _t,ab as J$1,bD as wy,h as aC,P as Pd,L as Ld,bm as oE,Y as uC,a3 as XC,af as eo$1,ca as C1,aL as ci,bO as re,bN as B,b4 as cg,aF as JC,cb as Wg,ci as mo$1,c2 as j,cj as xs$1,ck as As$1,cl as S,ap as zC,as as Yp,aE as yg,aq as dT,c0 as db,aZ as x$1,cm as Sr$1,J as im,b_ as gC,b0 as eb,bn as N$1,a4 as fT,aa as Yl,x as xC,av as Vg,aw as iC,ah as Yg,cn as nb,bT as wg,aH as tb,bp as NC,aD as sm}from'./main-2ZYVV4C4.js';import {f as f$2}from'./chunk-CFgDqLU0.js';import {d}from'./chunk-BGuvkLC9.js';import {F as Fe,A as Ae}from'./chunk-DBkkb6OR.js';import {j as jn,m as me,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn$1,L,B as Bn,J as Jt,l as ln$1,f as ft,e as en,y as yt$1,b as m$3,D as D$1}from'./chunk-iGzJokt-.js';import {a as at}from'./chunk-DneBfCBh.js';import {v as v$1}from'./chunk-Bq_vr6Q3.js';import {R}from'./chunk-D9jPw9Ov.js';import'./chunk-CnZx831x.js';import {L as L$1,$,F}from'./chunk-Cm7JSdTO.js';var tn=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 yt(i){if(Sr$1(i))return i();if(Array.isArray(i))return i.map(t=>yt(t));if(typeof i=="object"&&i!==null){let t={};for(let e in i)i.hasOwnProperty(e)&&(t[e]=yt(i[e]));return t}return i}var xi=i=>i;function hi(i,t){let e=mo$1(i,xi,t?.equal),n=e[j],o=e;return o.set=a=>{let _=e();return xs$1(n,a),()=>{xs$1(n,_);}},o.update=a=>{let _=e();return As$1(n,a),()=>{xs$1(n,_);}},e}var mt=class i{#e=T(Q);isSaving=Ge(false);resourceDestinations=$({stream:()=>sy(()=>this.#e.getApiV2ConnectionStrings())});destinations=hi(()=>{let t=this.resourceDestinations.value()?.Data;return t||[]});save(t,e){return this.isSaving.set(true),e.Description="",sy(()=>t==="new"?this.#e.postApiV2ConnectionStrings({body:e}):this.#e.putApiV2ConnectionStringById({path:{id:t.ID},body:e})).pipe(Zu(()=>{this.isSaving.set(false);}))}getById(t){return sy(()=>this.#e.getApiV2ConnectionStringById({path:{id:t}}))}delete(t){return sy(()=>this.#e.deleteApiV2ConnectionStringById({path:{id:t}}))}reload(){this.resourceDestinations.reload();}updateBackups(t,e){return sy(()=>this.#e.postApiV2ConnectionStringByIdUpdateBackups({path:{id:t},body:{BackupIDs:e}}))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};var bi=new Set(["true","1","yes","on"]),vi=i=>(i??"").replace(/^--/,"").toLowerCase(),yi=i=>{let t=(i??[]).map(n=>({name:vi(n.Name),value:n.Value??""})),e=n=>t.find(o=>o.name===n)?.value??"";return {encryptionDisabled:bi.has(e("no-encryption").trim().toLowerCase()),encryptionModule:e("encryption-module"),passphrase:e("passphrase")}};var wi=["daysRef"];function Gi(i,t){if(i&1&&HC(0),i&2){let e=aC();Yl(" - ",e.getMonthName(e.getLastVisibleMonth())," ");}}function $i(i,t){if(i&1&&(Zi$1(0,"div"),HC(1),Wl()),i&2){let e=t.$implicit;bE(),im(e);}}function Ui(i,t){if(i&1){let e=ET();Zi$1(0,"button",9,1),Hg("keydown",function(o){let a=Pd(e).$implicit,_=aC(2);return Ld(_.onKeydown(o,a))})("click",function(){let o=Pd(e).$implicit,a=gC(1),_=aC(2);return Ld(_.setDate(o,a))}),HC(2),Wl();}if(i&2){let e=t.$implicit,n=aC().$implicit,o=aC();xC(o.isDateSelected(e)),Kg("out-of-scope",!o.isCurrentMonth(e,n)),yg("aria-label",o.getAriaLabel(e))("tabindex",o.getTabIndex(e))("aria-selected",o.isDateSelectedBool(e)),bE(2),Yl(" ",e.getDate()," ");}}function ki(i,t){if(i&1&&(Zi$1(0,"article",7),Ig(1,"div",10),Wl()),i&2){let e=aC(2);bE(),NC(e.selectedDateStylePosition());}}function Bi(i,t){if(i&1&&(Zi$1(0,"div",5)(1,"nav",6),pT(2,$i,2,1,"div",null,dT),Wl(),Zi$1(4,"div",7,0),pT(6,Ui,3,8,"button",8,dT),lT(8,ki,2,2,"article",7),Wl()()),i&2){let e=t.$implicit,n=aC();bE(2),hT(n.weekdays()),bE(4),hT(n.getMonthDates(e)),bE(2),uT(n.asRange()?-1:8);}}var Vi=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","textSuffix",""]],[["","suffix",""]]],Ki=["label","[prefix]","[textPrefix]","input","[textSuffix]","[suffix]"],Ji=["ngProjectAs","label",5,["label"]],Xi=["ngProjectAs","[prefix]",5,["","prefix",""]],zi=["ngProjectAs","[textPrefix]",5,["","textPrefix",""]],Hi=["ngProjectAs","[textSuffix]",5,["","textSuffix",""]],Wi=["ngProjectAs","[suffix]",5,["","suffix",""]];function ji(i,t){if(i&1&&(Zi$1(0,"div",3),HC(1),Wl()),i&2){let e=aC();bE(),Yl(" ",e._maskedDate()," ");}}function qi(i,t){if(i&1){let e=ET();Zi$1(0,"sh-datepicker",7),Hg("dateChange",function(o){Pd(e);let a=aC();return Ld(a.onDateChange(o))})("tabbedOut",function(){Pd(e);let o=aC();return Ld(o.isOpen.set(false))}),Wl();}if(i&2){let e=aC();xC(e.currentClass()),vg("date",e.internalDate());}}function Yi(i,t){}var Qi=`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 hn=(()=>{class i{constructor(){this.#e=new Date(new Date().setHours(0,0,0,0)),this.date=D1(null),this.endDate=D1(null),this.asRange=E1(false),this.activeRangeSelection=E1(null),this.monthsToShow=E1(1),this.disabled=E1(false),this.tabbedOut=I1(),this.startOfWeek=E1(1),this.weekdayLabels=E1(["Su","Mo","Tu","We","Th","Fr","Sa"]),this.daysRef=w1("daysRef"),this.currentDate=Ge(this.date()??this.#e),this.#t=T(N$1),this.prevMonthShortcut=Nt$1(()=>{let e="datepicker.prev-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.nextMonthShortcut=Nt$1(()=>{let e="datepicker.next-month",n=this.#t.getShortcut(e);return n?this.#t.getDisplayShortcut(e)||n:null}),this.monthOffsets=Nt$1(()=>Array.from({length:this.monthsToShow()},(e,n)=>n)),this.selectedDateStylePosition=Ge(null),this.weekdays=Nt$1(()=>{let e=this.startOfWeek(),n=this.weekdayLabels();return n.slice(e).concat(n.slice(0,e))}),this.currentClasses=re(),this.someEffect=Qa$1(()=>{this.currentClasses();this.#o();}),this.#n=Qa$1(()=>{this.monthsToShow()>1||this.#i();}),this.focusedDate=Ge(null),this.#a=T(eo$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$2(l({},n),{opacity:"0"}):null);this.setSelectedDateStylePosition(e);});}#r(e,n){let o=e.getFullYear(),a=e.getMonth(),_=new Date(o,a,1).getDay(),c=new Date(o,a+1,0).getDate(),u=[],S=_-n;S<0&&(S+=7);let D=new Date(o,a,0).getDate();for(let R=S-1;R>=0;R--)u.push(new Date(o,a-1,D-R,0,0,0,0));for(let R=1;R<=c;R++)u.push(new Date(o,a,R,0,0,0,0));let F=1;for(;u.length%7!==0;)u.push(new Date(o,a+1,F++,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,_)=>{let c=0,u=0,S=0,D=0;return _&&((typeof _=="string"||typeof _=="number")&&(_=new Date(_)),_ instanceof Date&&!isNaN(_.getTime())&&(c=_.getHours(),u=_.getMinutes(),S=_.getSeconds(),D=_.getMilliseconds())),new Date(a.getFullYear(),a.getMonth(),a.getDate(),c,u,S,D)};if(!this.asRange())this.date.set(o(e,this.date())),this.endDate.set(null);else {let a=this.date(),_=this.endDate(),c=this.activeRangeSelection();if(c==="start"){let u=o(e,a);this.date.set(u),_&&u>_&&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,_);this.endDate.set(u);}else if(a)if(_){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,_);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=F=>new Date(F.getFullYear(),F.getMonth(),F.getDate(),0,0,0,0),_=F=>new Date(F.getFullYear(),F.getMonth(),F.getDate(),23,59,59,999),c=a(e),u=a(n),S=o?_(o):null,D=[];if(this.asRange())if(S===null)c.getTime()===u.getTime()&&D.push("sel first last");else {if(c.getTime()===u.getTime()&&D.push("first"),c.getTime()===a(S).getTime()&&D.push("last"),c>=u&&c<=S){D.push("sel");let J=c.getDay(),H=this.startOfWeek();J===H&&D.push("week-start");let q=(H+6)%7;J===q&&D.push("week-end");}let F=new Date(c);F.setDate(c.getDate()+1),new Date(c).setDate(c.getDate()-1);let G=c.getDate()===1,I=F.getMonth()!==c.getMonth();G&&D.push("month-start"),I&&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 _=this.#a.nativeElement.querySelectorAll("button");if(_){let c=this.getAriaLabel(o),u=null;for(let S=0;S<_.length&&!(_[S].getAttribute("aria-label")===c&&(u=_[S],!_[S].classList.contains("out-of-scope")));S++);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=gw({type:i,selectors:[["sh-datepicker"]],viewQuery:function(n,o){n&1&&qg(o.daysRef,wi,5),n&2&&hC();},hostVars:6,hostBindings:function(n,o){n&1&&Hg("focusout",function(_){return o.onFocusOut(_)}),n&2&&(xC("columns-"+o.monthsToShow()),Kg("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&&(Zi$1(0,"header")(1,"button",2),Hg("click",function(){return o.previousMonth()}),Zi$1(2,"sh-icon"),HC(3,"caret-left"),Wl()(),Zi$1(4,"div",3),HC(5),lT(6,Gi,1,1),HC(7),Wl(),Zi$1(8,"button",2),Hg("click",function(){return o.nextMonth()}),Zi$1(9,"sh-icon"),HC(10,"caret-right"),Wl()()(),Zi$1(11,"section",4),pT(12,Bi,9,1,"div",5,fT),Wl()),n&2&&(bE(),yg("aria-keyshortcuts",o.prevMonthShortcut()),bE(4),Yl(" ",o.getMonthName(o.currentDate())," "),bE(),uT(o.monthsToShow()>1?6:-1),bE(),Yl(" ",o.getFullYear(o.currentDate())," "),bE(),yg("aria-keyshortcuts",o.nextMonthShortcut()),bE(4),hT(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})(),Ni=(()=>{class i{constructor(){this.#e=T(eo$1),this.ngControl=C1(m$3),this.#t=T(ci),this.#n=Ge(null),this.masking=E1("mediumDate"),this.closed=I1(),this._maskedDate=Nt$1(()=>{let e=this.internalDate(),n=this.masking();return n?e?this.#t.transform(e,n):null:e}),this.internalDate=Ge(null),this.isOpen=D1(false),this.currentClass=re(),this.#i=B("#input-wrap input"),this.datepicker=w1(hn),this.#o=Qa$1(()=>{this.isOpen()&&setTimeout(()=>{this.datepicker()?.focusActiveDate();},50);}),this.#r=Qa$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 _=new Date(a);if(isNaN(_.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;_=new Date(u),_.setHours(parseInt(c[1],10),parseInt(c[2],10),c[3]?parseInt(c[3],10):0,0);}}isNaN(_.getTime())||this.internalDate.set(_);}),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=gw({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(n,o,a){n&1&&Wg(a,o.ngControl,m$3,5),n&2&&hC();},viewQuery:function(n,o){n&1&&qg(o.datepicker,hn,5),n&2&&hC();},hostBindings:function(n,o){n&1&&Hg("focusout",function(_){return o.onFocusOut(_)});},inputs:{masking:[1,"masking"],isOpen:[1,"isOpen"]},outputs:{closed:"closed",isOpen:"isOpenChange"},features:[JC([ci])],ngContentSelectors:Ki,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=ET();lC(Vi),Zi$1(0,"sh-form-field-popover",1),Hg("closed",function(){return o.close()}),lm("isOpenChange",function(c){return Pd(a),qC(o.isOpen,c)||(o.isOpen=c),Ld(c)}),uC(1,0,Ji),uC(2,1,Xi),uC(3,2,zi),Zi$1(4,"div",2),lT(5,ji,2,1,"div",3),uC(6,3),Wl(),uC(7,4,Hi),uC(8,5,Wi),Zi$1(9,"sh-icon",4),HC(10,"calendar"),Wl(),Zi$1(11,"div",5),lT(12,qi,1,3,"sh-datepicker",6),Wl()(),cg(13,Yi,0,0,"ng-template",null,0,db);}n&2&&(cm("isOpen",o.isOpen),bE(5),uT(o.masking()?5:-1),bE(7),uT(o.isOpen()?12:-1));},dependencies:[hn,Ae,N],styles:[Qi],encapsulation:2});}}return i})();var Zi=["mon","tue","wed","thu","fri","sat","sun"],eo={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:0};function Fi(i,t){let e=Zi.filter(n=>t[n]).map(n=>i().day(eo[n]).format("dddd"));return e.length===7?$localize`All days`:e.length===0?$localize`No days selected`:new Intl.ListFormat(i.locale(),{style:"long",type:"conjunction"}).format(e)}function to(i,t){if(i&1&&(Zi$1(0,"span"),oC(1,13),Wl()),i&2){aC(2);let e=zC(6);bE(),Vg(e.repeatValue)(e.repeatValue),iC(1);}}function no(i,t){if(i&1&&(Zi$1(0,"span"),oC(1,14),Wl()),i&2){aC(2);let e=zC(6);bE(),Vg(e.repeatValue)(e.repeatValue),iC(1);}}function io(i,t){if(i&1&&(Zi$1(0,"span"),oC(1,15),Wl()),i&2){aC(2);let e=zC(6);bE(),Vg(e.repeatValue)(e.repeatValue),iC(1);}}function oo(i,t){if(i&1&&(Zi$1(0,"span"),oC(1,16),Wl()),i&2){aC(2);let e=zC(6);bE(),Vg(e.repeatValue)(e.repeatValue),iC(1);}}function ao(i,t){if(i&1&&(Zi$1(0,"span"),oC(1,17),Wl()),i&2){aC(2);let e=zC(6);bE(),Vg(e.repeatValue)(e.repeatValue),iC(1);}}function ro(i,t){if(i&1&&(Zi$1(0,"span"),oC(1,18),Wl()),i&2){aC(2);let e=zC(6);bE(),Vg(e.repeatValue)(e.repeatValue),iC(1);}}function so(i,t){if(i&1&&(Zi$1(0,"span"),oC(1,19),Wl()),i&2){aC(2);let e=zC(6);bE(),Vg(e.repeatValue)(e.repeatValue),iC(1);}}function lo(i,t){if(i&1&&(Zi$1(0,"dl")(1,"div")(2,"dt"),oC(3,8),Wl(),Zi$1(4,"dd"),oC(5,9),Wl()(),Zi$1(6,"div")(7,"dt"),oC(8,10),Wl(),Zi$1(9,"dd"),lT(10,to,2,2,"span")(11,no,2,2,"span")(12,io,2,2,"span")(13,oo,2,2,"span")(14,ao,2,2,"span")(15,ro,2,2,"span")(16,so,2,2,"span"),Wl()(),Zi$1(17,"div")(18,"dt"),oC(19,11),Wl(),Zi$1(20,"dd"),HC(21),Wl()()(),Zi$1(22,"p"),oC(23,12),Wl()),i&2){aC();let e=zC(6);bE(5),Vg(e.date)(e.time),iC(5),bE(5),uT(e.repeatUnit==="s"?10:e.repeatUnit==="m"?11:e.repeatUnit==="h"?12:e.repeatUnit==="W"?13:e.repeatUnit==="M"?14:e.repeatUnit==="Y"?15:16),bE(11),im(e.allowedDays);}}function _o(i,t){i&1&&(Zi$1(0,"p"),oC(1,20),Wl());}function co(i,t){if(i&1){let e=ET();Zi$1(0,"div",41)(1,"sh-form-field")(2,"label",42),oC(3,21),Wl(),Zi$1(4,"input",43,0),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.nextTime.time,o)||(a.scheduleFields.nextTime.time=o),Ld(o)}),Wl(),bD(),Zi$1(6,"sh-icon",44),HC(7,"clock"),Wl()(),Zi$1(8,"sh-datepicker-input",45)(9,"label",46),HC(10,"\xA0"),Wl(),Zi$1(11,"input",47,1),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.nextTime.date,o)||(a.scheduleFields.nextTime.date=o),Ld(o)}),Wl(),bD(),Zi$1(13,"sh-icon",44),HC(14,"calendar"),Wl()()(),Zi$1(15,"div",41)(16,"sh-form-field")(17,"label",48),oC(18,22),Wl(),Zi$1(19,"input",49),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.repeatValue,o)||(a.scheduleFields.runAgain.repeatValue=o),Ld(o)}),Wl(),bD(),Wl(),Zi$1(20,"sh-select",50)(21,"input",51),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.repeatUnit,o)||(a.scheduleFields.runAgain.repeatUnit=o),Ld(o)}),Wl(),bD(),Wl()(),Zi$1(22,"sh-toggle-card",52),zl(23,53),oC(24,23),Ql(),Zi$1(25,"div",54)(26,"sh-toggle",38),Fg(27,24),Zi$1(28,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.allowedDays.mon,o)||(a.scheduleFields.runAgain.allowedDays.mon=o),Ld(o)}),Wl(),bD(),jg(),Wl(),Zi$1(29,"sh-toggle",38),Fg(30,25),Zi$1(31,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.allowedDays.tue,o)||(a.scheduleFields.runAgain.allowedDays.tue=o),Ld(o)}),Wl(),bD(),jg(),Wl(),Zi$1(32,"sh-toggle",38),Fg(33,26),Zi$1(34,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.allowedDays.wed,o)||(a.scheduleFields.runAgain.allowedDays.wed=o),Ld(o)}),Wl(),bD(),jg(),Wl(),Zi$1(35,"sh-toggle",38),Fg(36,27),Zi$1(37,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.allowedDays.thu,o)||(a.scheduleFields.runAgain.allowedDays.thu=o),Ld(o)}),Wl(),bD(),jg(),Wl(),Zi$1(38,"sh-toggle",38),Fg(39,28),Zi$1(40,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.allowedDays.fri,o)||(a.scheduleFields.runAgain.allowedDays.fri=o),Ld(o)}),Wl(),bD(),jg(),Wl(),Zi$1(41,"sh-toggle",38),Fg(42,29),Zi$1(43,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.allowedDays.sat,o)||(a.scheduleFields.runAgain.allowedDays.sat=o),Ld(o)}),Wl(),bD(),jg(),Wl(),Zi$1(44,"sh-toggle",38),Fg(45,30),Zi$1(46,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC(2);return qC(a.scheduleFields.runAgain.allowedDays.sun,o)||(a.scheduleFields.runAgain.allowedDays.sun=o),Ld(o)}),Wl(),bD(),jg(),Wl()()();}if(i&2){let e=aC(2);bE(4),cm("ngModel",e.scheduleFields.nextTime.time),MD(),bE(7),cm("ngModel",e.scheduleFields.nextTime.date),MD(),bE(8),cm("ngModel",e.scheduleFields.runAgain.repeatValue),MD(),bE(),vg("options",e.unitOptions)("isClearable",false),bE(),cm("ngModel",e.scheduleFields.runAgain.repeatUnit),MD(),bE(),vg("disableToggle",true),bE(6),cm("ngModel",e.scheduleFields.runAgain.allowedDays.mon),MD(),bE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.tue),MD(),bE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.wed),MD(),bE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.thu),MD(),bE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.fri),MD(),bE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.sat),MD(),bE(3),cm("ngModel",e.scheduleFields.runAgain.allowedDays.sun),MD();}}function uo(i,t){if(i&1){let e=ET();Zi$1(0,"div",37)(1,"sh-toggle",38),Fg(2,5),Zi$1(3,"input",39),lm("ngModelChange",function(o){Pd(e);let a=aC();return qC(a.scheduleFields.autoRun,o)||(a.scheduleFields.autoRun=o),Ld(o)}),Wl(),bD(),jg(),Wl(),Zi$1(4,"p"),oC(5,6),Wl()(),dm(6),Zi$1(7,"section",40)(8,"h4"),oC(9,7),Wl(),lT(10,lo,24,4)(11,_o,2,0,"p"),Wl(),lT(12,co,47,14);}if(i&2){let e=aC();bE(3),cm("ngModel",e.scheduleFields.autoRun),MD(),bE(3);let n=GC(e.scheduleSummary());bE(4),uT(n.autoRun?10:11),bE(2),uT(e.scheduleFields.autoRun()?12:-1);}}var po=[{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`}],nn=[{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:Co().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 mo(i){if(typeof i=="string"){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(i);if(e)return {year:parseInt(e[1]),month:parseInt(e[2])-1,day:parseInt(e[3])}}let t=i instanceof Date?i:new Date(i);return {year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}}function Di(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(R=>R!==null),{year:e,month:n,day:o}=mo(i.nextTime.date),a=i.nextTime.time.split(":"),_=parseInt(a[0]??"0"),c=parseInt(a[1]??"0"),u=parseInt(a[2]??"0"),S=new Date(e,n,o,_,c,u,0),D=i.runAgain.repeatValue,F=i.runAgain.repeatUnit;return {Time:S.toISOString(),Repeat:`${D}${F}`,AllowedDays:t}}function Co(){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 Nn=()=>({autoRun:Ge(true),nextTime:{time:Ge("13:00"),date:Ge(new Date().toISOString().split("T")[0])},runAgain:{repeatValue:Ge(1),repeatUnit:Ge("D"),allowedDays:{mon:Ge(true),tue:Ge(true),wed:Ge(true),thu:Ge(true),fri:Ge(true),sat:Ge(true),sun:Ge(true)}}}),yn=class i{#e=T(Ke);#t=T(ee);#n=T(W);#i=T(Vt);unitOptions=po;scheduleFields=this.#e.scheduleFields;scheduleType=this.#e.scheduleType;scheduleOptions=nn;scheduleSummary=Nt$1(()=>{if(!this.scheduleFields.autoRun())return {autoRun:false};let t=this.scheduleFields.runAgain.allowedDays;return {autoRun:true,date:this.scheduleFields.nextTime.date(),time:this.scheduleFields.nextTime.time(),repeatValue:this.scheduleFields.runAgain.repeatValue(),repeatUnit:this.scheduleFields.runAgain.repeatUnit(),allowedDays:Fi(this.#i,{mon:t.mon(),tue:t.tue(),wed:t.wed(),thu:t.thu(),fri:t.fri(),sat:t.sat(),sun:t.sun()})}});updateScheduleType(t){let e=nn.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(["destination"],{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=gw({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 _;_=$localize`If a date was missed, the job will run as soon as possible.`;let c;c=$localize`Schedule summary`;let u;u=$localize`First run`;let S;S=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: at ${"\uFFFD1\uFFFD"}:INTERPOLATION_1:`;let D;D=$localize`Repeats`;let F;F=$localize`Allowed days`;let R;R=$localize`The first run sets the anchor for the recurring schedule.`;let G;G=$localize`{VAR_PLURAL, plural, =1 {Every second} other {Every {INTERPOLATION} seconds}}`,G=sC(G,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let I;I=$localize` ${G}:ICU@@5419491236737079104: `;let J;J=$localize`{VAR_PLURAL, plural, =1 {Every minute} other {Every {INTERPOLATION} minutes}}`,J=sC(J,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let H;H=$localize` ${J}:ICU@@9181525891437455640: `;let q;q=$localize`{VAR_PLURAL, plural, =1 {Every hour} other {Every {INTERPOLATION} hours}}`,q=sC(q,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Z;Z=$localize` ${q}:ICU@@1340843328390311686: `;let re;re=$localize`{VAR_PLURAL, plural, =1 {Every week} other {Every {INTERPOLATION} weeks}}`,re=sC(re,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let z;z=$localize` ${re}:ICU@@7052524268295174745: `;let ue;ue=$localize`{VAR_PLURAL, plural, =1 {Every month} other {Every {INTERPOLATION} months}}`,ue=sC(ue,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ee;Ee=$localize` ${ue}:ICU@@2595475742100737159: `;let B;B=$localize`{VAR_PLURAL, plural, =1 {Every year} other {Every {INTERPOLATION} years}}`,B=sC(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let We;We=$localize` ${B}:ICU@@1400112360174321415: `;let ke;ke=$localize`{VAR_PLURAL, plural, =1 {Every day} other {Every {INTERPOLATION} days}}`,ke=sC(ke,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Y;Y=$localize` ${ke}:ICU@@1295786187490408294: `;let Et;Et=$localize`Backups will not run automatically.`;let ft;ft=$localize`Next time`;let Q;Q=$localize`Run again every`;let In;In=$localize`Allowed days`;let Pn;Pn=$localize` Monday ${"\uFFFD#28\uFFFD\uFFFD/#28\uFFFD"}:TAG_INPUT:`;let Mn;Mn=$localize` Tuesday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Rn;Rn=$localize` Wednesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let Ln;Ln=$localize` Thursday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let xn;xn=$localize` Friday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let bn;bn=$localize` Saturday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let vn;return vn=$localize` Sunday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],e,n,o,a,_,c,u,S,D,F,R,I,H,Z,z,Ee,We,Y,Et,ft,Q,In,Pn,Mn,Rn,Ln,xn,bn,vn,[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"],["aria-live","polite",1,"schedule-summary"],[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&&(Zi$1(0,"h3",31),oC(1,2),Wl(),Zi$1(2,"sh-select",32)(3,"input",33),Hg("ngModelChange",function(a){return n.updateScheduleType(a)}),Wl(),bD(),Wl(),lT(4,uo,13,4),Zi$1(5,"div",34)(6,"button",35),Hg("click",function(){return n.goBack()}),Fg(7,3),Ig(8,"sh-icon"),jg(),Wl(),Zi$1(9,"button",36),Hg("click",function(){return n.next()}),Fg(10,4),Ig(11,"sh-icon"),jg(),Wl()()),e&2&&(bE(2),vg("isClearable",false)("options",n.scheduleOptions),bE(),vg("ngModel",n.scheduleType()),MD(),bE(),uT(n.scheduleType()==="custom"?4:-1));},dependencies:[Bn,Ze,en,yt$1,Rn,Jt,Fe,J,N,v,Nt$2,I,Ni],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}.schedule-summary[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1rem;border:.0625rem solid var(--base-4);border-radius:.5rem;background:var(--base-1)}.schedule-summary[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .schedule-summary[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .schedule-summary[_ngcontent-%COMP%] dl[_ngcontent-%COMP%], .schedule-summary[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.schedule-summary[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;gap:.5rem}.schedule-summary[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(6.25rem,1fr) 2fr;gap:.75rem}.schedule-summary[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--base-8)}.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 go=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],To=["[title]","[description]","[action]","*"];function So(i,t){i&1&&HC(0,"Title");}function Eo(i,t){i&1&&(Zi$1(0,"sh-icon"),HC(1,"caret-down"),Wl());}var rt=class i{isActive=D1(false);disableToggle=E1(false);ngOnInit(){this.disableToggle()&&this.isActive.set(true);}toggle(){this.isActive.set(!this.isActive());}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(e,n){e&2&&Kg("active",n.isActive());},inputs:{isActive:[1,"isActive"],disableToggle:[1,"disableToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:To,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(e,n){e&1&&(lC(go),Zi$1(0,"header")(1,"div",0)(2,"h3",1),Hg("click",function(){return n.disableToggle()||n.toggle()}),uC(3,0,null,So,1,0),lT(5,Eo,2,0,"sh-icon"),Wl(),uC(6,1),Wl(),Zi$1(7,"div",2),uC(8,2),Wl()(),Zi$1(9,"div",3),uC(10,3),Wl()),e&2&&(bE(5),uT(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 fo=["textInput"];function ho(i,t){if(i&1){let e=ET();Zi$1(0,"sh-select",3)(1,"input",7),lm("ngModelChange",function(o){Pd(e);let a=aC();return qC(a.internalPath,o)||(a.internalPath=o),Ld(o)}),Hg("ngModelChange",function(){Pd(e);let o=aC();return Ld(o.updateFilter())}),Wl(),bD(),Wl();}if(i&2){let e=aC();vg("options",e.fileGroupOptions())("isClearable",false)("selectMultiple",true),bE(),cm("ngModel",e.internalPath),MD();}}function yo(i,t){if(i&1&&(Zi$1(0,"div",8),HC(1),Wl()),i&2){let e=aC(2);bE(),im(e.currentExpressionOption()?.startsWith);}}function No(i,t){if(i&1&&(Zi$1(0,"div",9),HC(1),Wl()),i&2){let e=aC(2);bE(),im(e.currentExpressionOption()?.endsWith);}}function Fo(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field",4)(1,"input",7,0),lm("ngModelChange",function(o){Pd(e);let a=aC();return qC(a.internalPath,o)||(a.internalPath=o),Ld(o)}),Hg("ngModelChange",function(){Pd(e);let o=aC();return Ld(o.updateFilter())}),Wl(),bD(),lT(3,yo,2,1,"div",8),lT(4,No,2,1,"div",9),Wl();}if(i&2){let e=aC();bE(),cm("ngModel",e.internalPath),MD(),bE(2),uT(e.currentExpressionOption()?.startsWith?.length?3:-1),bE(),uT(e.currentExpressionOption()?.endsWith?.length?4:-1);}}var Do=[{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"}],Oo=[{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"}],Oi=i=>i==="Windows"?"\\":"/",Ai=(i,t)=>{let e=i;for(;e.endsWith(t)&&e!==t&&!/^[A-Za-z]:\\$/.test(e);)e=e.slice(0,-1);return e},Ao=(i,t)=>{let e=i.slice(1),n=i.startsWith("-")?"-":"+",o=Oi(t),a=t==="Windows";return e.startsWith("%")&&e.endsWith(o)||a&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?{type:`${n}Folder`,expression:Ai(e,o)}:e.startsWith("*")&&e.endsWith(`*${o}`)?{type:`${n}FolderName`,expression:e.slice(1,-2)}:e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?{type:`${n}FileName`,expression:e.slice(3,-7)}:e.startsWith("{")&&e.endsWith("}")?{type:`${n}FileGroup`,expression:e.slice(1,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:`${n}Regex`,expression:e.slice(1,-1)}:e.startsWith("*.")?{type:`${n}Extension`,expression:e.slice(2)}:{type:`${n}Expression`,expression:e}},Io=(i,t,e,n="",o="")=>{let a=i.slice(0,1);if(i.endsWith("Folder")){let _=Oi(e),c=Ai(t,_);return `${a}${c}${c.endsWith(_)?"":_}`}return `${a}${n}${t}${o}`},on=class i{#e=T(ve$1);path=E1.required();osType=E1();isNew=E1(false);pathChange=I1();remove=I1();internalPath=Ge("");pathType=Ge("-Expression");textInput=w1("textInput");currentExpressionOption=Nt$1(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=Ge(Do);expressionOptions=Nt$1(()=>{let e=this.osType()==="Windows"?"\\":"/";return Oo.map(n=>n.value==="-Folder"||n.value==="+Folder"?m$2(l({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?m$2(l({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?m$2(l({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?m$2(l({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?m$2(l({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?m$2(l({},n),{startsWith:"*.",endsWith:""}):m$2(l({},n),{startsWith:"",endsWith:""}))});pathEffect=Qa$1(()=>{let t=this.path(),e=Ao(t,this.osType());this.pathType.set(e.type),this.internalPath.set(e.expression),this.isNew()&&oE(()=>{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=""),e&&this.pathChange.emit(Io(e.value,t,this.osType(),e.startsWith,e.endsWith)));}removeFilter(){this.remove.emit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-new-filter"]],viewQuery:function(e,n){e&1&&qg(n.textInput,fo,5),e&2&&hC();},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&&(Zi$1(0,"sh-select",1)(1,"input",2),lm("ngModelChange",function(a){return qC(n.pathType,a)||(n.pathType=a),a}),Hg("ngModelChange",function(){return n.updateFilter()}),Wl(),bD(),Wl(),lT(2,ho,2,4,"sh-select",3)(3,Fo,5,3,"sh-form-field",4),Zi$1(4,"div",5),Hg("click",function(){return n.removeFilter()}),Zi$1(5,"sh-icon",6),HC(6,"x-circle"),Wl()()),e&2&&(vg("options",n.expressionOptions())("isClearable",false),bE(),cm("ngModel",n.pathType),MD(),bE(),uT(n.currentExpressionOption()?.value=="-FileGroup"||n.currentExpressionOption()?.value=="+FileGroup"?2:3));},dependencies:[Bn,Ze,Rn,Jt,Nt$2,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 Po=["filtersContainer"],Mo=()=>({updateOn:"blur",standalone:true});function Ro(i,t){i&1&&(Zi$1(0,"sh-icon",14),HC(1," warning "),Wl());}function Lo(i,t){if(i&1){let e=ET();lT(0,Ro,2,0,"sh-icon",14),Zi$1(1,"button",15),Hg("click",function(){Pd(e);let o=aC();return Ld(o.addFilter())}),Fg(2,3),Ig(3,"sh-icon"),jg(),Wl();}if(i&2){let e=aC();uT(e.wrongConfiguration()?0:-1);}}function xo(i,t){i&1&&oC(0,2,1);}function bo(i,t){i&1&&oC(0,2,2);}function vo(i,t){i&1&&(Zi$1(0,"p",12),oC(1,4),Wl());}function wo(i,t){i&1&&(Zi$1(0,"p",12),oC(1,5),Wl());}function Go(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field")(1,"textarea",16),lm("ngModelChange",function(o){Pd(e);let a=aC();return qC(a.bulkFilters,o)||(a.bulkFilters=o),Ld(o)}),Hg("ngModelChange",function(){Pd(e);let o=aC();return Ld(o.saveBulkFilterEdit())}),Wl(),bD(),Wl();}if(i&2){let e=aC();bE(),cm("ngModel",e.bulkFilters),vg("ngModelOptions",XC(2,Mo)),MD();}}function $o(i,t){if(i&1){let e=ET();Zi$1(0,"app-new-filter",18),Hg("pathChange",function(o){let a=Pd(e).$index,_=aC(2);return Ld(_.updateFilterAt(o,a))})("remove",function(){let o=Pd(e).$index,a=aC(2);return Ld(a.removeFilterAt(o))}),Wl();}if(i&2){let e=t.$implicit,n=t.$index,o=aC(2);vg("path",e)("osType",o.osType())("isNew",o.lastAddedIndex()===n);}}function Uo(i,t){if(i&1&&(Zi$1(0,"div",13,0),pT(2,$o,1,3,"app-new-filter",17,dT),Wl()),i&2){let e=aC();bE(2),hT(e.filters());}}var an=class i{#e=T(ve$1);filters=D1.required();osType=E1("");disableToggle=E1(true);bulkFilterEditMode=Ge(false);bulkFilters=Ge("");lastAddedIndex=Ge(null);filtersContainer=w1.required("filtersContainer");hasFilters=Nt$1(()=>this.filters().length>0);wrongConfiguration=Nt$1(()=>{let t=this.filters();if(t.length===0)return false;let e=t.findIndex(o=>o==="-*"||o==="-*.*"||o==="-**");if(e===-1)return false;let n=t.findIndex(o=>o.startsWith("+"));return n===-1||e<n});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,"-*.lock"]),this.lastAddedIndex.set(e),oE(()=>{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=gw({type:i,selectors:[["app-filters"]],viewQuery:function(e,n){e&1&&qg(n.filtersContainer,Po,5),e&2&&hC();},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`The filters will unconditionally exclude all files.`;let o;o=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON: Add filter `;let a;a=$localize`Customize your filters.`;let _;return _=$localize`Edit filters as text, one per line.`,[["filtersContainer",""],t,e,o,a,_,[3,"disableToggle"],["title",""],[1,"spacer"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],["description",""],[1,"filters"],["shTooltip",n,1,"warn"],["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&&(Zi$1(0,"app-toggle-card",6),zl(1,7),Zi$1(2,"span"),oC(3,1),Wl(),Ig(4,"div",8),lT(5,Lo,4,1),Zi$1(6,"sh-menu")(7,"button",9)(8,"sh-icon"),HC(9,"dots-three-vertical"),Wl()(),zl(10,10),Zi$1(11,"button",11),Hg("click",function(){return n.toggleBulkFilterEdit()}),Fg(12,2),Ig(13,"sh-icon"),lT(14,xo,1,0)(15,bo,1,0),jg(),Wl(),Ql(),Wl(),Ql(),lT(16,vo,2,0,"p",12)(17,wo,2,0,"p",12),lT(18,Go,2,3,"sh-form-field")(19,Uo,4,0,"div",13),Wl()),e&2&&(vg("disableToggle",n.disableToggle()),bE(5),uT(n.bulkFilterEditMode()?-1:5),bE(9),uT(n.bulkFilterEditMode()?14:15),bE(2),uT(n.bulkFilterEditMode()?17:16),bE(2),uT(n.bulkFilterEditMode()?18:19));},dependencies:[Bn,Ze,Rn,Jt,v,N,ve,Fe,at,rt,on],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}"]})};var Ii=i=>({items:i}),ko=(i,t)=>t.name;function Bo(i,t){i&1&&(Zi$1(0,"h3",9),oC(1,2),Wl());}function Vo(i,t){i&1&&(Zi$1(0,"h3",9),oC(1,3),Wl());}function Ko(i,t){i&1&&(Zi$1(0,"div",11)(1,"sh-icon"),HC(2,"spinner"),Wl(),Zi$1(3,"span"),oC(4,4),Wl()());}function Jo(i,t){if(i&1&&(Zi$1(0,"div",12)(1,"sh-icon"),HC(2,"warning"),Wl(),Zi$1(3,"span"),HC(4),Wl()()),i&2){let e=aC();bE(4),im(e.error());}}function Xo(i,t){if(i&1&&(Zi$1(0,"tr")(1,"td")(2,"div",18),HC(3),Wl(),Zi$1(4,"div",19),HC(5),Wl()(),Zi$1(6,"td",17)(7,"sh-icon"),HC(8),Wl()()()),i&2){let e=t.$implicit;bE(3),im(e.name),bE(2),im(e.description),bE(2),Kg("enabled",e.enabled)("disabled",!e.enabled),bE(),Yl(" ",e.enabled?"check-circle":"x-circle"," ");}}function zo(i,t){i&1&&(Zi$1(0,"tr")(1,"td",20),oC(2,7),Wl()());}function Ho(i,t){if(i&1&&(Zi$1(0,"table",16)(1,"thead")(2,"tr")(3,"th"),oC(4,5),Wl(),Zi$1(5,"th",17),oC(6,6),Wl()()(),Zi$1(7,"tbody"),pT(8,Xo,9,7,"tr",null,ko,false,zo,3,0,"tr"),Wl()()),i&2){let e=t.items;bE(8),hT(e);}}function Wo(i,t){i&1&&wg(0);}function jo(i,t){i&1&&wg(0);}function qo(i,t){if(i&1&&(Zi$1(0,"h4"),oC(1,8),Wl(),cg(2,jo,1,0,"ng-container",15)),i&2){aC();let e=gC(2),n=zC(0);bE(2),vg("ngTemplateOutlet",e)("ngTemplateOutletContext",eb(2,Ii,n));}}function Yo(i,t){if(i&1&&(dm(0),cg(1,Ho,11,1,"ng-template",null,0,db)(3,Wo,1,0,"ng-container",15),lT(4,qo,3,4)),i&2){let e=gC(2),n=aC(),o=n.visiblePermissions(),a=GC(n.additionalPermissions());bE(3),vg("ngTemplateOutlet",e)("ngTemplateOutletContext",eb(4,Ii,o)),bE(),uT(a.length>0?4:-1);}}var rn=class i{#e=T(d$1);data=E1();closed=I1();status=Ge("loading");error=Ge(null);permissions=Ge(null);visiblePermissions=Nt$1(()=>{let t=this.permissions();if(!t)return null;let e=this.data()?.mode??"backup";return t.filter(n=>e==="backup"?n.requiredForBackup:n.requiredForRestore)});additionalPermissions=Nt$1(()=>{let t=this.permissions();return t?t.filter(e=>!e.requiredForBackup&&!e.requiredForRestore):null});#t=Qa$1(()=>{let t=this.data(),e=t?.url,n=t?.sourcePrefix,o=t?.backupId??null,a=t?.module;if(!e||!n||!a){this.status.set("error"),this.error.set($localize`No URL provided`);return}this.status.set("loading"),(a==="googleworkspace"?this.#e.getGsuitePermissions(e,n,o):this.#e.getOffice365Permissions(e,n,o)).subscribe({next:c=>{this.permissions.set(c),this.status.set("success");},error:c=>{this.error.set(c?.message??$localize`Failed to load permissions`),this.status.set("error");}});});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-custom-remote-permissions-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:2,consts:()=>{let t;t=$localize`Close`;let e;e=$localize`Google Workspace permissions`;let n;n=$localize`Microsoft 365 permissions`;let o;o=$localize`Loading permissions…`;let a;a=$localize`Permission`;let _;_=$localize`Enabled`;let c;c=$localize`No permissions are required for this operation.`;let u;return u=$localize`Additional permissions`,[["permissionsTable",""],t,e,n,o,a,_,c,u,[1,"title-30"],["content",""],[1,"state","loading"],[1,"state","error"],["footer",""],["shButton","","type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"permissions"],[1,"center"],[1,"name"],[1,"description"],["colspan","2",1,"empty"]]},template:function(e,n){if(e&1&&(Zi$1(0,"header"),lT(1,Bo,2,0,"h3",9)(2,Vo,2,0,"h3",9),Wl(),Zi$1(3,"section",10),lT(4,Ko,5,0,"div",11)(5,Jo,5,1,"div",12)(6,Yo,5,6),Wl(),Zi$1(7,"footer",13)(8,"button",14),Hg("click",function(){return n.closed.emit()}),oC(9,1),Wl()()),e&2){let o;bE(),uT(n.data()?.module==="googleworkspace"?1:2),bE(3),uT((o=n.status())==="loading"?4:o==="error"?5:o==="success"?6:-1);}},dependencies:[ei,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}h4[_ngcontent-%COMP%]{margin:0}.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)}}.permissions[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.permissions[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .permissions[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.5rem .25rem;border-bottom:1px solid var(--color-border, #e0e0e0);text-align:left;vertical-align:middle}.permissions[_ngcontent-%COMP%] th.center[_ngcontent-%COMP%], .permissions[_ngcontent-%COMP%] td.center[_ngcontent-%COMP%]{text-align:center;width:1%;white-space:nowrap}.permissions[_ngcontent-%COMP%] th.empty[_ngcontent-%COMP%], .permissions[_ngcontent-%COMP%] td.empty[_ngcontent-%COMP%]{color:var(--color-text-secondary, #666)}.permissions[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{color:var(--color-text-secondary, #666);font-weight:600}.permissions[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:none}.permissions[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600}.permissions[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:var(--color-text-secondary, #666);font-size:.9em}.permissions[_ngcontent-%COMP%] .enabled[_ngcontent-%COMP%]{color:var(--color-success, #27ae60)}.permissions[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{color:var(--color-danger, #c0392b)}footer[_ngcontent-%COMP%]{z-index:1}"]})};function Qo(i,t){i&1&&(Zi$1(0,"div",24)(1,"sh-icon"),HC(2,"spinner"),Wl(),Zi$1(3,"span"),oC(4,2),Wl()());}function Zo(i,t){if(i&1&&(Zi$1(0,"div",25)(1,"sh-icon"),HC(2,"warning"),Wl(),Zi$1(3,"span"),HC(4),Wl()()),i&2){let e=aC();bE(4),im(e.error());}}function ea(i,t){if(i&1&&(Zi$1(0,"div",31)(1,"dt"),Fg(2,20),Ig(3,"span",32),jg(),Wl(),Zi$1(4,"dd"),HC(5),Wl()(),Zi$1(6,"div",31)(7,"dt"),Fg(8,21),Ig(9,"span",32),jg(),Wl(),Zi$1(10,"dd"),HC(11),Wl()()),i&2){aC();let e=zC(0);bE(5),im(e.sites.personalLicensedUser),bE(6),im(e.sites.personalUnlicensedUser);}}function ta(i,t){if(i&1&&(dm(0),Zi$1(1,"div",26)(2,"section",29)(3,"h4"),oC(4,3),Wl(),Zi$1(5,"dl")(6,"div")(7,"dt"),oC(8,4),Wl(),Zi$1(9,"dd"),HC(10),Wl()(),Zi$1(11,"div")(12,"dt"),oC(13,5),Wl(),Zi$1(14,"dd"),HC(15),Wl()(),Zi$1(16,"div")(17,"dt"),oC(18,6),Wl(),Zi$1(19,"dd"),HC(20),Wl()(),Zi$1(21,"div")(22,"dt"),oC(23,7),Wl(),Zi$1(24,"dd"),HC(25),Wl()(),Zi$1(26,"div",30)(27,"dt"),oC(28,8),Wl(),Zi$1(29,"dd"),HC(30),Wl()()()(),Zi$1(31,"section",29)(32,"h4"),oC(33,9),Wl(),Zi$1(34,"dl")(35,"div")(36,"dt"),oC(37,10),Wl(),Zi$1(38,"dd"),HC(39),Wl()(),Zi$1(40,"div")(41,"dt"),oC(42,11),Wl(),Zi$1(43,"dd"),HC(44),Wl()(),Zi$1(45,"div",30)(46,"dt"),oC(47,12),Wl(),Zi$1(48,"dd"),HC(49),Wl()()()(),Zi$1(50,"section",29)(51,"h4"),oC(52,13),Wl(),Zi$1(53,"dl")(54,"div")(55,"dt"),oC(56,14),Wl(),Zi$1(57,"dd"),HC(58),Wl()(),Zi$1(59,"div")(60,"dt"),oC(61,15),Wl(),Zi$1(62,"dd"),HC(63),Wl()(),Zi$1(64,"div")(65,"dt"),oC(66,16),Wl(),Zi$1(67,"dd"),HC(68),Wl()(),Zi$1(69,"div")(70,"dt"),oC(71,17),Wl(),Zi$1(72,"dd"),HC(73),Wl()(),lT(74,ea,12,2),Zi$1(75,"div")(76,"dt"),oC(77,18),Wl(),Zi$1(78,"dd"),HC(79),Wl()(),Zi$1(80,"div",30)(81,"dt"),oC(82,19),Wl(),Zi$1(83,"dd"),HC(84),Wl()()()()()),i&2){let e=GC(aC().counts());bE(10),im(e.users.licensed),bE(5),im(e.users.unlicensed),bE(5),im(e.users.sharedMailboxWithStorage),bE(5),im(e.users.sharedMailboxWithoutStorage),bE(5),im(e.users.total),bE(9),im(e.groups.unified),bE(5),im(e.groups.notUnified),bE(5),im(e.groups.total),bE(9),im(e.sites.group),bE(5),im(e.sites.classic),bE(5),im(e.sites.communication),bE(5),im(e.sites.personal),bE(),uT(e.sites.personalLicensedUser!==null&&e.sites.personalUnlicensedUser!==null?74:-1),bE(5),im(e.sites.other),bE(5),im(e.sites.total);}}var sn=class i{#e=T(d$1);data=E1();closed=I1();status=Ge("loading");error=Ge(null);counts=Ge(null);#t=Qa$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=gw({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 _;_=$localize`Unlicensed`;let c;c=$localize`Shared mailbox (with storage)`;let u;u=$localize`Shared mailbox (without storage)`;let S;S=$localize`Total`;let D;D=$localize`Groups`;let F;F=$localize`Unified`;let R;R=$localize`Not unified`;let G;G=$localize`Total`;let I;I=$localize`Sites`;let J;J=$localize`Group`;let H;H=$localize`Classic`;let q;q=$localize`Communication`;let Z;Z=$localize`Personal`;let re;re=$localize`Other`;let z;z=$localize`Total`;let ue;ue=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SPAN:—${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPAN: Licensed users `;let Ee;return Ee=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPAN:—${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPAN: Unlicensed users `,[t,e,n,o,a,_,c,u,S,D,F,R,G,I,J,H,q,Z,re,z,ue,Ee,[1,"title-30"],["content",""],[1,"state","loading"],[1,"state","error"],[1,"counts"],["footer",""],["shButton","","type","button",3,"click"],[1,"group"],[1,"total"],[1,"sub"],[1,"indent"]]},template:function(e,n){if(e&1&&(Zi$1(0,"header")(1,"h3",22),oC(2,0),Wl()(),Zi$1(3,"section",23),lT(4,Qo,5,0,"div",24)(5,Zo,5,1,"div",25)(6,ta,85,16,"div",26),Wl(),Zi$1(7,"footer",27)(8,"button",28),Hg("click",function(){return n.closed.emit()}),oC(9,1),Wl()()),e&2){let o;bE(4),uT((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%] > div.sub[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--color-text-secondary, #666);font-size:.9em}.group[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div.sub[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{font-weight:500}.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 Nt=class i{data=E1();closed=I1();path=Ge("");isValid=Nt$1(()=>this.path().length>0);dataEffect=Qa$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=gw({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&&(Zi$1(0,"header")(1,"h3",3),oC(2,0),Wl()(),Zi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),lm("ngModelChange",function(a){return qC(n.path,a)||(n.path=a),a}),Wl(),bD(),Wl()(),Zi$1(6,"footer",7)(7,"button",8),Hg("click",function(){return n.closed.emit(null)}),oC(8,1),Wl(),Zi$1(9,"button",9),Hg("click",function(){return n.submit()}),oC(10,2),Wl()()),e&2&&(bE(4),vg("customRemoteMode","diskimage")("destinationUrl","diskimage://"),bE(),cm("ngModel",n.path),MD(),bE(4),vg("disabled",!n.isValid()));},dependencies:[v,le$1,Bn,Ze,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}"]})};function ln(i,t,e){return i??t??e}function Pi(i,t){return t?i.sourceDescription??i.description:i.description}var na=[[["","displayName",""]],[["","description",""]],"*"],ia=["[displayName]","[description]","*"];function oa(i,t){if(i&1&&HC(0),i&2){aC(2);let e=zC(1);Yl(" ",e.Name," ");}}function aa(i,t){if(i&1&&HC(0),i&2){aC(2);let e=zC(0);Yl(" ",e.displayName," ");}}function ra(i,t){i&1&&(Zi$1(0,"sh-chip",6),HC(1,"Untested"),Wl());}function sa(i,t){i&1&&(Zi$1(0,"sh-chip",6),HC(1,"Special"),Wl());}function la(i,t){i&1&&(Zi$1(0,"sh-chip",7),HC(1,"Deprecated"),Wl());}function _a(i,t){if(i&1&&HC(0),i&2){aC();let e=zC(16);Yl(" ",e," ");}}function da(i,t){if(i&1&&HC(0),i&2){let e=aC(2);Yl(" ",e.description()," ");}}function ca(i,t){if(i&1&&(Zi$1(0,"sh-card",0)(1,"div",1),Ig(2,"img",2),Wl(),Zi$1(3,"div",3)(4,"div",4),uC(5),Wl(),Zi$1(6,"div",5),lT(7,oa,1,1)(8,aa,1,1),lT(9,ra,2,0,"sh-chip",6)(10,sa,2,0,"sh-chip",6)(11,la,2,0,"sh-chip",7),Wl()(),Zi$1(12,"div",8)(13,"div",4),uC(14,1),Wl(),Zi$1(15,"div",5),dm(16),lT(17,_a,1,1)(18,da,1,1),Wl()(),Zi$1(19,"div",9),uC(20,2),Wl()()),i&2){let e=aC(),n=zC(0),o=zC(1);vg("variant",e.variant()),bE(2),vg("src",n.icon,Yp),yg("alt",n.displayName),bE(5),uT(o&&o.Name?7:8),bE(2),uT((n.sortOrder??0)==-3?9:(n.sortOrder??0)==-2?10:(n.sortOrder??0)<0?11:-1),bE(7);let a=GC(e.getSimplePath(o?.BaseUrl));bE(),uT(a&&a.length>0?17:18);}}var Ct=class i{destination=E1();targetUrl=E1();variant=E1("type-b");connectionStringId=E1();showAsSource=E1(false);#e=T(mt);connectionString=Nt$1(()=>{let t=this.connectionStringId();return t==null?null:this.#e.destinations().find(e=>e.ID===t)});selectedDestinationType=Nt$1(()=>{let t=this.targetUrl();return t?G(t)??null:null});destinationFromTargetUrl=Nt$1(()=>{let t=this.selectedDestinationType();return t?{key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,sourceDescription:t.sourceDescription??null,icon:t.icon}:null});destinationItem=Nt$1(()=>{let t=this.destination(),e=this.destinationFromTargetUrl();return t||e||null});description=Nt$1(()=>{let t=this.destinationItem();return t?Pi(t,this.showAsSource()):""});getSimplePath(t){return t?f$1(t):""}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"],targetUrl:[1,"targetUrl"],variant:[1,"variant"],connectionStringId:[1,"connectionStringId"],showAsSource:[1,"showAsSource"]},ngContentSelectors:ia,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&&(lC(na),dm(0)(1),lT(2,ca,21,7,"sh-card",0)),e&2){let o=GC(n.destinationItem());bE(),GC(n.connectionString()),bE(),uT(o?2:-1);}},dependencies:[f$2,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 gt=class i{#e=T(f);#t(t){return t.flatMap(e=>{if(!e?.Key)return null;let n=xe(e.Key);if(n.length<=1){let o=A(e.Key);return o.isDefaultEntry===true?[m$2(l({},o),{displayName:e.DisplayName||o.displayName||e.Key,description:e.Description||o.description||"",sourceDescription:ln(o.sourceDescription,e.Description,o.description)})]:m$2(l({},o),{sourceDescription:ln(o.sourceDescription,e.Description,o.description)})}else return n.map(o=>m$2(l({},o),{sourceDescription:ln(o.sourceDescription,e.Description,o.description)}))}).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,sourceDescription:e.sourceDescription??null,icon:e.icon,searchTerms:[e.displayName,e.description,e.key,e.searchTerms??"",e.customKey??""].join(" "),sortOrder:e.sortOrder??0}))}backendDestinationOptions=Nt$1(()=>{let t=this.#e.backendModules(),e=this.#t(t);return this.#n(e)});sourceProviderOptions=Nt$1(()=>{let t=this.#e.sourceProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});restoreDestinationOptions=Nt$1(()=>{let t=this.#e.restoreDestinationProviderModules(),e=this.#t(t.length?t:this.#e.backendModules());return this.#n(e)});destinationTypeOptions=this.backendDestinationOptions;allModules=Nt$1(()=>[...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 ua(i,t){if(i&1){let e=ET();Zi$1(0,"input",8),lm("ngModelChange",function(o){Pd(e);let a=aC();return qC(a.destinationSearchTerm,o)||(a.destinationSearchTerm=o),Ld(o)}),Wl(),bD();}if(i&2){let e=aC();cm("ngModel",e.destinationSearchTerm),MD();}}function pa(i,t){if(i&1){let e=ET();Zi$1(0,"input",9),lm("ngModelChange",function(o){Pd(e);let a=aC();return qC(a.destinationSearchTerm,o)||(a.destinationSearchTerm=o),Ld(o)}),Wl(),bD();}if(i&2){let e=aC();cm("ngModel",e.destinationSearchTerm),MD();}}function ma(i,t){if(i&1){let e=ET();Zi$1(0,"app-destination-list-item",10),Hg("click",function(){let o=Pd(e).$implicit,a=aC();return Ld(a.setDestination.emit(o.customKey??o.key))})("keydown.enter",function(o){return o.target.click()})("keydown.space",function(o){return o.target.click()}),Zi$1(1,"button",11),Fg(2,1),Ig(3,"sh-icon"),jg(),Wl()();}if(i&2){let e=t.$implicit,n=aC();vg("destination",e)("showAsSource",n.showAsSources());}}var _n=class i{#e=T(gt);#t=T(f);showAsSources=E1(false);moduleType=E1("Backend");setDestination=I1();destinationSearchTerm=Ge("");showAllDestinations=Ge(false);destinationTypeOptions=Nt$1(()=>{switch(this.moduleType()){case "SourceProvider":return this.#e.sourceProviderOptions();case "RestoreDestinationProvider":return this.#e.restoreDestinationOptions();default:return this.#e.backendDestinationOptions()}});destinationTypeOptionsFocused=Nt$1(()=>{let t=this.#t.backendModules(),e=this.destinationTypeOptions().map(_=>{let c=t.find(u=>u.Key==_.key);return c&&(_=m$2(l({},_),{sortOrder:c.IsDeprecated?-1:c.IsUntested?-3:_.sortOrder})),_}),n=this.destinationSearchTerm().toLowerCase(),o=this.showAllDestinations(),a=[...e].sort((_,c)=>{let u=_.sortOrder??0,S=c.sortOrder??0;return u!==S?S-u:_.displayName.localeCompare(c.displayName)}).filter(_=>{if(o)return true;let c=_.sortOrder??0;return c<0&&n?.length&&(_.key.toLocaleLowerCase()===n.toLocaleLowerCase()||_.customKey?.toLocaleLowerCase()===n.toLocaleLowerCase())?true:c>=0});return n?a.filter(_=>_.searchTerms.toLowerCase().includes(n)):a});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-destination-list"]],inputs:{showAsSources:[1,"showAsSources"],moduleType:[1,"moduleType"]},outputs:{setDestination:"setDestination"},decls:9,vars:2,consts:()=>{let t;t=$localize`Search for remote source...`;let e;e=$localize`Search for destination...`;let n;n=$localize`Show all`;let o;return o=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[n,o,[1,"search-area"],["type","text","placeholder",t,3,"ngModel"],["type","text","placeholder",e,3,"ngModel"],[1,"raised","primary",3,"checkedChange","checked"],[1,"list"],["tabindex","0",3,"destination","showAsSource"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["type","text","placeholder",e,3,"ngModelChange","ngModel"],["tabindex","0",3,"click","keydown.enter","keydown.space","destination","showAsSource"],["shButton","","tabindex","-1","type","button"]]},template:function(e,n){e&1&&(Zi$1(0,"div",2)(1,"sh-form-field"),lT(2,ua,1,1,"input",3)(3,pa,1,1,"input",4),Wl(),Zi$1(4,"sh-toggle",5),lm("checkedChange",function(a){return qC(n.showAllDestinations,a)||(n.showAllDestinations=a),a}),oC(5,0),Wl()(),Zi$1(6,"div",6),pT(7,ma,4,2,"app-destination-list-item",7,dT),Wl()),e&2&&(bE(2),uT(n.showAsSources()?2:3),bE(2),cm("checked",n.showAllDestinations),bE(3),hT(n.destinationTypeOptionsFocused()));},dependencies:[Ct,Bn,Ze,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 Ca=["fileInput"],ga=[[["label"]]],Ta=["label"],Sa=["ngProjectAs","label",5,["label"]],dn=class i{customId=E1();content=Ge("");readonly=Ge(false);placeholder=E1($localize`Drop a file here or use the browse button`);fileInputRef=w1("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=Qa$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=gw({type:i,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,n){e&1&&qg(n.fileInputRef,Ca,5),e&2&&hC();},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[JC([{provide:D$1,useExisting:i,multi:true}])],ngContentSelectors:Ta,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=ET();lC(ga),uC(0,0,Sa),Zi$1(1,"div",1)(2,"button",2),Hg("click",function(){return n.triggerBrowse()}),Zi$1(3,"sh-icon"),HC(4,"upload"),Wl()()(),Zi$1(5,"div",3),Hg("drop",function(_){return n.onFileDrop(_)})("dragover",function(_){return n.onDragOver(_)}),Zi$1(6,"textarea",4),lm("ngModelChange",function(_){return Pd(o),qC(n.content,_)||(n.content=_),Ld(_)}),Wl(),bD(),Wl(),Zi$1(7,"input",5,0),Hg("change",function(_){return n.onFileSelected(_)}),Wl();}e&2&&(bE(6),vg("placeholder",n.placeholder()),cm("ngModel",n.content),vg("disabled",n.readonly()),MD());},dependencies:[Bn,Ze,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 cn=class i{data=E1();closed=I1();path=Ge("");destinationUrl=Ge("");backupId=Ge("");connectionStringId=Ge(null);isValid=Nt$1(()=>this.path().length>0);dataEffect=Qa$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=gw({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&&(Zi$1(0,"header")(1,"h3",3),oC(2,0),Wl()(),Zi$1(3,"section",4)(4,"app-file-tree",5)(5,"input",6),lm("ngModelChange",function(a){return qC(n.path,a)||(n.path=a),a}),Wl(),bD(),Wl()(),Zi$1(6,"footer",7)(7,"button",8),Hg("click",function(){return n.closed.emit(null)}),oC(8,1),Wl(),Zi$1(9,"button",9),Hg("click",function(){return n.submit()}),oC(10,2),Wl()()),e&2&&(bE(4),vg("customRemoteMode","backend")("backupId",n.backupId())("destinationUrl",n.destinationUrl())("connectionStringId",n.connectionStringId())("onlySelectFolder",true)("selectFiles",false),bE(),cm("ngModel",n.path),MD(),bE(4),vg("disabled",!n.isValid()));},dependencies:[v,le$1,Bn,Ze,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 Ea=(i,t,e,n)=>({index:i,fieldGroup:"custom",formView:t,destinationType:e,oauthField:n}),Oe=i=>({$implicit:i}),fa=(i,t,e,n)=>({index:i,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:n}),ha=()=>({updateOn:"blur"}),ya=(i,t,e,n)=>({index:i,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:n}),$e=(i,t)=>({fieldGroup:i,formView:t}),Na=()=>["/connect/logon"];function Fa(i,t){i&1&&wg(0);}function Da(i,t){if(i&1&&cg(0,Fa,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;aC();let o=gC(15);aC();let a=zC(0),_=zC(1);vg("ngTemplateOutlet",o)("ngTemplateOutletContext",eb(7,Oe,nb(2,Ea,n,e,a,_.oauthField)));}}function Oa(i,t){i&1&&wg(0);}function Aa(i,t){if(i&1&&cg(0,Oa,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;aC();let o=gC(15);aC();let a=zC(0),_=zC(1);vg("ngTemplateOutlet",o)("ngTemplateOutletContext",eb(7,Oe,nb(2,fa,n,e,a,_.oauthField)));}}function Ia(i,t){if(i&1){let e=ET();Zi$1(0,"button",26),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.showTextArea.set(false))}),Fg(1,8),Ig(2,"sh-icon"),jg(),Wl();}}function Pa(i,t){if(i&1){let e=ET();Zi$1(0,"button",33,2),Hg("click",function(){let o=Pd(e).$implicit,a=aC(3);return Ld(a.addAdvancedOption(o))}),HC(2),Wl();}if(i&2){let e=t.$implicit;bE(2),Yl(" ",e.name," ");}}function Ma(i,t){if(i&1){let e=ET();Zi$1(0,"div",23)(1,"sh-menu",27)(2,"button",28),Fg(3,9),Ig(4,"sh-icon"),jg(),Wl(),zl(5,29),pT(6,Pa,3,1,"button",30,dT),Ql(),Wl(),Zi$1(8,"sh-menu")(9,"button",31)(10,"sh-icon"),HC(11,"dots-three-vertical"),Wl()(),zl(12,29),Zi$1(13,"button",32),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.showTextArea.set(true))}),Zi$1(14,"sh-icon"),HC(15,"link"),Wl(),HC(16," Edit contents as text "),Wl(),Ql(),Wl()();}if(i&2){aC();let e=zC(9);bE(),vg("searchable",true),bE(),vg("disabled",e.length===0),bE(4),hT(e);}}function Ra(i,t){if(i&1){let e=ET();Zi$1(0,"textarea",34),Hg("ngModelChange",function(o){Pd(e);let a=aC(2);return Ld(a.updateSettingsFromText(o))}),Wl(),bD();}if(i&2){let e=aC(2);vg("ngModel",e.settingsAsText())("ngModelOptions",XC(2,ha)),MD();}}function La(i,t){i&1&&wg(0);}function xa(i,t){if(i&1&&cg(0,La,1,0,"ng-container",25),i&2){let e=t.$implicit,n=t.$index;aC(2);let o=gC(15),a=aC(),_=zC(0),c=zC(1),u=a.getFormView("advanced",e)??a.getDefaultFormView(e);vg("ngTemplateOutlet",o)("ngTemplateOutletContext",eb(7,Oe,nb(2,ya,n,u,_,c.oauthField)));}}function ba(i,t){if(i&1&&pT(0,xa,1,9,"ng-container",null,dT),i&2){let e=aC(2);hT(e.advancedFormFieldNames());}}function va(i,t){i&1&&(Zi$1(0,"sup",43),HC(1,"*"),Wl());}function wa(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Ga(i,t){if(i&1){let e=ET();Zi$1(0,"app-file-tree",36)(1,"label",42),lT(2,va,2,0,"sup",43),HC(3),lT(4,wa,2,1,"sh-icon",44),Wl(),Zi$1(5,"input",45),Hg("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Wl();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(3),_=zC(4),c=zC(5);vg("startingPath",a)("accepts",e.formView.accepts)("showFiles",true)("hideShortcuts",false)("showHiddenNodes",true)("selectFiles",true)("resolvePaths",true),bE(),vg("for",c),bE(),uT(e.formView.isMandatory&&_?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("id",c)("ngModel",o),MD();}}function $a(i,t){i&1&&(Zi$1(0,"sup",46),HC(1,"*"),Wl());}function Ua(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function ka(i,t){if(i&1){let e=ET();Zi$1(0,"app-file-tree",37)(1,"label",42),lT(2,$a,2,0,"sup",46),HC(3),lT(4,Ua,2,1,"sh-icon",44),Wl(),Zi$1(5,"input",45),Hg("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Wl();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(3),_=zC(4),c=zC(5);vg("hideShortcuts",false)("enableCreateFolder",true)("startingPath",a)("resolvePaths",true),bE(),vg("for",c),bE(),uT(e.formView.isMandatory&&_?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("id",c)("ngModel",o),MD();}}function Ba(i,t){i&1&&(Zi$1(0,"sup",47),HC(1,"*"),Wl());}function Va(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Ka(i,t){i&1&&(Zi$1(0,"sh-icon",48),HC(1," warning "),Wl());}function Ja(i,t){i&1&&wg(0);}function Xa(i,t){if(i&1&&(Zi$1(0,"sh-icon",53),HC(1," link "),Wl()),i&2){aC();let e=zC(8),n=zC(9);Kg("error",e&&n==="error")("warn",e&&n==="warning"),vg("shTooltip",e);}}function za(i,t){i&1&&(Zi$1(0,"sh-icon",51),HC(1,"envelope"),Wl());}function Ha(i,t){i&1&&(Zi$1(0,"sh-icon",51),HC(1,"hard-drives"),Wl());}function Wa(i,t){i&1&&(Zi$1(0,"sh-icon",51),HC(1,"jar"),Wl());}function ja(i,t){i&1&&(Zi$1(0,"sh-icon",51),HC(1,"textbox"),Wl());}function qa(i,t){if(i&1){let e=ET();Zi$1(0,"button",54),Hg("click",function(o){Pd(e);let a=aC(2).$implicit,_=aC(2);return Ld(_.browse(a.fieldGroup,a.formView.name,o))}),HC(1," Browse ... "),Wl();}}function Ya(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field")(1,"label",42),lT(2,Ba,2,0,"sup",47),HC(3),lT(4,Va,2,1,"sh-icon",44),lT(5,Ka,2,0,"sh-icon",48),cg(6,Ja,1,0,"ng-container",25),Wl(),Zi$1(7,"input",49),Hg("keydown",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),dm(8)(9),lT(10,Xa,2,5,"sh-icon",50)(11,za,2,0,"sh-icon",51)(12,Ha,2,0,"sh-icon",51)(13,Wa,2,0,"sh-icon",51)(14,ja,2,0,"sh-icon",51),lT(15,qa,2,0,"button",52),Wl();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(3),_=zC(4),c=zC(5);aC();let u=gC(17),S=aC();bE(),vg("for",c),bE(),uT(e.formView.isMandatory&&_?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),uT(_&&e.formView.type==="Path"?5:-1),bE(),vg("ngTemplateOutlet",u)("ngTemplateOutletContext",eb(17,Oe,tb(14,$e,e.fieldGroup,e.formView))),bE(),vg("type",e.formView.type==="Email"?"email":"text")("id",c)("ngModel",o),MD();let D=a,F=S.hasLeadingSlash(D??"");bE(),GC(F&&e.formView.doubleSlash?.message),bE(),GC(e.formView.doubleSlash?.type),bE(),uT(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),bE(5),uT(e.formView.type==="Path"&&S.hasV2ListBackendOperations()?15:-1);}}function Qa(i,t){i&1&&(Zi$1(0,"sup",55),HC(1,"*"),Wl());}function Za(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function er(i,t){i&1&&wg(0);}function tr(i,t){if(i&1){let e=ET();Zi$1(0,"span",59),Hg("click",function(){Pd(e);let o=aC(2).$implicit,a=aC(2);return Ld(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),HC(1," AuthID "),Wl();}}function nr(i,t){i&1&&(Zi$1(0,"sh-icon",51),HC(1,"password"),Wl());}function ir(i,t){if(i&1){let e=ET();Zi$1(0,"sh-icon",60),Hg("click",function(){Pd(e);let o=aC(2).$implicit;return Ld(o.formView.showPassword=!o.formView.showPassword)}),HC(1," eye "),Wl();}}function or(i,t){if(i&1){let e=ET();Zi$1(0,"sh-icon",60),Hg("click",function(){Pd(e);let o=aC(2).$implicit;return Ld(o.formView.showPassword=!o.formView.showPassword)}),HC(1," eye-slash "),Wl();}}function ar(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field")(1,"label",42),lT(2,Qa,2,0,"sup",55),HC(3),lT(4,Za,2,1,"sh-icon",44),cg(5,er,1,0,"ng-container",25),Wl(),Zi$1(6,"input",56),Hg("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),lT(7,tr,2,0,"span",57)(8,nr,2,0,"sh-icon",51),lT(9,ir,2,0,"sh-icon",58)(10,or,2,0,"sh-icon",58),Wl();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(4),_=zC(5);aC();let c=gC(17);bE(),vg("for",_),bE(),uT(e.formView.isMandatory&&a?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(14,Oe,tb(11,$e,e.fieldGroup,e.formView))),bE(),vg("type",e.formView.showPassword?"text":"password")("id",_)("ngModel",o),MD(),bE(),uT(e.oauthField===e.formView.name?7:8),bE(2),uT(e.formView.showPassword?9:10);}}function rr(i,t){i&1&&(Zi$1(0,"sup",62),HC(1,"*"),Wl());}function sr(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function lr(i,t){i&1&&wg(0);}function _r(i,t){if(i&1&&HC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function dr(i,t){if(i&1){let e=ET();Zi$1(0,"sh-select",61)(1,"label",42),lT(2,rr,2,0,"sup",62),HC(3),lT(4,sr,2,1,"sh-icon",44),cg(5,lr,1,0,"ng-container",25),Wl(),Zi$1(6,"input",45),Hg("ngModelChange",function(o){Pd(e);let a=aC(2).$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Wl(),cg(7,_r,1,2,"ng-template",null,3,db);}if(i&2){let e=gC(8);aC();let n=zC(0),o=aC().$implicit,a=zC(1),_=zC(2),c=zC(4),u=zC(5);aC();let S=gC(17);vg("options",n)("isClearable",false)("optionTemplate",e),bE(),vg("for",u),bE(),uT(o.formView.isMandatory&&c?2:-1),bE(),Yl(" ",a," "),bE(),uT(o.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",S)("ngTemplateOutletContext",eb(14,Oe,tb(11,$e,o.fieldGroup,o.formView))),bE(),vg("id",u)("ngModel",_),MD();}}function cr(i,t){if(i&1&&(dm(0),lT(1,dr,9,16)),i&2){let e=aC().$implicit,n=GC(aC(2).mapOptions(e.formView));bE(),uT(n?1:-1);}}function ur(i,t){i&1&&(Zi$1(0,"sup",65),HC(1,"*"),Wl());}function pr(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function mr(i,t){i&1&&wg(0);}function Cr(i,t){if(i&1&&HC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function gr(i,t){if(i&1){let e=ET();Zi$1(0,"sh-select",64)(1,"label",42),lT(2,ur,2,0,"sup",65),HC(3),lT(4,pr,2,1,"sh-icon",44),cg(5,mr,1,0,"ng-container",25),Wl(),Zi$1(6,"input",45),Hg("ngModelChange",function(o){Pd(e);let a=aC(2).$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Wl(),cg(7,Cr,1,2,"ng-template",null,4,db);}if(i&2){let e=gC(8);aC();let n=zC(0),o=aC().$implicit,a=zC(1),_=zC(2),c=zC(4),u=zC(5);aC();let S=gC(17);vg("options",n)("asFreeText",true)("inlineSearch",true)("optionTemplate",e),bE(),vg("for",u),bE(),uT(o.formView.isMandatory&&c?2:-1),bE(),Yl(" ",a," "),bE(),uT(o.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",S)("ngTemplateOutletContext",eb(15,Oe,tb(12,$e,o.fieldGroup,o.formView))),bE(),vg("id",u)("ngModel",_),MD();}}function Tr(i,t){i&1&&Ig(0,"sh-progress-bar",63);}function Sr(i,t){if(i&1&&(dm(0),lT(1,gr,9,17)(2,Tr,1,0,"sh-progress-bar",63)),i&2){let e=aC().$implicit,n=zC(2),o=GC(aC(2).mapOptionsWithFreeText(e.formView,n));bE(),uT(o?1:2);}}function Er(i,t){i&1&&(Zi$1(0,"sup",67),HC(1,"*"),Wl());}function fr(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function hr(i,t){i&1&&wg(0);}function yr(i,t){if(i&1){let e=ET();Zi$1(0,"app-size",66),Hg("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Zi$1(1,"label",42),lT(2,Er,2,0,"sup",67),HC(3),lT(4,fr,2,1,"sh-icon",44),cg(5,hr,1,0,"ng-container",25),Wl()(),bD();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(4),_=zC(5);aC();let c=gC(17);vg("inputType",e.Name)("ngModel",o)("customId",_),MD(),bE(),vg("for",_),bE(),uT(e.formView.isMandatory&&a?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(12,Oe,tb(9,$e,e.fieldGroup,e.formView)));}}function Nr(i,t){i&1&&(Zi$1(0,"sup",68),HC(1,"*"),Wl());}function Fr(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Dr(i,t){i&1&&wg(0);}function Or(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field")(1,"label",42),lT(2,Nr,2,0,"sup",68),HC(3),lT(4,Fr,2,1,"sh-icon",44),cg(5,Dr,1,0,"ng-container",25),Wl(),Zi$1(6,"input",69),Hg("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Zi$1(7,"sh-icon",51),HC(8,"numpad"),Wl()();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(4),_=zC(5);aC();let c=gC(17);bE(),vg("for",_),bE(),uT(e.formView.isMandatory&&a?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(11,Oe,tb(8,$e,e.fieldGroup,e.formView))),bE(),vg("id",_)("ngModel",o),MD();}}function Ar(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Ir(i,t){i&1&&wg(0);}function Pr(i,t){if(i&1){let e=ET();Zi$1(0,"sh-toggle",39)(1,"label",42),HC(2),lT(3,Ar,2,1,"sh-icon",44),cg(4,Ir,1,0,"ng-container",25),Wl(),Zi$1(5,"input",70),Hg("change",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o.target.checked?"true":"false"))}),Wl()();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(5);aC();let _=gC(17),c=aC();bE(),vg("for",a),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?3:-1),bE(),vg("ngTemplateOutlet",_)("ngTemplateOutletContext",eb(9,Oe,tb(6,$e,e.fieldGroup,e.formView))),bE(),vg("checked",c.isTrue(o));}}function Mr(i,t){i&1&&(Zi$1(0,"sup",72),HC(1,"*"),Wl());}function Rr(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function Lr(i,t){i&1&&wg(0);}function xr(i,t){if(i&1&&HC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function br(i,t){if(i&1){let e=ET();Zi$1(0,"sh-select",71)(1,"label",42),lT(2,Mr,2,0,"sup",72),HC(3),lT(4,Rr,2,1,"sh-icon",44),cg(5,Lr,1,0,"ng-container",25),Wl(),Zi$1(6,"input",73),Hg("ngModelChange",function(o){Pd(e);let a=aC(2).$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Wl(),cg(7,xr,1,2,"ng-template",null,5,db);}if(i&2){let e=gC(8);aC();let n=zC(0),o=aC().$implicit,a=zC(1),_=zC(2),c=zC(4),u=zC(5);aC();let S=gC(17);vg("options",n)("selectMultiple",true)("optionTemplate",e),bE(),vg("for",u),bE(),uT(o.formView.isMandatory&&c?2:-1),bE(),Yl(" ",a," "),bE(),uT(o.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",S)("ngTemplateOutletContext",eb(13,Oe,tb(10,$e,o.fieldGroup,o.formView))),bE(),vg("ngModel",_),MD();}}function vr(i,t){if(i&1&&(dm(0),lT(1,br,9,15)),i&2){let e=aC().$implicit,n=GC(aC(2).mapOptions(e.formView));bE(),uT(n?1:-1);}}function wr(i,t){i&1&&(Zi$1(0,"sup",74),HC(1,"*"),Wl());}function Gr(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function $r(i,t){i&1&&wg(0);}function Ur(i,t){if(i&1){let e=ET();Zi$1(0,"app-timespan",66),Hg("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Zi$1(1,"label",42),lT(2,wr,2,0,"sup",74),HC(3),lT(4,Gr,2,1,"sh-icon",44),cg(5,$r,1,0,"ng-container",25),Wl()(),bD();}if(i&2){let e=aC().$implicit,n=zC(1),o=zC(2),a=zC(4),_=zC(5);aC();let c=gC(17);vg("inputType",e.formView.name)("ngModel",o)("customId",_),MD(),bE(),vg("for",_),bE(),uT(e.formView.isMandatory&&a?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(12,Oe,tb(9,$e,e.fieldGroup,e.formView)));}}function kr(i,t){i&1&&(Zi$1(0,"sup",76),HC(1,"*"),Wl());}function Br(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(2).$implicit;vg("shTooltip",e.formView.longDescription);}}function Vr(i,t){i&1&&wg(0);}function Kr(i,t){if(i&1){let e=ET();Zi$1(0,"app-file-drop-textarea",75),Hg("ngModelChange",function(o){Pd(e);let a=aC().$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Zi$1(1,"label"),lT(2,kr,2,0,"sup",76),HC(3),lT(4,Br,2,1,"sh-icon",44),cg(5,Vr,1,0,"ng-container",25),Wl()(),bD();}if(i&2){let e=aC().$implicit,n=zC(2),o=zC(4),a=zC(5);aC();let _=gC(17);vg("ngModel",n)("customId",a)("placeholder",e.formView.longDescription),MD(),bE(2),uT(e.formView.isMandatory&&o?2:-1),bE(),Yl(" ",e.formView.shortDescription??e.formView.name," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",_)("ngTemplateOutletContext",eb(11,Oe,tb(8,$e,e.fieldGroup,e.formView)));}}function Jr(i,t){i&1&&(Ig(0,"sh-spinner"),Zi$1(1,"span"),oC(2,10),Wl()),i&2&&Yg("--spinner-size","16px")("--spinner-thickness","2px");}function Xr(i,t){if(i&1){let e=ET();Zi$1(0,"div",79)(1,"span"),oC(2,11),Wl(),Zi$1(3,"button",32),Hg("click",function(){Pd(e);let o=aC(6);return Ld(o.reloadTrigger.set(!o.reloadTrigger()))}),oC(4,12),Wl()();}}function zr(i,t){if(i&1&&HC(0),i&2){let e=t.$implicit;sm(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ");}}function Hr(i,t){if(i&1){let e=ET();Zi$1(0,"sh-select",80)(1,"label",42)(2,"sup",81),HC(3,"*"),Wl(),Zi$1(4,"span"),oC(5,13),Wl()(),Zi$1(6,"input",45),Hg("ngModelChange",function(o){Pd(e);let a=aC(4).$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Wl(),cg(7,zr,1,2,"ng-template",null,6,db);}if(i&2){aC(4);let e=zC(2),n=zC(5),o=aC(2);vg("options",o.restoreBackupIdOptions())("isClearable",false),bE(),vg("for",n),bE(5),vg("id",n)("ngModel",e),MD();}}function Wr(i,t){if(i&1&&lT(0,Jr,3,4)(1,Xr,5,0,"div",79)(2,Hr,9,5),i&2){let e=aC(5);uT(e.isLoadingRestoreBackupIdOptions()?0:e.restoreBackupIdOptions().length==0?1:2);}}function jr(i,t){i&1&&(Zi$1(0,"sup",82),HC(1,"*"),Wl());}function qr(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(4).$implicit;vg("shTooltip",e.formView.longDescription);}}function Yr(i,t){i&1&&wg(0);}function Qr(i,t){if(i&1){let e=ET();Zi$1(0,"button",84),Hg("click",function(){Pd(e),aC(4);let o=zC(5),a=aC(2);return Ld(a.toggleDisabled(o))}),Fg(1,14),Ig(2,"sh-icon"),jg(),Wl();}}function Zr(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field")(1,"label",42),lT(2,jr,2,0,"sup",82),HC(3),lT(4,qr,2,1,"sh-icon",44),cg(5,Yr,1,0,"ng-container",25),Wl(),Zi$1(6,"input",83),Hg("ngModelChange",function(o){Pd(e);let a=aC(3).$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Zi$1(7,"sh-icon",51),HC(8,"textbox"),Wl()(),lT(9,Qr,3,0,"button",41);}if(i&2){let e=aC(3).$implicit,n=zC(1),o=zC(2),a=zC(4),_=zC(5);aC();let c=gC(17),u=aC();bE(),vg("for",_),bE(),uT(e.formView.isMandatory&&a?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(15,Oe,tb(12,$e,e.fieldGroup,e.formView))),bE(),vg("type","text")("id",_)("ngModel",o)("placeholder",e.formView.longDescription)("disabled",true),MD(),bE(3),uT(u.getIsDisabled(_)?9:-1);}}function es(i,t){if(i&1&&(Zi$1(0,"div",77),lT(1,Wr,3,1)(2,Zr,10,17),Wl()),i&2){let e=aC(4);bE(),uT(e.isRestoreFlow()?1:2);}}function ts(i,t){if(i&1){let e=ET();Zi$1(0,"div",85),Fg(1,15),Ig(2,"div")(3,"div"),jg(),Wl(),Zi$1(4,"button",84),Hg("click",function(){Pd(e);let o=aC(5);return Ld(o.openConsole())}),Fg(5,16),Ig(6,"sh-icon"),jg(),Wl();}}function ns(i,t){i&1&&(Zi$1(0,"div",85),oC(1,17),Wl(),Zi$1(2,"button",86),Fg(3,18),Ig(4,"sh-icon"),jg(),Wl()),i&2&&(bE(2),vg("routerLink",XC(1,Na)));}function is(i,t){if(i&1&&(Zi$1(0,"div",78),lT(1,ts,7,0)(2,ns,5,2),Wl()),i&2){let e=aC(4);bE(),uT(e.isConnectedToConsole()?1:2);}}function os(i,t){if(i&1&&lT(0,es,3,1,"div",77)(1,is,3,1,"div",78),i&2){let e=aC(3);uT(e.hasManualStorageOptions()||e.isConnectedToConsole()&&e.hasStorageApiKey()?0:1);}}function as(i,t){i&1&&(Zi$1(0,"sup",87),HC(1,"*"),Wl());}function rs(i,t){if(i&1&&(Zi$1(0,"sh-icon",44),HC(1,"question"),Wl()),i&2){let e=aC(3).$implicit;vg("shTooltip",e.formView.longDescription);}}function ss(i,t){i&1&&wg(0);}function ls(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field")(1,"label",42),lT(2,as,2,0,"sup",87),HC(3),lT(4,rs,2,1,"sh-icon",44),cg(5,ss,1,0,"ng-container",25),Wl(),Zi$1(6,"input",88),Hg("ngModelChange",function(o){Pd(e);let a=aC(2).$implicit,_=aC(2);return Ld(_.updateFieldValue(a.fieldGroup,a.formView.name,o))}),Wl(),bD(),Zi$1(7,"sh-icon",51),HC(8,"textbox"),Wl(),Zi$1(9,"button",89),Hg("click",function(){Pd(e);let o=aC(4);return Ld(o.authenticateFilen())}),oC(10,19),Wl()();}if(i&2){let e=aC(2).$implicit,n=zC(1),o=zC(2),a=zC(4),_=zC(5);aC();let c=gC(17),u=aC();bE(),vg("for",_),bE(),uT(e.formView.isMandatory&&a?2:-1),bE(),Yl(" ",n," "),bE(),uT(e.formView.longDescription?4:-1),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(12,Oe,tb(9,$e,e.fieldGroup,e.formView))),bE(),vg("id",_)("ngModel",o),MD(),bE(3),vg("disabled",u.isAuthenticatingFilen());}}function _s(i,t){if(i&1&&lT(0,ls,11,14,"sh-form-field"),i&2){let e=aC(3);uT(e.hasFilenApiKey()?-1:0);}}function ds(i,t){if(i&1){let e=ET();Zi$1(0,"button",84),Hg("click",function(){Pd(e);let o=aC().$implicit,a=aC(2);return Ld(a.removeAdvancedOption(o.formView.name))}),Zi$1(1,"sh-icon"),HC(2,"x-circle"),Wl()();}}function cs(i,t){if(i&1&&(Zi$1(0,"div",35),dm(1)(2)(3)(4)(5),lT(6,Ga,6,13,"app-file-tree",36)(7,ka,6,10,"app-file-tree",37)(8,Ya,16,19,"sh-form-field")(9,ar,11,16,"sh-form-field")(10,cr,2,2)(11,Sr,3,2)(12,yr,6,14,"app-size",38)(13,Or,9,13,"sh-form-field")(14,Pr,6,11,"sh-toggle",39)(15,vr,2,2)(16,Ur,6,14,"app-timespan",38)(17,Kr,6,13,"app-file-drop-textarea",40)(18,os,2,1)(19,_s,1,1),lT(20,ds,3,0,"button",41),Wl()),i&2){let e=t.$implicit;aC();let n=zC(0),o=aC();Kg("single-field",e.fieldGroup!=="advanced"),bE(),GC(e.formView.shortDescription??e.formView.name),bE(),GC(o.getFieldGroup(n,e.fieldGroup)[e.formView.name]),bE();let a=GC(o.getFieldValue(e.fieldGroup,e.formView.name));bE(),GC((a??"").toString().trim()===""),bE(),GC("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),bE(),uT(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),bE(14),uT(e.fieldGroup==="advanced"?20:-1);}}function us(i,t){if(i&1&&(Zi$1(0,"sh-icon",90),HC(1,"x-circle"),Wl()),i&2){aC();let e=zC(0);vg("shTooltip",e?.message??"Invalid value");}}function ps(i,t){if(i&1&&(Zi$1(0,"sh-icon",91),HC(1,"warning"),Wl()),i&2){aC();let e=zC(0);vg("shTooltip",e?.message??"Invalid value");}}function ms(i,t){if(i&1&&(dm(0),lT(1,us,2,1,"sh-icon",90)(2,ps,2,1,"sh-icon",91)),i&2){let e=aC().$implicit,n=zC(0),o=GC(e.formView.validate(n));bE(),uT(o?.type==="error"?1:o?.type==="warning"?2:-1);}}function Cs(i,t){if(i&1&&(dm(0),lT(1,ms,3,2)),i&2){let e=t.$implicit,o=(GC(aC(2).getFieldValue(e.fieldGroup,e.formView.name))??"").toString().trim()==="";bE(),uT(!o&&e.formView.validate?1:-1);}}function gs(i,t){if(i&1&&(dm(0),pT(1,Da,1,9,"ng-container",null,dT),pT(3,Aa,1,9,"ng-container",null,dT),Zi$1(5,"sh-toggle-card",20),zl(6,21)(7),oC(8,7),Ql(),dm(9),lT(10,Ia,3,0,"button",22)(11,Ma,17,2,"div",23),Ql(),lT(12,Ra,1,3,"textarea",24)(13,ba,2,0),Wl(),cg(14,cs,21,9,"ng-template",null,0,db)(16,Cs,2,2,"ng-template",null,1,db)),i&2){let e=aC(),n=zC(1);GC(e.destinationForm()),bE(),hT(n.custom),bE(2),hT(n.dynamic),bE(2),vg("disableToggle",true),bE(4),GC(e.nonSelectedAdvancedFormViews()),bE(),uT(e.showTextArea()?10:11),bE(2),uT(e.showTextArea()?12:13);}}var un=class i{#e=T(Ke);#t=T(f);#n=T(R);#i=T(gt);#o=T(v$1);#r=T(d$1);#a=T(be);injector=T(ve$1);targetUrl=D1.required();useBackupState=E1(false);#s=null;destinationType=Nt$1(()=>{let t=this.targetUrl();if(!t)return null;let e=G(t);return this.#s=e?.customKey??e?.key,this.#s});refreshView=Ge(false);destinationForm=Ge({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=Nt$1(()=>Object.keys(this.destinationForm().advanced??{}));destinationFormConfig=Ge(null);showTextArea=Ge(false);hasV2ListBackendOperations=this.#t.hasV2ListBackendOperations;isLoadingRestoreBackupIdOptions=Ge(false);isRestoreFlow=Nt$1(()=>!this.useBackupState());reloadTrigger=Ge(false);hasAttemptedToLoadBackupIdOptions=Ge("");loadedBackupIdOptions=Ge([]);isConnectedToConsole=Nt$1(()=>this.#o.state()==="connected");hasStorageApiKey=Nt$1(()=>{let t=this.destinationForm();return (this.#n.serverSettings()?.["remote-control-storage-api-id"]??"").length>0||t.advanced["duplicati-auth-apiid"]});hasManualStorageOptions=Nt$1(()=>{let t=this.destinationForm();return t.advanced["duplicati-auth-apiid"]&&t.advanced["duplicati-auth-apikey"]});#l=Nt$1(()=>this.hasStorageApiKey()||this.hasManualStorageOptions());restoreBackupIdOptions=L$1(Ty(F(this.targetUrl).pipe(cy(),pt(t=>({url:t,isReload:false}))),F(this.reloadTrigger).pipe(pt(()=>({url:this.targetUrl(),isReload:true}))),F(this.#l).pipe(pt(()=>({url:this.targetUrl(),isReload:false})))).pipe(Yu(({url:t,isReload:e})=>{let n=this.hasStorageApiKey()||this.hasManualStorageOptions(),o=t&&t.startsWith("duplicati://")&&n&&this.isRestoreFlow(),a=this.#c(t);return o&&(e||a!=this.hasAttemptedToLoadBackupIdOptions())?(this.hasAttemptedToLoadBackupIdOptions.set(a),this.isLoadingRestoreBackupIdOptions.set(true),this.#r.getDuplicatiStorageBackups(t).pipe(Bs$1(c=>(console.error("Error loading Duplicati storage backups",c),iy([]))),id(c=>{this.loadedBackupIdOptions.set(c);}),Zu(()=>this.isLoadingRestoreBackupIdOptions.set(false)))):iy(this.loadedBackupIdOptions())})),{initialValue:[]});#c(t){if(!t)return "";let e=t.indexOf("?");if(e===-1)return t;let n=t.substring(0,e),o=new URLSearchParams(t.substring(e+1)),_=["duplicati-auth-apiid","duplicati-auth-apikey","duplicati-endpoint"].filter(c=>o.has(c)).map(c=>`${c}=${o.get(c)}`).join("&");return _?`${n}?${_}`:n}isAuthenticatingFilen=Ge(false);hasFilenApiKey=Nt$1(()=>{let e=this.destinationForm().advanced["api-key"];return e&&e.length>0});nonSelectedAdvancedFormViews=Nt$1(()=>{let t=this.destinationFormConfig();if(!t)return [];let e=this.advancedFormFieldNames();return t.advanced.filter(n=>e.findIndex(o=>o===n.name)===-1)});destinationTypeEffect=Qa$1(()=>{let t=this.targetUrl(),e=G(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 _=e&&e.oauthField?e.oauthField:null,c=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],S=e&&e.advancedFields?e.advancedFields:[],D=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],F={destinationType:o,oauthField:_,custom:[],dynamic:[],advanced:[]};c&&Object.entries(c).forEach(([G,I],J)=>{let H=I.order??J,q=I.validate;!q&&I.type==="Bucketname"&&(q=Z=>We(Z)?null:{type:"error",message:$localize`Invalid bucket name.`}),q&&I.type==="Hostname"&&(q=Z=>He(Z)?null:{type:"error",message:$localize`Invalid hostname.`}),F.custom.push(l({order:900+H,validate:q},I));});for(let G=0;G<a.Options.length;G++){let I=a.Options[G];if(I.Deprecated)continue;let J=u.find(H=>H===I.Name||I.Aliases?.includes(H.name)||H.name===I.Name);if(J){let H=I.Aliases?.indexOf(J.name)??-1,q=I.Aliases&&H>-1?I.Aliases[H]:I.Name,Z=J&&typeof J!="string";Z?J?.defaultValue??I.DefaultValue:I.DefaultValue;let z=Z&&J?.order!==void 0?J.order:G,ue={name:q,type:I.Type,shortDescription:I.ShortDescription??void 0,longDescription:I.LongDescription??void 0,options:I.ValidValues,order:900+z},Ee=Z?l(l({},ue),J):ue;F.dynamic.push(Ee);}else {let H=I.Name;if(D.find(B=>B===H))continue;let Z=S.find(B=>B===H||B.name===H),re=Z&&typeof Z!="string",z=re&&Z?.order!==void 0?Z.order:G,ue={name:H,type:I.Type,shortDescription:I.ShortDescription??void 0,longDescription:I.LongDescription??void 0,options:I.ValidValues,defaultValue:I.DefaultValue,order:900+z},Ee=re?l(l({},ue),Z):ue;F.advanced.push(Ee);}}if(F.custom.sort((G,I)=>G.order-I.order),F.dynamic.sort((G,I)=>G.order-I.order),F.advanced.sort((G,I)=>G.order-I.order),this.destinationFormConfig.set(F),!t)return;let R=je(t);R&&this.destinationForm.set({custom:R.custom,dynamic:R.dynamic,advanced:R.advanced});});destinationFormEffect=Qa$1(()=>{let t=this.#s,e=this.destinationForm();this.refreshView();if(!e||!t)return;let o=Be({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}#d=Ge(false);browse(t,e,n){let o=this.useBackupState()?this.#e.backupId():null,a=this.useBackupState()?this.#e.connectionStringId():null;this.#a.open(cn,{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.#d.set(true);let a=(o??1)==2?this.#t.defaultOAuthUrlV2():this.#t.defaultOAuthUrl(),_=this.#n.serverSettings()?.["--oauth-url"];if(_&&_.length>0&&(a=_),this.useBackupState()){let I=this.#e.mapFormsToSettings().find(J=>J.Name==="--oauth-url")?.Value;I&&I.length>0&&(a=I);}let c=this.destinationForm().advanced["oauth-url"];c&&c.length>0&&(a=c);let u=`${a}?type=${t}`,S=450,D=600,F=screen.width/2-S/2,R=screen.height/2-D/2,G=window.open(u,"_blank","height="+D+",width="+S+",menubar=0,status=0,titlebar=0,toolbar=0,left="+F+",top="+R);return window.addEventListener("message",I=>{let J=I.data.startsWith("authid:"),H=J?I.data.replace("authid:",""):null;J&&(this.destinationForm.update(q=>(q[e][n]=H,l({},q))),this.#d.set(false),this.refreshView.set(!this.refreshView()),G?.close());}),false}settingsAsText=Nt$1(()=>{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=Re(t);this.destinationForm.update(n=>m$2(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(Zu(()=>this.isAuthenticatingFilen.set(false))).subscribe({next:n=>{if(n.length===0){this.#a.open(h,{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,{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,{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=gw({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 _;_=$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 S;S=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let F;F=$localize`This field is mandatory`;let R;R=$localize`This field is mandatory`;let G;G=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let J;J=$localize`This field is mandatory`;let H;H=$localize`Loading available backups...`;let q;q=$localize`No backups found from this machine, contact support`;let Z;Z=$localize` Try again `;let re;re=$localize`This field is mandatory`;let z;z=$localize`Pick the backup to restore from`;let ue;ue=$localize`This field is mandatory`;let Ee;Ee=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:pencil${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let B;B=$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:`,B=sC(B);let We;We=$localize` Visit console ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ke;ke=$localize`Connect to the console to use Duplicati storage.`;let Y;Y=$localize` Connect now ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Et;Et=$localize`This field is mandatory`;let ft;return ft=$localize` Authenticate now `,[["fieldTemplate",""],["validateTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],["backupIdOptionTemplate",""],t,e,n,H,q,Z,z,Ee,B,We,ke,Y,ft,[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",_],["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",S],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",D],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",F],["shTooltip",R],["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",I],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",J],[1,"duplicati-backup-id"],[1,"duplicati-backup-id-console"],[1,"no-backups-found"],[3,"options","isClearable"],["shTooltip",re],["shTooltip",ue],["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",Et],["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&&(dm(0)(1),lT(2,gs,18,5)),e&2){let o=GC(n.destinationType());bE();let a=GC(n.destinationFormConfig());bE(),uT(o&&a?2:-1);}},dependencies:[Gn,Ze,en,Rn,Bn,Jt,ei,_t,le$1,q,Z,dn,Fe,v,N,I,ve,Nt$2,at,J,d,m$1],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 pn=class i{#e=T(J$1);#t=T(be);#n=T(f);testDestination(t,e,n,o,a,_,c,u,S){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,n,o,a,_,c,u,S):this.testDestinationv1(t,e,n,o,a,_,c,u,S)}testDestinationv2(t,e,n,o,a,_,c,u,S$1){return new S(D=>{sy(()=>this.#e.postApiV2DestinationTest({body:{DestinationUrl:t,ConnectionStringId:n??null,BackupId:e=="new"?null:e,AutoCreate:u==="create",ReadOnlyTest:S$1,Options:null,DestinationType:_,SourcePrefix:e=="new"?null:o}})).subscribe({next:F=>{if(F.Success){this.emitSuccessV2(D,t,a,F);return}this.handleGenericError(D,t,a,F.Error??"Unknown error",c);},error:F=>{let R=F?.error?.body??F?.error?.requestBody;if(R?.Data?.FolderExists===false||R?.StatusCode==="missing-folder"){this.handleMissingFolder(D,t,e,n,a,c,u,S$1);return}if(R?.Data?.HostCertificate){this.handleMissingCertificate(D,t,a,R.Data?.HostCertificate,c);return}if(R?.Data?.ReportedHostKey){this.handleIncorrectKey(D,t,a,R.Data.ReportedHostKey,R.Data.AcceptedHostKey??null,c);return}this.handleGenericError(D,t,a,F?.message??"Unknown error",c);}});})}testDestinationv1(t,e,n,o,a,_,c,u,S$1){return new S(D=>{sy(()=>this.#e.postApiV1RemoteoperationTest({query:{readOnlyTest:S$1,type:_},body:{path:t,backupId:e=="new"?null:e,connectionStringId:n??null,sourcePrefix:e=="new"?null:o}})).subscribe({next:F=>{D.next({action:"success",targetUrl:t,testAgain:false,destinationIndex:a}),D.complete();},error:F=>{this.handleDestinationErrorv1(F.message,t,e,n,a,c,u,S$1).subscribe(R=>{D.next(R);});}});})}handleMissingFolder(t,e,n,o,a,_,c,u){function S(){t.next({action:"missing-folder",targetUrl:e,testAgain:false,destinationIndex:a,errorMessage:$localize`The remote destination folder does not exist.`}),t.complete();}if(_||c==="error"){S();return}this.#t.open(h,{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()?sy(()=>this.#e.postApiV2DestinationTest({body:{DestinationUrl:e,ConnectionStringId:o,AutoCreate:true,ReadOnlyTest:u,Options:null,BackupId:n=="new"?null:n}})).subscribe({next:F=>{if(F.Success){this.emitSuccessV2(t,e,a,F);return}else this.handleFolderCreateFailure(t,e,a,F.Error??$localize`Unknown error`);},error:F=>{this.handleFolderCreateFailure(t,e,a,F.message??$localize`Unknown error`);}}):sy(()=>this.#e.postApiV1RemoteoperationCreate({body:{path:e,backupId:n=="new"?null:n}})).subscribe({next:()=>{this.handleFolderCreated(t,e,a);},error:F=>{this.handleFolderCreateFailure(t,e,a,F.message??$localize`Unknown error`);}});}});}handleFolderCreateFailure(t,e,n,o){this.#t.open(h,{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,{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 _=$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:_,destinationIndex:n}),t.complete();}if(a){u();return}this.#t.open(h,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:_,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:S=>{if(!S){this.reportNoAction(t,e,n,$localize`The server certificate is not trusted.`);return}u();}});}handleIncorrectKey(t,e,n,o,a,_){if(a){let D=function(){t.next({action:"approve-host-key",targetUrl:e,suggestedUrl:S,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}?`,S=e;try{let R=new URL(e);R.searchParams.set("ssh-fingerprint",o),S=R.toString();}catch{let R=e.replace(/([?&])ssh-fingerprint=[^&]*/,""),G=R.includes("?");S=R+`${G?"&":"?"}ssh-fingerprint=${o}`;}if(_){D();return}this.#t.open(h,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:R=>{if(!R){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+`${S?"&":"?"}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}`,S=e.includes("?");if(_){D();return}this.#t.open(h,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:u,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:F=>{if(!F){this.reportNoAction(t,e,n,$localize`The host key was not approved.`);return}D();}});}}handleGenericError(t,e,n,o,a){function _(){t.next({action:"generic-error",targetUrl:e,testAgain:false,destinationIndex:n,errorMessage:o}),t.complete();}if(a){_();return}this.#t.open(h,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:c=>_()});}handleDestinationErrorv1(t,e,n,o,a,_,c,u){return new S(S=>{if(t==="missing-folder"){this.handleMissingFolder(S,e,n,o,a,_,c,u);return}if(t.startsWith("incorrect-cert:")){let D=t.split("incorrect-cert:")[1];this.handleMissingCertificate(S,e,a,D,_);return}if(t.startsWith("incorrect-host-key:")){let D=t.split('incorrect-host-key:"')[1].split('",')[0],F=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(S,e,a,D,F,_);return}this.handleGenericError(S,e,a,t,_);})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function Ts(i,t){if(i&1){let e=ET();Zi$1(0,"sh-alert",13),Fg(1,0),Zi$1(2,"button",14),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.testDestinationClick())}),Wl(),jg(),Wl();}}function Ss(i,t){i&1&&(Zi$1(0,"sh-alert",13),Fg(1,1),Ig(2,"sh-icon"),Zi$1(3,"div",15),Ig(4,"sh-spinner"),Wl(),jg(),Wl()),i&2&&(bE(4),Yg("--spinner-size","16px")("--spinner-thickness","2px"));}function Es(i,t){i&1&&(Zi$1(0,"sh-alert",17),oC(1,2),Wl());}function fs(i,t){i&1&&(Zi$1(0,"sh-alert",16),oC(1,3),Wl());}function hs(i,t){if(i&1&&lT(0,Es,2,0,"sh-alert",17)(1,fs,2,0,"sh-alert",16),i&2){let e=aC(4);uT(e.testResponse()?.containsBackup?0:1);}}function ys(i,t){i&1&&(Zi$1(0,"sh-alert",18),oC(1,4),Wl());}function Ns(i,t){i&1&&(Zi$1(0,"sh-alert",16),oC(1,5),Wl());}function Fs(i,t){i&1&&(Zi$1(0,"sh-alert",17),oC(1,6),Wl());}function Ds(i,t){if(i&1&&lT(0,ys,2,0,"sh-alert",18)(1,Ns,2,0,"sh-alert",16)(2,Fs,2,0,"sh-alert",17),i&2){let e=aC(4);uT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function Os(i,t){i&1&&(Zi$1(0,"sh-alert",17),oC(1,7),Wl());}function As(i,t){i&1&&(Zi$1(0,"sh-alert",16),oC(1,8),Wl());}function Is(i,t){if(i&1&&lT(0,Os,2,0,"sh-alert",17)(1,As,2,0,"sh-alert",16),i&2){let e=aC(4);uT(e.testResponse()?.anyFilesFound?0:1);}}function Ps(i,t){i&1&&(Zi$1(0,"sh-alert",17),oC(1,9),Wl());}function Ms(i,t){i&1&&(Zi$1(0,"sh-alert",17),oC(1,10),Wl());}function Rs(i,t){i&1&&(Zi$1(0,"sh-alert",17),oC(1,11),Wl());}function Ls(i,t){if(i&1&&lT(0,Ps,2,0,"sh-alert",17)(1,Ms,2,0,"sh-alert",17)(2,Rs,2,0,"sh-alert",17),i&2){let e=aC(4);uT(e.testResponse()?.containsBackup?0:e.testResponse()?.anyFilesFound?1:2);}}function xs(i,t){if(i&1&&lT(0,hs,2,1)(1,Ds,3,1)(2,Is,2,1)(3,Ls,3,1),i&2){let e=aC(3);uT(e.testExpectation()==="containsBackup"?0:e.testExpectation()==="destinationEmpty"?1:e.testExpectation()==="destinationNotEmpty"?2:3);}}function bs(i,t){if(i&1){let e=ET();Fg(0,12,1),Zi$1(1,"button",14),Hg("click",function(){Pd(e);let o=aC(4);return Ld(o.createFolder())}),Wl(),jg();}}function vs(i,t){if(i&1&&(Zi$1(0,"sh-alert",16),Fg(1,12),lT(2,bs,2,0,"button",19),jg(),Wl()),i&2){let e=aC(3);bE(2),uT(e.askToCreate()?2:-1);}}function ws(i,t){if(i&1){let e=ET();Zi$1(0,"sh-alert",16),HC(1),Zi$1(2,"button",14),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.useSuggestedUrl())}),HC(3,"Approve"),Wl()();}if(i&2){let e=aC(3);bE(),Yl(" ",e.testResponse()?.errorMessage," ");}}function Gs(i,t){if(i&1){let e=ET();Zi$1(0,"sh-alert",16),HC(1),Zi$1(2,"button",14),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.useSuggestedUrl())}),HC(3,"Approve"),Wl()();}if(i&2){let e=aC(3);bE(),Yl(" ",e.testResponse()?.errorMessage," ");}}function $s(i,t){if(i&1){let e=ET();Zi$1(0,"sh-alert",16),HC(1),Zi$1(2,"button",14),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.testDestinationClick())}),HC(3,"Test again"),Wl()();}if(i&2){let e=aC(3);bE(),Yl(" ",e.testResponse()?.errorMessage," ");}}function Us(i,t){if(i&1&&lT(0,xs,4,1)(1,vs,3,1,"sh-alert",16)(2,ws,4,1,"sh-alert",16)(3,Gs,4,1,"sh-alert",16)(4,$s,4,1,"sh-alert",16),i&2){let e=aC(2);uT(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 ks(i,t){if(i&1&&lT(0,Ts,3,0,"sh-alert",13)(1,Ss,5,4,"sh-alert",13)(2,Us,5,1),i&2){let e=aC();uT(e.testSignal()===null?0:e.testSignal()==="testing"?1:2);}}var mn=class i{#e=T(pn);targetUrl=D1.required();testSignal=D1.required();connectionStringId=E1(null);backupId=E1.required();sourcePrefix=E1.required();suppressErrorDialogs=E1.required();askToCreate=E1.required();readOnlyTest=E1.required();testExpectation=E1.required();moduleType=E1.required();testResponse=Nt$1(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});isExpectedValidTargetUrl=Nt$1(()=>{let t=this.targetUrl();return !(!t||!je(t))});prevTargetUrl=null;targetUrlEffect=Qa$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 _=a.suggestedUrl;_&&this.targetUrl.set(_),this.testSignal.set("testing"),this.#e.testDestination(_??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=gw({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 _;_=$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 S;S=$localize`The remote destination is empty.`;let D;D=$localize`Success! Test completed, backup found.`;let F;F=$localize`Success! Test completed, destination contains files.`;let R;R=$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,_,c,u,S,D,F,R,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&&lT(0,ks,3,1),e&2&&uT(n.isExpectedValidTargetUrl()?0:-1);},dependencies:[ue,v,N,m$1],styles:["[_nghost-%COMP%]{display:block}.testing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:space-between}"]})};function Bs(i,t){if(i&1){let e=ET();Zi$1(0,"app-destination-list",10),Hg("setDestination",function(o){Pd(e);let a=aC();return Ld(a.setDestination(o))}),Wl();}if(i&2){let e=aC();vg("showAsSources",true)("moduleType",e.moduleType());}}function Vs(i,t){if(i&1){let e=ET();Zi$1(0,"app-destination-list-item",11)(1,"button",8),Hg("click",function(){Pd(e);let o=aC();return Ld(o.removeDestination())}),oC(2,3),Wl()(),Zi$1(3,"app-test-url",12),lm("targetUrlChange",function(o){Pd(e);let a=aC();return qC(a.targetUrlModel,o)||(a.targetUrlModel=o),Ld(o)})("testSignalChange",function(o){Pd(e);let a=aC();return qC(a.testSignal,o)||(a.testSignal=o),Ld(o)}),Wl(),Zi$1(4,"app-single-destination",13),lm("targetUrlChange",function(o){Pd(e);let a=aC();return qC(a.targetUrlModel,o)||(a.targetUrlModel=o),Ld(o)}),Wl();}if(i&2){let e=aC();vg("targetUrl",e.targetUrlModel()),bE(3),cm("targetUrl",e.targetUrlModel)("testSignal",e.testSignal),vg("backupId",e.backupId())("sourcePrefix",e.sourcePrefix())("suppressErrorDialogs",e.suppressErrorDialogs())("askToCreate",e.askToCreate())("testExpectation",e.expectedResult())("readOnlyTest",true)("moduleType",e.moduleType()),bE(),cm("targetUrl",e.targetUrlModel);}}function Ks(i,t){i&1&&oC(0,2,1);}function Js(i,t){i&1&&oC(0,2,2);}function Xs(i,t){i&1&&oC(0,2,3);}function zs(i,t){i&1&&oC(0,2,4);}var Ft=class i{data=E1();closed=I1();targetUrlModel=Ge(null);moduleType=Ge("Backend");askToCreate=Ge(false);expectedResult=Ge("any");suppressErrorDialogs=Ge(false);backupId=Ge(null);sourcePrefix=Ge(null);dataEffect=Qa$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=Ge(null);setTargetUrl(t,e=false){this.targetUrlModel.set(t);}setDestination(t){let e=A(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=gw({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=sC(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&&(Zi$1(0,"header")(1,"h3",4),oC(2,0),Wl()(),Zi$1(3,"section",5),lT(4,Bs,1,2,"app-destination-list",6),lT(5,Vs,5,11),Wl(),Zi$1(6,"footer",7)(7,"button",8),Hg("click",function(){return n.closed.emit(null)}),oC(8,1),Wl(),Zi$1(9,"button",9),Hg("click",function(){return n.submit()}),Fg(10,2),lT(11,Ks,1,0)(12,Js,1,0)(13,Xs,1,0)(14,zs,1,0),jg(),Wl()()),e&2){let o=!!n.targetUrlModel();bE(4),uT(o?-1:4),bE(),uT(o?5:-1),bE(4),Kg("loading",n.testSignal()==="testing"),vg("disabled",!o||n.testSignal()===null||n.testSignal()==="testing"),bE(2),uT(n.moduleType()==="Backend"?11:n.moduleType()==="SourceProvider"?12:n.moduleType()==="RestoreDestinationProvider"?13:14);}},dependencies:[un,_n,Ct,v,mn],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 Hs=["formRef"],Ws=()=>({updateOn:"blur",standalone:true}),Dn=()=>({standalone:true});function js(i,t){if(i&1){let e=ET();Zi$1(0,"button",41),Hg("click",function(){Pd(e);let o=aC(2);return Ld(o.openLocalDiskDialog())}),Fg(1,12),Ig(2,"sh-icon"),jg(),Wl();}}function qs(i,t){if(i&1){let e=ET();lT(0,js,3,0,"button",40),Zi$1(1,"button",41),Hg("click",function(){Pd(e);let o=aC();return Ld(o.openRemoteDestinationDialog())}),Fg(2,11),Ig(3,"sh-icon"),jg(),Wl();}if(i&2){let e=aC();uT(e.isLocalDiskSupported()?0:-1);}}function Ys(i,t){i&1&&oC(0,7,1);}function Qs(i,t){i&1&&oC(0,7,2);}function Zs(i,t){i&1&&(Zi$1(0,"p",34),oC(1,13),Wl());}function el(i,t){i&1&&(Zi$1(0,"p",34),oC(1,14),Wl());}function tl(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field")(1,"textarea",42),lm("ngModelChange",function(o){Pd(e);let a=aC();return qC(a.bulkPaths,o)||(a.bulkPaths=o),Ld(o)}),Hg("ngModelChange",function(){Pd(e);let o=aC();return Ld(o.savePathBulkEdit())}),Wl(),bD(),Wl();}if(i&2){let e=aC();bE(),cm("ngModel",e.bulkPaths),vg("ngModelOptions",XC(2,Ws)),MD();}}function nl(i,t){if(i&1){let e=ET();Zi$1(0,"sh-form-field",46)(1,"input",47),lm("ngModelChange",function(o){Pd(e);let a=aC(3);return qC(a.editingPath,o)||(a.editingPath=o),Ld(o)}),Wl(),bD(),Wl(),Zi$1(2,"button",24),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.updatePath())}),Zi$1(3,"sh-icon"),HC(4,"floppy-disk"),Wl()(),Zi$1(5,"button",24),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.cancelEditPath())}),Zi$1(6,"sh-icon"),HC(7,"x-bold"),Wl()();}if(i&2){let e=aC(3);bE(),cm("ngModel",e.editingPath),vg("ngModelOptions",XC(2,Dn)),MD();}}function il(i,t){if(i&1){let e=ET();Zi$1(0,"button",51),Hg("click",function(){Pd(e);let o=aC(3).$implicit,a=aC(2);return Ld(a.openOffice365Counts(o))}),Zi$1(1,"sh-icon"),HC(2,"info"),Wl()();}}function ol(i,t){if(i&1){let e=ET();Zi$1(0,"button",52),Hg("click",function(){Pd(e);let o=aC(3).$implicit,a=aC(2);return Ld(a.openCustomRemotePermissions(o))}),Zi$1(1,"sh-icon"),HC(2,"shield-check"),Wl()();}}function al(i,t){if(i&1&&(Zi$1(0,"sh-chip"),Ig(1,"img",48),HC(2),Wl(),lT(3,il,3,0,"button",49),lT(4,ol,3,0,"button",50)),i&2){let e=aC(2).$implicit,n=aC(2);bE(),vg("src",n.getBackendIcon(e),Yp),bE(),Yl(" ",n.getRemotePathDisplayName(e)," "),bE(),uT(e.includes("|office365://")?3:-1),bE(),uT(e.includes("|office365://")||e.includes("|googleworkspace://")?4:-1);}}function rl(i,t){if(i&1&&(Zi$1(0,"sh-form-field",46),Ig(1,"input",53),bD(),Wl()),i&2){let e=aC(2).$implicit;yg("readonly",true),bE(),vg("ngModel",e)("ngModelOptions",XC(3,Dn)),MD();}}function sl(i,t){if(i&1){let e=ET();lT(0,al,5,4)(1,rl,2,4,"sh-form-field",46),Zi$1(2,"button",24),Hg("click",function(){Pd(e);let o=aC().$implicit,a=aC(2);return Ld(a.editPath(o))}),Zi$1(3,"sh-icon"),HC(4,"pen"),Wl()(),Zi$1(5,"button",24),Hg("click",function(){Pd(e);let o=aC().$implicit,a=aC(2);return Ld(a.removePath(o))}),Zi$1(6,"sh-icon"),HC(7,"trash-simple"),Wl()();}if(i&2){let e=aC().$implicit;uT(e.startsWith("@")?0:1);}}function ll(i,t){if(i&1&&(Zi$1(0,"div",43),lT(1,nl,8,3)(2,sl,8,1),Wl()),i&2){let e=t.$implicit,n=aC(2);bE(),uT(n.oldPath()===e?1:2);}}function _l(i,t){if(i&1){let e=ET();pT(0,ll,3,1,"div",43,dT),Zi$1(2,"div",39)(3,"sh-form-field"),Ig(4,"input",44),bD(),Wl(),Zi$1(5,"button",45),Hg("click",function(){Pd(e);let o=aC();return Ld(o.addNewPath())}),Zi$1(6,"sh-icon"),HC(7,"plus"),Wl()()();}if(i&2){let e=aC();hT(e.nonFilterPaths()),bE(4),vg("formControl",e.newPathCtrl),MD();}}function dl(i,t){if(i&1){let e=ET();Zi$1(0,"div",39)(1,"app-size",54),Hg("ngModelChange",function(o){Pd(e);let a=aC();return Ld(a.updateFilesLargerThan(o))}),Wl(),bD(),Wl();}if(i&2){let e=aC();bE(),vg("ngModel",e.filesLargerThan())("ngModelOptions",XC(2,Dn)),MD();}}var Tt=new jn,Mi=(i={path:"",filters:[],excludes:{filesLargerThan:null}})=>Tt.group({path:Tt.control(i.path),excludes:Tt.group({filesLargerThan:Tt.group({size:Tt.control(null),unit:Tt.control(null)})})}),Fn=class i{#e=T(Ke);#t=T(be);#n=T(ee);#i=T(W);#o=T(f);#r=T(d$1);formRef=w1.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new L("");filesLargerThan=Nt$1(()=>{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$1(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=Nt$1(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=Ge(null);editingPath=Ge(null);addingNewPath=Ge(false);bulkPathEditMode=Ge(false);bulkPaths=Ge("");mobileMenuOpen=Ge(false);backupId=this.#e.backupId();isLocalDiskSupported=Nt$1(()=>this.#o.systemInfo()?.SourceProviderModules?.find(t=>t.Key=="diskimage"));filters=Ge([]);#a=Qa$1(()=>{let e=this.pathSignal()?.split("\0").filter(n=>n!=="___none___"&&(n.startsWith("-")||n.startsWith("+")))??[];this.filters.set(e);});openRemoteDestinationDialog(){this.#t.open(Ft,{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],_=`@${this.#o.systemInfo()?.DirectorySeparator==="\\"?"X:\\":"/"}dupl-${o}-${n}|${e}`;this.addPath(_);});}openLocalDiskDialog(){this.#t.open(Nt,{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(Nt,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{initialPath:n}}).closed.subscribe(a=>{if(!a)return;let _=`${e}|diskimage://${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,_)??"");});}editTargetUrlPath(t,e,n){this.#t.open(Ft,{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 _=`${e}|${a}`,c=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(c?.replace(t,_)??"");});}updateFilesLargerThan(t){let{size:e,unit:n}=le(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(_=>_&&_!=="").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 Le(e)}getRemotePathDisplayName(t){if(!t)return "";let e=t.split("|")[1];return Ne(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(sn,{maxWidth:"500px",width:"100%",closeOnOutsideClick:true,data:{url:o,sourcePrefix:n,backupId:this.backupId}});}openCustomRemotePermissions(t){if(!t||!t.startsWith("@"))return;let e=t.split("|");if(e.length!==2)return;let n=e[1].startsWith("office365://")?"office365":e[1].startsWith("googleworkspace://")?"googleworkspace":null;if(!n)return;let o=e[0],a=e[1];this.#t.open(rn,{maxWidth:"700px",width:"100%",closeOnOutsideClick:true,data:{url:a,sourcePrefix:o,backupId:this.backupId,module:n,mode:"backup"}});}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(["general"],{relativeTo:this.#i.parent});}next(){this.#e.shouldAutoSave()&&this.#e.submit(true),this.#n.navigate(["destination"],{relativeTo:this.#i.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&qg(n.formRef,Hs,5),e&2&&hC();},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 _;_=$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 S;S=$localize`Exclude`;let D;D=$localize`Choose if there’s any files you want to exclude.`;let F;F=$localize` Files larger than `;let R;R=$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 I;I=$localize`Manually add a path.`;let J;J=$localize`Edit paths as text, one per line.`;let H;H=$localize`Add a direct path`;let q;q=$localize`Edit path`;let Z;Z=$localize`Show item counts`;let re;return re=$localize`Check permissions`,[["formRef",""],e,n,o,a,_,c,u,S,D,F,R,G,I,J,[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",H,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",q,3,"ngModelChange","ngModel","ngModelOptions"],["alt","Provider icon",1,"provider-icon",3,"src"],["shButton","","type","button","title",Z,1,"small"],["shButton","","type","button","title",re,1,"small"],["shButton","","type","button","title",Z,1,"small",3,"click"],["shButton","","type","button","title",re,1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let o=ET();Zi$1(0,"form",15,0),Hg("submit",function(){return n.next()}),Zi$1(2,"div",16)(3,"div",17)(4,"h3",18),oC(5,1),Wl(),Zi$1(6,"button",19),Hg("click",function(){return n.mobileMenuOpen.set(true)}),Zi$1(7,"sh-icon"),HC(8,"sliders"),Wl()()(),Zi$1(9,"app-file-tree",20)(10,"label",21),oC(11,2),Wl(),Ig(12,"input",22),bD(),Wl(),Zi$1(13,"div",23)(14,"button",24),Hg("click",function(){return n.goBack()}),Fg(15,3),Ig(16,"sh-icon"),jg(),Wl(),Zi$1(17,"button",25),Fg(18,4),Ig(19,"sh-icon"),jg(),Wl()()(),Zi$1(20,"div",26)(21,"div",27)(22,"span",18),oC(23,5),Wl(),Zi$1(24,"button",28),Hg("click",function(){return n.mobileMenuOpen.set(false)}),Zi$1(25,"sh-icon"),HC(26,"x-bold"),Wl()()(),Zi$1(27,"app-toggle-card",29),zl(28,30),Zi$1(29,"span"),oC(30,6),Wl(),Ig(31,"div",31),lT(32,qs,4,1),Zi$1(33,"sh-menu")(34,"button",32)(35,"sh-icon"),HC(36,"dots-three-vertical"),Wl()(),zl(37,33),Zi$1(38,"button",24),Hg("click",function(){return n.togglePathBulkEdit()}),Fg(39,7),Ig(40,"sh-icon"),lT(41,Ys,1,0)(42,Qs,1,0),jg(),Wl(),Ql(),Wl(),Ql(),lT(43,Zs,2,0,"p",34)(44,el,2,0,"p",34),Zi$1(45,"div",35),lT(46,tl,2,3,"sh-form-field")(47,_l,8,1),Wl()(),Zi$1(48,"app-filters",36),lm("filtersChange",function(_){return Pd(o),qC(n.filters,_)||(n.filters=_),Ld(_)}),Hg("filtersChange",function(_){return n.updateFilters(_)}),Wl(),Zi$1(49,"app-toggle-card",37),zl(50,30),oC(51,8),Ql(),Zi$1(52,"p",34),oC(53,9),Wl(),Zi$1(54,"sh-toggle",38),Hg("checkedChange",function(_){return n.toggleFilesLargerThan(_)}),oC(55,10),Wl(),lT(56,dl,2,3,"div",39),Wl()()();}e&2&&(vg("formGroup",n.sourceDataForm),bE(9),vg("multiSelect",true)("startingPath",n.getPath())("showFiles",true)("showUnrootedSources",true)("backupId",n.backupId),bE(3),MD(),bE(8),Kg("open",n.mobileMenuOpen()),bE(7),vg("disableToggle",true),bE(5),uT(n.bulkPathEditMode()?-1:32),bE(9),uT(n.bulkPathEditMode()?41:42),bE(2),uT(n.bulkPathEditMode()?44:43),bE(3),uT(n.bulkPathEditMode()?46:47),bE(2),cm("filters",n.filters),vg("osType",n.osType()??""),bE(),vg("disableToggle",true),bE(5),vg("checked",n.filesLargerThan()!==null),bE(2),uT(n.filesLargerThan()?56:-1));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt,Gn,ln$1,gn,hn$1,ft,Fe,N,v,J,ve,an,le$1,rt,q,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 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 Ri="1W:1D,4W:1W,12M:1M",On=false,Cn=(i,t,e,n)=>({uiKey:x$1(),url:i,connectionStringId:t,urlKey:e,save:n}),Ke=class i{#e=T(ee);#t=T(f);#n=T(be);#i=T(J$1);#o=T(R);#r=T(tn);#a=T(mt);generalForm=Li();sourceDataForm=Mi();scheduleFields=Nn();scheduleType=Ge("daily");settings=Ge([]);optionsFields={backupRetention:Ge("all"),backupRetentionTime:Ge(""),backupRetentionVersions:Ge(0),backupRetentionCustom:Ge("")};targetUrls=Ge([]);targetUrlModel=Nt$1(()=>this.targetUrls()[0]?.url??null);connectionStringId=Nt$1(()=>this.targetUrls()[0]?.connectionStringId??null);targetUrlTestSignal=Ge(null);backupMetadata=Ge(null);isDraft=Ge(false);backupId=Ge(null);backupName=Nt$1(()=>this.generalFormSignal()?.name??"");isSubmitting=Ge(false);finishedLoading=Ge(false);backupDefaults=Ge(null);applicationOptions=Ge(null);isNew=Nt$1(()=>this.backupId()==="new");shouldAutoSave=Nt$1(()=>!this.isDraft()&&!this.isNew());osType=Nt$1(()=>this.#t.systemInfo()?.OSType);isSyncMode=Nt$1(()=>this.generalForm.controls.operationType.value==="Sync");isConnectionStringSaved=Nt$1(()=>{let t=this.targetUrlModel();return t?this.#a.destinations().some(e=>e.BaseUrl===t):false});selectedOptions=Ge([]);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$1(()=>this.#t.systemInfo()?.Options?.map(this.#_)??[]);#s=Ge(null);#l=null;testSignal=this.#s.asReadonly();#c=Qa$1(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&this.#s.set(null);});#d=Qa$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);}#_(t){return {name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=Nt$1(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return [St,...t]});nonSelectedOptions=Nt$1(()=>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.#m().pipe(Yu(e=>{let n=this.#u(),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,S)=>{let D=e[S+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()?sy(()=>this.#i.postApiV1Backups({body:n})):sy(()=>this.#i.putApiV1BackupById({path:{id:o},body:n}))}),Zu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{t||this.exit(false);},error:()=>{}});}validateBeforeSubmit(){this.generalForm.markAllAsTouched(),this.sourceDataForm.markAllAsTouched();let t=this.#u(),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,{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 _=this.targetUrls();if(!(_.length>0&&_.some(S=>S.url.trim()!=="")))return this.#n.open(h,{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(S=>S.trim()!=="").length>0;return !u||!this.sourceDataForm.valid?(this.#n.open(h,{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.#p(),this.#e.navigate(["/"]);return}this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#p(),this.#e.navigate(["/"]));}});}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(_=>`${_.Include?"+":"-"}${_.Expression}`)??[],o=t.Settings?.find(_=>_.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,a={path:[...e,...n].join("\0"),excludes:{filesLargerThan:o===null?void 0:le(o)}};this.sourceDataForm.patchValue(a);}mapDestinationToForm(t){let e=t,n=t.TargetURL??"",o=(t.ConnectionStringID===-1?null:t.ConnectionStringID)??null,a=n?[Cn(n,o,null,!!o)]:[],_=e.AdditionalTargetURLs?.map(c=>Cn(c.TargetUrl,c.ConnectionStringID??null,c.UrlKey??null,!!c.ConnectionStringID))??[];this.targetUrls.set([...a,..._]);}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",{encryptionDisabled:o,encryptionModule:a,passphrase:_}=yi(t.Settings),c=t.OperationType??"Backup",u={name:t.Name??"",description:t.Description??"",operationType:c};e&&e!==""&&(u.name=e),n&&n!==""&&(u.description=n),o?u.encryption=St.Key:a&&(u.encryption=a),u.password=_,u.repeatPassword=_,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.#C(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=yt(this.scheduleFields),a=nn.find(_=>JSON.stringify(_.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(S=>S.startsWith("--")).forEach(S=>{o.find(F=>F.Name===S)||o.push({Name:S,Value:u[S],Filter:null});});}let a=o.filter(u=>!n.includes(u.Name)),_=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";_?.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===Ri)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=yt(this.scheduleFields);return Di(t)}#u(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,a=this.targetUrls()[0],_=a?.url??null,c=n.path?.split("\0")??[],u=this.mapFormsToSettings(),S=n.excludes?.filesLargerThan;return S&&S.size!==null&&S.unit!==null&&u.push({Name:"--skip-files-larger-than",Value:`${S.size}${S.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:_??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,F)=>({Order:F,Include:D.startsWith("+"),Expression:D.slice(1)}))},Schedule:e}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["dblock-size","compression-module"],o=["--no-encryption","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy",...n,...n.map(F=>`--${F}`)],a=[{Name:"--no-encryption",Value:"True"}];!(e.operationType==="Sync")&&e.encryption!==""&&e.encryption!==St.Key&&(a=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let c=n.map(F=>{let R=this.settings().find(G=>G.Name===F||G.Name==="--"+F);return R?{Name:F,Value:R.Value}:null}).filter(F=>F!==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:Ri});break}let S=[...t,...o],D=this.settings().filter(F=>!S.includes(F.Name)).map(F=>{let R=F.Value;return typeof F.Value=="number"&&(R=F.Value.toString()),typeof F.Value=="boolean"&&(R=F.Value?"True":"False"),{Name:F.Name?.startsWith("--")?F.Name:`--${F.Name}`,Value:R}});return [...a,...c,...u,...D]}#m(){let t=this.targetUrls();if(t.length===0)return iy([]);let e=t.map(n=>{if(n.connectionStringId)return iy(n.connectionStringId);if(!n.save)return iy(null);let o=n.url,_=G(o)?.displayName??"Destination";this.#a.destinations().filter(F=>F.Name?.startsWith(_)).length;let D={Name:`${_} ${new Date().toISOString()}`,Description:null,BaseUrl:o};return this.#a.save("new",D).pipe(pt(F=>F.Data?.ID??null))});return wy(e).pipe(id(n=>{let o=this.targetUrls();n.forEach((a,_)=>{if(a&&_<o.length&&(this.#a.reload(),o[_].connectionStringId!==a)){let c=o[_].urlKey;this.updateTargetUrl(_,o[_].url,a,c);}});}))}#C(t){if(!t||t?.indexOf("T")===-1)return {time:t??"13:00"};let e=new Date(t);return {time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:`${(""+e.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 _=[...a];return _.length===0?_.push(Cn(t,n,o,n?true:On)):_[0]=m$2(l({},_[0]),{url:t,urlKey:o,connectionStringId:n,save:n?true:On}),_});}addTargetUrl(t,e,n){this.targetUrls.update(o=>[...o,Cn(t,e,n,e?true:On)]);}updateTargetUrl(t,e,n,o){this.targetUrls.update(a=>{if(t<0||t>=a.length)return a;let _=[...a],c=_[t].save;return _[t]=m$2(l({},_[t]),{url:e,connectionStringId:n,urlKey:o,save:n?true:c}),_});}toggleSaveConnectionString(t){this.targetUrls.update(e=>{if(t<0||t>=e.length)return e;let n=[...e];return n[t]=m$2(l({},n[t]),{save:!n[t].save}),n});}removeTargetUrl(t){this.targetUrls.update(e=>e.filter((n,o)=>o!==t));}#p(){this.generalForm.reset({operationType:"Backup"}),this.sourceDataForm.reset(),this.scheduleFields=Nn(),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 cl=["formRef"];function ul(i,t){i&1&&(Zi$1(0,"sh-alert",31),Fg(1,5),Ig(2,"sh-icon",33),jg(),Wl());}function pl(i,t){i&1&&(Zi$1(0,"sh-alert",32),Fg(1,6),Ig(2,"sh-icon",33),jg(),Wl());}function ml(i,t){if(i&1&&lT(0,ul,3,0,"sh-alert",31)(1,pl,3,0,"sh-alert",32),i&2){let e=aC();uT(e.generalFormSignal()?.operationType==="Sync"?0:!e.canEditEncryption()&&e.generalFormSignal()?.encryption!==""?1:-1);}}function Cl(i,t){if(i&1){let e=ET();Zi$1(0,"div",26)(1,"label"),oC(2,7),Wl(),Zi$1(3,"sh-button-group",34),lm("valueChange",function(o){Pd(e);let a=aC();return qC(a.operationTypeFieldSignal,o)||(a.operationTypeFieldSignal=o),Ld(o)}),Zi$1(4,"button",35),Fg(5,8),Ig(6,"sh-icon",36),jg(),Wl(),Zi$1(7,"button",37),Fg(8,9),Ig(9,"sh-icon",36),jg(),Wl()()();}if(i&2){let e=aC();bE(3),cm("value",e.operationTypeFieldSignal),bE(3),vg("shTooltip","Store backups with version history, deduplication, compression and encryption"),bE(3),vg("shTooltip","Copy files from the source to the destination without compression or encryption");}}function gl(i,t){i&1&&(Zi$1(0,"sh-alert",38),Fg(1,10),Ig(2,"sh-icon",33),jg(),Wl());}function Tl(i,t){if(i&1&&lT(0,gl,3,0,"sh-alert",38),i&2){let e=aC();uT(e.isNew()?0:-1);}}function Sl(i,t){if(i&1&&HC(0),i&2){let e=t.$implicit;Yl(" ",e.DisplayName," ");}}function El(i,t){if(i&1&&Ig(0,"sh-progress-bar",52),i&2){let e=aC(4);Kg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),vg("value",e.calculatePasswordStrength()*(100/5));}}function fl(i,t){i&1&&(Zi$1(0,"span",47),oC(1,15),Wl());}function hl(i,t){i&1&&(Fg(0,13,1),Ig(1,"sh-icon"),jg());}function yl(i,t){i&1&&(Fg(0,13,2),Ig(1,"sh-icon"),jg());}function Nl(i,t){i&1&&(Fg(0,16,1),Ig(1,"sh-icon",54),jg());}function Fl(i,t){i&1&&(Fg(0,16,2),Ig(1,"sh-icon"),jg());}function Dl(i,t){if(i&1){let e=ET();Zi$1(0,"button",53),Hg("click",function(){Pd(e);let o=aC(4);return Ld(o.copyPassword())}),Fg(1,16),lT(2,Nl,2,0)(3,Fl,2,0),jg(),Wl();}if(i&2){let e=aC(4);bE(2),uT(e.copiedPassword()?2:3);}}function Ol(i,t){i&1&&(Zi$1(0,"sh-alert",51),oC(1,17),Wl());}function Al(i,t){if(i&1){let e=ET();Zi$1(0,"div",42)(1,"sh-form-field")(2,"label",43),Fg(3,12),Ig(4,"sup"),jg(),Wl(),Ig(5,"input",44),bD(),Wl(),lT(6,El,1,9,"sh-progress-bar",45),Zi$1(7,"sh-form-field"),Ig(8,"input",46),bD(),lT(9,fl,2,0,"span",47),Wl(),Zi$1(10,"div",48)(11,"button",49),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.showPassword.set(!o.showPassword()))}),Fg(12,13),lT(13,hl,2,0)(14,yl,2,0),jg(),Wl(),Zi$1(15,"button",49),Hg("click",function(){Pd(e);let o=aC(3);return Ld(o.generatePassword())}),Fg(16,14),Ig(17,"sh-icon"),jg(),Wl(),lT(18,Dl,4,1,"button",50),Wl(),lT(19,Ol,2,0,"sh-alert",51),Wl();}if(i&2){let e=aC(3);bE(5),vg("type",e.showPassword()?"text":"password"),MD(),bE(),uT(e.generalForm.value.password?6:-1),bE(2),vg("type",e.showPassword()?"text":"password"),MD(),bE(),uT(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),bE(4),uT(e.showPassword()?13:14),bE(5),uT(e.showCopyPassword()?18:-1),bE(),uT(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1);}}function Il(i,t){if(i&1&&(Zi$1(0,"sh-select",39)(1,"label",40),oC(2,11),Wl(),Ig(3,"input",41),bD(),cg(4,Sl,1,1,"ng-template"),Wl(),lT(5,Al,20,7,"div",42)),i&2){let e=aC(2);vg("options",e.encryptionOptions())("isClearable",false),bE(3),MD(),bE(2),uT(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1);}}function Pl(i,t){if(i&1&&lT(0,Il,6,3),i&2){let e=aC();uT(e.canEditEncryption()?0:-1);}}function Ml(i,t){if(i&1&&(Zi$1(0,"button",29),Fg(1,18),Ig(2,"sh-icon"),jg(),Wl()),i&2){let e=aC();vg("disabled",e.nameAndDescriptionValid()===false);}}function Rl(i,t){if(i&1&&(Zi$1(0,"button",30),Fg(1,19),Ig(2,"sh-icon"),jg(),Wl()),i&2){let e=aC();vg("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword());}}var st=new jn,Li=(i={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:"",operationType:"Backup"})=>st.group({name:st.control(i.name,[me.required]),description:st.control(i.description),encryption:st.control(i.encryption,[g()]),password:st.control(i.password,[b(t=>t?.value.encryption!=="-",[me.required])]),repeatPassword:st.control(i.repeatPassword,[b(t=>t?.value.encryption!=="-",[me.required])]),operationType:st.control(i.operationType)}),St={Key:"-",DisplayName:"None"},An=class i{#e=T(ee);#t=T(W);#n=T(m);#i=T(Ke);#o=T(f);formRef=w1.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;operationTypeFieldSignal=Ge("Backup");encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;isDraft=this.#i.isDraft;canEditEncryption=Nt$1(()=>this.isNew()||this.isDraft());syncModeSupported=this.#o.hasSyncMode;showPassword=Ge(false);copiedPassword=Ge(false);showCopyPassword=Ge(false);noneOptionKey=St.Key;encryptionEffect=Qa$1(()=>{this.encryptionFieldSignal()===St.Key&&(this.copiedPassword.set(false),this.showCopyPassword.set(false));});#r=Qa$1(()=>{let t=this.#i.operationTypeFieldSignal();this.operationTypeFieldSignal.set(t??"Backup");});#a=Qa$1(()=>{let t=this.operationTypeFieldSignal();this.generalForm.controls.operationType.setValue(t);});nameAndDescriptionValid=Nt$1(()=>{this.generalFormSignal();let e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=Nt$1(()=>{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(["source-data"],{relativeTo:this.#t.parent});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&qg(n.formRef,cl,5),e&2&&hC();},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 _;_=$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 S;S=$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 F;F=$localize` Backup ${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON: info ${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON:`;let R;R=$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 I;I=$localize`Encryption`;let J;J=$localize`Encryption`;let H;H=$localize`Password`;let q;q=$localize`Repeat password`;let Z;Z=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let re;re=$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:`,re=sC(re);let z;z=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let ue;ue=$localize`Passwords do not match`;let Ee;Ee=$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:`,Ee=sC(Ee);let B;B=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let We;We=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ke;return ke=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],o,a,_,c,u,S,D,F,R,G,J,Z,re,z,ue,Ee,B,We,ke,["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",I,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",H,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",q,"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&&(Zi$1(0,"form",20,0),Hg("submit",function(){return n.next()}),Zi$1(2,"h3",21),oC(3,1),Wl(),lT(4,ml,2,1),Zi$1(5,"sh-form-field")(6,"label",22),Fg(7,2),Ig(8,"sup"),jg(),Wl(),Ig(9,"input",23),bD(),Wl(),Zi$1(10,"sh-form-field")(11,"label",24),oC(12,3),Wl(),Ig(13,"textarea",25),bD(),Wl(),lT(14,Cl,10,3,"div",26),lT(15,Tl,1,1)(16,Pl,1,1),Zi$1(17,"div",27)(18,"button",28),Hg("click",function(){return n.exit()}),Fg(19,4),Ig(20,"sh-icon"),jg(),Wl(),lT(21,Ml,3,1,"button",29)(22,Rl,3,1,"button",30),Wl()()),e&2&&(vg("formGroup",n.generalForm),bE(4),uT(n.isNew()?-1:4),bE(5),MD(),bE(4),MD(),bE(),uT(n.isNew()&&n.syncModeSupported()?14:-1),bE(),uT(n.generalFormSignal()?.operationType==="Sync"?15:16),bE(6),uT(n.generalFormSignal()?.operationType==="Sync"||n.encryptionFieldSignal()===n.noneOptionKey||!n.canEditEncryption()?21:22));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn$1,Fe,Nt$2,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 chunkZ3EMICZO=/*#__PURE__*/Object.freeze({__proto__:null,NONE_OPTION:St,createGeneralForm:Li,default:An});var chunkQVMRCVIT=/*#__PURE__*/Object.freeze({__proto__:null,createSourceDataForm:Mi,default:Fn});var chunkVWAG7JAN=/*#__PURE__*/Object.freeze({__proto__:null,SCHEDULE_DEFAULT_OPTIONS:nn,SCHEDULE_FIELD_DEFAULTS:Nn,default:yn,scheduleOptionToSchedule:Di});export{Ct as C,Ft as F,Ke as K,_n as _,mn as a,an as b,rt as c,chunkZ3EMICZO as d,chunkQVMRCVIT as e,chunkVWAG7JAN as f,mt as m,rn as r,un as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {w as w$1}from'./chunk-Brfc2m61.js';import {t as te}from'./chunk-DmCJ7w-M.js';import'./chunk-C1-31fA7.js';import'./chunk-iU19kwHx.js';import'./chunk-C185qUb-.js';import {K as Ke}from'./chunk-DWCofCiP.js';import'./chunk-6-sszNfh.js';import'./chunk-Kq2ZFJSk.js';import'./chunk-zOY5leQB.js';import'./chunk-29_4gGIi.js';import'./chunk-BEUeHgR9.js';import'./chunk-CGnjVnmu.js';import'./chunk-BJOhC2d8.js';import'./chunk-fDWfSg6Y.js';import'./chunk-DuRr4rDS.js';import'./chunk-C1py21yb.js';import'./chunk-D38QrkIM.js';import'./chunk-3YzyUT-a.js';import'./chunk-CKUlUN3q.js';import {T,ax as W,a5 as m,ab as J$1,Q as Qa,ad as sy,aG as jo,g as gw,$ as lr,_ as _t,a8 as To,d as Ig,Z as Zi,l as lT,o as oC,W as Wl,b as bE,c as uT,z as vg,aH as tb,aF as JC,H as HC,h as aC,aa as Yl}from'./main-2ZYVV4C4.js';import'./chunk-CFgDqLU0.js';import {d}from'./chunk-BGuvkLC9.js';import'./chunk-DBkkb6OR.js';import'./chunk-iGzJokt-.js';import'./chunk-DneBfCBh.js';import'./chunk-Bq_vr6Q3.js';import'./chunk-D9jPw9Ov.js';import {L}from'./chunk-Cm7JSdTO.js';import'./chunk-CnZx831x.js';var $=(i,e)=>[i,e,"general"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"destination"],F=(i,e)=>[i,e,"schedule"],w=(i,e)=>[i,e,"options"];function J(i,e){if(i&1&&(Zi(0,"p"),HC(1),Wl()),i&2){let t=aC();bE(),Yl("Editing: ",t.backupName());}}function X(i,e){i&1&&Ig(0,"sh-progress-bar",7);}function x(i,e){i&1&&(Zi(0,"section"),Ig(1,"router-outlet"),Wl());}var k=class i{#t=T(W);#e=T(Ke);#i=T(m);#n=T(J$1);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=L(this.#t.params);#o=L(this.#t.url);paramsChanged=Qa(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults());});getDefaults(){sy(()=>this.#n.getApiV1Backupdefaults()).pipe(jo(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(true);}});}getBackup(e,t=false){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(true);};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data);}else sy(()=>this.#n.getApiV1BackupById({path:{id:e}})).subscribe({next:n});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=gw({type:i,selectors:[["app-backup"]],features:[JC([Ke])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Source Data `;let n;n=$localize` Destination `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(Ig(0,"app-status-bar"),Zi(1,"header"),lT(2,J,2,1,"p"),Zi(3,"sh-stepper",5)(4,"div",6),oC(5,0),Wl(),Zi(6,"div",6),oC(7,1),Wl(),Zi(8,"div",6),oC(9,2),Wl(),Zi(10,"div",6),oC(11,3),Wl(),Zi(12,"div",6),oC(13,4),Wl()()(),lT(14,X,1,0,"sh-progress-bar",7)(15,x,2,0,"section")),t&2&&(bE(2),uT(n.isNew()?-1:2),bE(2),vg("routerLink",tb(7,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(10,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(13,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(16,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),vg("routerLink",tb(19,w,n.isDraft()?"/backup-draft":"/backup",n.backupId())),bE(2),uT(n.finishedLoading()?15:14));},dependencies:[lr,_t,To,te,w$1,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"]})};export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {g as gw,$ as lr,d as Ig}from'./main-2ZYVV4C4.js';var t=class o{static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-welcome"]],decls:1,vars:0,template:function(e,m){e&1&&Ig(0,"router-outlet");},dependencies:[lr],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100vh}"]})};export{t as default};
|