@duplicati/ngclient 0.0.100 → 0.0.102

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.
Files changed (121) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/{chunk-M7VDIUGU.js → chunk-2IDHF5MN.js} +1 -1
  3. package/chunk-2PAPG5UW.js +1 -0
  4. package/chunk-4B4SNBSE.js +1 -0
  5. package/chunk-4HAKE425.js +1 -0
  6. package/{chunk-FXLWWVAS.js → chunk-4IMMYDEZ.js} +1 -1
  7. package/chunk-4YHLU5WJ.js +1 -0
  8. package/chunk-4YRHMBJK.js +1 -0
  9. package/{chunk-ZP273LXY.js → chunk-5242ZMFS.js} +1 -1
  10. package/chunk-56OFRQFF.js +1 -0
  11. package/chunk-5EOQSHY6.js +1 -0
  12. package/chunk-5XWXETE2.js +1 -0
  13. package/chunk-66XKA75B.js +1 -0
  14. package/{chunk-SFWQDWHT.js → chunk-6OYKPS4F.js} +1 -1
  15. package/chunk-6WLXFV43.js +1 -0
  16. package/{chunk-EO2PLY2Q.js → chunk-73FGPZLT.js} +1 -1
  17. package/{chunk-4FF7PF7J.js → chunk-7NSKVKO7.js} +1 -1
  18. package/chunk-7WCKE7GY.js +1 -0
  19. package/chunk-A7BKUGJT.js +1 -0
  20. package/chunk-ARQ6YMHX.js +1 -0
  21. package/chunk-AX2OTUX5.js +8 -0
  22. package/{chunk-MEQPT4C3.js → chunk-B7AEDFNS.js} +1 -1
  23. package/{chunk-2SGDSXNW.js → chunk-BIHIR35J.js} +1 -1
  24. package/chunk-C4IFBLYB.js +1 -0
  25. package/chunk-CEHXBQ6Q.js +3 -0
  26. package/chunk-CVF2Q2H6.js +8 -0
  27. package/chunk-D36FLK4W.js +1 -0
  28. package/chunk-DYCJPQSE.js +1 -0
  29. package/chunk-EQ74YCX7.js +1 -0
  30. package/{chunk-O6GWHO26.js → chunk-FQMZSQUI.js} +1 -1
  31. package/chunk-FUAUSLOF.js +1 -0
  32. package/chunk-GGDMQHEQ.js +1 -0
  33. package/chunk-GM25ACCR.js +7 -0
  34. package/chunk-GON7FNZR.js +1 -0
  35. package/{chunk-I457VUEG.js → chunk-GWH4FCBZ.js} +1 -1
  36. package/{chunk-FDMBNUIK.js → chunk-HFKG5ODC.js} +1 -1
  37. package/{chunk-DJWNLIDJ.js → chunk-HPSQUH4S.js} +1 -1
  38. package/chunk-IYJFFIHQ.js +1 -0
  39. package/{chunk-FQPH5MIV.js → chunk-K4BJJNFG.js} +1 -1
  40. package/chunk-KEHATBLP.js +1 -0
  41. package/chunk-LOR4VCVG.js +1 -0
  42. package/chunk-LU6KVNOT.js +1 -0
  43. package/{chunk-TLY4PQBT.js → chunk-N35UIMLP.js} +1 -1
  44. package/chunk-NTGNZYL7.js +1 -0
  45. package/chunk-NYZVIDDD.js +1 -0
  46. package/{chunk-BWYJMRKB.js → chunk-OD5LGCQE.js} +1 -1
  47. package/{chunk-WCLOWI5G.js → chunk-OELZQ6RK.js} +1 -1
  48. package/{chunk-E2LHQGCK.js → chunk-OP5UYIDM.js} +1 -1
  49. package/{chunk-FKTH6XCB.js → chunk-OPC7T2MU.js} +1 -1
  50. package/{chunk-WSLU6K4D.js → chunk-OQNO5JCJ.js} +1 -1
  51. package/chunk-P3QRASBZ.js +1 -0
  52. package/chunk-PX25CWH6.js +1 -0
  53. package/chunk-PXG6UWRT.js +1 -0
  54. package/chunk-Q4OHMO5N.js +1 -0
  55. package/chunk-QBYHBPBT.js +1 -0
  56. package/{chunk-JJQARMUD.js → chunk-QTTYDT3P.js} +1 -1
  57. package/{chunk-3IZBE2NA.js → chunk-R5DUA6AR.js} +1 -1
  58. package/chunk-RO3W2TTH.js +1 -0
  59. package/{chunk-KABJYPCP.js → chunk-S2EID4MC.js} +1 -1
  60. package/{chunk-K3CYM6ID.js → chunk-TKVTCBLW.js} +1 -1
  61. package/{chunk-UXWTPWS6.js → chunk-U34D3G4S.js} +1 -1
  62. package/chunk-UKQTVYRS.js +1 -0
  63. package/{chunk-BKWTKAB4.js → chunk-W2OVJAGT.js} +1 -1
  64. package/chunk-X7KD2725.js +1 -0
  65. package/chunk-XYENMXJU.js +1 -0
  66. package/{chunk-LBZ753XE.js → chunk-Y5T3G6PP.js} +1 -1
  67. package/chunk-YBGYY3E5.js +1 -0
  68. package/{chunk-VRGLHRK2.js → chunk-YC7JUCYS.js} +1 -1
  69. package/{chunk-J6XKFGF5.js → chunk-YCVMFFKU.js} +1 -1
  70. package/{chunk-ISRMJKPG.js → chunk-YRQ33MKD.js} +1 -1
  71. package/chunk-ZJWHMCU4.js +1 -0
  72. package/chunk-ZLTJTLNJ.js +1 -0
  73. package/{chunk-D5WIWFNP.js → chunk-ZVBVR6H4.js} +1 -1
  74. package/index.html +2 -2
  75. package/locale/messages.json +268 -49
  76. package/main-SGSJMHZH.js +1 -0
  77. package/package.json +1 -1
  78. package/styles-7QQPZCZ2.css +1 -0
  79. package/chunk-2VHTET54.js +0 -1
  80. package/chunk-36ZZ3COU.js +0 -1
  81. package/chunk-3NDOYD25.js +0 -1
  82. package/chunk-3UJUWE5B.js +0 -1
  83. package/chunk-3V622MYY.js +0 -1
  84. package/chunk-436ZVGPO.js +0 -1
  85. package/chunk-54SNAQYD.js +0 -1
  86. package/chunk-643UNOPE.js +0 -1
  87. package/chunk-6TNJS5KT.js +0 -1
  88. package/chunk-7QUJNAXH.js +0 -1
  89. package/chunk-ACN637D7.js +0 -1
  90. package/chunk-AHX7BWQR.js +0 -1
  91. package/chunk-AN4FSLGT.js +0 -1
  92. package/chunk-ASEBN4DE.js +0 -1
  93. package/chunk-B4U66F2Q.js +0 -1
  94. package/chunk-BA7NYTFR.js +0 -1
  95. package/chunk-CEOO3F5U.js +0 -1
  96. package/chunk-DRBDCRHV.js +0 -1
  97. package/chunk-EKIFJPZJ.js +0 -1
  98. package/chunk-FRXAEGHW.js +0 -1
  99. package/chunk-HFRBCV47.js +0 -8
  100. package/chunk-I3TLRILF.js +0 -1
  101. package/chunk-LVHLXMSY.js +0 -1
  102. package/chunk-MIASAENR.js +0 -3
  103. package/chunk-MYK7A3PZ.js +0 -1
  104. package/chunk-NFME267J.js +0 -1
  105. package/chunk-OH33D663.js +0 -1
  106. package/chunk-PFAU4FFV.js +0 -1
  107. package/chunk-PGUALKQ6.js +0 -1
  108. package/chunk-PPKU3R4J.js +0 -1
  109. package/chunk-PX6A6XCQ.js +0 -1
  110. package/chunk-QFKEUN2J.js +0 -1
  111. package/chunk-RQSCZC6C.js +0 -1
  112. package/chunk-SYZYJSXM.js +0 -8
  113. package/chunk-UJZB6UQE.js +0 -1
  114. package/chunk-XGARKXE4.js +0 -7
  115. package/chunk-XH2A67YP.js +0 -1
  116. package/chunk-XQKR67WI.js +0 -1
  117. package/chunk-YPSSTA3J.js +0 -1
  118. package/chunk-YTJB3DGU.js +0 -1
  119. package/chunk-ZHAXIU33.js +0 -1
  120. package/main-ZJBIDZ3R.js +0 -1
  121. package/styles-2KPDWK5U.css +0 -1
