@duplicati/ngclient 0.0.21 → 0.0.22
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/spk.woff2 +0 -0
- package/chunk-22ZYSOTR.js +1 -0
- package/chunk-37USSSCL.js +1 -0
- package/{chunk-ICX4A35N.js → chunk-3ZEBM2Q6.js} +1 -1
- package/{chunk-6FMOBX4W.js → chunk-4EODC7AQ.js} +1 -1
- package/chunk-4SQTVC5T.js +1 -0
- package/{chunk-DUEP5NWI.js → chunk-5AC7O5ME.js} +1 -1
- package/{chunk-QILG6324.js → chunk-6GOAPINI.js} +1 -1
- package/chunk-73UOOUBD.js +1 -0
- package/chunk-7JBXSDSO.js +1 -0
- package/{chunk-OLR3NLBF.js → chunk-AIWAOXTQ.js} +1 -1
- package/{chunk-HQEL6ET4.js → chunk-BHQV6I5A.js} +1 -1
- package/chunk-C6XNKGG2.js +1 -0
- package/{chunk-THXSJ5EB.js → chunk-CLHK3WG3.js} +1 -1
- package/{chunk-VCWCJ6GK.js → chunk-CLPPNSLN.js} +1 -1
- package/chunk-DFRSFFFH.js +1 -0
- package/{chunk-4UMXA6ZN.js → chunk-EEZT434V.js} +2 -2
- package/chunk-GON5H26V.js +1 -0
- package/{chunk-24SCDXOT.js → chunk-ICNC6KVB.js} +1 -1
- package/chunk-IEVRQDB6.js +1 -0
- package/{chunk-EE44D7EI.js → chunk-IXLTPP72.js} +1 -1
- package/{chunk-XG5WW7WW.js → chunk-JNQHJPEL.js} +1 -1
- package/chunk-KOPAOYHK.js +1 -0
- package/chunk-LZSE733H.js +1 -0
- package/{chunk-ZHM55NRD.js → chunk-N6REZCKW.js} +1 -1
- package/chunk-OLIXIFDJ.js +6 -0
- package/chunk-ORCLDJSO.js +1 -0
- package/{chunk-HAGEM2KU.js → chunk-OVWWCW76.js} +1 -1
- package/{chunk-ETZPVGXX.js → chunk-PFVXGEM7.js} +1 -1
- package/{chunk-I62MTURC.js → chunk-Q76L4VLC.js} +1 -1
- package/chunk-QHJTF3V4.js +8 -0
- package/chunk-QR4CYW4K.js +1 -0
- package/chunk-SFRGISK2.js +1 -0
- package/{chunk-EC4YV54D.js → chunk-TKY4PPEK.js} +1 -1
- package/{chunk-ZCCVAPLP.js → chunk-VC4GI7EV.js} +1 -1
- package/{chunk-AE4UH7UP.js → chunk-VOS5UL4W.js} +1 -1
- package/chunk-VUEDXCG5.js +1 -0
- package/{chunk-XWP5J7FY.js → chunk-WSTPDNCJ.js} +1 -1
- package/{chunk-XX4XT5RQ.js → chunk-XDYHN4IQ.js} +1 -1
- package/{chunk-SCOHUUYQ.js → chunk-XGBLG5PU.js} +1 -1
- package/{chunk-D3SNAEYH.js → chunk-Z7GRCDAT.js} +1 -1
- package/chunk-ZACWBV3N.js +1 -0
- package/chunk-ZPJ6YV7Y.js +1 -0
- package/chunk-ZSOWH34L.js +1 -0
- package/index.html +2 -2
- package/main-AXRS6RU7.js +1 -0
- package/package.json +1 -1
- package/{styles-EYLEETOZ.css → styles-LL6J7JBI.css} +1 -1
- package/chunk-3ZII4VBA.js +0 -1
- package/chunk-4I2FZHFA.js +0 -1
- package/chunk-5P5MCIGV.js +0 -1
- package/chunk-5XTTHY4J.js +0 -1
- package/chunk-72GO2ZEM.js +0 -1
- package/chunk-APGFOGYB.js +0 -1
- package/chunk-AT2YMZPR.js +0 -1
- package/chunk-BGMX7SZ6.js +0 -1
- package/chunk-CBPKRHET.js +0 -1
- package/chunk-HK24NYRP.js +0 -1
- package/chunk-KOIUHATU.js +0 -1
- package/chunk-M6XAG6QD.js +0 -1
- package/chunk-NN4VOZJP.js +0 -1
- package/chunk-NUWA7AOR.js +0 -8
- package/chunk-PB775LH4.js +0 -1
- package/chunk-PJY2UW7Y.js +0 -1
- package/chunk-S4TH7BUT.js +0 -1
- package/chunk-VLYQWE2X.js +0 -1
- package/chunk-WIE3F2D2.js +0 -1
- package/chunk-ZMHOWC7A.js +0 -1
- package/main-WNZU6MTP.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Aa as G,Ba as Y,Ca as K,Da as q,Ea as W,Fa as X,Ga as J,Ha as m,La as M,N as y,Oa as Q,P as l,S as O,U as a,W as E,aa as $,bc as ee,hc as L,ic as te,jc as ne,kc as f,nc as re,oa as S,pa as I,rc as oe,ta as Z,tc as P,ua as N,uc as se,va as z,wa as w,xa as _,ya as g,za as v}from"./chunk-NUWA7AOR.js";import{a as b,b as V}from"./chunk-7CGTOI24.js";var j=class extends ne{constructor(){super(...arguments),this.supportsDOMEvents=!0}},x=class r extends j{static makeCurrent(){te(new r)}onAndCancel(n,e,t){return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=pe();return e==null?null:me(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return re(document.cookie,n)}},T=null;function pe(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function me(r){return new URL(r,document.baseURI).pathname}var ye=(()=>{class r{build(){return new XMLHttpRequest}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),U=new O(""),ue=(()=>{class r{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o){return this._findPluginFor(t).addEventListener(e,t,o)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new y(5101,!1);return this._eventNameToPlugin.set(e,t),t}static{this.\u0275fac=function(t){return new(t||r)(a(U),a(S))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),C=class{constructor(n){this._doc=n}},H="ng-app-id",de=(()=>{class r{constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=P(s),this.resetHostNodes()}addStyles(e){for(let t of e)this.changeUsageCount(t,1)===1&&this.onStyleAdded(t)}removeStyles(e){for(let t of e)this.changeUsageCount(t,-1)<=0&&this.onStyleRemoved(t)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(t=>t.remove()),e.clear());for(let t of this.getAllStyles())this.onStyleRemoved(t);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let t of this.getAllStyles())this.addStyleToHost(e,t)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let t of this.hostNodes)this.addStyleToHost(t,e)}onStyleRemoved(e){let t=this.styleRef;t.get(e)?.elements?.forEach(o=>o.remove()),t.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${H}="${this.appId}"]`);if(e?.length){let t=new Map;return e.forEach(o=>{o.textContent!=null&&t.set(o.textContent,o)}),t}return null}changeUsageCount(e,t){let o=this.styleRef;if(o.has(e)){let s=o.get(e);return s.usage+=t,s.usage}return o.set(e,{usage:t,elements:[]}),t}getStyleElement(e,t){let o=this.styleNodesInDOM,s=o?.get(t);if(s?.parentNode===e)return o.delete(t),s.removeAttribute(H),s;{let i=this.doc.createElement("style");return this.nonce&&i.setAttribute("nonce",this.nonce),i.textContent=t,this.platformIsServer&&i.setAttribute(H,this.appId),e.appendChild(i),i}}addStyleToHost(e,t){let o=this.getStyleElement(e,t),s=this.styleRef,i=s.get(t)?.elements;i?i.push(o):s.set(t,{elements:[o],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(t){return new(t||r)(a(f),a(N),a(_,8),a(w))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),k={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},B=/%COMP%/g,le="%COMP%",ge=`_nghost-${le}`,ve=`_ngcontent-${le}`,Ee=!0,Se=new O("",{providedIn:"root",factory:()=>Ee});function we(r){return ve.replace(B,r)}function Me(r){return ge.replace(B,r)}function fe(r,n){return n.map(e=>e.replace(B,r))}var ie=(()=>{class r{constructor(e,t,o,s,i,c,u,d=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=u,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=P(c),this.defaultRenderer=new D(e,i,u,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===E.ShadowDom&&(t=V(b({},t),{encapsulation:E.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof A?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,u=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,p=this.platformIsServer;switch(t.encapsulation){case E.Emulated:s=new A(u,d,t,this.appId,h,i,c,p);break;case E.ShadowDom:return new F(u,d,e,t,i,c,this.nonce,p);default:s=new R(u,d,t,h,i,c,p);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(t){return new(t||r)(a(ue),a(de),a(N),a(Se),a(f),a(w),a(S),a(_))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),D=class{constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,e){return e?this.doc.createElementNS(k[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(ae(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(ae(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new y(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=k[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=k[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(M.DashCase|M.Important)?n.style.setProperty(e,t,o&M.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&M.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t){if(typeof n=="string"&&(n=L().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);return this.eventManager.addEventListener(n,e,this.decoratePreventDefault(t))}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function ae(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var F=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=fe(o.id,o.styles);for(let h of d){let p=document.createElement("style");c&&p.setAttribute("nonce",c),p.textContent=h,this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o,this.styles=u?fe(u,t.styles):t.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},A=class extends R{constructor(n,e,t,o,s,i,c,u){let d=o+"-"+t.id;super(n,e,t,s,i,c,u,d),this.contentAttr=we(d),this.hostAttr=Me(d)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Te=(()=>{class r extends C{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o){return e.addEventListener(t,o,!1),()=>this.removeEventListener(e,t,o)}removeEventListener(e,t,o){return e.removeEventListener(t,o)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),ce=["alt","control","meta","shift"],De={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Re={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ce=(()=>{class r extends C{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o){let s=r.parseEventName(t),i=r.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>L().onAndCancel(e,s.domEventName,i))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ce.forEach(d=>{let h=t.indexOf(d);h>-1&&(t.splice(h,1),i+=d+".")}),i+=s,t.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=i,u}static matchEventFullKeyCode(e,t){let o=De[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ce.forEach(i=>{if(i!==o){let c=Re[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();function ft(r,n){return ee(b({rootComponent:r},Ae(n)))}function Ae(r){return{appProviders:[..._e,...r?.providers??[]],platformProviders:Ne}}function be(){x.makeCurrent()}function Oe(){return new I}function Ie(){return Z(document),document}var Ne=[{provide:w,useValue:oe},{provide:z,useValue:be,multi:!0},{provide:f,useFactory:Ie,deps:[]}];var _e=[{provide:$,useValue:"root"},{provide:I,useFactory:Oe,deps:[]},{provide:U,useClass:Te,multi:!0,deps:[f,S,w]},{provide:U,useClass:Ce,multi:!0,deps:[f]},ie,de,ue,{provide:Q,useExisting:ie},{provide:se,useClass:ye,deps:[]},[]];var ht=(()=>{class r{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Le=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(Pe),o},providedIn:"root"})}}return r})(),Pe=(()=>{class r extends Le{constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case m.NONE:return t;case m.HTML:return v(t,"HTML")?g(t):J(this._doc,String(t)).toString();case m.STYLE:return v(t,"Style")?g(t):t;case m.SCRIPT:if(v(t,"Script"))return g(t);throw new y(5200,!1);case m.URL:return v(t,"URL")?g(t):X(String(t));case m.RESOURCE_URL:if(v(t,"ResourceURL"))return g(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return G(e)}bypassSecurityTrustStyle(e){return Y(e)}bypassSecurityTrustScript(e){return K(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return W(e)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{ft as a,ht as b,Le as c};
|
|
1
|
+
import{Aa as g,Ba as v,Ca as G,Da as Y,Ea as K,Fa as q,Ga as W,Ha as X,Ia as J,Ja as m,Na as M,O as y,Q as l,Qa as Q,T as O,V as a,X as E,ba as $,cc as ee,jc as L,kc as te,lc as ne,mc as f,pa as S,pc as re,qa as I,tc as oe,va as Z,vc as P,wa as N,wc as se,xa as z,ya as w,za as _}from"./chunk-QHJTF3V4.js";import{a as b,b as V}from"./chunk-7CGTOI24.js";var j=class extends ne{constructor(){super(...arguments),this.supportsDOMEvents=!0}},x=class r extends j{static makeCurrent(){te(new r)}onAndCancel(n,e,t){return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=pe();return e==null?null:me(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return re(document.cookie,n)}},T=null;function pe(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function me(r){return new URL(r,document.baseURI).pathname}var ye=(()=>{class r{build(){return new XMLHttpRequest}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),U=new O(""),ue=(()=>{class r{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o){return this._findPluginFor(t).addEventListener(e,t,o)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new y(5101,!1);return this._eventNameToPlugin.set(e,t),t}static{this.\u0275fac=function(t){return new(t||r)(a(U),a(S))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),C=class{constructor(n){this._doc=n}},H="ng-app-id",de=(()=>{class r{constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=P(s),this.resetHostNodes()}addStyles(e){for(let t of e)this.changeUsageCount(t,1)===1&&this.onStyleAdded(t)}removeStyles(e){for(let t of e)this.changeUsageCount(t,-1)<=0&&this.onStyleRemoved(t)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(t=>t.remove()),e.clear());for(let t of this.getAllStyles())this.onStyleRemoved(t);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let t of this.getAllStyles())this.addStyleToHost(e,t)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let t of this.hostNodes)this.addStyleToHost(t,e)}onStyleRemoved(e){let t=this.styleRef;t.get(e)?.elements?.forEach(o=>o.remove()),t.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${H}="${this.appId}"]`);if(e?.length){let t=new Map;return e.forEach(o=>{o.textContent!=null&&t.set(o.textContent,o)}),t}return null}changeUsageCount(e,t){let o=this.styleRef;if(o.has(e)){let s=o.get(e);return s.usage+=t,s.usage}return o.set(e,{usage:t,elements:[]}),t}getStyleElement(e,t){let o=this.styleNodesInDOM,s=o?.get(t);if(s?.parentNode===e)return o.delete(t),s.removeAttribute(H),s;{let i=this.doc.createElement("style");return this.nonce&&i.setAttribute("nonce",this.nonce),i.textContent=t,this.platformIsServer&&i.setAttribute(H,this.appId),e.appendChild(i),i}}addStyleToHost(e,t){let o=this.getStyleElement(e,t),s=this.styleRef,i=s.get(t)?.elements;i?i.push(o):s.set(t,{elements:[o],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(t){return new(t||r)(a(f),a(N),a(_,8),a(w))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),k={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},B=/%COMP%/g,le="%COMP%",ge=`_nghost-${le}`,ve=`_ngcontent-${le}`,Ee=!0,Se=new O("",{providedIn:"root",factory:()=>Ee});function we(r){return ve.replace(B,r)}function Me(r){return ge.replace(B,r)}function fe(r,n){return n.map(e=>e.replace(B,r))}var ie=(()=>{class r{constructor(e,t,o,s,i,c,u,d=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=u,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=P(c),this.defaultRenderer=new D(e,i,u,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===E.ShadowDom&&(t=V(b({},t),{encapsulation:E.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof A?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,u=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,p=this.platformIsServer;switch(t.encapsulation){case E.Emulated:s=new A(u,d,t,this.appId,h,i,c,p);break;case E.ShadowDom:return new F(u,d,e,t,i,c,this.nonce,p);default:s=new R(u,d,t,h,i,c,p);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(t){return new(t||r)(a(ue),a(de),a(N),a(Se),a(f),a(w),a(S),a(_))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),D=class{constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,e){return e?this.doc.createElementNS(k[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(ae(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(ae(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new y(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=k[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=k[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(M.DashCase|M.Important)?n.style.setProperty(e,t,o&M.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&M.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t){if(typeof n=="string"&&(n=L().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);return this.eventManager.addEventListener(n,e,this.decoratePreventDefault(t))}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function ae(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var F=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=fe(o.id,o.styles);for(let h of d){let p=document.createElement("style");c&&p.setAttribute("nonce",c),p.textContent=h,this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o,this.styles=u?fe(u,t.styles):t.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},A=class extends R{constructor(n,e,t,o,s,i,c,u){let d=o+"-"+t.id;super(n,e,t,s,i,c,u,d),this.contentAttr=we(d),this.hostAttr=Me(d)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Te=(()=>{class r extends C{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o){return e.addEventListener(t,o,!1),()=>this.removeEventListener(e,t,o)}removeEventListener(e,t,o){return e.removeEventListener(t,o)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),ce=["alt","control","meta","shift"],De={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Re={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ce=(()=>{class r extends C{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o){let s=r.parseEventName(t),i=r.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>L().onAndCancel(e,s.domEventName,i))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ce.forEach(d=>{let h=t.indexOf(d);h>-1&&(t.splice(h,1),i+=d+".")}),i+=s,t.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=i,u}static matchEventFullKeyCode(e,t){let o=De[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ce.forEach(i=>{if(i!==o){let c=Re[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();function ft(r,n){return ee(b({rootComponent:r},Ae(n)))}function Ae(r){return{appProviders:[..._e,...r?.providers??[]],platformProviders:Ne}}function be(){x.makeCurrent()}function Oe(){return new I}function Ie(){return Z(document),document}var Ne=[{provide:w,useValue:oe},{provide:z,useValue:be,multi:!0},{provide:f,useFactory:Ie,deps:[]}];var _e=[{provide:$,useValue:"root"},{provide:I,useFactory:Oe,deps:[]},{provide:U,useClass:Te,multi:!0,deps:[f,S,w]},{provide:U,useClass:Ce,multi:!0,deps:[f]},ie,de,ue,{provide:Q,useExisting:ie},{provide:se,useClass:ye,deps:[]},[]];var ht=(()=>{class r{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Le=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(Pe),o},providedIn:"root"})}}return r})(),Pe=(()=>{class r extends Le{constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case m.NONE:return t;case m.HTML:return v(t,"HTML")?g(t):J(this._doc,String(t)).toString();case m.STYLE:return v(t,"Style")?g(t):t;case m.SCRIPT:if(v(t,"Script"))return g(t);throw new y(5200,!1);case m.URL:return v(t,"URL")?g(t):X(String(t));case m.RESOURCE_URL:if(v(t,"ResourceURL"))return g(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return G(e)}bypassSecurityTrustStyle(e){return Y(e)}bypassSecurityTrustScript(e){return K(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return W(e)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{ft as a,ht as b,Le as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a,k as b}from"./chunk-OLIXIFDJ.js";import"./chunk-ZSOWH34L.js";import"./chunk-SFRGISK2.js";import"./chunk-DNHLTHLR.js";import"./chunk-N6REZCKW.js";import"./chunk-73UOOUBD.js";import"./chunk-IEVRQDB6.js";import"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";export{a as createScheduleForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as R,Q as u,V as c,l as I,m as B,p as V,v as T,xc as v,y as f,zc as d}from"./chunk-QHJTF3V4.js";import{a as b,b as D}from"./chunk-7CGTOI24.js";var k=class{_fns;constructor(){this._fns=[]}eject(e){let p=this._fns.indexOf(e);p!==-1&&(this._fns=[...this._fns.slice(0,p),...this._fns.slice(p+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new k}};var y=class extends Error{url;status;statusText;body;request;constructor(e,p,i){super(i),this.name="ApiError",this.url=p.url,this.status=p.status,this.statusText=p.statusText,this.body=p.body,this.request=e}};var m=r=>typeof r=="string",P=r=>m(r)&&r!=="",S=r=>r instanceof Blob,O=r=>r instanceof FormData,w=r=>{try{return btoa(r)}catch{return Buffer.from(r).toString("base64")}},F=r=>{let e=[],p=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},i=(a,n)=>{n!=null&&(n instanceof Date?p(a,n.toISOString()):Array.isArray(n)?n.forEach(o=>i(a,o)):typeof n=="object"?Object.entries(n).forEach(([o,l])=>i(`${a}[${o}]`,l)):p(a,n))};return Object.entries(r).forEach(([a,n])=>i(a,n)),e.length?`?${e.join("&")}`:""},U=(r,e)=>{let p=r.ENCODE_PATH||encodeURI,i=e.url.replace("{api-version}",r.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?p(String(e.path[o])):n),a=r.BASE+i;return e.query?a+F(e.query):a},N=r=>{if(r.formData){let e=new FormData,p=(i,a)=>{m(a)||S(a)?e.append(i,a):e.append(i,JSON.stringify(a))};return Object.entries(r.formData).filter(([,i])=>i!=null).forEach(([i,a])=>{Array.isArray(a)?a.forEach(n=>p(i,n)):p(i,a)}),e}},g=async(r,e)=>typeof e=="function"?e(r):e,H=(r,e)=>T({token:g(e,r.TOKEN),username:g(e,r.USERNAME),password:g(e,r.PASSWORD),additionalHeaders:g(e,r.HEADERS)}).pipe(V(({token:p,username:i,password:a,additionalHeaders:n})=>{let o=Object.entries(b(b({Accept:"application/json"},n),e.headers)).filter(([,l])=>l!=null).reduce((l,[A,h])=>D(b({},l),{[A]:String(h)}),{});if(P(p)&&(o.Authorization=`Bearer ${p}`),P(i)&&P(a)){let l=w(`${i}:${a}`);o.Authorization=`Basic ${l}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:S(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":m(e.body)?o["Content-Type"]="text/plain":O(e.body)||(o["Content-Type"]="application/json")),new v(o)})),M=r=>{if(r.body)return r.mediaType?.includes("application/json")||r.mediaType?.includes("+json")?JSON.stringify(r.body):m(r.body)||S(r.body)||O(r.body)?r.body:JSON.stringify(r.body)},$=(r,e,p,i,a,n,o)=>p.request(e.method,i,{headers:o,body:a??n,withCredentials:r.WITH_CREDENTIALS,observe:"response"}),z=(r,e)=>{if(e){let p=r.headers.get(e);if(m(p))return p}},W=r=>{if(r.status!==204&&r.body!==null)return r.body},K=(r,e)=>{let i=b({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},r.errors)[e.status];if(i)throw new y(r,e,i);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new y(r,e,`Generic Error: status: ${a}; status text: ${n}; body: ${o}`)}},s=(r,e,p)=>{let i=U(r,p),a=N(p),n=M(p);return H(r,p).pipe(R(o=>$(r,p,e,i,n,a,o)),R(async o=>{for(let L of r.interceptors.response._fns)o=await L(o);let l=W(o),A=z(o,p.responseHeader),h=l;return p.responseTransformer&&o.ok&&(h=await p.responseTransformer(l)),{url:i,ok:o.ok,status:o.status,statusText:o.statusText,body:A??h}}),f(o=>o.status?I({url:i,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):B(()=>o)),V(o=>(K(p,o),o.body)),f(o=>B(()=>o)))};var G=class r{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},x=class r{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(){return s(t,this.http,{method:"GET",url:"/api/v1/backups"})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1CaptchaByToken(e){return s(t,this.http,{method:"GET",url:"/api/v1/captcha/{token}",path:{token:e.token}})}postApiV1CaptchaByToken(e){return s(t,this.http,{method:"POST",url:"/api/v1/captcha/{token}",path:{token:e.token},body:e.requestBody,mediaType:"application/json"})}postApiV1Captcha(e){return s(t,this.http,{method:"POST",url:"/api/v1/captcha",body:e.requestBody,mediaType:"application/json"})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1Mssql(){return s(t,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStopaftercurrentfile(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stopaftercurrentfile",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStopnow(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stopnow",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,"captcha-token":e.captchaToken,"captcha-answer":e.captchaAnswer,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},C=class r{constructor(e){this.http=e}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},E=class r{constructor(e){this.http=e}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},j=class r{constructor(e){this.http=e}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},q=class r{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{x as a,C as b,E as c,q as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{O as a,Ua as b,W as d,ea as l,ec as g,fc as y,gc as h,i as f,la as v,ma as c}from"./chunk-QHJTF3V4.js";function p(s,e){!e?.injector&&l(p);let n=e?.injector??d(v),o=new f(1),i=h(()=>{let t;try{t=s()}catch(u){y(()=>o.error(u));return}y(()=>o.next(t))},{injector:n,manualCleanup:!0});return n.get(c).onDestroy(()=>{i.destroy(),o.complete()}),o.asObservable()}function m(s,e){let n=!e?.manualCleanup;n&&!e?.injector&&l(m);let o=n?e?.injector?.get(c)??d(c):null,i=w(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{if(e?.rejectErrors)throw r;t.set({kind:2,error:r})}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return o?.onDestroy(u.unsubscribe.bind(u)),g(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function w(s=Object.is){return(e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}export{p as a,m as b};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as Me,b as Fe}from"./chunk-ZSOWH34L.js";import{a as Je}from"./chunk-SFRGISK2.js";import{a as dt,b as Rt}from"./chunk-DNHLTHLR.js";import{b as _e}from"./chunk-N6REZCKW.js";import{a as xe,b as te,c as fe,d as ne,e as ie,f as Nt,g as oe,h as we,j as Pt,k as re,l as Se,m as It,n as ae,o as le,p as se,q as U,s as pe}from"./chunk-73UOOUBD.js";import{a as me,b as Xe,d as Gt,e as Mt,g as ke,i as et,k as ce,m as tt,n as At,p as nt,q as de,t as ve,u as Ge}from"./chunk-IEVRQDB6.js";import{a as ee,c as q}from"./chunk-22ZYSOTR.js";import{a as Ie}from"./chunk-LZSE733H.js";import{Db as Z,E as He,Eb as J,Fb as X,Gb as l,Hb as I,Ib as k,Jb as vt,Kb as Ft,Lb as bt,Mb as Tt,Oa as s,Ob as j,Pb as Vt,Q as ye,Qb as De,Rb as Dt,Sb as Le,Ua as S,Va as Y,W as x,Wb as Ye,Y as z,ab as d,cb as c,eb as ue,ec as G,ga as h,gc as Ot,ha as y,hb as _,ib as V,jb as D,kb as O,la as wt,lb as r,mb as o,nb as u,ob as F,p as Ue,pb as b,qb as Ve,qc as Ze,rb as v,sa as St,sb as C,ta as kt,tb as p,wb as N,xb as P,yb as E,zc as Et}from"./chunk-QHJTF3V4.js";import{a as B,c as xt}from"./chunk-7CGTOI24.js";function Wt(t,i){if(t&1&&(r(0,"p"),l(1),o()),t&2){let e=p();s(),I(e._data().message)}}var Kt={title:"Are you sure?",confirmText:"Confirm",cancelText:"Cancel"},Oe=class t{data=kt();_data=G(()=>B(B({},Kt),this.data()));closed=St();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},standalone:!0,features:[j],decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,n){e&1&&(r(0,"header",0)(1,"h3"),l(2),o()(),r(3,"div",1),d(4,Wt,2,1,"p"),o(),r(5,"footer",2)(6,"button",3),C("click",function(){return n.close("cancel")}),l(7),o(),r(8,"button",4),C("click",function(){return n.close("confirm")}),l(9),o()()),e&2&&(s(2),I(n._data().title),s(2),_(n._data().message?4:-1),s(3),I(n._data().cancelText),s(2),I(n._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var it=class t{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var je=class t{#e=x(Ie);#n(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,n])=>({key:e,value:n})))??[]}getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(Ue(e=>this.#n(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(Ue(e=>this.#n(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(Ue(e=>this.#n(e)))}gcsConfigLocations=_e(this.getGcsConfig("Locations"));gcsConfigStorageClasses=_e(this.getGcsConfig("StorageClasses"));getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(Ue(e=>this.#n(e)))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var be=new U,qe={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>be.control(t??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>be.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>be.control(t??"",[fe.required,fe.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>be.control(t??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>be.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>be.control(t??"")}},dynamicFields:["use-ssl","s3-server-name","auth-username","auth-password"]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>be.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(je).gcsConfigLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(je).gcsConfigStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>be.control(t??"")}},dynamicFields:["authid"]}};function Ae(t,i){let e={},n={};return i.searchParams.forEach((a,m)=>{qe[t].dynamicFields?.includes(m)?n[m]=decodeURIComponent(a):e[m]=decodeURIComponent(a)}),{advanced:e,dynamic:n}}function We(t){let i=t.map(([e,n])=>`${e}=${n?encodeURIComponent(n.toString()):""}`).join("&");return i?"?"+i:""}var Re={file:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${i}`},from:(t,i,e)=>{let n=e.indexOf("file:///")===0,a=e.split(n?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return B({destinationType:t,custom:{path:`${n?"/":""}${a}${i.pathname}`}},Ae(t,i))}},ssh:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.server}${t.custom.port?":"+t.custom.port:""}${t.custom.path.startsWith("/")?t.custom.path:"/"+t.custom.path}${i}`},from:(t,i,e)=>B({destinationType:t,custom:{server:i.hostname,port:i.port,path:i.pathname}},Ae(t,i))},s3:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.bucket}${t.custom.path}${i}`},from:(t,i,e)=>B({destinationType:t,custom:{path:i.pathname,bucket:i.hostname}},Ae(t,i))},gcs:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${i}`},from:(t,i,e)=>{let{advanced:n,dynamic:a}=Ae(t,i);return{destinationType:t,custom:{path:i.hostname+i.pathname},dynamic:a,advanced:n}}},googledrive:{to:t=>{let i=t.custom.path,e=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${i}${e}`},from:(t,i,e)=>{let{advanced:n,dynamic:a}=Ae(t,i);return{destinationType:t,custom:{path:i.hostname+i.pathname},dynamic:a,advanced:n}}},fallbackMapper:{to:t=>"",from:(t,i,e)=>B({destinationType:t},Ae(t,i))}};function ot(t){let i=t.destinationType;return!i||!Re.hasOwnProperty(i)?Re.fallbackMapper.to(t)??"":Re[i].to(t)??""}function ut(t){let i=URL.canParse(t),e=t.split("://")[0],n="http://"+t.split("://")[1],a=new URL(n);if(!Re.hasOwnProperty(e))return Re.fallbackMapper.from(e,a);if(!i)throw new Error("Invalid target path");return Re[e].from(e,a,t)}var $t=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,rt=class t{generate(i,e=$t){let n;do n=this.generatePassword(i,e);while(this.calculatePasswordStrength(n)<5);return n}generatePassword(i,e=$t){let n=this;return Array.apply(null,{length:i}).map(()=>{let a;for(;;)if(a=String.fromCharCode(n.#e()),e.test(a))return a},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var Qt=["formRef"];function Yt(t,i){if(t&1&&(r(0,"option",14),l(1),o()),t&2){let e=i.$implicit;c("value",e.Key),s(),I(e.DisplayName)}}function Zt(t,i){if(t&1&&u(0,"spk-progress-bar",25),t&2){let e=p(3);ue("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),c("value",e.calculatePasswordStrength()*(100/5))}}function Jt(t,i){t&1&&(r(0,"span",20),l(1,"Passwords do not match"),o())}function Xt(t,i){t&1&&(r(0,"spk-icon"),l(1,"eye-slash"),o(),l(2," hide "))}function en(t,i){t&1&&(r(0,"spk-icon"),l(1,"eye"),o(),l(2," show "))}function tn(t,i){t&1&&(r(0,"spk-icon",27),l(1,"check"),o())}function nn(t,i){t&1&&(r(0,"spk-icon"),l(1,"copy"),o())}function on(t,i){if(t&1){let e=v();r(0,"button",26),C("click",function(){h(e);let a=p(3);return y(a.copyPassword())}),d(1,tn,2,0,"spk-icon",27)(2,nn,2,0,"spk-icon"),l(3),o()}if(t&2){let e=p(3);s(),_(e.copiedPassword()?1:2),s(2),k(" ",e.copiedPassword()?"Copied":"Copy"," password ")}}function rn(t,i){t&1&&(r(0,"spk-alert",24),l(1," Tip: Be sure to save your password. If you loose it you will lose access to your backups. "),o())}function an(t,i){if(t&1){let e=v();r(0,"div",15)(1,"spk-form-field")(2,"label",16),l(3," Create a password "),r(4,"sup"),l(5,"*"),o()(),u(6,"input",17),o(),d(7,Zt,1,9,"spk-progress-bar",18),r(8,"spk-form-field"),u(9,"input",19),d(10,Jt,2,0,"span",20),o(),r(11,"div",21)(12,"button",22),C("click",function(){h(e);let a=p(2);return y(a.showPassword.set(!a.showPassword()))}),d(13,Xt,3,0)(14,en,3,0),o(),r(15,"button",22),C("click",function(){h(e);let a=p(2);return y(a.generatePassword())}),r(16,"spk-icon"),l(17,"password"),o(),l(18," Generate password "),o(),d(19,on,4,2,"button",23),o(),d(20,rn,2,0,"spk-alert",24),o()}if(t&2){let e=p(2);s(6),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.password?7:-1),s(2),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?10:-1),s(3),_(e.showPassword()?13:14),s(6),_(e.showCopyPassword()?19:-1),s(),_(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?20:-1)}}function ln(t,i){if(t&1&&(r(0,"spk-select",11)(1,"label",12),l(2,"Encryption"),o(),u(3,"input",13),D(4,Yt,2,2,"option",14,V),o(),d(6,an,21,7,"div",15)),t&2){let e=p();c("displayFn",e.displayFn()),s(4),O(e.encryptionOptions()),s(2),_(e.encryptionFieldSignal()!==""?6:-1)}}function sn(t,i){if(t&1&&(r(0,"button",9),l(1," Continue "),r(2,"spk-icon"),l(3,"arrow-right"),o()()),t&2){let e=p();c("disabled",e.generalForm.invalid)}}function pn(t,i){if(t&1&&(r(0,"spk-tooltip",10)(1,"button",9),l(2," Continue "),r(3,"spk-icon"),l(4,"arrow-right"),o()()()),t&2){let e=p();c("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),s(),c("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var $e=new U,Bt=(t={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>$e.group({name:$e.control(t.name,[fe.required]),description:$e.control(t.description),encryption:$e.control(t.encryption,[Rt()]),password:$e.control(t.password,[dt(i=>i?.value.encryption!=="",[fe.required])]),repeatPassword:$e.control(t.repeatPassword,[dt(i=>i?.value.encryption!=="",[fe.required])])}),_t={Key:"",DisplayName:"None"},ft=class t{#e=x(q);#n=x(ee);#i=x(rt);#o=x(W);#t=x(Je);formRef=Y.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=S(!1);copiedPassword=S(!1);showCopyPassword=S(!1);encryptionEffect=Ot(()=>{let i=this.encryptionFieldSignal();console.log(i===""),i===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))},{allowSignalWrites:!0});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let n=document.createElement("textarea");n.value=i,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let i=this.#t.systemInfo()?.EncryptionModules??[];return e=>{let n=[_t,...i].find(a=>a.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&Z(n.formRef,Qt,5),e&2&&J()},standalone:!0,features:[j],decls:22,vars:3,consts:[["formRef",""],["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder","Your backup name","formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder","Your backup description","formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder","Encryption","formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder","Password","formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder","Repeat password","formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]],template:function(e,n){if(e&1){let a=v();r(0,"form",1,0),C("submit",function(){return h(a),y(n.next())}),r(2,"h3",2),l(3,"General backup settings"),o(),r(4,"spk-form-field")(5,"label",3),l(6," Backup name "),r(7,"sup"),l(8,"*"),o()(),u(9,"input",4),o(),r(10,"spk-form-field")(11,"label",5),l(12,"Backup description"),o(),u(13,"textarea",6),o(),d(14,ln,7,2),r(15,"div",7)(16,"button",8),C("click",function(){return h(a),y(n.exit())}),r(17,"spk-icon"),l(18,"arrow-left"),o(),l(19," Exit "),o(),d(20,sn,4,1,"button",9)(21,pn,5,2,"spk-tooltip",10),o()()}e&2&&(c("formGroup",n.generalForm),s(14),_(n.isNew()?14:-1),s(6),_(n.encryptionFieldSignal()===""?20:21))},dependencies:[pe,oe,le,se,te,ne,ie,re,ae,ce,de,ke,me,At,Xe,Ge],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var mn=["formRef"],cn=(t,i)=>({index:t,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),dn=t=>({$implicit:t});function un(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function fn(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e.value),s(),I(e.name)}}function _n(t,i){if(t&1){let e=v();r(0,"button",23,2),C("click",function(){let a=h(e).$implicit,m=p();return y(m.addNewOption(a))}),l(2),o()}if(t&2){let e=i.$implicit;s(2),I(e.name)}}function gn(t,i){t&1&&Ve(0)}function Cn(t,i){if(t&1&&d(0,gn,1,0,"ng-container",24),t&2){let e=i.$implicit,n=i.$index;p();let a=X(39);c("ngTemplateOutlet",a)("ngTemplateOutletContext",De(5,dn,Dt(2,cn,n,e)))}}function hn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function yn(t,i){if(t&1&&(r(0,"app-file-tree",27)(1,"label",33),l(2),d(3,hn,3,1,"spk-tooltip",34),o(),u(4,"input",35),o()),t&2){let e,n=p().$implicit,a=p();c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name))("accepts",n.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function xn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function wn(t,i){if(t&1&&(r(0,"app-file-tree",28)(1,"label",33),l(2),d(3,xn,3,1,"spk-tooltip",34),o(),u(4,"input",35),o()),t&2){let e,n=p().$implicit,a=p();c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name)),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function Sn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function kn(t,i){t&1&&(r(0,"spk-icon",36),l(1,"link"),o())}function vn(t,i){t&1&&(r(0,"spk-icon",36),l(1,"textbox"),o())}function Fn(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),d(3,Sn,3,1,"spk-tooltip",34),o(),u(4,"input",35),d(5,kn,2,0,"spk-icon",36)(6,vn,2,0,"spk-icon",36),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name),s(),_(n.formView.type==="Path"?5:6)}}function bn(t,i){if(t&1){let e=v();r(0,"span",40),C("click",function(){h(e);let a=p(2).$implicit,m=p();return y(m.oauthStartTokenCreation(a.formViewType))}),l(1,"AuthID"),o()}}function Tn(t,i){t&1&&(r(0,"spk-icon",36),l(1,"password"),o())}function Vn(t,i){if(t&1){let e=v();r(0,"spk-icon",41),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye "),o()}}function Dn(t,i){if(t&1){let e=v();r(0,"spk-icon",41),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye-slash "),o()}}function On(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),o(),u(3,"input",37),d(4,bn,2,0,"span",38)(5,Tn,2,0,"spk-icon",36)(6,Vn,2,0,"spk-icon",39)(7,Dn,2,0,"spk-icon",39),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name),c("type",n.formView.showPassword?"text":"password"),s(),_(n.oauthField===n.formView.name?4:5),s(2),_(n.formView.showPassword?6:7)}}function En(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Nn(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Pn(t,i){if(t&1&&(r(0,"spk-select")(1,"label",33),l(2),d(3,En,3,1,"spk-tooltip",34),o(),u(4,"input",42),F(5,10),D(6,Nn,2,2,"option",11,V),b(),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function In(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Gn(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Mn(t,i){if(t&1&&(r(0,"div",29)(1,"label",33),l(2),d(3,In,3,1,"spk-tooltip",34),o(),r(4,"div",43)(5,"spk-form-field"),u(6,"input",44),r(7,"spk-icon",36),l(8,"resize"),o()(),r(9,"spk-select"),u(10,"label")(11,"input",45),F(12,10),D(13,Gn,2,2,"option",11,V),b(),o()()()),t&2){let e,n=p().$implicit,a=p();c("formGroupName",n.formView.name),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(3),P("id","destination-",n.formGroupName,"-",n.index,""),s(7),O(a.sizeOptions())}}function An(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Rn(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),d(3,An,3,1,"spk-tooltip",34),o(),u(4,"input",46),r(5,"spk-icon",36),l(6,"numpad"),o()()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function $n(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Bn(t,i){if(t&1&&(r(0,"spk-toggle",30)(1,"label",33),l(2),d(3,$n,3,1,"spk-tooltip",34),o(),u(4,"input",47),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function Un(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Hn(t,i){t&1&&(r(0,"spk-option",49),l(1,"None"),o()),t&2&&c("value","None")}function Ln(t,i){if(t&1&&(r(0,"spk-option",11),l(1),u(2,"spk-checkbox",50),o()),t&2){let e=p().$implicit;c("value",e),s(),k(" ",e," ")}}function zn(t,i){if(t&1&&d(0,Hn,2,1,"spk-option",49)(1,Ln,3,2,"spk-option",11),t&2){let e=i.$implicit;_(e==="None"?0:1)}}function jn(t,i){if(t&1&&(r(0,"spk-select",31)(1,"label",33),l(2),d(3,Un,3,1,"spk-tooltip",34),o(),u(4,"input",48),F(5,10),D(6,zn,2,1,null,null,V),b(),o()),t&2){let e,n=p().$implicit;c("selectMultiple",!0),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function qn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Wn(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),d(3,qn,3,1,"spk-tooltip",34),o(),u(4,"input",35),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function Kn(t,i){if(t&1){let e=v();r(0,"div",25),F(1,26),d(2,yn,5,14,"app-file-tree",27)(3,wn,5,10,"app-file-tree",28)(4,Fn,7,10,"spk-form-field")(5,On,8,11,"spk-form-field")(6,Pn,8,9,"spk-select")(7,Mn,15,9,"div",29)(8,Rn,7,9,"spk-form-field")(9,Bn,5,9,"spk-toggle",30)(10,jn,8,7,"spk-select",31)(11,Wn,5,9,"spk-form-field"),b(),r(12,"button",32),C("click",function(){let a=h(e).$implicit,m=p();return y(m.removeFormView(a.formView,0))}),r(13,"spk-icon"),l(14,"x-circle"),o()()()}if(t&2){let e=i.$implicit;s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var Ce=new U,Qn=["Bytes","KB","MB","GB","TB","PB"],Yn=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],Ut=(t={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Ce.group({remoteVolumeSize:Ce.group({size:Ce.control(t.remoteVolumeSize),unit:Ce.control(t.size)}),backupRetention:Ce.control(t.backupRetention),advancedOptions:Ce.group({})}),ir=(t,i)=>Ce.group({name:Ce.control(t),value:Ce.control(i)}),gt=class t{#e=x(W);#n=x(q);#i=x(ee);formRef=Y.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=S(Qn);rentationOptions=S(Yn);oauthStartTokenCreation(i){}getFormFieldValue(i,e,n){return this.optionsForm.controls.advancedOptions.controls[n].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let n=i.find(a=>a.value===e);return n?n.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let n=i.find(a=>a.name===e);return n?`${n.name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-options"]],viewQuery:function(e,n){e&1&&Z(n.formRef,mn,5),e&2&&J()},standalone:!0,features:[j],decls:49,vars:5,consts:[["formRef",""],["fieldTemplate",""],["option",""],[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder","Select an option...","formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]],template:function(e,n){if(e&1){let a=v();r(0,"form",3,0),C("submit",function(){return h(a),y(n.submit())}),r(2,"h3",4),l(3,"Options"),o(),r(4,"div",5)(5,"div",6)(6,"spk-form-field")(7,"label",7),l(8,"Remote volume size"),o(),u(9,"input",8),o(),r(10,"spk-select"),u(11,"input",9),F(12,10),D(13,un,2,2,"option",11,V),b(),o()(),r(15,"p"),l(16," The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. "),r(17,"a",12),l(18,"Read more"),o()()(),r(19,"spk-select",13)(20,"label",7),l(21,"Backup retention"),o(),u(22,"input",14),D(23,fn,2,2,"option",11,V),o(),r(25,"app-toggle-card",15),F(26,16),l(27," Advanced options "),r(28,"spk-menu")(29,"button",17),l(30," Add advanced option "),r(31,"spk-icon"),l(32,"plus"),o()(),F(33,18),D(34,_n,3,1,"button",19,V),b(),o(),b(),D(36,Cn,1,7,"ng-container",null,V),o(),d(38,Kn,15,2,"ng-template",null,1,Ye),r(40,"div",20)(41,"button",21),C("click",function(){return h(a),y(n.goBack())}),r(42,"spk-icon"),l(43,"arrow-left"),o(),l(44," Go back "),o(),r(45,"button",22)(46,"spk-icon"),l(47,"arrow-right"),o(),l(48," Submit "),o()()()}e&2&&(c("formGroup",n.optionsForm),s(13),O(n.sizeOptions()),s(6),c("displayFn",n.retentionOptionDisplayFn()),s(4),O(n.rentationOptions()),s(2),c("disallowToggle",!0),s(9),O(n.nonSelectedOptions()),s(2),O(n.selectedOptions()),s(9),ue("loader",n.isSubmitting()))},dependencies:[pe,oe,le,se,te,we,xe,ne,ie,re,ae,Se,Ze,tt,de,ke,me,ce,ve,et,nt,Ge,Me,Fe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Zn=["formRef"];function Jn(t,i){if(t&1&&(r(0,"option",24),l(1),o()),t&2){let e=i.$implicit;c("value",e.key),s(),I(e.label)}}function Xn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"spk-form-field")(2,"label",12),l(3,"Next time"),o(),r(4,"input",13,1),C("focus",function(){h(e);let a=X(5);return y(a.showPicker())}),o(),r(6,"spk-icon",14),l(7,"clock"),o()(),r(8,"spk-form-field"),u(9,"label",15),r(10,"input",16,2),C("focus",function(){h(e);let a=X(11);return y(a.showPicker())}),o(),r(12,"spk-icon",14),l(13,"calendar"),o()()(),F(14,17),r(15,"div",18)(16,"spk-form-field")(17,"label",19),l(18,"Run again every"),o(),u(19,"input",20),o(),r(20,"spk-select",21),u(21,"input",22),F(22,23),D(23,Jn,2,2,"option",24,V),b(),o()(),r(25,"app-toggle-card",25),F(26,26),l(27,"Allowed days"),b(),r(28,"div",27)(29,"spk-toggle",6),l(30," Monday "),u(31,"input",28),o(),r(32,"spk-toggle",6),l(33," Tuesday "),u(34,"input",29),o(),r(35,"spk-toggle",6),l(36," Wednesday "),u(37,"input",30),o(),r(38,"spk-toggle",6),l(39," Thursday "),u(40,"input",31),o(),r(41,"spk-toggle",6),l(42," Friday "),u(43,"input",32),o(),r(44,"spk-toggle",6),l(45," Saturday "),u(46,"input",33),o(),r(47,"spk-toggle",6),l(48," Sunday "),u(49,"input",34),o()()(),b()}if(t&2){let e=p();s(20),c("displayFn",e.displayFn),s(3),O(e.unitOptions),s(2),c("disallowToggle",!0)}}var M=new U,Ht=[{key:"s",label:"Seconds"},{key:"m",label:"Minutes"},{key:"h",label:"Hours"},{key:"D",label:"Days"},{key:"W",label:"Weeks"},{key:"M",label:"Months"},{key:"Y",label:"Years"}],Lt=(t={autoRun:!1,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>M.group({autoRun:M.control(t.autoRun),nextTime:M.group({time:M.control(t.nextTime.time),date:M.control(t.nextTime.date)}),runAgain:M.group({repeatValue:M.control(t.runAgain.repeatValue),repeatUnit:M.control(t.runAgain.repeatUnit),allowedDays:M.group({mon:M.control(t.runAgain.allowedDays.mon),tue:M.control(t.runAgain.allowedDays.tue),wed:M.control(t.runAgain.allowedDays.wed),thu:M.control(t.runAgain.allowedDays.thu),fri:M.control(t.runAgain.allowedDays.fri),sat:M.control(t.runAgain.allowedDays.sat),sun:M.control(t.runAgain.allowedDays.sun)})})}),Ct=class t{#e=x(W);#n=x(q);#i=x(ee);formRef=Y.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Ht;displayFn(i){let e=Ht.find(n=>n.key===i);return e?`${e.label}`:""}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-schedule"]],viewQuery:function(e,n){e&1&&Z(n.formRef,Zn,5),e&2&&J()},standalone:!0,features:[j],decls:20,vars:2,consts:[["formRef",""],["timeRef",""],["dateRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]],template:function(e,n){if(e&1){let a=v();r(0,"form",3,0),C("submit",function(){return h(a),y(n.next())}),r(2,"h3",4),l(3,"Schedule"),o(),r(4,"div",5)(5,"spk-toggle",6),l(6," Automatically run backups "),u(7,"input",7),o(),r(8,"p"),l(9,"If a date was missed, the job will run as soon as possible."),o()(),d(10,Xn,50,2),r(11,"div",8)(12,"button",9),C("click",function(){return h(a),y(n.goBack())}),r(13,"spk-icon"),l(14,"arrow-left"),o(),l(15," Go back "),o(),r(16,"button",10)(17,"spk-icon"),l(18,"arrow-right"),o(),l(19," Continue "),o()()()}if(e&2){let a;c("formGroup",n.scheduleForm),s(10),_((a=n.scheduleFormSignal())!=null&&a.autoRun?10:-1)}},dependencies:[pe,oe,le,se,te,we,xe,ne,ie,re,ae,Se,ce,de,ve,me,ke,Fe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ei=["formRef"];function ti(t,i){if(t&1&&(r(0,"option",20),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function ni(t,i){if(t&1&&(r(0,"div",13)(1,"spk-form-field"),u(2,"input",17),o(),r(3,"spk-select"),u(4,"input",18),F(5,19),D(6,ti,2,2,"option",20,V),b(),o()()),t&2){let e=p();s(6),O(e.sizeOptions())}}var he=new U,ii=["Bytes","KB","MB","GB","TB","PB"],oi=["Contains","Does not contain","Is greater than","Is less than"];var zt=(t={path:"",excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>he.group({path:he.control(t.path),excludes:he.group({hidden:he.control(t.excludes.hidden),system:he.control(t.excludes.system),temporary:he.control(t.excludes.temporary),filesLargerThan:he.group({size:he.control(null),unit:he.control(null)})})}),ht=class t{#e=x(W);#n=x(q);#i=x(ee);formRef=Y.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=S(ii);expressionOptions=S(oi);getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&Z(n.formRef,ei,5),e&2&&J()},standalone:!0,features:[j],decls:32,vars:7,consts:[["formRef",""],[3,"submit","formGroup"],[1,"title-30"],[3,"multiSelect","startingPath"],["for","path"],["type","text","id","path","tabindex","4","placeholder","Path","formControlName","path"],["formGroupName","excludes",3,"isActive"],["title",""],[1,"raised","primary"],["type","checkbox","placeholder","Hidden files","formControlName","hidden"],["type","checkbox","placeholder","System files","formControlName","system"],["type","checkbox","placeholder","Temporary files","formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder","Select an option..."],["options",""],[3,"value"]],template:function(e,n){if(e&1){let a=v();r(0,"form",1,0),C("submit",function(){return h(a),y(n.next())}),r(2,"h3",2),l(3,"Source Data"),o(),r(4,"app-file-tree",3)(5,"label",4),l(6,"Folder path"),o(),u(7,"input",5),o(),r(8,"app-toggle-card",6),F(9,7),l(10,"Exclude"),b(),r(11,"spk-toggle",8),l(12," Hidden files "),u(13,"input",9),o(),r(14,"spk-toggle",8),l(15," System files "),u(16,"input",10),o(),r(17,"spk-toggle",8),l(18," Temporary files "),u(19,"input",11),o(),r(20,"spk-toggle",12),C("click",function(){return h(a),y(n.toggleFilesLargerThan())}),l(21," Files larger than "),o(),d(22,ni,8,0,"div",13),o(),r(23,"div",14)(24,"button",15),C("click",function(){return h(a),y(n.goBack())}),r(25,"spk-icon"),l(26,"arrow-left"),o(),l(27," Go back "),o(),r(28,"button",16)(29,"spk-icon"),l(30,"arrow-right"),o(),l(31," Continue "),o()()()}e&2&&(c("formGroup",n.sourceDataForm),s(4),c("multiSelect",!0)("startingPath",n.getPath()),s(4),c("isActive",!0),s(12),ue("active",n.filesLargerThan()),s(2),_(n.filesLargerThan()?22:-1))},dependencies:[pe,oe,le,se,te,we,xe,ne,ie,re,ae,Se,ce,me,ke,de,ve,Me,Fe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}.filter-inputs[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-end}.filter-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.filter-inputs[_ngcontent-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var K=new U,W=class t{#e=x(q);#n=x(Je);#i=x(Ie);#o=x(it);generalForm=Bt();sourceDataForm=zt();scheduleForm=Lt();destinationForm=jt();optionsForm=Ut();isDraft=S(!1);backupId=S(null);isSubmitting=S(!1);finishedLoading=S(!1);backupDefaults=S(null);isNew=G(()=>this.backupId()==="new");selectedOptions=S([]);selectedAdvancedFormPair=S([]);destinationFormPair=S({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=G(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(n=>e.findIndex(a=>a.name===n.name)===-1)});selectedHttpOptions=S([]);notSelectedHttpOptions=G(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(n=>e.findIndex(a=>a.name===n.name)===-1)});sourceDataFormSignal=_e(this.sourceDataForm.valueChanges);destinationFormSignal=_e(this.destinationForm.valueChanges);generalFormSignal=_e(this.generalForm.valueChanges);encryptionFieldSignal=_e(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=_e(this.scheduleForm.valueChanges);destinationOptions=G(()=>this.#n.backendModules()??[]);httpOptions=G(()=>this.#n.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=G(()=>this.#n.systemInfo()?.Options?.map(this.#t)??[]);#t(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=G(()=>{let i=this.#n.systemInfo()?.EncryptionModules??[];return[_t,...i]});nonSelectedOptions=G(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,n){let a=this.notSelectedAdvancedFormPair().find(m=>m.name===i);a&&this.addAdvancedFormPair(a,e,n)}addHttpOptionByName(i,e,n){let a=this.notSelectedHttpOptions().find(m=>m.name===i);a&&this.addHttpOption(a,e,n)}addAdvancedFormPair(i,e,n){let a=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=n??i.defaultValue;this.createFormField(a,i,m),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,n){let a=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=n??i.defaultValue;this.createFormField(a,i,m),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(a=>a.name===i.name)!==-1?this.selectedAdvancedFormPair.update(a=>(a=a.filter(m=>m.name!==i.name),a)):this.selectedHttpOptions.update(a=>(a=a.filter(m=>m.name!==i.name),a))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(n=>(n=n.filter(a=>a.name!==i.name),n))}submit(){this.isSubmitting.set(!0);let i=this.#s(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(He(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{console.log("submitted res",n),this.exit()},error:n=>{console.error("submitted error",n)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(He(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{console.log("submitted res",n),this.exit()},error:n=>{console.error("submitted error",n)}})}exit(){this.#m(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#l(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",n=i.Filters?.map(R=>`${R.Include?"":"-"}${R.Expression}`)??[],a=i.Settings?.find(R=>R.Name==="--exclude-files-attributes")?.Value??"",m=i.Settings?.find(R=>R.Name==="--skip-files-larger-than")??null,g=m?.Value.replace(/[0-9]/g,"")??null,A=m?.Value.replace(/[^0-9]/g,"")??null,$={path:[...e,...n].join("\0"),excludes:{hiddenFiles:a.includes("hidden"),systemFiles:a.includes("system"),tempFiles:a.includes("temporary"),filesLargerThan:g&&A?{size:parseInt(A),unit:g.toUpperCase()}:null}};this.sourceDataForm.patchValue($)}mapDestinationToForm(i){let e=i.TargetURL?ut(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#l(i){let e=ut(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(m=>m.Name==="encryption-module"),n=e?.Value&&e.Value.length?e.Value:"",a={name:i.Name??"",description:i.Description??""};n&&n!==""&&(a.encryption=n),this.generalForm.patchValue(a)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,a={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(a)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],n=this.advancedOptions();i.Settings?.forEach(a=>{if(a.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(a.Value??"");if(!(a.Name&&e.includes(a.Name))){if(a.Name==="dblock-size"){let m=a.Value?.replace(/[^0-9]/g,""),g=a.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:m?parseInt(m):null,unit:g?g.toUpperCase():null})}if(a.Name&&a.Value){let m=n.find(g=>g.name===a.Name);if(!m)return;this.addOptionToFormGroup(m,a.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#s(){let i=this.generalForm.value,e=this.optionsForm.value,n=this.scheduleForm.value,a=this.sourceDataForm.value,g=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],A=null;n.runAgain?.repeatUnit&&n.runAgain?.repeatValue&&(A=this.#o.toString(n.runAgain.repeatValue,n.runAgain.repeatUnit));let $=n.runAgain?.allowedDays?Object.entries(n.runAgain?.allowedDays).filter(([f,w])=>w).map(([f,w])=>f):[],R=a.path?.split("\0")??[],pt=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},mt=this.advancedOptions(),Ke=Object.entries(e.advancedOptions??{}).filter(([f,w])=>f&&w).map(([f,w])=>{let H=mt.find(L=>L.name===f);return H?.type==="Size"?{Name:f,Value:`${w.size}${w.unit.toLowerCase()}`}:H?.type==="Integer"?{Name:f,Value:w.toString()}:H?.type==="Boolean"?{Name:f,Value:w.toString()}:{Name:f,Value:w}}),Ee=[pt,...Ke],Ne=Object.entries(a.excludes??{}).filter(([f,w])=>w&&f!=="filesLargerThan").map(([f])=>f),T=a.excludes?.filesLargerThan;return Ne.length&&Ee.push({Name:"--exclude-files-attributes",Value:Ne.join(",")}),T&&T.size!==null&&T.unit!==null&&Ee.push({Name:"--skip-files-larger-than",Value:`${T.size}${T.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:g[0]??null,Sources:R.filter(f=>!f.startsWith("-")),Settings:Ee,Filters:R.filter(f=>f.startsWith("-")).map((f,w)=>({Order:w,Include:!1,Expression:f.slice(1)}))},Schedule:n.autoRun?{Repeat:A,Time:n.nextTime?.date?new Date(`${n.nextTime.date}T${n.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:$}:null}}#a(i){return i.controls.map(e=>ot(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),n={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(n.date=e.toISOString().split("T")[0]),n}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(n=>(n=n.filter(a=>a.name!==e),n)))}addOptionToFormGroup(i,e){let n=this.optionsForm.controls.advancedOptions;this.createFormField(n,i,e??i.defaultValue),this.selectedOptions.update(a=>(a.push(i),a))}createFormField(i,e,n){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,K.control(n));return}if(e.type==="Size"){let a=n.replace(/[0-9]/g,""),m=n.replace(/[^0-9]/g,"");i.addControl(e.name,K.group({size:K.control(m?parseInt(m):50),unit:K.control(a?a.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,K.control(n?parseInt(n):0));return}if(e.type==="Boolean"){i.addControl(e.name,K.control(n==="true"));return}if(e.type==="Flags"){i.addControl(e.name,K.control(n??""));return}if(e.type==="Timespan"){i.addControl(e.name,K.control(n,[fe.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,n=!1){let a=this.destinationOptions().find(T=>T.Key===i),m=this.httpOptions();if(!a||!a.Options)return;let g=qe.hasOwnProperty(i)&&qe[i],A=g&&g.oauthField?g.oauthField:null,$=g&&g.customFields?g.customFields:{},R=g&&g.dynamicFields?g.dynamicFields:[],pt=g&&g.advancedFields?g.advancedFields:[],mt=g&&g.ignoredAdvancedFields?g.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:A,custom:[],dynamic:[],advanced:[]});let Ke=K.group({}),Ee=K.group({}),Ne=K.group({});$&&Object.entries($).forEach(([T,f],w)=>{let Te=f,{formElement:H}=Te,L=xt(Te,["formElement"]);Ke.addControl(T,H(e?.custom[T])),this.destinationFormPair.update(Pe=>(Pe.custom.push(B({order:900+w},L)),Pe))});for(let T=0;T<a.Options.length;T++){let f=a.Options[T];if(f.Deprecated)continue;let w=R.find(H=>H===f.Name||H.name===f.Name);if(w){let H=w&&typeof w!="string",L={name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,order:900+T},Te=H?B(B({},L),w):L,Qe=e?.dynamic[f.Name]??f.DefaultValue;this.createFormField(Ee,Te,Qe),this.destinationFormPair.update(Be=>(Be.dynamic.push(Te),Be))}else{if(mt.find(Q=>Q===f.Name))continue;let L=pt.find(Q=>Q===f.Name||Q.name===f.Name),Te=L&&typeof L!="string",Pe=e?.advanced[f.Name],Qe=Pe??f.DefaultValue,Be={name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,defaultValue:Qe,order:900+T},ct=Te?B(B({},Be),L):Be;n&&Pe&&(this.createFormField(Ne,ct,Qe),this.selectedAdvancedFormPair.update(Q=>(Q.push(ct),Q))),this.destinationFormPair.update(Q=>(Q.advanced.push(ct),Q))}}for(let T=0;T<m.length;T++){let f=m[T],w=e?.advanced[f.name],H=w??f.defaultValue;n&&w&&(this.createFormField(Ne,f,H),this.selectedHttpOptions.update(L=>(L.push(f),L)))}this.destinationFormPair.update(T=>({oauthField:T.oauthField,custom:T.custom.sort((f,w)=>f.order-w.order),dynamic:T.dynamic.sort((f,w)=>f.order-w.order),advanced:T.advanced.sort((f,w)=>f.order-w.order)})),this.destinationForm.controls.destinations.push(qt({key:a.Key,customGroup:Ke,dynamicGroup:Ee,advancedGroup:Ne}))}#m(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var ri=["formRef"],ai=(t,i,e,n)=>({index:t,formView:i,formGroupName:"custom",destinationType:e,oauthField:n}),st=t=>({$implicit:t}),li=(t,i,e,n)=>({index:t,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:n}),si=(t,i,e,n)=>({index:t,formView:i,formGroupName:"advanced",destinationType:e,oauthField:n}),pi=(t,i,e,n)=>({index:t,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),mi=()=>({maxWidth:"700px",width:"100%"});function ci(t,i){t&1&&(l(0," Connected "),r(1,"spk-icon"),l(2,"check"),o())}function di(t,i){t&1&&l(0," Test destination ")}function ui(t,i){if(t&1){let e=v();r(0,"button",8),C("click",function(){h(e);let a=p();return y(a.testDestination())}),d(1,ci,3,0,"spk-icon")(2,di,1,0),o()}if(t&2){let e=p();ue("success",e.successfulTest()),s(),_(e.successfulTest()?1:2)}}function fi(t,i){if(t&1){let e=v();r(0,"p",14),C("click",function(){h(e);let a=p();return y(a.removeDestinationFormGroup(a.destinationCount()-1))}),l(1," Want to select another destination? "),r(2,"span",15),l(3,"Click here"),o()()}}function _i(t,i){if(t&1){let e=v();r(0,"div",16)(1,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("file"))}),r(2,"h3"),l(3,"File system"),o(),r(4,"p"),l(5,"Store backups on your local file system."),o()(),r(6,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("gcs"))}),r(7,"h3"),l(8,"Google Cloud Storage"),o(),r(9,"p"),l(10,"Store backups in Google Cloud Storage."),o()(),r(11,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("s3"))}),r(12,"h3"),l(13,"S3 compatible bucket"),o(),r(14,"p"),l(15,"Store backups in any S3 compatible bucket."),o()(),r(16,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("ssh"))}),r(17,"h3"),l(18,"SSH"),o(),r(19,"p"),l(20,"Store backups in SSH."),o()(),r(21,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("googledrive"))}),r(22,"h3"),l(23,"Google Drive"),o(),r(24,"p"),l(25,"Store backups in Google Drive."),o()()(),r(26,"p"),l(27,"More destinations are coming soon."),o()}}function gi(t,i){t&1&&Ve(0)}function Ci(t,i){if(t&1&&d(0,gi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=X(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,Le(2,ai,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function hi(t,i){t&1&&Ve(0)}function yi(t,i){if(t&1&&d(0,hi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=X(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,Le(2,li,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function xi(t,i){if(t&1){let e=v();r(0,"button",24),C("click",function(){let a=h(e).$implicit,m=p(2);return y(m.addAdvancedFormPair(a,0))}),l(1),o()}if(t&2){let e=i.$implicit;s(),k(" ",e.name," ")}}function wi(t,i){t&1&&Ve(0)}function Si(t,i){if(t&1&&d(0,wi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=X(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,Le(2,si,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function ki(t,i){if(t&1){let e=v();r(0,"button",24),C("click",function(){let a=h(e).$implicit,m=p(2);return y(m.addHttpOption(a,0))}),l(1),o()}if(t&2){let e=i.$implicit;s(),k(" ",e.name," ")}}function vi(t,i){t&1&&Ve(0)}function Fi(t,i){if(t&1&&d(0,vi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=X(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,Le(2,pi,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function bi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ti(t,i){if(t&1&&(r(0,"app-file-tree",27)(1,"label",34),l(2),d(3,bi,3,1,"spk-tooltip",35),o(),u(4,"input",36),o()),t&2){let e,n=p().$implicit,a=p(2);c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name))("accepts",n.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Vi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Di(t,i){if(t&1&&(r(0,"app-file-tree",28)(1,"label",34),l(2),d(3,Vi,3,1,"spk-tooltip",35),o(),u(4,"input",36),o()),t&2){let e,n=p().$implicit,a=p(2);c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name)),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Oi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ei(t,i){t&1&&(r(0,"spk-icon",37),l(1,"link"),o())}function Ni(t,i){t&1&&(r(0,"spk-icon",37),l(1,"textbox"),o())}function Pi(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),d(3,Oi,3,1,"spk-tooltip",35),o(),u(4,"input",36),d(5,Ei,2,0,"spk-icon",37)(6,Ni,2,0,"spk-icon",37),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),s(),_(n.formView.type==="Path"?5:6)}}function Ii(t,i){if(t&1){let e=v();r(0,"span",41),C("click",function(){h(e);let a=p(2).$implicit,m=p(2);return y(m.oauthStartTokenCreation(a.destinationType))}),l(1,"AuthID"),o()}}function Gi(t,i){t&1&&(r(0,"spk-icon",37),l(1,"password"),o())}function Mi(t,i){if(t&1){let e=v();r(0,"spk-icon",42),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye "),o()}}function Ai(t,i){if(t&1){let e=v();r(0,"spk-icon",42),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye-slash "),o()}}function Ri(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),o(),u(3,"input",38),d(4,Ii,2,0,"span",39)(5,Gi,2,0,"spk-icon",37)(6,Mi,2,0,"spk-icon",40)(7,Ai,2,0,"spk-icon",40),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),c("type",n.formView.showPassword?"text":"password"),s(),_(n.oauthField===n.formView.name?4:5),s(2),_(n.formView.showPassword?6:7)}}function $i(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Bi(t,i){if(t&1&&(r(0,"option",45),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Ui(t,i){if(t&1&&(r(0,"spk-select")(1,"label",34),l(2),d(3,$i,3,1,"spk-tooltip",35),o(),u(4,"input",43),F(5,44),D(6,Bi,2,2,"option",45,V),b(),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function Hi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Li(t,i){if(t&1&&(r(0,"option",45),l(1),o()),t&2){let e=i.$implicit;c("value",e.value),s(),vt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function zi(t,i){if(t&1&&(r(0,"spk-select",29)(1,"label",34),l(2),d(3,Hi,3,1,"spk-tooltip",35),o(),u(4,"input",43),F(5,44),D(6,Li,2,3,"option",45,V),b(),o()),t&2){let e,n=p().$implicit,a=p(2);c("isFreeText",!0),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),s(2),O(n.formView.loadOptions(a.injector)())}}function ji(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function qi(t,i){if(t&1&&(r(0,"option",45),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Wi(t,i){if(t&1&&(r(0,"div",30)(1,"label",34),l(2),d(3,ji,3,1,"spk-tooltip",35),o(),r(4,"div",46)(5,"spk-form-field"),u(6,"input",47),r(7,"spk-icon",37),l(8,"resize"),o()(),r(9,"spk-select"),u(10,"label")(11,"input",48),F(12,44),D(13,qi,2,2,"option",45,V),b(),o()()()),t&2){let e,n=p().$implicit,a=p(2);c("formGroupName",n.formView.name),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(3),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(7),O(a.sizeOptions())}}function Ki(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Qi(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),d(3,Ki,3,1,"spk-tooltip",35),o(),u(4,"input",49),r(5,"spk-icon",37),l(6,"numpad"),o()()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Yi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Zi(t,i){if(t&1&&(r(0,"spk-toggle",31)(1,"label",34),l(2),d(3,Yi,3,1,"spk-tooltip",35),o(),u(4,"input",50),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Ji(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Xi(t,i){t&1&&(r(0,"spk-option",52),l(1,"None"),o()),t&2&&c("value","None")}function eo(t,i){if(t&1&&(r(0,"spk-option",45),l(1),u(2,"spk-checkbox",53),o()),t&2){let e=p().$implicit;c("value",e),s(),k(" ",e," ")}}function to(t,i){if(t&1&&d(0,Xi,2,1,"spk-option",52)(1,eo,3,2,"spk-option",45),t&2){let e=i.$implicit;_(e==="None"?0:1)}}function no(t,i){if(t&1&&(r(0,"spk-select",32)(1,"label",34),l(2),d(3,Ji,3,1,"spk-tooltip",35),o(),u(4,"input",51),F(5,44),D(6,to,2,1,null,null,V),b(),o()),t&2){let e,n=p().$implicit;c("selectMultiple",!0),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function io(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function oo(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),d(3,io,3,1,"spk-tooltip",35),o(),u(4,"input",36),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function ro(t,i){if(t&1){let e=v();r(0,"button",54),C("click",function(){h(e);let a=p().$implicit,m=p(2);return y(m.removeFormView(a.formView,0))}),r(1,"spk-icon"),l(2,"x-circle"),o()()}}function ao(t,i){if(t&1&&(r(0,"div",25),F(1,26),d(2,Ti,5,16,"app-file-tree",27)(3,Di,5,12,"app-file-tree",28)(4,Pi,7,12,"spk-form-field")(5,Ri,8,13,"spk-form-field")(6,Ui,8,11,"spk-select")(7,zi,8,12,"spk-select",29)(8,Wi,15,11,"div",30)(9,Qi,7,11,"spk-form-field")(10,Zi,5,11,"spk-toggle",31)(11,no,8,8,"spk-select",32)(12,oo,5,11,"spk-form-field"),b(),d(13,ro,3,0,"button",33),o()),t&2){let e=i.$implicit;ue("single-field",e.formGroupName!=="advanced"),s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),s(11),_(e.formGroupName==="advanced"?13:-1)}}function lo(t,i){if(t&1&&(F(0,9)(1,18),D(2,Ci,1,9,"ng-container",null,V),D(4,yi,1,9,"ng-container",null,V),r(6,"app-toggle-card",19),F(7,20),l(8," Advanced options "),r(9,"spk-menu")(10,"button",21),l(11," Add advanced option "),r(12,"spk-icon"),l(13,"plus"),o()(),F(14,7),D(15,xi,2,1,"button",22,V),b(),o(),b(),D(17,Si,1,9,"ng-container",null,V),o(),r(19,"app-toggle-card",19),F(20,20),l(21," Http options "),r(22,"spk-menu")(23,"button",21),l(24," Add http option "),r(25,"spk-icon"),l(26,"plus"),o()(),F(27,7),D(28,ki,2,1,"button",22,V),b(),o(),b(),D(30,Fi,1,9,"ng-container",null,V),o(),d(32,ao,14,5,"ng-template",null,1,Ye),b()()),t&2){let e=p();s(2),O(e.destinationFormPair().custom),s(2),O(e.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedAdvancedFormPair().length===0),s(5),O(e.notSelectedAdvancedFormPair()),s(2),O(e.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedHttpOptions().length===0),s(5),O(e.notSelectedHttpOptions()),s(2),O(e.selectedHttpOptions())}}function so(t,i){if(t&1){let e=v();r(0,"spk-dialog",55),Tt("isOpenChange",function(a){h(e);let m=p();return bt(m.targetUrlDialogOpen,a)||(m.targetUrlDialogOpen=a),y(a)}),r(1,"header",56)(2,"h2"),l(3,"Edit target URL"),o(),r(4,"spk-alert",57),l(5,"Be careful, this will overwrite everything you have in your destination."),o()(),r(6,"div",58)(7,"spk-form-field"),u(8,"textarea",59),o()(),r(9,"footer",60)(10,"button",11),C("click",function(){h(e);let a=p();return y(a.closeTargetUrlDialog(!1))}),l(11,"Cancel"),o(),r(12,"button",61),C("click",function(){h(e);let a=p();return y(a.closeTargetUrlDialog(!0))}),l(13," Override target URLc "),r(14,"spk-icon"),l(15,"swap"),o()()()()}if(t&2){let e=p();Ft("isOpen",e.targetUrlDialogOpen),c("options",Vt(3,mi)),s(8),c("formControl",e.targetUrlCtrl)}}var po=["Bytes","KB","MB","GB","TB","PB"],lt=new U,jt=(t={destinations:[]})=>lt.group({destinations:lt.array(t.destinations)}),qt=({key:t,customGroup:i,dynamicGroup:e,advancedGroup:n})=>lt.group({destinationType:lt.control(t),custom:i,dynamic:e,advanced:n}),yt=class t{#e=x(q);#n=x(ee);#i=x(Et);#o=x(Ie);#t=x(W);#r=x(Mt);injector=x(wt);formRef=Y.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=G(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=S(po);successfulTest=S(!1);getFormFieldValue(i,e,n){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[n].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#t.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#t.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#t.addHttpOption(i,e)}targetUrl=G(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new Nt;targetUrlInitial=S(null);targetUrlDialogOpen=S(!1);openTargetUrlDialog(){let e=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!i||e===n||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let n=this.#t.getCurrentTargetUrl()[i];n&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:n}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:a=>{let m=a.error.error.Error;if(m==="missing-folder"&&this.#r.open(Oe,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:g=>{g&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:n}}).subscribe()}}),m.startsWith("incorrect-cert:")){let g=m.split("incorrect-cert:")[1];this.#r.open(Oe,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${g}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:A=>{A&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",g)}})}if(m.startsWith("incorrect-host-key:")){let g=m.split('incorrect-host-key:"')[1].split('",')[0],A=m.split('accepted-host-key:"')[1].split('",')[0];A?this.#r.open(Oe,{maxWidth:"500px",data:{title:"The host key has changed",message:`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${A}
|
|
6
|
+
with the REPORTED host key: ${g}?`,confirmText:"Approve",cancelText:"Cancel"},closed:$=>{$&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,g)}}):this.#r.open(Oe,{maxWidth:"500px",data:{title:"Approve host key?",message:`No certificate was specified, please verify that the reported host key is correct: ${g}`,confirmText:"Approve",cancelText:"Cancel"},closed:$=>{$&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,g)}})}}})}mapToTargetUrl(i){return ot(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let e=this.destinationOptions().find(n=>n.Key===i);return e?`${e.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#n.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#n.parent})}#l=S("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=S(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=S(!1);#p=S(null);keyCreation(){}oauthStartTokenCreation(i){this.#a.set(!0);let e=450,n=600,a=this.#l()+"?type="+i+"&token="+this.#s(),m=screen.width/2-e/2,g=screen.height/2-n/2,A=window.open(a,"_blank","height="+n+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+m+",top="+g);A?.addEventListener("blur",$=>{console.log("event blur",$)}),A?.addEventListener("beforeunload",$=>{console.log("event beforeunload",$),this.#i.get(this.#l()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#s()}}).pipe(He(()=>this.#a.set(!1))).subscribe({next:R=>{console.log("res",R),R?.authid&&this.#p.set(R.authid)}})})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&Z(n.formRef,ri,5),e&2&&J()},standalone:!0,features:[j],decls:29,vars:6,consts:[["formRef",""],["fieldTemplate",""],[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["item","","type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["item","","type","button",3,"click"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],["options",""],[3,"value"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]],template:function(e,n){if(e&1){let a=v();r(0,"form",2,0),C("submit",function(){return h(a),y(n.next())}),r(2,"header")(3,"h3",3),l(4," Backup destination "),r(5,"div",4),d(6,ui,3,3,"button",5),r(7,"spk-menu")(8,"button",6)(9,"spk-icon"),l(10,"dots-three-vertical"),o()(),F(11,7),r(12,"button",8),C("click",function(){return h(a),y(n.openTargetUrlDialog())}),r(13,"spk-icon"),l(14,"link"),o(),l(15," Edit target URL "),o(),b(),o()()(),d(16,fi,4,0,"p"),o(),d(17,_i,28,0)(18,lo,34,4,"ng-container",9),r(19,"div",10)(20,"button",11),C("click",function(){return h(a),y(n.goBack())}),r(21,"spk-icon"),l(22,"arrow-left"),o(),l(23," Go back "),o(),r(24,"button",12)(25,"spk-icon"),l(26,"arrow-right"),o(),l(27," Continue "),o()()(),d(28,so,16,4,"spk-dialog",13)}if(e&2){let a;c("formGroup",n.destinationForm),s(6),_(n.destinationCount()>0?6:-1),s(10),_(n.destinationCount()>0?16:-1),s(),_(n.destinationCount()===0?17:-1),s(),_(!((a=n.destinationFormSignal())==null||a.destinations==null)&&a.destinations.length?18:-1),s(10),_(n.targetUrlDialogOpen()?28:-1)}},dependencies:[pe,oe,le,se,te,we,xe,ne,ie,Pt,re,ae,Se,It,Ze,ce,de,tt,et,nt,me,ve,Ge,Gt,Xe,Fe,Me],styles:["[_nghost-%COMP%]{display:block}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{jt as a,qt as b,yt as c,Bt as d,_t as e,ft as f,Ut as g,ir as h,gt as i,Lt as j,Ct as k,zt as l,ht as m,W as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,d as b}from"./chunk-AIWAOXTQ.js";import"./chunk-4EODC7AQ.js";import"./chunk-ZSOWH34L.js";import"./chunk-N6REZCKW.js";import"./chunk-73UOOUBD.js";import"./chunk-IEVRQDB6.js";import"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-5AC7O5ME.js";import{a as J}from"./chunk-6GOAPINI.js";import{a as R}from"./chunk-3ZEBM2Q6.js";import{a as $,g as A,h as V,j as z,m as j}from"./chunk-IEVRQDB6.js";import{d as N}from"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import{$ as y,Gb as e,Ib as u,Oa as p,Ob as D,Pb as B,Qb as S,Tb as M,Ub as I,Vb as H,W as _,Y as v,ab as s,cb as m,ga as f,ha as g,hb as d,ib as P,jb as O,kb as E,lb as a,mb as o,nb as x,ob as F,pb as w,rb as T,rc as L,sb as b,tb as c}from"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";var C=class t{#t=_(J);transform(l,...n){if(!l)return"";let i=l.split(".")[0],r=parseInt(i.split(":")[0])??0,k=parseInt(i.split(":")[1])??0,q=parseInt(i.split(":")[2])??0;return this.#t.duration({hours:r,minutes:k,seconds:q}).humanize()}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=y({name:"durationFormat",type:t,pure:!0,standalone:!0})};var K=()=>["/add-backup"],Q=()=>["/restore"],U=t=>["/backup",t],W=t=>["/backup",t,"export"];function X(t,l){if(t&1&&(e(0),M(1,"durationFormat")),t&2){let n=c().$implicit;u(" - (took ",I(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration),") ")}}function Z(t,l){t&1&&e(0," N/A ")}function tt(t,l){if(t&1&&e(0),t&2){let n=c().$implicit;u(" ",n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceSizeString," ")}}function et(t,l){t&1&&e(0," N/A ")}function nt(t,l){if(t&1&&e(0),t&2){let n=c().$implicit;u(" ",n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetSizeString," ")}}function it(t,l){t&1&&e(0," N/A ")}function at(t,l){if(t&1&&(a(0,"spk-chip",9),e(1),o()),t&2){let n=c().$implicit;p(),u("",n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.BackupListCount," Version")}}function ot(t,l){t&1&&(a(0,"spk-chip",10),e(1,"No version yet"),o())}function lt(t,l){if(t&1){let n=T();a(0,"div",8)(1,"div",3)(2,"h3"),e(3),a(4,"spk-icon"),e(5,"database"),o()(),a(6,"p")(7,"span"),e(8,"Last successful backup:"),o(),e(9),M(10,"date"),s(11,X,2,3)(12,Z,1,0),o(),a(13,"p")(14,"span"),e(15,"Source:"),o(),s(16,tt,1,1)(17,et,1,0),o(),a(18,"p")(19,"span"),e(20,"Destination:"),o(),s(21,nt,1,1)(22,it,1,0),o()(),s(23,at,2,1,"spk-chip",9)(24,ot,2,0,"spk-chip",10),a(25,"div",11)(26,"button",12),b("click",function(){let r=f(n).$implicit,k=c(2);return g(k.startBackup(r.Backup==null?null:r.Backup.ID))}),a(27,"spk-icon"),e(28,"play-circle"),o(),e(29," Start "),o(),a(30,"button",13)(31,"spk-icon"),e(32,"pencil-simple"),o()(),a(33,"spk-menu",14)(34,"button",4)(35,"spk-icon"),e(36,"dots-three-vertical"),o()(),F(37,15),a(38,"button",16,0),e(40," Export "),a(41,"spk-icon"),e(42,"export"),o()(),a(43,"button",17,0),b("click",function(){let r=f(n).$implicit,k=c(2);return g(k.deleteBackup(r.Backup==null?null:r.Backup.ID))}),e(45," Delete "),a(46,"spk-icon"),e(47,"x-circle"),o()(),w(),o()()()}if(t&2){let n,i=l.$implicit;p(3),u(" ",(n=i.Backup==null?null:i.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"," "),p(6),u(" ",H(10,9,i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupDate,"short")," "),p(2),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.LastBackupDuration?11:12),p(5),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.SourceSizeString?16:17),p(5),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.TargetSizeString?21:22),p(2),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.BackupListCount?23:24),p(7),m("routerLink",S(12,U,i.Backup==null?null:i.Backup.ID)),p(3),m("right",!0),p(5),m("routerLink",S(14,W,i.Backup==null?null:i.Backup.ID))}}function pt(t,l){if(t&1&&O(0,lt,48,16,"div",8,P),t&2){let n=c();E(n.backups())}}function ct(t,l){t&1&&e(0," No backups founds ")}var h=class t{#t=_(R);backups=this.#t.backups;backupsLoading=this.#t.backupsLoading;ngOnInit(){this.#t.getBackups(!0)}startBackup(l){this.#t.startBackup(l)}deleteBackup(l){l&&window.confirm("Are you sure you want to delete this backup?")&&this.#t.deleteBackup(l)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=v({type:t,selectors:[["app-home"]],standalone:!0,features:[D],decls:31,vars:5,consts:[["option",""],[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["spk-button","",3,"routerLink"],[3,"right"],["menu",""],[3,"routerLink"],[3,"click"]],template:function(n,i){n&1&&(x(0,"app-status-bar"),a(1,"section")(2,"header")(3,"spk-card",1),x(4,"img",2),a(5,"div",3)(6,"h3"),e(7,"Backups"),o(),a(8,"p"),e(9,"Backups are stored in the cloud and can be restored at any time."),o()(),a(10,"button",4),e(11," Add "),a(12,"spk-icon"),e(13,"plus"),o()()(),a(14,"spk-card",1),x(15,"img",5),a(16,"div",3)(17,"h3"),e(18,"Restores"),o(),a(19,"p"),e(20,"Restores are stored in the cloud and can be restored at any time."),o()(),a(21,"button",4),e(22," Start "),a(23,"spk-icon"),e(24,"arrow-right"),o()()()(),a(25,"div",6)(26,"h2"),e(27,"My backups"),o(),a(28,"div",7),s(29,pt,2,0)(30,ct,1,0),o()()()),n&2&&(p(3),m("routerLink",B(3,K)),p(11),m("routerLink",B(4,Q)),p(15),d(i.backups().length?29:30))},dependencies:[N,Y,V,A,$,z,j,L,C],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-VC4GI7EV.js";import{Q as s,Ua as e,W as i,gc as r}from"./chunk-QHJTF3V4.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-VC4GI7EV.js";import{c as h}from"./chunk-22ZYSOTR.js";import{a as u}from"./chunk-LZSE733H.js";import{B as t,N as i,Q as l,Ua as n,W as s,gc as a}from"./chunk-QHJTF3V4.js";var m=class r{#t=s(c);#i=s(h);#s=s(u);#e=n(this.#t.getItemParsed("token")??null);#r=n(this.#t.getItemParsed("tokenSetTime")??null);tokenSetTime=this.#r.asReadonly();token=this.#e.asReadonly();#o=a(()=>{if(!this.#e()){this.#t.clearAll(),this.#i.navigate(["/login"]);return}let e=Date.now();this.#t.setItemParsed("tokenSetTime",e),this.#t.setItemParsed("token",this.#e()),this.#r.set(this.#e()?e:null)},{allowSignalWrites:!0});login(e="helloworld"){return this.#s.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(t(1),i(o=>this.#e.set(o.AccessToken??null)))}refreshToken(){return this.#s.postApiV1AuthRefresh().pipe(t(1),i(e=>this.#e.set(e.AccessToken??null)))}logout(){this.#s.postApiV1AuthRefreshLogout().pipe(t(1),i(e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])})).subscribe({error:e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])}})}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
|