@@ -1 +1 @@
1
- import{a as k,b as se,c as ie,d as p,h as ae,m as ce,o as j,p as le}from"./chunk-M7VDIUGU.js";import{Aa as S,Ba as K,Ca as q,Da as J,Ea as Q,Fa as ee,Ga as te,Ha as ne,Ia as g,O as y,Oa as M,Q as f,Qa as re,T as L,V as c,Y as G,ka as C,la as H,sa as Y,ta as N,ua as W,uc as oe,va as b,wa as P,xa as X,ya as w,za as E}from"./chunk-XGARKXE4.js";import{a as I,b as z}from"./chunk-7CGTOI24.js";var x=class extends ie{supportsDOMEvents=!0},B=class r extends x{static makeCurrent(){se(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}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=Se();return e==null?null:we(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ae(document.cookie,n)}},T=null;function Se(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function we(r){return new URL(r,document.baseURI).pathname}var Me=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),F=new L(""),me=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}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 \u0275fac=function(t){return new(t||r)(c(F),c(C))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),_=class{_doc;constructor(n){this._doc=n}manager},A="ng-app-id";function de(r){for(let n of r)n.remove()}function ue(r,n){let e=n.createElement("style");return e.textContent=r,e}function Te(r,n,e,t){let o=r.head?.querySelectorAll(`style[${A}="${n}"],link[${A}="${n}"]`);if(o)for(let s of o)s.removeAttribute(A),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function $(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var ge=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=j(s),Te(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,ue);t?.forEach(o=>this.addUsage(o,this.external,$))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(de(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])de(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,ue(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,$(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(A,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(c(p),c(N),c(P,8),c(b))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),U={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"},Z=/%COMP%/g;var ve="%COMP%",De=`_nghost-${ve}`,Re=`_ngcontent-${ve}`,Ce=!0,be=new L("",{providedIn:"root",factory:()=>Ce});function Ae(r){return Re.replace(Z,r)}function _e(r){return De.replace(Z,r)}function ye(r,n){return n.map(e=>e.replace(Z,r))}var fe=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,a,d,u=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=a,this.ngZone=d,this.nonce=u,this.tracingService=l,this.platformIsServer=j(a),this.defaultRenderer=new D(e,i,d,this.platformIsServer,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===w.ShadowDom&&(t=z(I({},t),{encapsulation:w.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof O?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,a=this.ngZone,d=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,m=this.platformIsServer,h=this.tracingService;switch(t.encapsulation){case w.Emulated:s=new O(d,u,t,this.appId,l,i,a,m,h);break;case w.ShadowDom:return new V(d,u,e,t,i,a,this.nonce,m,h);default:s=new R(d,u,t,l,i,a,m,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(c(me),c(ge),c(N),c(be),c(p),c(b),c(C),c(P),c(X,8))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),D=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o,s){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(U[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(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=U[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=U[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,o){if(typeof n=="string"&&(n=k().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);let s=this.decoratePreventDefault(t);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var V=class extends D{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,d,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=ye(o.id,l);for(let h of l){let v=document.createElement("style");a&&v.setAttribute("nonce",a),v.textContent=h,this.shadowRoot.appendChild(v)}let m=o.getExternalStyles?.();if(m)for(let h of m){let v=$(h,s);a&&v.setAttribute("nonce",a),this.shadowRoot.appendChild(v)}}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{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,a,d),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=u?ye(u,l):l,this.styleUrls=t.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends R{contentAttr;hostAttr;constructor(n,e,t,o,s,i,a,d,u){let l=o+"-"+t.id;super(n,e,t,s,i,a,d,u,l),this.contentAttr=Ae(l),this.hostAttr=_e(l)}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}},Oe=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),he=["alt","control","meta","shift"],Ie={"\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"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},He=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),a=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>k().onAndCancel(e,i.domEventName,a,s))}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="",a=t.indexOf("code");if(a>-1&&(t.splice(a,1),i="code."),he.forEach(u=>{let l=t.indexOf(u);l>-1&&(t.splice(l,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ie[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"),he.forEach(i=>{if(i!==o){let a=Le[i];a(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 \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})();function St(r,n){return oe(I({rootComponent:r},Ne(n)))}function Ne(r){return{appProviders:[...xe,...r?.providers??[]],platformProviders:Ue}}function Pe(){B.makeCurrent()}function ke(){return new H}function je(){return Y(document),document}var Ue=[{provide:b,useValue:ce},{provide:W,useValue:Pe,multi:!0},{provide:p,useFactory:je,deps:[]}];var xe=[{provide:G,useValue:"root"},{provide:H,useFactory:ke,deps:[]},{provide:F,useClass:Oe,multi:!0,deps:[p]},{provide:F,useClass:He,multi:!0,deps:[p]},fe,ge,me,{provide:re,useExisting:fe},{provide:le,useClass:Me,deps:[]},[]];var wt=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Be=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=c(Fe),o},providedIn:"root"})}return r})(),Fe=(()=>{class r extends Be{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return S(t,"HTML")?E(t):ne(this._doc,String(t)).toString();case g.STYLE:return S(t,"Style")?E(t):t;case g.SCRIPT:if(S(t,"Script"))return E(t);throw new y(5200,!1);case g.URL:return S(t,"URL")?E(t):te(String(t));case g.RESOURCE_URL:if(S(t,"ResourceURL"))return E(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return q(e)}bypassSecurityTrustScript(e){return J(e)}bypassSecurityTrustUrl(e){return Q(e)}bypassSecurityTrustResourceUrl(e){return ee(e)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{St as a,wt as b,Be as c};
1
+ import{a as k,b as se,c as ie,d as p,h as ae,m as ce,o as j,p as le}from"./chunk-2IDHF5MN.js";import{Aa as E,Ba as S,Ca as K,Da as q,Ea as J,Fa as Q,Ga as ee,Ha as te,Ia as ne,Ja as g,P as y,Pa as M,R as f,Ra as re,U as L,W as c,Z as G,la as C,ma as H,ta as Y,ua as N,va as W,vc as oe,wa as b,xa as P,ya as X,za as w}from"./chunk-GM25ACCR.js";import{a as I,b as z}from"./chunk-7CGTOI24.js";var x=class extends ie{supportsDOMEvents=!0},B=class r extends x{static makeCurrent(){se(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}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=Se();return e==null?null:we(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ae(document.cookie,n)}},T=null;function Se(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function we(r){return new URL(r,document.baseURI).pathname}var Me=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),F=new L(""),me=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}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 \u0275fac=function(t){return new(t||r)(c(F),c(C))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),_=class{_doc;constructor(n){this._doc=n}manager},A="ng-app-id";function de(r){for(let n of r)n.remove()}function ue(r,n){let e=n.createElement("style");return e.textContent=r,e}function Te(r,n,e,t){let o=r.head?.querySelectorAll(`style[${A}="${n}"],link[${A}="${n}"]`);if(o)for(let s of o)s.removeAttribute(A),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function $(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var ge=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.isServer=j(s),Te(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,ue);t?.forEach(o=>this.addUsage(o,this.external,$))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(de(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])de(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,ue(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,$(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),this.isServer&&t.setAttribute(A,this.appId),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(c(p),c(N),c(P,8),c(b))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),U={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"},Z=/%COMP%/g;var ve="%COMP%",De=`_nghost-${ve}`,Re=`_ngcontent-${ve}`,Ce=!0,be=new L("",{providedIn:"root",factory:()=>Ce});function Ae(r){return Re.replace(Z,r)}function _e(r){return De.replace(Z,r)}function ye(r,n){return n.map(e=>e.replace(Z,r))}var fe=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,t,o,s,i,a,d,u=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=a,this.ngZone=d,this.nonce=u,this.tracingService=l,this.platformIsServer=j(a),this.defaultRenderer=new D(e,i,d,this.platformIsServer,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===w.ShadowDom&&(t=z(I({},t),{encapsulation:w.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof O?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,a=this.ngZone,d=this.eventManager,u=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,m=this.platformIsServer,h=this.tracingService;switch(t.encapsulation){case w.Emulated:s=new O(d,u,t,this.appId,l,i,a,m,h);break;case w.ShadowDom:return new V(d,u,e,t,i,a,this.nonce,m,h);default:s=new R(d,u,t,l,i,a,m,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(c(me),c(ge),c(N),c(be),c(p),c(b),c(C),c(P),c(X,8))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),D=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o,s){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(U[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(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=U[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=U[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,o){if(typeof n=="string"&&(n=k().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);let s=this.decoratePreventDefault(t);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var V=class extends D{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,d,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=ye(o.id,l);for(let h of l){let v=document.createElement("style");a&&v.setAttribute("nonce",a),v.textContent=h,this.shadowRoot.appendChild(v)}let m=o.getExternalStyles?.();if(m)for(let h of m){let v=$(h,s);a&&v.setAttribute("nonce",a),this.shadowRoot.appendChild(v)}}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{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,a,d,u){super(n,s,i,a,d),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=u?ye(u,l):l,this.styleUrls=t.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends R{contentAttr;hostAttr;constructor(n,e,t,o,s,i,a,d,u){let l=o+"-"+t.id;super(n,e,t,s,i,a,d,u,l),this.contentAttr=Ae(l),this.hostAttr=_e(l)}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}},Oe=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})(),he=["alt","control","meta","shift"],Ie={"\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"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},He=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),a=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>k().onAndCancel(e,i.domEventName,a,s))}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="",a=t.indexOf("code");if(a>-1&&(t.splice(a,1),i="code."),he.forEach(u=>{let l=t.indexOf(u);l>-1&&(t.splice(l,1),i+=u+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ie[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"),he.forEach(i=>{if(i!==o){let a=Le[i];a(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 \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac})}return r})();function St(r,n){return oe(I({rootComponent:r},Ne(n)))}function Ne(r){return{appProviders:[...xe,...r?.providers??[]],platformProviders:Ue}}function Pe(){B.makeCurrent()}function ke(){return new H}function je(){return Y(document),document}var Ue=[{provide:b,useValue:ce},{provide:W,useValue:Pe,multi:!0},{provide:p,useFactory:je,deps:[]}];var xe=[{provide:G,useValue:"root"},{provide:H,useFactory:ke,deps:[]},{provide:F,useClass:Oe,multi:!0,deps:[p]},{provide:F,useClass:He,multi:!0,deps:[p]},fe,ge,me,{provide:re,useExisting:fe},{provide:le,useClass:Me,deps:[]},[]];var wt=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Be=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=f({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=c(Fe),o},providedIn:"root"})}return r})(),Fe=(()=>{class r extends Be{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return S(t,"HTML")?E(t):ne(this._doc,String(t)).toString();case g.STYLE:return S(t,"Style")?E(t):t;case g.SCRIPT:if(S(t,"Script"))return E(t);throw new y(5200,!1);case g.URL:return S(t,"URL")?E(t):te(String(t));case g.RESOURCE_URL:if(S(t,"ResourceURL"))return E(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return q(e)}bypassSecurityTrustScript(e){return J(e)}bypassSecurityTrustUrl(e){return Q(e)}bypassSecurityTrustResourceUrl(e){return ee(e)}static \u0275fac=function(t){return new(t||r)(c(p))};static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{St as a,wt as b,Be as c};
@@ -0,0 +1 @@
1
+ import{a as L}from"./chunk-PX25CWH6.js";import{d as A}from"./chunk-7WCKE7GY.js";import{b as w}from"./chunk-DYCJPQSE.js";import{a as k,c as I}from"./chunk-TKVTCBLW.js";import{A as m,D as o,E as y,O as l,R as a,X as i,f as h,k as u,n as g,r as d,sa as n}from"./chunk-GM25ACCR.js";var c=class s{#r=i(L);#i=n(null);#t=window.self!==window.top;#s=n(this.#t);relayIsEnabled=this.#s.asReadonly();config=this.#i.asReadonly();configLoaded=this.#t?new u:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#n(),this.#t&&(this.#s.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),r=JSON.parse(t);if(!r?.accessToken||!r?.clientId){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof r.clientId!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof r.accessToken!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}let R=this.#r.getItem("locale")??"en-US",p=r.locale??"en-US";R!==p&&(this.#r.setItem("locale",p),window.location.reload()),this.#i.set(r),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#n(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#i.set(e)}clearConfig(){this.#i.set(null)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=a({token:s,factory:s.\u0275fac,providedIn:"root"})};var f="PROXY_AUTHED_FAKE_TOKEN",b=class s{#r=i(A);#i=i(I);#t=i(w);#s=i(c);#e=n(null);#n=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#n.asReadonly();login(e){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(o(1),l(t=>t.AccessToken&&this.#e.set(t.AccessToken)))}refreshToken(){return this.#s.relayIsEnabled()?(this.#e.set(f),new h(e=>{e.next({AccessToken:f}),e.complete()})):this.#t.postApiV1AuthRefresh().pipe(o(1),l(e=>e.AccessToken&&this.#e.set(e.AccessToken)))}checkProxyAuthed(){let e=new k({"custom-proxy-check":"true"});return this.#i.get("/api/v1/systeminfo",{headers:e}).pipe(d(()=>(this.#e.set(f),!0)),m(()=>g(!1)))}logout(){this.#n.set(!0),this.#t.postApiV1AuthRefreshLogout().pipe(o(1),y(()=>{this.#n.set(!1),this.#e.set(null),this.#r.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=a({token:s,factory:s.\u0275fac,providedIn:"root"})};export{c as a,f as b,b as c};
@@ -0,0 +1,3 @@
1
+ import{a as Fe}from"./chunk-N35UIMLP.js";import{m as L}from"./chunk-CVF2Q2H6.js";import{a as Se}from"./chunk-Y5T3G6PP.js";import"./chunk-4B4SNBSE.js";import{a as Ee}from"./chunk-YRQ33MKD.js";import"./chunk-DNHLTHLR.js";import{a as D}from"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ARQ6YMHX.js";import{a as fe}from"./chunk-6OYKPS4F.js";import"./chunk-5242ZMFS.js";import"./chunk-ZVBVR6H4.js";import"./chunk-OQNO5JCJ.js";import"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import{c as le,e as se,f as me,h as de,i as _e,m as pe,n as ce,o as ue,q as Ce,r as ge,s as Me,t as Ne}from"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as Z,d as J,e as Q}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{a as te,g as ne,k as oe,l as ie,p as ae,t as re}from"./chunk-6WLXFV43.js";import{a as Y,b as ee}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{Ab as z,Eb as S,Fb as E,Gb as c,Hb as X,Ib as V,Kb as W,Lb as g,Oa as s,Pb as j,X as C,_a as B,ca as N,cc as P,da as f,db as v,dc as T,ec as I,ic as H,jc as k,lb as u,nb as x,qb as G,rb as w,sa as F,sb as U,tb as K,ub as r,vb as o,wb as l,xb as A,yb as O,zc as q}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var Ae=()=>[],Oe=()=>["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","no-encryption"];function Pe(m,t){m&1&&l(0,"spk-progress-bar",13)}function Te(m,t){if(m&1&&(r(0,"spk-form-field"),l(1,"input",36),o()),m&2){let e=t.$implicit,n=t.$index;s(),j("id","filter-",n,""),u("formControl",e)}}function Ie(m,t){if(m&1){let e=z();r(0,"form",14)(1,"spk-select",15)(2,"label",16),c(3,1),o(),l(4,"input",17),o(),r(5,"spk-form-field")(6,"label",18),c(7,2),o(),l(8,"textarea",19),o(),r(9,"spk-form-field")(10,"label",20),c(11,3),o(),l(12,"textarea",21),o()(),r(13,"spk-divider"),c(14,4),o(),r(15,"form",14)(16,"spk-form-field")(17,"label",22),c(18,5),o(),l(19,"input",23),o(),r(20,"spk-form-field")(21,"label",24),c(22,6),o(),l(23,"input",25),o(),r(24,"app-toggle-card",26),A(25,27),c(26,7),O(),A(27,28),U(28,Te,2,3,"spk-form-field",null,w),O(),o()(),r(30,"div",29)(31,"app-size",30),I("ngModelChange",function(i){N(e);let d=g();return T(d.optionsFields.remoteVolumeSize,i)||(d.optionsFields.remoteVolumeSize=i),f(i)}),r(32,"label",31),c(33,8),o()()(),r(34,"p"),S(35,9),l(36,"a",32),E(),o(),r(37,"app-options-list",33),I("optionsChange",function(i){N(e);let d=g();return T(d.settings,i)||(d.settings=i),f(i)}),o(),r(38,"div",34)(39,"button",35),W("click",function(){N(e);let i=g();return f(i.submit())}),S(40,10),l(41,"spk-icon"),E(),o()()}if(m&2){let e,n=g();u("formGroup",n.baseCmdForm),s(),u("options",(e=n.commandOptions())!==null&&e!==void 0?e:k(13,Ae))("inlineSearch",!0),s(14),u("formGroup",n.standardFields),s(9),u("disallowToggle",!0),s(4),K(n.standardFields.controls.filters.controls),s(3),u("customId","size"),P("ngModel",n.optionsFields.remoteVolumeSize),s(6),P("options",n.settings),u("hasFreeTextSettings",!0)("hiddenOptions",k(14,Oe)),s(2),x("loader",n.isSubmitting()),s(2),X(n.baseCmdForm.value.command),V(40)}}var p=new ge,ke=["Bytes","KB","MB","GB","TB","PB"],$=class m{#e=C(L);#t=C(ee);#n=C(J);#o=C(Z);#i=C(Y);#a=D(this.#o.params);commandOptions=D(this.#i.getApiV1Commandline());sizeOptions=F(ke);isSubmitting=F(!1);optionsFields=this.#e.optionsFields;standardFields=p.group({"backup-id":p.control(""),"backup-name":p.control(""),dbpath:p.control(""),filters:p.array([])});baseCmdForm=p.group({command:p.control("backup"),targetUrl:p.control(""),arguments:p.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#r=q(()=>{let t=this.#a()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(p.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",n=t.arguments?.split(`
2
+ `)??[],i=this.standardFields.value,d=i.filters??[],M=[t.command,e,...n,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...d.filter(a=>a).map(a=>a.startsWith("-")?`--exclude=${a?.slice(1)}`:`--include=${a}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(a=>a.Name.startsWith("--")?`${a.Name}=${a.Value}`:`--${a.Name}=${a.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:M}).subscribe(a=>{a.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",a.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
+ `)??""})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=B({type:m,selectors:[["app-commandline"]],features:[H([L])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let e;e=$localize`Command`;let n;n=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let d;d=$localize`Advanced options`;let M;M=$localize`Backup ID`;let a;a=$localize`Backup Name`;let h;h=$localize`Filters`;let b;b=$localize`Remote volume size`;let y;y=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#36\uFFFD"}:START_LINK:Read more${"\uFFFD/#36\uFFFD"}:CLOSE_LINK:`;let R;return R=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SPK_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,n,i,d,M,a,h,b,y,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],["href","#",1,"spk-primary"],[3,"optionsChange","options","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["spk-button","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,n){e&1&&(l(0,"app-status-bar"),r(1,"section")(2,"div",11)(3,"button",12),S(4,0),l(5,"spk-icon"),E(),o()(),v(6,Pe,1,0,"spk-progress-bar",13)(7,Ie,42,15),o()),e&2&&(s(6),G(n.finishedLoading()?7:6))},dependencies:[Me,_e,le,se,me,de,fe,Fe,Ee,Ne,pe,ce,Ce,ue,Q,ie,ne,oe,re,ae,te,Se],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.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}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.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}"],changeDetection:0})};export{$ as default};
@@ -0,0 +1,8 @@
1
+ import{a as jt,b as qt}from"./chunk-Y5T3G6PP.js";import{a as mt}from"./chunk-4B4SNBSE.js";import{a as je}from"./chunk-YRQ33MKD.js";import{a as kt,b as zt}from"./chunk-DNHLTHLR.js";import{a as j}from"./chunk-NYZVIDDD.js";import{a as lt}from"./chunk-OELZQ6RK.js";import{a as Oe}from"./chunk-ARQ6YMHX.js";import{b as Ht}from"./chunk-RHW5QVAY.js";import{b as Le,c as de,d as _e,e as Fe,f as Ue,g as pt,h as Ve,i as Be,j as Ke,m as ct,n as We,o as ut,p as Xt,q as He,r as ge,s as Xe,t as ze}from"./chunk-QTTYDT3P.js";import{b as ye,d as pe}from"./chunk-7WCKE7GY.js";import{A as st,a as ce,b as rt,d as Bt,e as Kt,g as be,l as ue,o as Wt,p as at,t as me,z as Ge}from"./chunk-6WLXFV43.js";import{b as ve}from"./chunk-DYCJPQSE.js";import{c as Vt}from"./chunk-TKVTCBLW.js";import{i as Ut}from"./chunk-2IDHF5MN.js";import{$b as z,Ab as G,E as Ye,Eb as E,Fb as y,Gb as R,Hb as Et,Ib as yt,Jb as ke,Kb as P,Lb as c,Oa as l,Ob as le,Qb as Gt,R as Ee,Rb as K,Va as we,Wb as Re,X as $,Xb as Ie,Yb as ie,Zb as m,_a as se,_b as xe,ac as Lt,ca as F,cc as U,da as g,db as S,dc as V,ec as B,fc as Pt,gc as At,ha as vt,hc as Nt,jc as Ze,kb as bt,kc as et,lb as u,mc as tt,nb as Ne,oa as Tt,pa as Dt,qb as D,qc as nt,r as Qe,rb as Z,sa as T,sb as ee,tb as te,ub as s,vb as a,wb as d,xb as H,yb as X,yc as b,zb as Je,zc as it}from"./chunk-GM25ACCR.js";import{a as h,b as De,c as xt}from"./chunk-7CGTOI24.js";var dt=class e{fromString(n){if(!n)return null;let t=n.match(/(\d+)([smhDWMY])/);return t&&{value:parseInt(t[1]),unit:t[2]}}toString(n,t){return`${n}${t}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ee({token:e,factory:e.\u0275fac,providedIn:"root"})};var Ce=class e{#n=$(ve);s3Providers=j(this.getS3Config("Providers"));s3Regions=j(this.getS3Config("Regions"));s3RegionHosts=j(this.getS3Config("RegionHosts"));s3StorageClasses=j(this.getS3Config("StorageClasses"));storjSatellites=j(this.getStorjConfig("Satellites"));storjAuthenticationMethods=j(this.getStorjConfig("AuthenticationMethods"));openstackProviders=j(this.getOpenstackConfig("Providers"));openstackVersions=j(this.getOpenstackConfig("Versions"));gcsLocations=j(this.getGcsConfig("Locations"));gcsStorageClasses=j(this.getGcsConfig("StorageClasses"));getS3Config(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":n}}).pipe(Qe(t=>this.#t(t)))}createS3IamUser(n,t){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":n,"s3-password":t}})}createS3PolicyIAM(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:n}})}getStorjConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":n}}).pipe(Qe(t=>this.#t(t)))}getOpenstackConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":n}}).pipe(Qe(t=>this.#t(t)))}getGcsConfig(n){return this.#n.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":n}}).pipe(Qe(t=>this.#t(t)))}#t(n){return(n.Result&&typeof n.Result=="object"&&Object.entries(n.Result).map(([t,o])=>({key:t,value:o})))??[]}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ee({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ae(e){return e==null?"":":"+e.toString()}function Q(e){return e==null?"":e.startsWith("/")?e:"/"+e}function k(e,n){let t={},o={},i=Se.find(r=>r.key===e);return n.searchParams.forEach((r,p)=>{i?.dynamicFields?.some(N=>N===p||N?.name===p)?o[p]=decodeURIComponent(r):t[p]=decodeURIComponent(r)}),{advanced:t,dynamic:o}}function O(e,n=!1){let t=e.map(([i,r])=>`${i}=${r?encodeURIComponent(r.toString()):""}`).join("&");return t?(n?"":"?")+t:""}function _t(e){let n=e.destinationType,t=Se.find(o=>o.customKey===n||o.key===n);if(!t)throw new Error("Invalid destination type");return t?.mapper.to(e)??""}function Ot(e){let n=URL.canParse(e),t=e.split("://")[0],o=e.split("://")[1],i="http://"+o;if(o.startsWith("%")&&t==="file")return Se.find(r=>r.customKey===t||r.key===t)?.mapper.from(t,new URL("http://localhost"),e);try{let r=new URL(i);return Se.find(p=>p.customKey===t||p.key===t)?.mapper.from(t,r,e)}catch(r){console.error("Error while parsing target path",r)}if(!n)throw new Error("Invalid target path");return null}var _=new ge,Se=[{key:"file",displayName:"File system",description:"Store backups on your local file system.",customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:e=>_.control(e??"")}},mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>{let i=t.startsWith("file:///")?t.split("file:///")[1]:t.split("file://")[1],r=i.startsWith("%"),C=i.slice(1).startsWith(":\\")||r?i:"/"+i;return h({destinationType:e,custom:{path:C}},k(e,n))}}},{key:"ssh",displayName:"SSH",description:"Store backups in SSH.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:e=>_.control(e??"",[_e.required,_e.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},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"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>h({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"s3",displayName:"S3 compatible bucket",description:"Store backups in any S3 compatible bucket.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).s3StorageClasses}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},k(e,n))}},{key:"gcs",displayName:"Google Cloud Storage",description:"Store backups in Google Cloud Storage.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(Ce).gcsStorageClasses},"authid"],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${e.custom.path}${n}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"googledrive",displayName:"Google Drive",description:"Store backups in Google Drive.",oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"pcloud",displayName:"pCloud",description:"Store backups in pCloud.",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>T([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{server:t,path:o}=e.custom;return`${e.destinationType}://${t+Q(o)+n}`},from:(e,n,t)=>{let o=n.pathname.replace(/^\//,"");return h({destinationType:e,custom:{server:n.hostname,path:o}},k(e,n))}}},{key:"azure",displayName:"Azure Blob Storage",description:"Store backups in Azure Blob Storage.",customFields:{path:{type:"String",name:"path",shortDescription:"Container name",longDescription:"Container name",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"onedrivev2",displayName:"OneDrive",description:"Store backups in OneDrive.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"od4b",displayName:"OneDrive Business",description:"Store backups in OneDrive Business.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>h({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"mssp",displayName:"Microsoft SharePoint",description:"Store backups in Microsoft SharePoint.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Account name"},{name:"auth-password",shortDescription:"Access key"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>h({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"sharepoint",displayName:"Microsoft SharePoint v2",description:"Store backups in Microsoft SharePoint.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"dropbox",displayName:"Dropbox",description:"Store backups in Dropbox.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"box",displayName:"Box.com",description:"Store backups in Box.com.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"jottacloud",displayName:"Jottacloud",description:"Store backups in Jottacloud.",oauthField:"authid",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"b2",displayName:"B2 Cloud Storage",description:"Store backups in B2 Cloud Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Application ID"},{name:"auth-password",shortDescription:"Application Key"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>h({destinationType:e,custom:{bucket:n.hostname,path:decodeURIComponent(n.pathname)}},k(e,n))}},{key:"e2",displayName:"IDrive e2",description:"Store backups in IDrive e2.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path in the bucket",longDescription:"Path in the bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Access ID"},{name:"auth-password",shortDescription:"Access Secret"}],mapper:{to:e=>{let{bucket:n,path:t}=e.custom,o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>h({destinationType:e,custom:{bucket:n.hostname,path:n.pathname}},k(e,n))}},{key:"mega",displayName:"Mega.nz",description:"Store backups in Mega.nz.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"msgroup",displayName:"Microsoft Office 365 Group",description:"Store backups in Microsoft Office 365 Group.",oauthField:"authid",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:"Group email",longDescription:"Group email",formElement:e=>_.control(e??"",[_e.email])},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["authid"],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]);return`${e.destinationType}://${n}${t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.hostname+n.pathname}},k(e,n))}},{key:"cloudfiles",displayName:"Rackspace CloudFiles",description:"Store backups in Rackspace CloudFiles.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{port:t,server:o,path:i}=e.custom;return`${e.destinationType}://${o+Ae(t)+Q(i)+n}`},from:(e,n,t)=>h({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"rclone",displayName:"Rclone",description:"Store backups in Rclone.",dynamicFields:[{name:"rclone-local-repository",shortDescription:"Local repository",defaultValue:""},{name:"rclone-remote-repository",shortDescription:"Remote repository",defaultValue:""},{name:"rclone-remote-path",shortDescription:"Path on remote repository",defaultValue:""}],mapper:{to:e=>{let n=e.dynamic["rclone-remote-repository"],t=e.dynamic["rclone-remote-path"],o=Object.entries(e.dynamic).filter(([r])=>!["rclone-remote-repository","rclone-remote-path"].includes(r)),i=O([...Object.entries(e.advanced),...o]);return`${e.destinationType}://${n}/${t+i}`},from:(e,n,t)=>{let{advanced:o,dynamic:i}=k(e,n);return h({destinationType:e,dynamic:h({"rclone-remote-repository":n.hostname,"rclone-remote-path":n.pathname},i)},o)}}},{key:"openstack",displayName:"OpenStack Object Storage",description:"Store backups in OpenStack Object Storage.",customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket",longDescription:"Bucket",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"openstack-authuri",shortDescription:"Auth URI",type:"Enumeration",loadOptions:e=>e.get(Ce).openstackProviders},{name:"openstack-version",shortDescription:"Version",type:"Enumeration",loadOptions:e=>e.get(Ce).openstackVersions},{name:"openstack-domain-name",shortDescription:"Domain name"},{name:"openstack-tenant-name",shortDescription:"Tenant name"},{name:"openstack-region",shortDescription:"Region"}],mapper:{to:e=>{let n=O([...Object.entries(e.advanced),...Object.entries(e.dynamic)]),{bucket:t}=e.custom;return`${e.destinationType}://${t+n}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.pathname,bucket:n.hostname}},k(e,n))}},{key:"webdav",displayName:"WebDAV",description:"Store backups in WebDAV.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"},{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=e.dynamic["use-ssl"],r=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([p])=>p!=="use-ssl")]);return`${e.destinationType}${i?"s":""}://${t+Ae(n)+Q(o)+r}`},from:(e,n,t)=>h({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"aftp",displayName:"FTP",description:"Store backups in FTP.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:"Username"},{name:"auth-password",shortDescription:"Password"}],mapper:{to:e=>{let{port:n,server:t,path:o}=e.custom,i=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([r])=>r!=="use-ssl")]);return`${e.destinationType}://${t+Ae(n)+Q(o)+i}`},from:(e,n,t)=>h({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"sia",displayName:"Sia Decentrilized Cloud",description:"Store backups in Sia Decentrilized Cloud.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let n=e.custom.server,t=e.dynamic["sia-targetpath"],o=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([i])=>i!=="sia-targetpath")]);return`${e.destinationType}://${n+Q(t)+o}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.pathname}},k(e,n))}},{key:"cos",displayName:"Tencent COS",description:"Store backups in Tencent COS.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"cos-bucket",shortDescription:"Bucket",order:1},{name:"cos-region",shortDescription:"Region",order:2},{name:"cos-app-id",shortDescription:"COS App Id",order:3},{name:"cos-secret-id",shortDescription:"COS Secret Id",order:4},{name:"cos-secret-key",shortDescription:"COS Secret Key",order:5}],mapper:{to:e=>{let n=e.custom.path,t=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([o])=>o!=="cos-targetpath")]);return`${e.destinationType}://${n+t}`},from:(e,n,t)=>h({destinationType:e,custom:{path:n.pathname}},k(e,n))}},{key:"tahoe",displayName:"Tahoe LAFS",description:"Store backups in Tahoe LAFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"Port",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")},username:{type:"String",name:"username",shortDescription:"Username",longDescription:"Username",formElement:e=>_.control(e??"")},password:{type:"Password",name:"password",shortDescription:"Password",longDescription:"Password",formElement:e=>_.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:"Use SSL"}],mapper:{to:e=>{let{port:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},C=e.dynamic["use-ssl"],N=O([...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([w])=>w!=="use-ssl"),...Object.entries(p)]);return`${e.destinationType}${C?"s":""}://${t+Ae(n)+Q(o)+N}`},from:(e,n,t)=>h({destinationType:e,custom:{server:n.hostname,port:n.port,path:n.pathname}},k(e,n))}},{key:"cifs",displayName:"CIFS",description:"Store backups in CIFS.",customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"Server",formElement:e=>_.control(e??"")},share:{type:"String",name:"share",shortDescription:"Share Name",longDescription:"Share Name",formElement:e=>_.control(e??"")},path:{type:"String",name:"path",shortDescription:"Path on server",longDescription:"Path on server",formElement:e=>_.control(e??"")}},dynamicFields:["transport","auth-username","auth-password","auth-domain"],mapper:{to:e=>{let{share:n,server:t,path:o,username:i,password:r}=e.custom,p={"auth-username":i,"auth-password":r},C=new Map([...Object.entries(p),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),N=O(Array.from(C));return`${e.destinationType}://${t+Q(n)+Q(o)+N}`},from:(e,n,t)=>{let o=n.pathname.split("/")[1],i=n.pathname.split("/").slice(2).join("/");return h({destinationType:e,custom:{server:n.hostname,share:o,path:i}},k(e,n))}}},{key:"filen",displayName:"Filen.io",description:"Store backups in Filen.io.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filen",longDescription:"Path on Filen",formElement:e=>_.control(e??"")}},dynamicFields:["auth-username","auth-password"],mapper:{to:e=>{let{path:n,username:t,password:o}=e.custom,i={"auth-username":t,"auth-password":o},r=new Map([...Object.entries(i),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),p=O(Array.from(r));return`${e.destinationType}://${n+p}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&n.pathname[0]!="/"&&(o+="/"),o+=n.pathname,h({destinationType:e,custom:{path:o}},k(e,n))}}},{key:"filejump",displayName:"Filejump",description:"Store backups in Filejump.",customFields:{path:{type:"String",name:"path",shortDescription:"Path on Filejump",longDescription:"Path on Filejump",formElement:e=>_.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:"API Token",longDescription:"Filejump API Token",formElement:e=>_.control(e??"")}],mapper:{to:e=>{let{path:n,username:t,password:o,apitoken:i}=e.custom,r=(i||"").trim()===""?{"auth-username":t,"auth-password":o}:{"api-token":i},p=new Map([...Object.entries(r),...Object.entries(e.advanced),...Object.entries(e.dynamic)]),C=O(Array.from(p));return`${e.destinationType}://${n+C}`},from:(e,n,t)=>{let o=n.hostname??"";return n.pathname&&o!==""&&n.pathname[0]!="/"&&(o+="/"),o+=n.pathname,h({destinationType:e,custom:{path:o}},k(e,n))}}},{key:"storj",customKey:"storjAccessGrant",displayName:"Storj Access Grant",description:"Store backups in Storj Access Grant.",dynamicFields:[{name:"storj-shared-access",shortDescription:"Access Grant"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=Access%20grant&storj-satellite=us1.storj.io%3A7777&storj-api-key&storj-secret&${O([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>h({destinationType:e},k(e,n))}},{key:"storj",customKey:"storjApiKey",displayName:"Storj API Key",description:"Store backups in Storj API Key.",dynamicFields:[{name:"storj-satellite",shortDescription:"Satellite",type:"Enumeration",loadOptions:e=>e.get(Ce).storjSatellites},{name:"storj-api-key",shortDescription:"API Key"},{name:"storj-secret",shortDescription:"Secret"},{name:"storj-bucket",shortDescription:"Bucket"},{name:"storj-folder",shortDescription:"Path on server"}],mapper:{to:e=>`storj://storj.io/config?storj-auth-method=API%20key&${O([...Object.entries(e.advanced),...Object.entries(e.dynamic)],!0)}`,from:(e,n,t)=>h({destinationType:e},k(e,n))}}];var Qt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,Ft=class e{generate(n,t=Qt){let o;do o=this.generatePassword(n,t);while(this.calculatePasswordStrength(o)<5);return o}generatePassword(n,t=Qt){return Array.apply(null,{length:n}).map(()=>{let o;for(;;)if(o=String.fromCharCode(Ht()),t.test(o))return o},this).join("")}calculatePasswordStrength(n){let t=1;return n.length>=8&&t++,n.match(/[a-z]/)&&n.match(/[A-Z]/)&&t++,n.match(/\d+/)&&t++,n.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ee({token:e,factory:e.\u0275fac,providedIn:"root"})};var on=["formRef"];function rn(e,n){if(e&1&&m(0),e&2){let t=n.$implicit;z(" ",t.DisplayName," ")}}function an(e,n){if(e&1&&d(0,"spk-progress-bar",37),e&2){let t=c(3);Ne("error",t.calculatePasswordStrength()===1)("warn",t.calculatePasswordStrength()===2)("primary",t.calculatePasswordStrength()===4)("success",t.calculatePasswordStrength()===5),u("value",t.calculatePasswordStrength()*(100/5))}}function sn(e,n){e&1&&(s(0,"span",32),R(1,9),a())}function ln(e,n){e&1&&(E(0,7,1),d(1,"spk-icon"),y())}function pn(e,n){e&1&&(E(0,7,2),d(1,"spk-icon"),y())}function cn(e,n){e&1&&(E(0,10,1),d(1,"spk-icon",39),y())}function un(e,n){e&1&&(E(0,10,2),d(1,"spk-icon"),y())}function mn(e,n){if(e&1){let t=G();s(0,"button",38),P("click",function(){F(t);let i=c(3);return g(i.copyPassword())}),E(1,10),S(2,cn,2,0)(3,un,2,0),y(),a()}if(e&2){let t=c(3);l(2),D(t.copiedPassword()?2:3)}}function dn(e,n){e&1&&(s(0,"spk-alert",36),R(1,11),a())}function _n(e,n){if(e&1){let t=G();s(0,"div",27)(1,"spk-form-field")(2,"label",28),E(3,6),d(4,"sup"),y(),a(),d(5,"input",29),a(),S(6,an,1,9,"spk-progress-bar",30),s(7,"spk-form-field"),d(8,"input",31),S(9,sn,2,0,"span",32),a(),s(10,"div",33)(11,"button",34),P("click",function(){F(t);let i=c(2);return g(i.showPassword.set(!i.showPassword()))}),E(12,7),S(13,ln,2,0)(14,pn,2,0),y(),a(),s(15,"button",34),P("click",function(){F(t);let i=c(2);return g(i.generatePassword())}),E(16,8),d(17,"spk-icon"),y(),a(),S(18,mn,4,1,"button",35),a(),S(19,dn,2,0,"spk-alert",36),a()}if(e&2){let t=c(2);l(5),u("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.password?6:-1),l(2),u("type",t.showPassword()?"text":"password"),l(),D(t.generalForm.value.repeatPassword&&t.generalForm.value.repeatPassword!==t.generalForm.value.password?9:-1),l(4),D(t.showPassword()?13:14),l(5),D(t.showCopyPassword()?18:-1),l(),D(t.generalForm.value.password&&t.generalForm.value.password===t.generalForm.value.repeatPassword?19:-1)}}function Fn(e,n){if(e&1&&(s(0,"spk-select",24)(1,"label",25),R(2,5),a(),d(3,"input",26),S(4,rn,1,1,"ng-template"),a(),S(5,_n,20,7,"div",27)),e&2){let t=c();u("options",t.encryptionOptions())("isClearable",!1),l(5),D(t.encryptionFieldSignal()!==""?5:-1)}}function gn(e,n){if(e&1&&(s(0,"button",22),E(1,12),d(2,"spk-icon"),y(),a()),e&2){let t=c();u("disabled",t.nameAndDescriptionValid()===!1)}}function Cn(e,n){if(e&1&&(s(0,"spk-tooltip",23)(1,"button",22),E(2,13),d(3,"spk-icon"),y(),a()()),e&2){let t=c();u("disabled",!(t.showCopyPassword()&&!t.copiedPassword())),l(),u("disabled",t.generalForm.invalid||t.showCopyPassword()&&!t.copiedPassword())}}var qe=new ge,Yt=(e={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>qe.group({name:qe.control(e.name,[_e.required]),description:qe.control(e.description),encryption:qe.control(e.encryption,[zt()]),password:qe.control(e.password,[kt(n=>n?.value.encryption!=="",[_e.required])]),repeatPassword:qe.control(e.repeatPassword,[kt(n=>n?.value.encryption!=="",[_e.required])])}),$t={Key:"",DisplayName:"None"},Mt=class e{#n=$(pe);#t=$(ye);#o=$(Ft);#i=$(he);#e=$(lt);formRef=we.required("formRef");generalForm=this.#i.generalForm;generalFormSignal=this.#i.generalFormSignal;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=T(!1);copiedPassword=T(!1);showCopyPassword=T(!1);encryptionEffect=it(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=b(()=>{let n=this.generalFormSignal(),t=this.generalForm.controls;return t?.name&&t.name.valid&&t?.description&&t.description.valid});calculatePasswordStrength=b(()=>{let t=this.generalFormSignal()?.password??"";return this.#o.calculatePasswordStrength(t)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let o=document.createElement("textarea");o.value=n,document.body.appendChild(o),o.select(),document.execCommand("copy"),document.body.removeChild(o)}catch(o){console.error("Failed to copy text: ",o)}}}displayFn(){let n=this.#e.systemInfo()?.EncryptionModules??[];return t=>{let o=[$t,...n].find(i=>i.Key===t);return o?`${o.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let n=this.#o.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#n.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-general"]],viewQuery:function(t,o){t&1&&Re(o.formRef,on,5),t&2&&Ie()},decls:22,vars:4,consts:()=>{let n;n=$localize`Your backup name`;let t;t=$localize`Your backup description`;let o;o=$localize`General backup settings`;let i;i=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let r;r=$localize`Backup description`;let p;p=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let C;C=$localize`Encryption`;let N;N=$localize`Encryption`;let w;w=$localize`Password`;let q;q=$localize`Repeat password`;let I;I=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let x;x=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,x=ke(x);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let ne;ne=$localize`Passwords do not match`;let Y;Y=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Y=ke(Y);let f;f=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let A;A=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let L;return L=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],o,i,r,p,N,I,x,W,ne,Y,f,A,L,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",n,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",t,"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"],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",C,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",w,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",q,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["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(t,o){if(t&1){let i=G();s(0,"form",14,0),P("submit",function(){return F(i),g(o.next())}),s(2,"h3",15),R(3,1),a(),s(4,"spk-form-field")(5,"label",16),E(6,2),d(7,"sup"),y(),a(),d(8,"input",17),a(),s(9,"spk-form-field")(10,"label",18),R(11,3),a(),d(12,"textarea",19),a(),S(13,Fn,6,3),s(14,"div",20)(15,"button",21),P("click",function(){return F(i),g(o.exit())}),E(16,4),d(17,"spk-icon"),y(),a(),s(18,"pre"),m(19),a(),S(20,gn,3,1,"button",22)(21,Cn,4,2,"spk-tooltip",23),a()()}t&2&&(u("formGroup",o.generalForm),l(13),D(o.isNew()?13:-1),l(6),z("hello",o.nameAndDescriptionValid(),""),l(),D(o.encryptionFieldSignal()===""||!o.isNew()?20:21))},dependencies:[ze,Be,de,Fe,Ue,We,He,ue,me,be,ce,at,rt,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-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})};function hn(e,n){if(e&1){let t=G();s(0,"div",24)(1,"spk-form-field")(2,"label",25),R(3,7),a(),s(4,"input",26,0),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.nextTime().time,i)||(r.scheduleFields.nextTime().time=i),g(i)}),P("focus",function(){F(t);let i=ie(5);return g(i.showPicker())}),a(),s(6,"spk-icon",27),m(7,"clock"),a()(),s(8,"spk-form-field"),d(9,"label",28),s(10,"input",29,1),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.nextTime().date,i)||(r.scheduleFields.nextTime().date=i),g(i)}),P("focus",function(){F(t);let i=ie(11);return g(i.showPicker())}),a(),s(12,"spk-icon",27),m(13,"calendar"),a()()(),s(14,"div",24)(15,"spk-form-field")(16,"label",30),R(17,8),a(),s(18,"input",31),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().repeatValue,i)||(r.scheduleFields.runAgain().repeatValue=i),g(i)}),a()(),s(19,"spk-select",32)(20,"input",33),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().repeatUnit,i)||(r.scheduleFields.runAgain().repeatUnit=i),g(i)}),a()()(),s(21,"app-toggle-card",34),H(22,35),R(23,9),X(),s(24,"div",36)(25,"spk-toggle",19),E(26,10),s(27,"input",20),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().allowedDays.mon,i)||(r.scheduleFields.runAgain().allowedDays.mon=i),g(i)}),a(),y(),a(),s(28,"spk-toggle",19),E(29,11),s(30,"input",20),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().allowedDays.tue,i)||(r.scheduleFields.runAgain().allowedDays.tue=i),g(i)}),a(),y(),a(),s(31,"spk-toggle",19),E(32,12),s(33,"input",20),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().allowedDays.wed,i)||(r.scheduleFields.runAgain().allowedDays.wed=i),g(i)}),a(),y(),a(),s(34,"spk-toggle",19),E(35,13),s(36,"input",20),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().allowedDays.thu,i)||(r.scheduleFields.runAgain().allowedDays.thu=i),g(i)}),a(),y(),a(),s(37,"spk-toggle",19),E(38,14),s(39,"input",20),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().allowedDays.fri,i)||(r.scheduleFields.runAgain().allowedDays.fri=i),g(i)}),a(),y(),a(),s(40,"spk-toggle",19),E(41,15),s(42,"input",20),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().allowedDays.sat,i)||(r.scheduleFields.runAgain().allowedDays.sat=i),g(i)}),a(),y(),a(),s(43,"spk-toggle",19),E(44,16),s(45,"input",20),B("ngModelChange",function(i){F(t);let r=c();return V(r.scheduleFields.runAgain().allowedDays.sun,i)||(r.scheduleFields.runAgain().allowedDays.sun=i),g(i)}),a(),y(),a()()()}if(e&2){let t=c();l(4),U("ngModel",t.scheduleFields.nextTime().time),l(6),U("ngModel",t.scheduleFields.nextTime().date),l(8),U("ngModel",t.scheduleFields.runAgain().repeatValue),l(),u("options",t.unitOptions)("isClearable",!1),l(),U("ngModel",t.scheduleFields.runAgain().repeatUnit),l(),u("disallowToggle",!0),l(6),U("ngModel",t.scheduleFields.runAgain().allowedDays.mon),l(3),U("ngModel",t.scheduleFields.runAgain().allowedDays.tue),l(3),U("ngModel",t.scheduleFields.runAgain().allowedDays.wed),l(3),U("ngModel",t.scheduleFields.runAgain().allowedDays.thu),l(3),U("ngModel",t.scheduleFields.runAgain().allowedDays.fri),l(3),U("ngModel",t.scheduleFields.runAgain().allowedDays.sat),l(3),U("ngModel",t.scheduleFields.runAgain().allowedDays.sun)}}var Sn=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Me={autoRun:!0,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}}},wt=class e{#n=$(he);#t=$(pe);#o=$(ye);unitOptions=Sn;scheduleFields=this.#n.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let n;n=$localize`Schedule`;let t;t=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let o;o=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let r;r=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let p;p=$localize`Next time`;let C;C=$localize`Run again every`;let N;N=$localize`Allowed days`;let w;w=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let q;q=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let x;x=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let W;W=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let Y;return Y=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],n,t,o,i,r,p,C,N,w,q,I,x,W,ne,Y,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(t,o){t&1&&(s(0,"h3",17),R(1,2),a(),s(2,"div",18)(3,"spk-toggle",19),E(4,3),s(5,"input",20),B("ngModelChange",function(r){return V(o.scheduleFields.autoRun,r)||(o.scheduleFields.autoRun=r),r}),a(),y(),a(),s(6,"p"),R(7,4),a()(),S(8,hn,46,14),s(9,"div",21)(10,"button",22),P("click",function(){return o.goBack()}),E(11,5),d(12,"spk-icon"),y(),a(),s(13,"button",23),P("click",function(){return o.next()}),E(14,6),d(15,"spk-icon"),y(),a()()),t&2&&(l(5),U("ngModel",o.scheduleFields.autoRun),l(3),D(o.scheduleFields.autoRun()?8:-1))},dependencies:[Xe,de,Ke,Le,Fe,Ve,ue,Ge,ce,be,me,je],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function fn(e,n){if(e&1&&(H(0,4),m(1),X()),e&2){let t,o=c();l(),xe((t=o.currentExpressionOption())==null?null:t.startsWith)}}function Tn(e,n){if(e&1&&(H(0,5),m(1),X()),e&2){let t,o=c();l(),xe((t=o.currentExpressionOption())==null?null:t.endsWith)}}var Dn=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],ht=class e{path=Dt.required();osType=Dt();pathChange=Tt();remove=Tt();internalPath=T("");pathType=T("-Expression");currentExpressionOption=b(()=>{let n=this.pathType();return this.expressionOptions().find(t=>t.value===n)});expressionOptions=b(()=>{let t=this.osType()==="Windows"?"\\":"/";return Dn.map(o=>o.value==="-Folder"||o.value==="+Folder"?De(h({},o),{startsWith:"",endsWith:""}):o.value==="-FolderName"||o.value==="+FolderName"?De(h({},o),{startsWith:"*",endsWith:`*${t}`}):o.value==="-FileName"||o.value==="+FileName"?De(h({},o),{startsWith:"[.*",endsWith:`[^\\${t}]*]`}):o.value==="-FileGroup"||o.value==="+FileGroup"?De(h({},o),{startsWith:"{",endsWith:"}"}):o.value==="-Regex"||o.value==="+Regex"?De(h({},o),{startsWith:"[",endsWith:"]"}):o.value==="-Extension"||o.value==="+Extension"?De(h({},o),{startsWith:"*.",endsWith:""}):De(h({},o),{startsWith:"",endsWith:""}))});pathEffect=it(()=>{let n=this.path(),t=n.slice(1),o=n.startsWith("-")?"-":"+",i=this.osType()==="Windows",r=i?"\\":"/";t.startsWith("%")&&t.endsWith(r)||i&&t.slice(2).startsWith(r)&&t.endsWith(r)||t.startsWith(r)&&t.endsWith(r)?(this.pathType.set(`${o}Folder`),this.internalPath.set(t)):t.startsWith("*")&&t.endsWith(`*${r}`)?(this.pathType.set(`${o}FolderName`),this.internalPath.set(t.slice(1,-2))):t.startsWith("[.*")&&t.endsWith(`[^\\${r}]*]`)?(this.pathType.set(`${o}FileName`),this.internalPath.set(t.slice(3,-7))):t.startsWith("{")&&t.endsWith("}")?(this.pathType.set(`${o}FileGroup`),this.internalPath.set(t.slice(1,-1))):t.startsWith("[")&&t.endsWith("]")?(this.pathType.set(`${o}Regex`),this.internalPath.set(t.slice(1,-1))):t.startsWith("*.")?(this.pathType.set(`${o}Extension`),this.internalPath.set(t.slice(2))):(this.pathType.set(`${o}Expression`),this.internalPath.set(t))});updateFilter(){let n=this.internalPath(),t=this.currentExpressionOption();n!==""&&this.pathChange.emit(`${t?.value.slice(0,1)}${t?.startsWith??""}${n}${t?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let n;return n=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(t,o){if(t&1&&(s(0,"spk-select",0)(1,"input",1),B("ngModelChange",function(r){return V(o.pathType,r)||(o.pathType=r),r}),P("ngModelChange",function(){return o.updateFilter()}),a()(),s(2,"spk-form-field",2)(3,"input",3),B("ngModelChange",function(r){return V(o.internalPath,r)||(o.internalPath=r),r}),P("ngModelChange",function(){return o.updateFilter()}),a(),S(4,fn,2,1,"ng-container",4)(5,Tn,2,1,"ng-container",5),a(),s(6,"div",6),P("click",function(){return o.removeFilter()}),s(7,"spk-icon",7),m(8,"x-circle"),a()()),t&2){let i,r;u("options",o.expressionOptions())("isClearable",!1),l(),U("ngModel",o.pathType),l(2),U("ngModel",o.internalPath),l(),D(!((i=o.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),l(),D(!((r=o.currentExpressionOption())==null||r.endsWith==null)&&r.endsWith.length?5:-1)}},dependencies:[Xe,de,Fe,Ve,me,ue,ce],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-level-20)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var En=["formRef"],Jt=()=>({standalone:!0});function yn(e,n){if(e&1){let t=G();s(0,"spk-form-field",42)(1,"input",43),B("ngModelChange",function(i){F(t);let r=c(2);return V(r.editingPath,i)||(r.editingPath=i),g(i)}),a()(),s(2,"button",44),P("click",function(){F(t);let i=c(2);return g(i.updatePath())}),s(3,"spk-icon"),m(4,"floppy-disk"),a()(),s(5,"button",44),P("click",function(){F(t);let i=c(2);return g(i.cancelEditPath())}),s(6,"spk-icon"),m(7,"x-bold"),a()()}if(e&2){let t=c(2);l(),U("ngModel",t.editingPath),u("ngModelOptions",Ze(2,Jt))}}function Pn(e,n){if(e&1){let t=G();s(0,"spk-form-field",42),d(1,"input",45),a(),s(2,"button",44),P("click",function(){F(t);let i=c().$implicit,r=c();return g(r.editPath(i))}),s(3,"spk-icon"),m(4,"pen"),a()(),s(5,"button",44),P("click",function(){F(t);let i=c().$implicit,r=c();return g(r.removePath(i))}),s(6,"spk-icon"),m(7,"trash-simple"),a()()}if(e&2){let t=c().$implicit;bt("readonly",!0),l(),u("ngModel",t)("ngModelOptions",Ze(3,Jt))}}function An(e,n){if(e&1&&(s(0,"div",30),S(1,yn,8,3)(2,Pn,8,4),a()),e&2){let t=n.$implicit,o=c();l(),D(o.oldPath()===t?1:2)}}function Nn(e,n){if(e&1){let t=G();s(0,"app-new-filter",47),P("pathChange",function(i){let r=F(t).$index,p=c(2);return g(p.patchPathAt(i,r))})("remove",function(){let i=F(t).$index,r=c(2);return g(r.removePathAt(i))}),a()}if(e&2){let t,o=n.$implicit,i=c(2);u("path",o)("osType",(t=i.osType())!==null&&t!==void 0?t:"")}}function kn(e,n){if(e&1&&ee(0,Nn,1,2,"app-new-filter",46,Z),e&2){let t=c();te(t.pathArray())}}function On(e,n){if(e&1&&(s(0,"div",41)(1,"spk-form-field"),d(2,"input",48),a(),s(3,"spk-select",49),d(4,"input",50),a()()),e&2){let t=c();l(3),u("options",t.sizeOptions())("isClearable",!1)}}var fe=new ge,Mn=["Bytes","KB","MB","GB","TB","PB"],Zt=(e={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>fe.group({path:fe.control(e.path),excludes:fe.group({hidden:fe.control(e.excludes.hidden),system:fe.control(e.excludes.system),temporary:fe.control(e.excludes.temporary),filesLargerThan:fe.group({size:fe.control(null),unit:fe.control(null)})})}),Rt=class e{#n=$(he);#t=$(pe);#o=$(ye);formRef=we.required("formRef");sourceDataForm=this.#n.sourceDataForm;sourceDataFormSignal=this.#n.sourceDataFormSignal;newPathCtrl=new pt("");filesLargerThan=b(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=T(Mn);osType=this.#n.osType;pathSignal=j(this.sourceDataForm.controls.path.valueChanges);pathArray=b(()=>this.pathSignal()?.split("\0").filter(n=>n.startsWith("-")||n.startsWith("+")||n==="___none___")??[]);nonFilterPaths=b(()=>this.pathSignal()?.split("\0").filter(n=>!n.startsWith("-")&&!n.startsWith("+")&&n!==""));oldPath=T(null);editingPath=T(null);addingNewPath=T(!1);editPath(n){this.oldPath.set(n),this.editingPath.set(n)}updatePath(){let n=this.oldPath(),t=this.editingPath();if(!n||!t||t===n){this.oldPath.set(null),this.editingPath.set(null);return}let o=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(o?.replace(n,t)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(n){let t=this.sourceDataForm.controls.path.value??"",o=t.indexOf(n);if(o===-1)return;let i=o===0?n:"\0"+n,r=t.replace(i,"");this.sourceDataForm.controls.path.setValue(r)}addFilter(n="-*"){let t=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${t}\0${n}`)}patchPathAt(n,t){let i=this.sourceDataForm.controls.path.value.split("\0").filter(p=>!p.startsWith("-")&&!p.startsWith("+")).join("\0"),r=this.pathArray().map((p,C)=>C===t?`${n}`:`${p}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${r}`)}removePathAt(n){let o=this.sourceDataForm.controls.path.value.split("\0").filter(r=>!r.startsWith("-")&&!r.startsWith("+")).join("\0"),i=this.pathArray().filter((r,p)=>p!==n).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${i}`)}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})}addNewPath(){let n=this.sourceDataForm.controls.path.value,t=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${n}\0${t}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#o.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-source-data"]],viewQuery:function(t,o){t&1&&Re(o.formRef,En,5),t&2&&Ie()},decls:56,vars:12,consts:()=>{let n;n=$localize`Path`;let t;t=$localize`Add a direct path`;let o;o=$localize`Hidden files`;let i;i=$localize`System files`;let r;r=$localize`Temporary files`;let p;p=$localize`Source Data`;let C;C=$localize`Folder path`;let N;N=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let w;w=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let q;q=$localize`Paths`;let I;I=$localize`Add a path directly from your machine.`;let x;x=$localize`Filters`;let W;W=$localize`Customize your filters.`;let ne;ne=$localize`Add filter`;let Y;Y=$localize`Exclude`;let f;f=$localize`Choose if there’s any files you want to exclude.`;let A;A=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let L;L=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let M;M=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let J;J=$localize` Files larger than `;let re;re=$localize`Edit path`;let oe;return oe=$localize`Select an option...`,[["formRef",""],p,C,N,w,q,I,x,W,ne,Y,f,A,L,M,J,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",n,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",t,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",o,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",r,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",re,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",oe]]},template:function(t,o){if(t&1){let i=G();s(0,"form",16,0),P("submit",function(){return F(i),g(o.next())}),s(2,"div",17)(3,"h3",18),R(4,1),a(),s(5,"app-file-tree",19)(6,"label",20),R(7,2),a(),d(8,"input",21),a(),s(9,"div",22)(10,"button",23),P("click",function(){return F(i),g(o.goBack())}),E(11,3),d(12,"spk-icon"),y(),a(),s(13,"button",24),E(14,4),d(15,"spk-icon"),y(),a()()(),s(16,"div",25)(17,"app-toggle-card",26),H(18,27),R(19,5),X(),s(20,"p",28),R(21,6),a(),s(22,"div",29),ee(23,An,3,1,"div",30,Z),s(25,"div",31)(26,"spk-form-field"),d(27,"input",32),a(),s(28,"button",33),P("click",function(){return F(i),g(o.addNewPath())}),s(29,"spk-icon"),m(30,"plus"),a()()()()(),s(31,"app-toggle-card",26),H(32,27),R(33,7),X(),s(34,"p",28),R(35,8),a(),s(36,"button",34),P("click",function(){return F(i),g(o.addFilter())}),R(37,9),a(),S(38,kn,2,0),a(),s(39,"app-toggle-card",35),H(40,27),R(41,10),X(),s(42,"p",28),R(43,11),a(),s(44,"spk-toggle",36),E(45,12),d(46,"input",37),y(),a(),s(47,"spk-toggle",36),E(48,13),d(49,"input",38),y(),a(),s(50,"spk-toggle",36),E(51,14),d(52,"input",39),y(),a(),s(53,"spk-toggle",40),P("click",function(){return F(i),g(o.toggleFilesLargerThan())}),R(54,15),a(),S(55,On,5,2,"div",41),a()()()}if(t&2){let i;u("formGroup",o.sourceDataForm),l(5),u("multiSelect",!0)("startingPath",o.getPath())("showFiles",!0),l(12),u("disallowToggle",!0),l(6),te(o.nonFilterPaths()),l(4),u("formControl",o.newPathCtrl),l(4),u("disallowToggle",!0),l(7),D((i=o.pathSignal())!=null&&i.length?38:-1),l(),u("disallowToggle",!0),l(14),Ne("active",o.filesLargerThan()),l(2),D(o.filesLargerThan()?55:-1)}},dependencies:[Xe,Be,de,Ke,Le,Fe,Ue,Ve,ze,ct,We,He,ut,ue,ce,be,Ge,me,ht,mt,je],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var en="1W:1D,4W:1W,12M:1M",Te=new ge,he=class e{#n=$(pe);#t=$(lt);#o=$(ve);#i=$(dt);generalForm=Yt();sourceDataForm=Zt();scheduleFields={autoRun:T(Me.autoRun),nextTime:T(Me.nextTime),runAgain:T(Me.runAgain)};destinationForm=tn();settings=T([]);optionsFields={remoteVolumeSize:T("50MB"),backupRetention:T("all"),backupRetentionTime:T(""),backupRetentionVersions:T(0),backupRetentionCustom:T("")};isDraft=T(!1);backupId=T(null);isSubmitting=T(!1);finishedLoading=T(!1);backupDefaults=T(null);isNew=b(()=>this.backupId()==="new");osType=b(()=>this.#t.systemInfo()?.OSType);selectedOptions=T([]);selectedAdvancedFormPair=T([]);destinationFormPair=T({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=b(()=>{let n=this.destinationFormPair()?.advanced??[],t=this.selectedAdvancedFormPair()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});selectedHttpOptions=T([]);notSelectedHttpOptions=b(()=>{let n=this.httpOptions(),t=this.selectedHttpOptions()??[];return n.filter(o=>t.findIndex(i=>i.name===o.name)===-1)});sourceDataFormSignal=j(this.sourceDataForm.valueChanges);destinationFormSignal=j(this.destinationForm.valueChanges);generalFormSignal=j(this.generalForm.valueChanges);encryptionFieldSignal=j(this.generalForm.controls.encryption.valueChanges);destinationOptions=b(()=>this.#t.backendModules()??[]);httpOptions=b(()=>this.#t.systemInfo()?.GenericModules?.find(n=>n.Key==="http-options")?.Options?.map(this.#e)??[]);advancedOptions=b(()=>this.#t.systemInfo()?.Options?.map(this.#e)??[]);#e(n){return{name:n.Name,type:n.Type,shortDescription:n.ShortDescription??void 0,longDescription:n.LongDescription??void 0,options:n.ValidValues}}encryptionOptions=b(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[$t,...n]});nonSelectedOptions=b(()=>this.advancedOptions().sort((n,t)=>n?.name&&t?.name?n?.name.localeCompare(t?.name):0).filter(n=>this.selectedOptions()?.findIndex(t=>t.name===n.name)===-1));addAdvancedFormPairByName(n,t,o){let i=this.notSelectedAdvancedFormPair().find(r=>r.name===n);i&&this.addAdvancedFormPair(i,t,o)}addHttpOptionByName(n,t,o){let i=this.notSelectedHttpOptions().find(r=>r.name===n);i&&this.addHttpOption(i,t,o)}addAdvancedFormPair(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),n])}addHttpOption(n,t,o){let i=this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced,r=o??n.defaultValue;this.createFormField(i,n,r),this.selectedHttpOptions.set([...this.selectedHttpOptions(),n])}removeAdvancedFormPair(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedAdvancedFormPair().findIndex(i=>i.name===n.name)!==-1?this.selectedAdvancedFormPair.update(i=>(i=i.filter(r=>r.name!==n.name),i)):this.selectedHttpOptions.update(i=>(i=i.filter(r=>r.name!==n.name),i))}removeHttpOption(n,t){this.destinationForm.controls.destinations.controls.at(t)?.controls.advanced.removeControl(n.name),this.selectedHttpOptions.update(o=>(o=o.filter(i=>i.name!==n.name),o))}submit(){this.isSubmitting.set(!0);let n=this.#l(),t=this.backupId();t==="new"||!t||this.isDraft()?this.#o.postApiV1Backups({requestBody:n}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}}):this.#o.putApiV1BackupById({id:t,requestBody:n}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:o=>{this.exit()},error:o=>{}})}exit(){this.#c(),this.#n.navigate(["/"])}updateFieldsFromTargetUrl(n){this.#r(),setTimeout(()=>{this.#s(n)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(n){let t=n.Sources??"",o=n.Filters?.map(C=>`${C.Include?"":"-"}${C.Expression}`)??[],i=n.Settings?.find(C=>C.Name==="--exclude-files-attributes")?.Value??"",r=n.Settings?.find(C=>C.Name==="--skip-files-larger-than")??null,p={path:[...t,...o].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:r?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(p)}mapDestinationToForm(n){let t=n.TargetURL?Ot(n.TargetURL):null;t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}#s(n){let t=Ot(n);t&&this.addDestinationFormGroup(t.destinationType,{custom:t.custom,dynamic:t.dynamic,advanced:t.advanced},!0)}mapGeneralToForm(n){let t=n.Settings?.find(p=>p.Name==="encryption-module"),o=n.Settings?.find(p=>p.Name==="passphrase")?.Value??"",i=t?.Value&&t.Value.length?t.Value:"",r={name:n.Name??"",description:n.Description??""};i&&i!==""&&(r.encryption=i),o&&o!==""&&(r.password=o,r.repeatPassword=o),this.generalForm.patchValue(r)}mapScheduleToForm(n){if(!n){this.scheduleFields.autoRun.set(!1);return}let t=this.#i.fromString(n.Repeat)??null,o=this.#p(n.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>h(h({},i),o)),this.scheduleFields.runAgain.set({repeatValue:t?.value??1,repeatUnit:t?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(n){let t=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],o=n.Settings?.filter(p=>!t.includes(p.Name)),i=n.Settings?.filter(p=>t.includes(p.Name));this.settings.set(o??[]),o?.forEach(p=>{if(p.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(p.Value??"")});var r="all";i?.forEach(p=>{if(console.log("x",p.Name),p.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(p.Value??"50MB"),p.Name==="keep-time"&&(p.Value??"")!=="")return r="time",this.optionsFields.backupRetentionTime.set(p.Value??"");if(p.Name==="keep-versions"&&(p.Value??"")!=="")return r="versions",this.optionsFields.backupRetentionVersions.set(p.Value?parseInt(p.Value):null);if(p.Name==="retention-policy"&&(p.Value??"")!=="")if(p.Value===en)r="smart";else return r="custom",this.optionsFields.backupRetentionCustom.set(p.Value??"")}),this.optionsFields.backupRetention.set(r)}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#l(){let n=this.generalForm.value,t=this.getScheduleFormValue(),o=this.sourceDataForm.value,r=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],p=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(p=this.#i.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let C=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([x,W])=>W).map(([x,W])=>x):[],N=o.path?.split("\0")??[],w=this.mapFormsToSettings(),q=Object.entries(o.excludes??{}).filter(([x,W])=>W&&x!=="filesLargerThan").map(([x])=>x),I=o.excludes?.filesLargerThan;return q.length&&w.push({Name:"--exclude-files-attributes",Value:q.join(",")}),I&&I.size!==null&&I.unit!==null&&w.push({Name:"--skip-files-larger-than",Value:`${I.size}${I.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:r[0]??null,Sources:N.filter(x=>!x.startsWith("-")),Settings:w,Filters:N.filter(x=>x.startsWith("-")).map((x,W)=>({Order:W,Include:!1,Expression:x.slice(1)}))},Schedule:t.autoRun?{Repeat:p,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:C}:null}}mapFormsToSettings(n=[]){let t=this.generalForm.value,o=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];t.encryption!==""&&(i=[{Name:"encryption-module",Value:t.encryption??null},{Name:"passphrase",Value:t.password??null}]);let r=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":r.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":r.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":r.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":r.push({Name:"retention-policy",Value:en});break}let p=[...n,...o],C=this.settings().filter(N=>!p.includes(N.Name)).map(N=>{let w=N.Value;return typeof N.Value=="number"&&(w=N.Value.toString()),typeof N.Value=="boolean"&&(w=N.Value?"True":"False"),{Name:N.Name,Value:w}});return[...i,...r,...C]}#a(n){return n.controls.map(t=>_t(t.value))}#p(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let t=new Date(n);return{time:`${(""+t.getHours()).padStart(2,"0")}:${(""+t.getMinutes()).padStart(2,"0")}`,date:t.toISOString().split("T")[0]}}createFormField(n,t,o){if(t.type==="String"||t.type==="FileTree"||t.type==="FolderTree"||t.type==="Password"||t.type==="Enumeration"||t.type==="NonValidatedSelectableString"||t.type==="Path"){n.addControl(t.name,Te.control(o));return}if(t.type==="Size"){n.addControl(t.name,Te.control(o));return}if(t.type==="Integer"){n.addControl(t.name,Te.control(o?parseInt(o):0));return}if(t.type==="Boolean"){n.addControl(t.name,Te.control(o==="true"||o==="True"));return}if(t.type==="Flags"){n.addControl(t.name,Te.control(o??""));return}if(t.type==="Timespan"||t.type==="DateTime"){n.addControl(t.name,Te.control(o,[_e.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(n,t,o=!1){let i=Se.find(f=>f.customKey===n||f.key===n),r=i?.key,p=this.destinationOptions().find(f=>f.Key===r),C=this.httpOptions();if(!p||!p.Options)return;let N=i&&i.oauthField?i.oauthField:null,w=i&&i.customFields?i.customFields:{},q=i&&i.dynamicFields?i.dynamicFields:[],I=i&&i.advancedFields?i.advancedFields:[],x=i&&i.ignoredAdvancedFields?i.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:N,custom:[],dynamic:[],advanced:[]});let W=Te.group({}),ne=Te.group({}),Y=Te.group({});w&&Object.entries(w).forEach(([f,A],L)=>{let re=A,{formElement:M}=re,J=xt(re,["formElement"]);W.addControl(f,M(t?.custom[f])),this.destinationFormPair.update(oe=>(oe.custom.push(h({order:900+L},J)),oe))});for(let f=0;f<p.Options.length;f++){let A=p.Options[f];if(A.Deprecated)continue;let L=q.find(M=>M===A.Name||M.name===A.Name);if(L){let M=L&&typeof L!="string",J=M?L?.defaultValue??A.DefaultValue:A.DefaultValue,re={name:A.Name,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,order:900+f},oe=M?h(h({},re),L):re,ot=t?.dynamic[A.Name]??J??A.DefaultValue;this.createFormField(ne,oe,ot),this.destinationFormPair.update($e=>($e.dynamic.push(oe),$e))}else{if(x.find(ae=>ae===A.Name))continue;let J=I.find(ae=>ae===A.Name||ae.name===A.Name),re=J&&typeof J!="string",oe=t?.advanced[A.Name],v=oe??A.DefaultValue,ot={name:A.Name,type:A.Type,shortDescription:A.ShortDescription??void 0,longDescription:A.LongDescription??void 0,options:A.ValidValues,defaultValue:v,order:900+f},$e=re?h(h({},ot),J):ot;o&&oe&&(this.createFormField(Y,$e,v),this.selectedAdvancedFormPair.update(ae=>(ae.push($e),ae))),this.destinationFormPair.update(ae=>(ae.advanced.push($e),ae))}}for(let f=0;f<C.length;f++){let A=C[f],L=t?.advanced[A.name],M=L??A.defaultValue;o&&L&&(this.createFormField(Y,A,M),this.selectedHttpOptions.update(J=>(J.push(A),J)))}this.destinationFormPair.update(f=>({oauthField:f.oauthField,custom:f.custom.sort((A,L)=>A.order-L.order),dynamic:f.dynamic.sort((A,L)=>A.order-L.order),advanced:f.advanced.sort((A,L)=>A.order-L.order)})),this.destinationForm.controls.destinations.push(nn({key:i?.customKey??n,customGroup:W,dynamicGroup:ne,advancedGroup:Y}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(Me.autoRun),this.scheduleFields.nextTime.set(Me.nextTime),this.scheduleFields.runAgain.set(Me.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([])}static \u0275fac=function(t){return new(t||e)};static \u0275prov=Ee({token:e,factory:e.\u0275fac,providedIn:"root"})};var $n=["formRef"],wn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"custom",destinationType:t,oauthField:o}),ft=e=>({$implicit:e}),Rn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"dynamic",destinationType:t,oauthField:o}),In=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",destinationType:t,oauthField:o}),xn=(e,n,t,o)=>({index:e,formView:n,formGroupName:"advanced",asHttpOptions:!0,destinationType:t,oauthField:o}),vn=()=>({maxWidth:"700px",width:"100%"});function bn(e,n){e&1&&(E(0,5,2),d(1,"spk-icon"),y())}function Gn(e,n){e&1&&R(0,5,3)}function Ln(e,n){if(e&1){let t=G();E(0,5,1),s(1,"button",21),P("click",function(){F(t);let i=c();return g(i.testDestination())}),S(2,bn,2,0)(3,Gn,1,0),a(),y()}if(e&2){let t=c();l(),Ne("success",t.successfulTest()),l(),D(t.successfulTest()?2:3)}}function Un(e,n){if(e&1){let t=G();s(0,"p",27),P("click",function(){F(t);let i=c();return g(i.removeDestinationFormGroup(i.destinationCount()-1))}),E(1,8),d(2,"span",28),y(),a()}}function Vn(e,n){if(e&1){let t=G();s(0,"div",34),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addDestinationFormGroup(i.key))}),s(1,"h3"),m(2),a(),s(3,"p"),m(4),a()()}if(e&2){let t=n.$implicit;l(2),xe(t.displayName),l(2),xe(t.description)}}function Bn(e,n){if(e&1){let t=G();s(0,"button",35,1),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addDestinationFormGroup(i.key))}),m(2),a()}if(e&2){let t=n.$implicit;l(2),z(" ",t.displayName," ")}}function Kn(e,n){if(e&1&&(s(0,"div",29),ee(1,Vn,5,2,"div",30,Z),a(),s(3,"spk-menu",31)(4,"button",32),R(5,9),a(),H(6,20),ee(7,Bn,3,1,"button",33,Z),X(),a()),e&2){let t=c();l(),te(t.destinationTypeOptionsFocused()),l(2),u("searchable",!0),l(4),te(t.destinationTypeOptionsNotFocused())}}function Wn(e,n){e&1&&Je(0)}function Hn(e,n){if(e&1&&S(0,Wn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,ft,tt(2,wn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Xn(e,n){e&1&&Je(0)}function zn(e,n){if(e&1&&S(0,Xn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,ft,tt(2,Rn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function jn(e,n){if(e&1){let t=G();E(0,10,1),s(1,"button",35,1),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addAdvancedFormPair(i,0))}),a(),y()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function qn(e,n){e&1&&Je(0)}function Qn(e,n){if(e&1&&S(0,qn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,ft,tt(2,In,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function Yn(e,n){if(e&1){let t=G();E(0,11,1),s(1,"button",35,1),P("click",function(){let i=F(t).$implicit,r=c(2);return g(r.addHttpOption(i,0))}),a(),y()}if(e&2){let t=n.$implicit;l(),Et(t.name),yt(0)}}function Jn(e,n){e&1&&Je(0)}function Zn(e,n){if(e&1&&S(0,Jn,1,0,"ng-container",40),e&2){let t,o=n.$implicit,i=n.$index;c();let r=ie(29),p=c();u("ngTemplateOutlet",r)("ngTemplateOutletContext",et(7,ft,tt(2,xn,i,o,(t=p.destinationFormSignal())==null||t.destinations==null||t.destinations[0]==null?null:t.destinations[0].destinationType,p.destinationFormPair().oauthField)))}}function eo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function to(e,n){if(e&1&&(s(0,"app-file-tree",43)(1,"label",47),m(2),S(3,eo,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name))("accepts",o.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),K("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function no(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function oo(e,n){if(e&1&&(s(0,"app-file-tree",44)(1,"label",47),m(2),S(3,no,3,1,"spk-tooltip",48),a(),d(4,"input",49),a()),e&2){let t,o=c().$implicit,i=c(2);u("hideShortcuts",!0)("startingPath",i.getFormFieldValue(0,o.formGroupName,o.formView.name)),l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),K("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function io(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function ro(e,n){e&1&&(s(0,"spk-icon",51),m(1,"link"),a())}function ao(e,n){e&1&&(s(0,"spk-icon",51),m(1,"envelope"),a())}function so(e,n){e&1&&(s(0,"spk-icon",51),m(1,"textbox"),a())}function lo(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),m(2),S(3,io,3,1,"spk-tooltip",48),a(),d(4,"input",50),S(5,ro,2,0,"spk-icon",51)(6,ao,2,0,"spk-icon",51)(7,so,2,0,"spk-icon",51),a()),e&2){let t,o=c().$implicit;l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),K("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name),u("type",o.formView.type==="Email"?"email":"text"),l(),D(o.formView.type==="Path"?5:o.formView.type==="Email"?6:7)}}function po(e,n){if(e&1){let t=G();s(0,"span",55),P("click",function(){F(t);let i=c(2).$implicit,r=c(2);return g(r.oauthStartTokenCreation(i.destinationType))}),m(1,"AuthID"),a()}}function co(e,n){e&1&&(s(0,"spk-icon",51),m(1,"password"),a())}function uo(e,n){if(e&1){let t=G();s(0,"spk-icon",56),P("click",function(){F(t);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye "),a()}}function mo(e,n){if(e&1){let t=G();s(0,"spk-icon",56),P("click",function(){F(t);let i=c(2).$implicit;return g(i.formView.showPassword=!i.formView.showPassword)}),m(1," eye-slash "),a()}}function _o(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),m(2),a(),d(3,"input",52),S(4,po,2,0,"span",53)(5,co,2,0,"spk-icon",51)(6,uo,2,0,"spk-icon",54)(7,mo,2,0,"spk-icon",54),a()),e&2){let t,o=c().$implicit;l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),K("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name),u("type",o.formView.showPassword?"text":"password"),l(),D(o.oauthField===o.formView.name?4:5),l(2),D(o.formView.showPassword?6:7)}}function Fo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function go(e,n){if(e&1&&m(0),e&2){let t=n.$implicit;z(" ",t," ")}}function Co(e,n){if(e&1&&(s(0,"spk-select",57)(1,"label",47),m(2),S(3,Fo,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),S(5,go,1,1,"ng-template",null,3,nt)),e&2){let t,o=ie(6);c();let i=Nt(0),r=c().$implicit;u("options",i)("isClearable",!1)("optionTemplate",o),l(),K("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),K("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),le("formControlName",r.formView.name)}}function ho(e,n){if(e&1&&(Pt(0),S(1,Co,7,14)),e&2){let t=c().$implicit,o=At(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:-1)}}function So(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(3).$implicit;u("message",t.formView.longDescription)}}function fo(e,n){if(e&1&&m(0),e&2){let t=n.$implicit;Lt(" ",t.key," ",t.value?"("+t.value+")":""," ")}}function To(e,n){if(e&1&&(s(0,"spk-select",59)(1,"label",47),m(2),S(3,So,3,1,"spk-tooltip",48),a(),d(4,"input",49),a(),S(5,fo,1,2,"ng-template",null,4,nt)),e&2){let t,o=ie(6);c();let i=Nt(0),r=c().$implicit;u("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",o),l(),K("for","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),l(),z(" ",(t=r.formView.shortDescription)!==null&&t!==void 0?t:r.formView.name," "),l(),D(r.formView.longDescription?3:-1),l(),K("id","destination-",r.formGroupName,"-",r.index,"-",r.asHttpOptions?"http":"other",""),le("formControlName",r.formView.name)}}function Do(e,n){e&1&&d(0,"spk-progress-bar",58)}function Eo(e,n){if(e&1&&(Pt(0),S(1,To,7,15)(2,Do,1,0,"spk-progress-bar",58)),e&2){let t=c().$implicit,o=At(t.formView.loadOptions?t.formView.loadOptions(c(2).injector)():t.formView.options);l(),D(o?1:2)}}function yo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Po(e,n){if(e&1&&(s(0,"app-size",45)(1,"label",47),m(2),S(3,yo,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.Name)("formControlName",o.formView.name)("customId",`destination-{{ item.formGroupName }}-{{ item.index }}-{{
2
+ item.asHttpOptions ? 'http' : 'other'
3
+ }}`),l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1)}}function Ao(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function No(e,n){if(e&1&&(s(0,"spk-form-field")(1,"label",47),m(2),S(3,Ao,3,1,"spk-tooltip",48),a(),d(4,"input",60),s(5,"spk-icon",51),m(6,"numpad"),a()()),e&2){let t,o=c().$implicit;l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),K("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function ko(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Oo(e,n){if(e&1&&(s(0,"spk-toggle",46)(1,"label",47),m(2),S(3,ko,3,1,"spk-tooltip",48),a(),d(4,"input",61),a()),e&2){let t,o=c().$implicit;l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1),l(),K("id","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),le("formControlName",o.formView.name)}}function Mo(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function $o(e,n){if(e&1&&m(0),e&2){let t=n.$implicit;z(" ",t," ")}}function wo(e,n){if(e&1&&(s(0,"spk-select",62)(1,"label",47),m(2),S(3,Mo,3,1,"spk-tooltip",48),a(),d(4,"input",63),a(),S(5,$o,1,1,"ng-template",null,4,nt)),e&2){let t,o=ie(6),i=c().$implicit;u("options",i.formView.options)("selectMultiple",!0)("optionTemplate",o),l(),Gt("for","destination-",i.formGroupName,"-",i.index,""),l(),z(" ",(t=i.formView.shortDescription)!==null&&t!==void 0?t:i.formView.name," "),l(),D(i.formView.longDescription?3:-1),l(),le("formControlName",i.formView.name)}}function Ro(e,n){if(e&1&&(s(0,"spk-tooltip",48)(1,"spk-icon"),m(2,"question"),a()()),e&2){let t=c(2).$implicit;u("message",t.formView.longDescription)}}function Io(e,n){if(e&1&&(s(0,"app-timespan",45)(1,"label",47),m(2),S(3,Ro,3,1,"spk-tooltip",48),a()()),e&2){let t,o=c().$implicit;u("inputType",o.formView.name)("formControlName",o.formView.name)("customId","destination-"+o.formGroupName+"-"+o.index+"-"+(o.asHttpOptions?"http":"other")),l(),K("for","destination-",o.formGroupName,"-",o.index,"-",o.asHttpOptions?"http":"other",""),l(),z(" ",(t=o.formView.shortDescription)!==null&&t!==void 0?t:o.formView.name," "),l(),D(o.formView.longDescription?3:-1)}}function xo(e,n){if(e&1){let t=G();s(0,"button",64),P("click",function(){F(t);let i=c().$implicit,r=c(2);return g(r.removeFormView(i.formView,0))}),s(1,"spk-icon"),m(2,"x-circle"),a()()}}function vo(e,n){if(e&1&&(s(0,"div",41),H(1,42),S(2,to,5,17,"app-file-tree",43)(3,oo,5,13,"app-file-tree",44)(4,lo,8,13,"spk-form-field")(5,_o,8,13,"spk-form-field")(6,ho,2,2)(7,Eo,3,2)(8,Po,4,9,"app-size",45)(9,No,7,11,"spk-form-field")(10,Oo,5,11,"spk-toggle",46)(11,wo,7,9)(12,Io,4,9,"app-timespan",45),X(),S(13,xo,3,0,"button",32),a()),e&2){let t=n.$implicit;Ne("single-field",t.formGroupName!=="advanced"),l(),u("formGroupName",t.formGroupName),l(),D(t.formView.type==="FileTree"?2:t.formView.type==="FolderTree"?3:t.formView.type==="String"||t.formView.type==="Path"||t.formView.type==="Email"?4:t.formView.type==="Password"?5:t.formView.type==="Enumeration"?6:t.formView.type==="NonValidatedSelectableString"?7:t.formView.type==="Size"?8:t.formView.type==="Integer"?9:t.formView.type==="Boolean"?10:t.formView.type==="Flags"?11:t.formView.type==="Timespan"||t.formView.type==="DateTime"?12:-1),l(11),D(t.formGroupName==="advanced"?13:-1)}}function bo(e,n){if(e&1&&(H(0,22)(1,36),ee(2,Hn,1,9,"ng-container",null,Z),ee(4,zn,1,9,"ng-container",null,Z),s(6,"app-toggle-card",37),H(7,38),E(8,10),s(9,"spk-menu",31)(10,"button",39),d(11,"spk-icon"),a(),H(12,20),ee(13,jn,3,1,"button",33,Z),X(),a(),y(),X(),ee(15,Qn,1,9,"ng-container",null,Z),a(),s(17,"app-toggle-card",37),H(18,38),E(19,11),s(20,"spk-menu",31)(21,"button",39),d(22,"spk-icon"),a(),H(23,20),ee(24,Yn,3,1,"button",33,Z),X(),a(),y(),X(),ee(26,Zn,1,9,"ng-container",null,Z),a(),S(28,vo,14,5,"ng-template",null,2,nt),X()()),e&2){let t=c();l(2),te(t.destinationFormPair().custom),l(2),te(t.destinationFormPair().dynamic),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedAdvancedFormPair().length===0),l(3),te(t.notSelectedAdvancedFormPair()),l(2),te(t.selectedAdvancedFormPair()),l(2),u("disallowToggle",!0),l(3),u("searchable",!0),l(),u("disabled",t.notSelectedHttpOptions().length===0),l(3),te(t.notSelectedHttpOptions()),l(2),te(t.selectedHttpOptions())}}function Go(e,n){if(e&1){let t=G();s(0,"spk-dialog",65),B("isOpenChange",function(i){F(t);let r=c();return V(r.targetUrlDialogOpen,i)||(r.targetUrlDialogOpen=i),g(i)}),s(1,"header",66)(2,"h2"),R(3,12),a(),s(4,"spk-alert",67),R(5,13),a()(),s(6,"div",68)(7,"spk-form-field"),d(8,"textarea",69),a()(),s(9,"footer",70)(10,"button",24),P("click",function(){F(t);let i=c();return g(i.closeTargetUrlDialog(!1))}),m(11,"Cancel"),a(),s(12,"button",71),P("click",function(){F(t);let i=c();return g(i.closeTargetUrlDialog(!0))}),E(13,14),d(14,"spk-icon"),y(),a()()()}if(e&2){let t=c();U("isOpen",t.targetUrlDialogOpen),u("options",Ze(3,vn)),l(8),u("formControl",t.targetUrlCtrl)}}var St=new ge,tn=(e={destinations:[]})=>St.group({destinations:St.array(e.destinations)}),nn=({key:e,customGroup:n,dynamicGroup:t,advancedGroup:o})=>St.group({destinationType:St.control(e),custom:n,dynamic:t,advanced:o}),It=class e{#n=$(pe);#t=$(ye);#o=$(Vt);#i=$(ve);#e=$(he);#r=$(Kt);injector=$(vt);formRef=we.required("formRef");destinationForm=this.#e.destinationForm;destinationFormPair=this.#e.destinationFormPair;selectedAdvancedFormPair=this.#e.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#e.notSelectedAdvancedFormPair;selectedHttpOptions=this.#e.selectedHttpOptions;notSelectedHttpOptions=this.#e.notSelectedHttpOptions;destinationOptions=this.#e.destinationOptions;destinationFormSignal=this.#e.destinationFormSignal;destinationCount=b(()=>this.destinationFormSignal()?.destinations?.length??0);successfulTest=T(!1);destinationTypeOptionsInFocus=T(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=T(Se.map(n=>({key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description})));destinationTypeOptionsFocused=b(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(i=>i.key===o))});destinationTypeOptionsNotFocused=b(()=>{let n=this.destinationTypeOptionsInFocus();return this.destinationTypeOptions().filter(o=>!n.includes(o.key))});getFormFieldValue(n,t,o){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[t]).controls[o].value}addDestinationFormGroup(n){this.#e.addDestinationFormGroup(n)}addAdvancedFormPair(n,t){this.#e.addAdvancedFormPair(n,t)}removeFormView(n,t){this.#e.removeAdvancedFormPair(n,t)}addHttpOption(n,t){this.#e.addHttpOption(n,t)}targetUrl=b(()=>this.#e.getCurrentTargetUrl()[0]);targetUrlCtrl=new pt;targetUrlInitial=T(null);targetUrlDialogOpen=T(!1);openTargetUrlDialog(){let t=this.#e.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(t),this.targetUrlInitial.set(t),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl.value,o=this.targetUrlInitial();!n||t===o||this.#e.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(n=0){let o=this.#e.getCurrentTargetUrl()[n];o&&this.#i.postApiV1RemoteoperationTest({requestBody:{path:o}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:i=>{let r=i.error.error.Error;if(this.successfulTest.set(!1),r==="missing-folder"){this.#r.open(Oe,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:p=>{p&&this.#i.postApiV1RemoteoperationCreate({requestBody:{path:o}}).subscribe({next:()=>{this.#r.open(Oe,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{this.testDestination(n)}})}})}});return}if(r.startsWith("incorrect-cert:")){let p=r.split("incorrect-cert:")[1];this.#r.open(Oe,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
4
+ If this is a self-signed certificate, you can choose to trust this certificate.
5
+ The server reported the certificate hash: ${p}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:C=>{C&&this.#e.addHttpOptionByName("accept-specified-ssl-hash",p)}});return}if(r.startsWith("incorrect-host-key:")){let p=r.split('incorrect-host-key:"')[1].split('",')[0],C=r.split('accepted-host-key:"')[1].split('",')[0];C?this.#r.open(Oe,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
6
+ otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
7
+ Do you want to REPLACE your CURRENT host key ${C}
8
+ with the REPORTED host key: ${p}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:N=>{N&&this.#e.addAdvancedFormPairByName("ssh-fingerprint",n,p)}}):this.#r.open(Oe,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${p}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:N=>{N&&this.#e.addAdvancedFormPairByName("ssh-fingerprint",n,p)}});return}this.#r.open(Oe,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:r,cancelText:$localize`OK`},closed:p=>{}})}})}mapToTargetUrl(n){return _t(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let t=this.destinationOptions().find(o=>o.Key===n);return t?`${t.DisplayName}`:""}goBack(){this.#n.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#n.navigate(["source-data"],{relativeTo:this.#t.parent})}#s=T("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=T(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=T(!1);#p=T(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let t=450,o=600,i=this.#s()+"?type="+n+"&token="+this.#l(),r=screen.width/2-t/2,p=screen.height/2-o/2,C=window.open(i,"_blank","height="+o+",width="+t+",menubar=0,status=0,titlebar=0,toolbar=0,left="+r+",top="+p);C?.addEventListener("blur",N=>{console.log("event blur",N)}),C?.addEventListener("beforeunload",N=>{console.log("event beforeunload",N),this.#o.get(this.#s()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(Ye(()=>this.#a.set(!1))).subscribe({next:w=>{console.log("res",w),w?.authid&&this.#p.set(w.authid)}})})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=se({type:e,selectors:[["app-destination"]],viewQuery:function(t,o){t&1&&Re(o.formRef,$n,5),t&2&&Ie()},decls:24,vars:6,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=ke(n);let t;t=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let i;i=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let r;r=$localize`Other destinations`;let p;p=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,p=ke(p);let C;C=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,C=ke(C);let N;N=$localize`Edit target URL`;let w;w=$localize` Be careful, this will overwrite everything you have in your destination. `;let q;return q=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["option",""],["fieldTemplate",""],["enumOptionTemplate",""],["optionTemplate",""],n,t,o,i,r,p,C,N,w,q,[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,"searchable"],["spk-button","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","startingPath"],[3,"inputType","formControlName","customId"],[1,"primary","raised"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],[3,"type","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"],[3,"options","isClearable","optionTemplate"],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"formControlName"],["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(t,o){if(t&1){let i=G();s(0,"form",15,0),P("submit",function(){return F(i),g(o.next())}),s(2,"header")(3,"h3",16),E(4,5),s(5,"div",17),S(6,Ln,4,3,"button",18),s(7,"spk-menu")(8,"button",19),d(9,"spk-icon"),a(),H(10,20),s(11,"button",21),P("click",function(){return F(i),g(o.openTargetUrlDialog())}),d(12,"spk-icon"),a(),X(),a()(),y(),a(),S(13,Un,3,0,"p"),a(),S(14,Kn,9,1)(15,bo,30,6,"ng-container",22),s(16,"div",23)(17,"button",24),P("click",function(){return F(i),g(o.goBack())}),E(18,6),d(19,"spk-icon"),y(),a(),s(20,"button",25),E(21,7),d(22,"spk-icon"),y(),a()()(),S(23,Go,15,4,"spk-dialog",26)}if(t&2){let i;u("formGroup",o.destinationForm),l(6),D(o.destinationCount()>0?6:-1),l(7),D(o.destinationCount()>0?13:-1),l(),D(o.destinationCount()===0?14:-1),l(),D(!((i=o.destinationFormSignal())==null||i.destinations==null)&&i.destinations.length?15:-1),l(8),D(o.targetUrlDialogOpen()?23:-1)}},dependencies:[ze,Be,de,Ke,Le,Fe,Ue,ct,We,He,ut,Xt,Ut,ue,Wt,ce,Ge,st,Bt,rt,me,at,qt,je,mt,jt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}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;padding-bottom: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}spk-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{_t as a,Se as b,tn as c,nn as d,It as e,Yt as f,$t as g,Mt as h,Me as i,wt as j,Zt as k,Rt as l,he as m};
@@ -0,0 +1 @@
1
+ import{m as g}from"./chunk-CVF2Q2H6.js";import"./chunk-Y5T3G6PP.js";import"./chunk-4B4SNBSE.js";import"./chunk-YRQ33MKD.js";import"./chunk-DNHLTHLR.js";import{a as k}from"./chunk-NYZVIDDD.js";import"./chunk-OELZQ6RK.js";import"./chunk-ARQ6YMHX.js";import{a as I}from"./chunk-6OYKPS4F.js";import"./chunk-5242ZMFS.js";import"./chunk-ZVBVR6H4.js";import"./chunk-OQNO5JCJ.js";import{a as N}from"./chunk-KEHATBLP.js";import"./chunk-RHW5QVAY.js";import"./chunk-QTTYDT3P.js";import"./chunk-C4IFBLYB.js";import"./chunk-PX25CWH6.js";import{b as P,c as h,e as E,f as B}from"./chunk-7WCKE7GY.js";import"./chunk-BIHIR35J.js";import{p as $,q as M,v as b}from"./chunk-6WLXFV43.js";import{b as O}from"./chunk-DYCJPQSE.js";import"./chunk-TKVTCBLW.js";import"./chunk-FQMZSQUI.js";import"./chunk-2IDHF5MN.js";import"./chunk-OD5LGCQE.js";import{D as m,Eb as d,Fb as c,Oa as r,X as l,_a as f,db as C,ic as R,lb as u,lc as _,qb as D,ub as s,vb as p,wb as n,zc as A}from"./chunk-GM25ACCR.js";import"./chunk-7CGTOI24.js";var K=(i,e)=>[i,e,"general"],L=(i,e)=>[i,e,"destination"],v=(i,e)=>[i,e,"source-data"],G=(i,e)=>[i,e,"schedule"],y=(i,e)=>[i,e,"options"];function U(i,e){i&1&&n(0,"spk-progress-bar",6)}function X(i,e){i&1&&(s(0,"section"),n(1,"router-outlet"),p())}var T=class i{#t=l(P);#e=l(g);#a=l(N);#i=l(O);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#o=k(this.#t.params);#n=k(this.#t.url);paramsChanged=A(()=>{let e=this.#o()?.id,a=!!this.#n()?.find(t=>t.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(m(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let t=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}t(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:t})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=f({type:i,selectors:[["app-backup"]],features:[R([g])],decls:20,vars:21,consts:()=>{let e;e=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: General `;let a;a=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let t;t=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `,[e,a,t,o,F,["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(a,t){a&1&&(n(0,"app-status-bar"),s(1,"header")(2,"spk-stepper")(3,"div",5),d(4,0),n(5,"spk-radio"),c(),p(),s(6,"div",5),d(7,1),n(8,"spk-radio"),c(),p(),s(9,"div",5),d(10,2),n(11,"spk-radio"),c(),p(),s(12,"div",5),d(13,3),n(14,"spk-radio"),c(),p(),s(15,"div",5),d(16,4),n(17,"spk-radio"),c(),p()()(),C(18,U,1,0,"spk-progress-bar",6)(19,X,2,0,"section")),a&2&&(r(3),u("routerLink",_(6,K,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(9,L,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(12,v,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(15,G,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),u("routerLink",_(18,y,t.isDraft()?"/backup-draft":"/backup",t.backupId())),r(3),D(t.finishedLoading()?19:18))},dependencies:[h,E,B,I,M,b,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{T as default};
@@ -0,0 +1 @@
1
+ import{a as D,c}from"./chunk-TKVTCBLW.js";import{A as k,M as g,R as d,W as l,n as I,o as m,r as R,x as O}from"./chunk-GM25ACCR.js";import{a as y,b as T}from"./chunk-7CGTOI24.js";var v=class{_fns;constructor(){this._fns=[]}eject(e){let i=this._fns.indexOf(e);i!==-1&&(this._fns=[...this._fns.slice(0,i),...this._fns.slice(i+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 v}};var A=class extends Error{url;status;statusText;body;request;constructor(e,i,a){super(a),this.name="ApiError",this.url=i.url,this.status=i.status,this.statusText=i.statusText,this.body=i.body,this.request=e}};var h=p=>typeof p=="string",P=p=>h(p)&&p!=="",f=p=>p instanceof Blob,G=p=>p instanceof FormData,L=p=>{try{return btoa(p)}catch{return Buffer.from(p).toString("base64")}},j=p=>{let e=[],i=(r,n)=>{e.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(n))}`)},a=(r,n)=>{n!=null&&(n instanceof Date?i(r,n.toISOString()):Array.isArray(n)?n.forEach(o=>a(r,o)):typeof n=="object"?Object.entries(n).forEach(([o,u])=>a(`${r}[${o}]`,u)):i(r,n))};return Object.entries(p).forEach(([r,n])=>a(r,n)),e.length?`?${e.join("&")}`:""},F=(p,e)=>{let i=p.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",p.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?i(String(e.path[o])):n),r=p.BASE+a;return e.query?r+j(e.query):r},N=p=>{if(p.formData){let e=new FormData,i=(a,r)=>{h(r)||f(r)?e.append(a,r):e.append(a,JSON.stringify(r))};return Object.entries(p.formData).filter(([,a])=>a!=null).forEach(([a,r])=>{Array.isArray(r)?r.forEach(n=>i(a,n)):i(a,r)}),e}},V=async(p,e)=>typeof e=="function"?e(p):e,U=(p,e)=>O({token:V(e,p.TOKEN),username:V(e,p.USERNAME),password:V(e,p.PASSWORD),additionalHeaders:V(e,p.HEADERS)}).pipe(R(({token:i,username:a,password:r,additionalHeaders:n})=>{let o=Object.entries(y(y({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[B,b])=>T(y({},u),{[B]:String(b)}),{});if(P(i)&&(o.Authorization=`Bearer ${i}`),P(a)&&P(r)){let u=L(`${a}:${r}`);o.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:f(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":h(e.body)?o["Content-Type"]="text/plain":G(e.body)||(o["Content-Type"]="application/json")),new D(o)})),M=p=>{if(p.body)return p.mediaType?.includes("application/json")||p.mediaType?.includes("+json")?JSON.stringify(p.body):h(p.body)||f(p.body)||G(p.body)?p.body:JSON.stringify(p.body)},K=(p,e,i,a,r,n,o)=>i.request(e.method,a,{headers:o,body:r??n,withCredentials:p.WITH_CREDENTIALS,observe:"response"}),z=(p,e)=>{if(e){let i=p.headers.get(e);if(h(i))return i}},W=p=>{if(p.status!==204&&p.body!==null)return p.body},$=(p,e)=>{let a=y({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"},p.errors)[e.status];if(a)throw new A(p,e,a);if(!e.ok){let r=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new A(p,e,`Generic Error: status: ${r}; status text: ${n}; body: ${o}`)}},s=(p,e,i)=>{let a=F(p,i),r=N(i),n=M(i);return U(p,i).pipe(g(o=>K(p,i,e,a,n,r,o)),g(async o=>{for(let w of p.interceptors.response._fns)o=await w(o);let u=W(o),B=z(o,i.responseHeader),b=u;return i.responseTransformer&&o.ok&&(b=await i.responseTransformer(u)),{url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:B??b}}),k(o=>o.status?I({url:a,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):m(()=>o)),R(o=>($(i,o),o.body)),k(o=>m(()=>o)))};var S=class p{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},E=class p{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}})}postApiV1AuthIssueForeverToken(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}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}})}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}})}getApiV1LogdataCrashlog(){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}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,pauseTransfers:e.pauseTransfers}})}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}})}postApiV1TaskByTaskidStop(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",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,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(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},C=class p{constructor(e){this.http=e}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},q=class p{constructor(e){this.http=e}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},x=class p{constructor(e){this.http=e}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})},H=class p{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(i){return new(i||p)(l(c))};static \u0275prov=d({token:p,factory:p.\u0275fac,providedIn:"root"})};export{S as a,E as b,C as c,H as d};