@duplicati/ngclient 0.0.231 → 0.0.232

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 (89) hide show
  1. package/{chunk-SycSMD-r.js → chunk-B52v_pjw.js} +1 -1
  2. package/{chunk-CI8lsvKT.js → chunk-B53Wj4F9.js} +1 -1
  3. package/chunk-B73LRsqH.js +1 -0
  4. package/{chunk-PONAC1Ya.js → chunk-B8uF0dom.js} +1 -1
  5. package/{chunk-D3SUPUQT.js → chunk-B9maI7Xa.js} +1 -1
  6. package/{chunk-DfcHtA-G.js → chunk-BBU0vswn.js} +1 -1
  7. package/{chunk-DPpQ_8VM.js → chunk-BBsBaTWO.js} +1 -1
  8. package/{chunk--kVw-BwM.js → chunk-BEhUV7oX.js} +1 -1
  9. package/{chunk-B1FMMTzB.js → chunk-BI14DMeb.js} +1 -1
  10. package/{chunk-DoYGADYB.js → chunk-BO2GlieG.js} +1 -1
  11. package/{chunk-Bfak-Gjv.js → chunk-BS8PXjJJ.js} +1 -1
  12. package/{chunk-C5p3bQwH.js → chunk-BTgf5lfZ.js} +1 -1
  13. package/{chunk-BYJ0fSUP.js → chunk-BVEyeg9y.js} +1 -1
  14. package/{chunk-DlqfMbsZ.js → chunk-BYWmNy-_.js} +1 -1
  15. package/{chunk-d4cdVCUg.js → chunk-BaxM-kGV.js} +1 -1
  16. package/{chunk-DuTbfCdT.js → chunk-Bb6BmVO4.js} +1 -1
  17. package/{chunk-C3KPTLNN.js → chunk-Bja52qI7.js} +1 -1
  18. package/{chunk-5Ay2I6OJ.js → chunk-BkIXk6uR.js} +1 -1
  19. package/{chunk-B6VmpM-T.js → chunk-BkUa7yBI.js} +1 -1
  20. package/chunk-BlTnmRGU.js +1 -0
  21. package/{chunk-B7vxwDBG.js → chunk-Bo1yB-fQ.js} +1 -1
  22. package/{chunk-D3d-eReU.js → chunk-Box6Lckh.js} +1 -1
  23. package/{chunk-CQv4eyEK.js → chunk-BpRWdcC8.js} +1 -1
  24. package/chunk-BqN36tfl.js +1 -0
  25. package/{chunk-Baizh2Dx.js → chunk-Brvxo-yI.js} +1 -1
  26. package/{chunk-BjSSXg5V.js → chunk-Bt_Ie-F3.js} +1 -1
  27. package/chunk-BvGGBIy7.js +1 -0
  28. package/{chunk-CzJ3-6Pu.js → chunk-C4GeR7BF.js} +1 -1
  29. package/{chunk-BFfFD-XE.js → chunk-C80zvTbO.js} +1 -1
  30. package/{chunk-gaP3Sx_C.js → chunk-CAwTsBqQ.js} +1 -1
  31. package/chunk-CGArETYn.js +1 -0
  32. package/{chunk-CwKxis_6.js → chunk-CHzwXmsn.js} +1 -1
  33. package/{chunk-BRJ93eei.js → chunk-CIcBoEH1.js} +1 -1
  34. package/{chunk-Crs56mDy.js → chunk-CKnRcyHZ.js} +1 -1
  35. package/{chunk-DlTsXgG2.js → chunk-CTRzgLM9.js} +2 -2
  36. package/{chunk-DNUCXG8E.js → chunk-CTm37hI-.js} +1 -1
  37. package/{chunk-Bnu5Zyue.js → chunk-CTwO6j97.js} +1 -1
  38. package/{chunk-oTpkLrqH.js → chunk-CUaRQ2FJ.js} +1 -1
  39. package/{chunk-PGDvGDW-.js → chunk-CUuyy9Er.js} +1 -1
  40. package/{chunk-D5031IDL.js → chunk-CVQPUpDQ.js} +1 -1
  41. package/{chunk-JMkz2RrF.js → chunk-CX26gEKv.js} +1 -1
  42. package/{chunk-DAM-4k69.js → chunk-CZoVeRAG.js} +1 -1
  43. package/{chunk-7qu0Yols.js → chunk-CartdZy-.js} +1 -1
  44. package/{chunk-CxjTj8X0.js → chunk-Cg09iQR5.js} +1 -1
  45. package/{chunk-CDEvMQA2.js → chunk-CgyaUJSI.js} +1 -1
  46. package/{chunk-CmexLvf7.js → chunk-Cjb79u3p.js} +1 -1
  47. package/{chunk-CTwvkMrj.js → chunk-CkrxdjhU.js} +1 -1
  48. package/chunk-CtEMAj2d.js +2 -0
  49. package/{chunk-U0VOUPLl.js → chunk-Cu2bh6aQ.js} +1 -1
  50. package/{chunk-BlfsmSZO.js → chunk-Cu4siB3B.js} +3 -3
  51. package/{chunk-Bcxzhjj8.js → chunk-CwKy8pxa.js} +1 -1
  52. package/{chunk-Cng2PWKw.js → chunk-Cz0KuBHB.js} +1 -1
  53. package/{chunk-DA5X-TzJ.js → chunk-D5tms-6w.js} +1 -1
  54. package/{chunk-BAVJD-p4.js → chunk-DI7suso2.js} +1 -1
  55. package/{chunk-Bgx4dtaL.js → chunk-DJJ8GbYi.js} +1 -1
  56. package/{chunk-C6beMvkJ.js → chunk-DKZlKdfB.js} +1 -1
  57. package/chunk-DTu0ZYnR.js +1 -0
  58. package/{chunk-D7AP6g7S.js → chunk-DUYvFN8m.js} +1 -1
  59. package/{chunk-DH6L3nQP.js → chunk-DY3nK3tu.js} +1 -1
  60. package/{chunk-B_iekvt6.js → chunk-DYnVzNxt.js} +1 -1
  61. package/{chunk-C2H72Zk8.js → chunk-DZm4l28A.js} +1 -1
  62. package/{chunk-BhGD1_v8.js → chunk-Da_-7L7P.js} +1 -1
  63. package/{chunk-DKacf9Tj.js → chunk-DmDqcC4A.js} +1 -1
  64. package/{chunk-CP3edE1P.js → chunk-Dn8nZWLd.js} +1 -1
  65. package/{chunk-EwTTC1EW.js → chunk-DoQHDPZg.js} +1 -1
  66. package/{chunk-D2aWqPl_.js → chunk-DqIU7ViF.js} +1 -1
  67. package/{chunk-Bj1ToKwz.js → chunk-Dum38U6w.js} +1 -1
  68. package/{chunk-C1BwGQgo.js → chunk-DvyGZpE4.js} +1 -1
  69. package/{chunk-DuHXCtrV.js → chunk-DzmZd524.js} +1 -1
  70. package/{chunk-CqwyTVd3.js → chunk-Rp7-yjlz.js} +1 -1
  71. package/{chunk-RqvNv7T_.js → chunk-Saq2s7Ep.js} +1 -1
  72. package/{chunk-dCFVYHva.js → chunk-aOMoAKYY.js} +1 -1
  73. package/{chunk-DH6iiZWc.js → chunk-ihUnHtR7.js} +1 -1
  74. package/{chunk-BhPCHFyT.js → chunk-ivwxSoND.js} +1 -1
  75. package/{chunk-BC2-YuwH.js → chunk-kU0H989B.js} +2 -2
  76. package/{chunk-BIAFFPb6.js → chunk-mby7fvmj.js} +1 -1
  77. package/{chunk-DKwqdnLJ.js → chunk-umW-K0Ca.js} +1 -1
  78. package/{chunk-mnaJWx8D.js → chunk-vPGrgL1U.js} +1 -1
  79. package/{chunk-D2MSuPzM.js → chunk-vnqcxg-9.js} +1 -1
  80. package/index.html +1 -1
  81. package/{main-QLXVXD6E.js → main-VVQP2YE7.js} +4 -4
  82. package/package.json +1 -1
  83. package/chunk-6bHATzM2.js +0 -1
  84. package/chunk-BHERv_y8.js +0 -1
  85. package/chunk-CAgfvBGI.js +0 -2
  86. package/chunk-D9O-afXN.js +0 -1
  87. package/chunk-Da2vs6ff.js +0 -1
  88. package/chunk-Z5fN6CGR.js +0 -1
  89. package/chunk-tpJJunhQ.js +0 -1
@@ -1,4 +1,4 @@
1
- import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import {O as O$1}from'./chunk-dCFVYHva.js';import {m}from'./chunk--kVw-BwM.js';import {J}from'./chunk-D7AP6g7S.js';import {N as Nt$1}from'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import {c}from'./chunk-CI8lsvKT.js';import {D}from'./chunk-C5p3bQwH.js';import {bj as _s,bk as j,bl as ft,bm as go,T,a6 as be,m as m$1,I,bn as f,G as Ge,N as Nt,z as za,H as qu,bo as xt,at as h,h as hw,v,d as N,u as ue,j as vg,Q as Qi,n as nC,$ as $l,f as aT,V as Vg,s as CD,L as Lg,F as Fg,p as cm,bg as ag,C as CE,i as cT,Y as Yg,A as yg,a3 as KC,y as _D,au as jg,av as rC,x as am,o as oC,U as UC,ab as C$1,E as D1,b3 as cg,b4 as oT,b5 as iT,W as Wg,K as fC,ae as eo,b as I1,af as E1,b9 as ce,M as aC,P as Ul,X as cC,S as Wl,w as jC,an as Hg,R as Ig,aB as im,ag as Zg,g as NC,k as iC,J as om,l as vT,r as kd,O as Od,ar as Qp,a9 as GC,aa as Ql}from'./main-QLXVXD6E.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe}from'./chunk-D3SUPUQT.js';import {B as Bn$1,Z as Ze,o as on$1,R as Rn$1,J as Jt,G as Gn$1}from'./chunk-DoYGADYB.js';import {a as at}from'./chunk-Crs56mDy.js';import {C}from'./chunk-Bcxzhjj8.js';import {O}from'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var sn=[[["label"]],[["input","type","range"]]],an=["label","input[type=range]"],tn=(()=>{class i{constructor(){this.hasInput=Ge(false),this.#n=T(eo),this.#i=null,this.#e=null,this.#t=0,this.unit=I1(""),this.value=E1(this.#t),this.inputState=Ge({min:0,max:100,step:1}),this.color=I1(null),this.variant=I1(null),this.size=I1(null),this.sharp=I1(void 0),this.alwaysShow=I1(void 0),this.hostClasses=ce("rangeSlider",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,alwaysShow:this.alwaysShow}),this.valuePercentage=Nt(()=>{let{min:e,max:n}=this.inputState(),s=this.value()??e;if(isNaN(s))return 0;let l=n-e;if(l===0)return 0;let E=(s-e)/l*100;return Math.max(0,Math.min(100,E))}),this.trackFilledPercentage=Nt(()=>this.valuePercentage()),this.thumbPositionPercentage=Nt(()=>this.valuePercentage()),this.syncModelToInputEffect=za(()=>{let e=this.value();if(this.#e){let n=parseFloat(this.#e.value);(isNaN(n)||String(n)!==String(e))&&(this.#e.value=String(e));}});}#n;#i;#e;#t;ngAfterViewInit(){this.#e=this.#n.nativeElement.querySelector('input[type="range"]'),this.#e?(this.hasInput.set(true),this.#a(this.#e),this.#e.oninput=()=>{this.setNewInputValue(this.#e.value);},this.#e.addEventListener("inputValueChanged",e=>{this.setNewInputValue(e.detail.value);}),queueMicrotask(()=>this.#o(true)),this.#r()):console.error('ShipRangeSlider: No <input type="range"> element found projected inside.');}setNewInputValue(e){let n=parseFloat(e??"0");if(!isNaN(n)){let{min:s,max:l}=this.inputState();this.value.set(Math.max(s,Math.min(l,n)));}}trackEvent(e){if(!this.#e||this.#e.readOnly||this.#e.disabled){e.preventDefault(),e.stopPropagation();return}if(e.target===this.#e||e.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let s=e.currentTarget.getBoundingClientRect(),l=e.clientX-s.left,E=s.width,{min:S,max:m,step:f}=this.inputState(),W=m-S;if(E>0&&W!==0&&f>0){let J=(l/E*W+S-S)/f,z=S+Math.round(J)*f,Q=this.#s(f);z=parseFloat(z.toFixed(Q));let Y=Math.max(S,Math.min(m,z));this.value.set(Y);}}#o(e=false){if(!this.#e)return;let n=parseFloat(this.#e.min??"0")??0,s=parseFloat(this.#e.max??"100")??100,l=this.#e.step,E=1;if(l&&l.toLowerCase()!=="any"){let m=parseFloat(l);!isNaN(m)&&m>0&&(E=m);}this.inputState.set({min:n,max:s,step:E});let S=parseFloat(this.#e.value??String(n))??n;if(e&&this.value()!==this.#t){let m=this.value(),f=Math.max(n,Math.min(s,m));S!==f&&(this.#e.value=String(f)),m!==f&&this.value.set(f);}else {let m=Math.max(n,Math.min(s,S));this.value()!==m&&this.value.set(m);}}#r(){if(!this.#e||typeof MutationObserver>"u")return;let e=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(n=>{let s=false;for(let l of n)if(l.type==="attributes"&&e.includes(l.attributeName??"")){s=true;break}s&&this.#o(false);}),this.#i.observe(this.#e,{attributes:true,attributeFilter:e});}#s(e){if(isNaN(e)||Math.floor(e)===e)return 0;let s=e.toString().split(".")[1];return s?s.length:0}#a(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(n){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,n);let l=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:n}});return this.dispatchEvent(l),n}});}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#e&&(this.#e.oninput=null);}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-range-slider"]],hostVars:6,hostBindings:function(n,s){n&2&&(NC(s.hostClasses()),Yg("sh-range-slider",true)("has-input",s.hasInput()));},inputs:{unit:[1,"unit"],value:[1,"value"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],alwaysShow:[1,"alwaysShow"]},outputs:{value:"valueChange"},ngContentSelectors:an,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(n,s){n&1&&(aC(sn),Ul(0,"div",0),cC(1),Wl(),Ul(2,"div",1)(3,"div",2),jC(4),Wl(),Ul(5,"div",3),Hg("click",function(E){return s.trackEvent(E)}),cC(6,1),Ul(7,"div",4),Ig(8,"div",5),Wl(),Ul(9,"div",6)(10,"div",7)(11,"div",8),jC(12),Wl()()()(),Ul(13,"div",9),jC(14),Wl()()),n&2&&(CE(4),im("",s.inputState().min,"",s.unit()),CE(4),Zg("width",s.trackFilledPercentage(),"%"),CE(),Zg("left",s.thumbPositionPercentage(),"%"),CE(3),im("",s.value(),"",s.unit()),CE(2),im("",s.inputState().max,"",s.unit()));},styles:[`sh-range-slider{--rs-h: 2.5rem;--rs-f: var(--paragraph-30);--rs-unit-g: .75rem;--rs-unit-c: var(--base-8);--rst: var(--base-3);--rst-bc: var(--base-1);--rst-bg: var(--base-4);--rst-h: .5rem;--rst-s: calc(var(--shape-2) / 2);--rs-thumb-c: var(--base-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--base-4);--rs-thumb-arrow: var(--rs-thumb-value-bg);--rs-thumb-value-c: var(--base-8);--rs-thumb-si: 1rem;--rs-thumb-w: var(--rs-thumb-si);--rs-thumb-s: calc(var(--rs-thumb-w) / 2);display:flex;flex-direction:column;width:100%;font:var(--rs-f)}sh-range-slider.sharp{--rst-s: .125rem;--rs-thumb-s: .125rem;--rs-thumb-bc: transparent !important}sh-range-slider .label{display:flex;align-items:center;gap:.5rem;padding-bottom:.25rem}sh-range-slider .label>label{display:flex;align-items:center;gap:.25rem}sh-range-slider .label sh-icon{color:var(--grey-500);font-size:1rem}sh-range-slider .label:empty{display:none}sh-range-slider[readonly]:not([readonly=false]),sh-range-slider:has(input[type=range][readonly]:not([readonly=false])),sh-range-slider[disabled]:not([disabled=false]),sh-range-slider:has(input[type=range][disabled]:not([disabled=false])){opacity:.4;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-range-slider:has(input[type=range][readonly]) .thumb .value-indicator,sh-range-slider.always-show .thumb .value-indicator{opacity:1}sh-range-slider input[type=range]{appearance:none;width:100%;height:100%;position:absolute;inset:0;opacity:0;margin:0;z-index:1000}sh-range-slider .input-wrap{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--rs-h);position:relative;gap:var(--rs-unit-g)}sh-range-slider .thumb-wrap{position:absolute;top:0}sh-range-slider .thumb{position:relative;margin-top:calc(-1 * var(--rs-thumb-si) / 4);width:var(--rs-thumb-w);height:var(--rs-thumb-si);border-radius:var(--rs-thumb-s);background-color:var(--rs-thumb-c);border:1px solid var(--rs-thumb-bc);box-shadow:var(--box-shadow-20);transform:translate(-50%)}sh-range-slider .track-wrap{position:relative;width:100%;height:var(--rst-h)}sh-range-slider .track{position:relative;width:100%;height:var(--rst-h);border-radius:var(--rst-s);background-color:var(--rst);border:1px solid var(--rst-bc);overflow:hidden}sh-range-slider .track-filled{position:absolute;top:0;left:0;bottom:0;background:var(--rst-bg);width:0}sh-range-slider .min-indicator,sh-range-slider .max-indicator{white-space:nowrap;color:var(--rs-unit-c)}sh-range-slider input[type=range]:hover~.thumb-wrap .value-indicator,sh-range-slider input[type=range]:focus~.thumb-wrap .value-indicator{opacity:1}sh-range-slider .value-indicator{position:absolute;top:-1.875rem;height:1.5rem;min-width:1.5rem;border-radius:var(--shape-2);left:50%;margin:auto;transform:translate(-50%);padding:.25rem .5rem;background:var(--rs-thumb-value-bg);color:var(--rs-thumb-value-c);white-space:nowrap;opacity:0;transition:opacity 125ms linear;-webkit-user-select:none;user-select:none;pointer-events:none}sh-range-slider .value-indicator:after{content:"";border-top:.3125rem solid var(--rs-thumb-arrow);border-left:.3125rem solid transparent;border-right:.3125rem solid transparent;position:absolute;top:calc(100% - 1px);left:50%;margin-left:-.3125rem}sh-range-slider.primary{--rst-bg: var(--primary-8);--rs-thumb-arrow: var(--primary-8);--rs-thumb-value-bg: var(--primary-8);--rs-thumb-value-c: #fff}sh-range-slider.accent{--rst-bg: var(--accent-8);--rs-thumb-arrow: var(--accent-8);--rs-thumb-value-bg: var(--accent-8);--rs-thumb-value-c: #fff}sh-range-slider.warn{--rst-bg: var(--warn-8);--rs-thumb-arrow: var(--warn-8);--rs-thumb-value-bg: var(--warn-8);--rs-thumb-value-c: #fff}sh-range-slider.error{--rst-bg: var(--error-8);--rs-thumb-arrow: var(--error-8);--rs-thumb-value-bg: var(--error-8);--rs-thumb-value-c: #fff}sh-range-slider.success{--rst-bg: var(--success-8);--rs-thumb-arrow: var(--success-8);--rs-thumb-value-bg: var(--success-8);--rs-thumb-value-c: #fff}sh-range-slider.simple{--rst-h: 1rem;--rst-s: var(--shape-2)}sh-range-slider.simple .thumb{width:1px;height:var(--rst-h);margin-top:0;border-radius:0;border:none;box-shadow:none}sh-range-slider.simple.primary{--rst-bg: var(--primary-8);--rst: var(--primary-2);--rs-thumb-c: var(--primary-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--primary-8);--rs-thumb-value-c: var(--primary-2)}sh-range-slider.simple.accent{--rst-bg: var(--accent-8);--rst: var(--accent-2);--rs-thumb-c: var(--accent-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--accent-8);--rs-thumb-value-c: var(--accent-2)}sh-range-slider.simple.warn{--rst-bg: var(--warn-8);--rst: var(--warn-2);--rs-thumb-c: var(--warn-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--warn-8);--rs-thumb-value-c: var(--warn-2)}sh-range-slider.simple.error{--rst-bg: var(--error-8);--rst: var(--error-2);--rs-thumb-c: var(--error-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--error-8);--rs-thumb-value-c: var(--error-2)}sh-range-slider.simple.success{--rst-bg: var(--success-8);--rst: var(--success-2);--rs-thumb-c: var(--success-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--success-8);--rs-thumb-value-c: var(--success-2)}sh-range-slider.outlined{--rst: var(--base-1);--rst-bc: var(--base-4);--rs-thumb-c: var(--base-6);--rs-thumb-bc: var(--base-1);--rs-thumb-arrow: var(--base-4)}sh-range-slider.outlined.primary,sh-range-slider.outlined.accent,sh-range-slider.outlined.warn,sh-range-slider.outlined.error,sh-range-slider.outlined.success{--rst: var(--base-2)}sh-range-slider.outlined.primary{--rst-bg: var(--primary-4);--rst-bc: var(--primary-8);--rs-thumb-c: var(--primary-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--primary-4);--rs-thumb-value-c: var(--primary-8);--rs-thumb-arrow: var(--primary-4)}sh-range-slider.outlined.accent{--rs-thumb-c: var(--accent-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--accent-4);--rs-thumb-value-c: var(--accent-8);--rs-thumb-arrow: var(--accent-4)}sh-range-slider.outlined.warn{--rs-thumb-c: var(--warn-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--warn-4);--rs-thumb-value-c: var(--warn-8);--rs-thumb-arrow: var(--warn-4)}sh-range-slider.outlined.error{--rs-thumb-c: var(--error-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--error-4);--rs-thumb-value-c: var(--error-8);--rs-thumb-arrow: var(--error-4)}sh-range-slider.outlined.success{--rs-thumb-c: var(--success-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--success-4);--rs-thumb-value-c: var(--success-8);--rs-thumb-arrow: var(--success-4)}sh-range-slider.flat{--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4)}sh-range-slider.flat.primary,sh-range-slider.flat.accent,sh-range-slider.flat.warn,sh-range-slider.flat.error,sh-range-slider.flat.success{--rst: var(--base-3);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4);--rs-thumb-value-bg: var(--base-8);--rs-thumb-value-c: #fff}sh-range-slider.flat.primary{--rst-bg: var(--primary-8);--rs-thumb-value-bg: var(--primary-8)}sh-range-slider.flat.accent{--rst-bg: var(--accent-8);--rs-thumb-value-bg: var(--accent-8)}sh-range-slider.flat.warn{--rst-bg: var(--warn-8);--rs-thumb-value-bg: var(--warn-8)}sh-range-slider.flat.error{--rst-bg: var(--error-8);--rs-thumb-value-bg: var(--error-8)}sh-range-slider.flat.success{--rst-bg: var(--success-8);--rs-thumb-value-bg: var(--success-8)}sh-range-slider.raised{--rst-bg: var(--base-g2);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4)}sh-range-slider.raised.primary,sh-range-slider.raised.accent,sh-range-slider.raised.warn,sh-range-slider.raised.error,sh-range-slider.raised.success{--rst: var(--base-3);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4);--rs-thumb-value-bg: var(--base-g6);--rs-thumb-value-c: #fff}sh-range-slider.raised.primary{--rst-bg: var(--primary-g2);--rs-thumb-arrow: var(--primary-8);--rs-thumb-value-bg: var(--primary-g3)}sh-range-slider.raised.accent{--rst-bg: var(--accent-g2);--rs-thumb-arrow: var(--accent-8);--rs-thumb-value-bg: var(--accent-8)}sh-range-slider.raised.warn{--rst-bg: var(--warn-g2);--rs-thumb-arrow: var(--warn-8);--rs-thumb-value-bg: var(--warn-8)}sh-range-slider.raised.error{--rst-bg: var(--error-g2);--rs-thumb-arrow: var(--error-8);--rs-thumb-value-bg: var(--error-8)}sh-range-slider.raised.success{--rst-bg: var(--success-g2);--rs-thumb-arrow: var(--success-8);--rs-thumb-value-bg: var(--success-8)}
2
- `],encapsulation:2});}}return i})();var rn=["formRef"],ln=()=>[import('./chunk-DAM-4k69.js').then(i=>i.OptionsListComponent)];function _n(i,t){i&1&&(Qi(0,"sh-alert",3),nC(1,1),$l());}function cn(i,t){if(i&1){let e=vT();Qi(0,"app-options-list",5),cm("optionsChange",function(s){kd(e);let l=iC();return UC(l.settings,s)||(l.settings=s),Od(s)}),$l();}if(i&2){let e=iC();am("options",e.settings),yg("hasFreeTextSettings",true);}}var K=class i{#n=T(O);#i=T(C$1);formRef=D1.required("formRef");settings=Ge([]);isSubmitting=Ge(false);isLoadingOptions=Ge(true);saved=Ge(false);lastRecievedServerSettings=Ge({});serverSettingsEffect=za(()=>{let t=this.#n.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(true);let e=Object.entries(t);e.forEach(([n,s],l)=>{if(n.startsWith("--")){let E=n.substring(2);this.settings.update(S=>(S.some(m=>m.Name===E||m.Name===n)||S.push({Name:n,Value:s}),S));}l===e.length-1&&this.isLoadingOptions.set(false);});});submit(){this.isSubmitting.set(true);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(S=>S.Name?.startsWith("--")?S.Name:`--${S.Name}`),l=Object.keys(e).filter(S=>S.startsWith("--")).filter(S=>!n.includes(S)),E=t.reduce((S,m)=>{let f=m.Name?.startsWith("--")?m.Name:`--${m.Name}`;return S[f]=m.Value,S},{});l.forEach(S=>{E[S]=null;}),this.#i.patchApiV1Serversettings({requestBody:E}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.#n.refreshServerSettings(),this.saved.set(true),setTimeout(()=>{this.saved.set(false);},3e3);}});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&Wg(n.formRef,rn,5),e&2&&fC();},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(Qi(0,"div",2),aT(1,_n,2,0,"sh-alert",3),Qi(2,"button",4),Vg("click",function(){return n.submit()}),Lg(3,0),vg(4,"sh-icon"),Fg(),$l()(),cg(5,cn,1,2),oT(6,5,ln)),e&2&&(CE(),cT(n.saved()?1:-1),CE(),Yg("loading",n.isSubmitting()),CE(4),iT(!n.isLoadingOptions()));},dependencies:[Gn$1,v,N,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"]})};function Tn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field",12)(1,"input",13),cm("ngModelChange",function(s){kd(e);let l=iC(2);return UC(l.registerUrl,s)||(l.registerUrl=s),Od(s)}),$l(),CD(),$l(),Qi(2,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.register())}),nC(3,0),$l();}if(i&2){let e=iC(2);CE(),am("ngModel",e.registerUrl),_D();}}function Sn(i,t){if(i&1&&(Qi(0,"div",9)(1,"label"),nC(2,1),$l(),Qi(3,"a",15),jC(4),$l()()),i&2){let e=iC(2);CE(3),yg("href",GC(e.claimUrl()),Qp),CE(),om(e.claimUrl());}}function un(i,t){i&1&&(Qi(0,"div",9)(1,"label"),nC(2,2),$l()());}function gn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.cancel())}),nC(1,3),$l();}}function pn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.disable())}),nC(1,4),$l();}}function Cn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.enable())}),nC(1,5),$l(),Qi(2,"button",16),Vg("click",function(){kd(e);let s=iC(2);return Od(s.delete())}),nC(3,6),$l();}}function mn(i,t){i&1&&(Lg(0,7,1),vg(1,"sh-icon"),Fg());}function En(i,t){i&1&&(Lg(0,7,2),vg(1,"sh-icon"),Fg());}function Nn(i,t){if(i&1){let e=vT();Qi(0,"sh-chip",17),Vg("click",function(){kd(e);let s=iC(2);return Od(s.copyReportingUrl())}),Lg(1,7),aT(2,mn,2,0,"sh-icon")(3,En,2,0,"sh-icon"),Fg(),$l();}if(i&2){let e=iC(2);CE(2),cT(e.copiedReportingUrl()===true?2:3);}}function hn(i,t){if(i&1&&(Qi(0,"div",8),aT(1,Tn,4,1),aT(2,Sn,5,3,"div",9),aT(3,un,3,0,"div",9),aT(4,gn,2,0,"button",10),aT(5,pn,2,0,"button",10),aT(6,Cn,4,0),aT(7,Nn,4,1,"sh-chip",11),$l()),i&2){let e=iC();CE(),cT(e.state()==="inactive"?1:-1),CE(),cT(e.state()==="registered"?2:-1),CE(),cT(e.state()==="registering"?3:-1),CE(),cT(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),CE(),cT(e.state()==="connected"||e.state()==="connecting"?5:-1),CE(),cT(e.state()==="disabled"?6:-1),CE(),cT(e.additionalReportingUrl()!==""&&e.state()!=="registered"?7:-1);}}var Te=class i{#n=T(C);#i=T(O);state=this.#n.state;claimUrl=this.#n.claimUrl;registerUrl=this.#n.registerUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return t&&t["additional-report-url"]||""});copiedReportingUrl=Ge(false);ngOnInit(){this.#n.refreshRemoteControlStatus();}cancel(){this.#n.cancelRemoteRegistration();}register(){this.#n.beginRemoteRegistration();}disable(){this.#n.disableRemoteControl();}enable(){this.#n.enableRemoteControl();}delete(){this.#n.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let s;s=$localize`Cancel registration`;let l;l=$localize`Disable console connection`;let E;E=$localize`Enable console connection`;let S;S=$localize` Delete console connection setup `;let m;return m=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=oC(m),[t,e,n,s,l,E,S,m,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&aT(0,hn,8,7,"div",8),e&2&&cT(n.state()!=="unknown"?0:-1);},dependencies:[Bn$1,Ze,Rn$1,Jt,Fe,v,D,N],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"]})};var Se=()=>({standalone:true});function fn(i,t){i&1&&(Qi(0,"sh-chip",90),nC(1,33),$l());}function In(i,t){if(i&1&&(Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,32),$l(),Qi(4,"p"),jC(5),$l()(),Qi(6,"div",68),aT(7,fn,2,0,"sh-chip",90),$l()()),i&2){let e=iC();CE(5),om(e.remoteControlStatus()),CE(2),cT(e.additionalReportingUrl()!==""&&e.remoteControlState()!=="registered"?7:-1);}}function Mn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,37),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.remoteControlTooltip());}}function Pn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,38),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.remoteControlTooltip());}}function On(i,t){if(i&1&&(Qi(0,"label"),Lg(1,39),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.connectionStatusIndicatorTooltip());}}function bn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,40),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.connectionStatusIndicatorTooltip());}}function vn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,35),$l(),Qi(4,"p"),nC(5,36),$l()(),Qi(6,"div",91)(7,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.toggleConsoleControl(s))}),aT(8,Mn,3,1,"label")(9,Pn,3,1,"label"),$l(),Qi(10,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.saveHideConsoleConnectionStatus(s))}),aT(11,On,3,1,"label")(12,bn,3,1,"label"),$l()()();}if(i&2){let e=iC(2);CE(7),yg("checked",!e.consoleControlDisabled()),CE(),cT(e.consoleControlDisabled()?8:9),CE(2),yg("checked",!e.hideConsoleConnectionStatus()),CE(),cT(e.hideConsoleConnectionStatus()?11:12);}}function Rn(i,t){i&1&&(Qi(0,"label"),nC(1,43),$l());}function Gn(i,t){i&1&&(Qi(0,"label"),nC(1,44),$l());}function yn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,41),$l(),Qi(4,"p"),nC(5,42),$l()(),Qi(6,"div",68)(7,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.saveHideConsoleConnectionStatus(s))}),aT(8,Rn,2,0,"label")(9,Gn,2,0,"label"),$l()()();}if(i&2){let e=iC(2);CE(7),yg("checked",!e.hideConsoleConnectionStatus()),CE(),cT(e.hideConsoleConnectionStatus()?8:9);}}function Fn(i,t){if(i&1&&(Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,34),$l(),Qi(4,"p"),jC(5),$l()(),Qi(6,"div",68),vg(7,"app-remote-control"),$l()(),aT(8,vn,13,4,"section")(9,yn,10,2,"section")),i&2){let e=iC();CE(5),om(e.remoteControlStatus()),CE(3),cT(e.remoteControlState()!="inactive"?8:9);}}function $n(i,t){i&1&&(Qi(0,"sh-icon",97),jC(1,"check"),$l());}function An(i,t){i&1&&(Qi(0,"sh-icon",98),jC(1,"prohibit"),$l());}function Ln(i,t){if(i&1){let e=vT();Qi(0,"button",102),Vg("click",function(){kd(e);let s=iC(2);return Od(s.updatePassphrase())}),nC(1,48),$l();}if(i&2){let e=iC(2);Yg("loading",e.isUpdating());}}function wn(i,t){if(i&1){let e=vT();Qi(0,"button",103),Vg("click",function(){kd(e);let s=iC(2);return Od(s.updatePassphrase())}),nC(1,49),$l();}if(i&2){let e=iC(2);Yg("loading",e.isUpdating()),yg("disabled",true);}}function Dn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field")(1,"label",93),nC(2,45),$l(),Qi(3,"input",94),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.passphrase,s)||(l.passphrase=s),Od(s)}),$l(),CD(),$l(),Qi(4,"sh-form-field")(5,"label",95),nC(6,46),$l(),Qi(7,"input",96),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.repeatPassphrase,s)||(l.repeatPassphrase=s),Od(s)}),$l(),CD(),aT(8,$n,2,0,"sh-icon",97)(9,An,2,0,"sh-icon",98),$l(),Qi(10,"div",73)(11,"button",99),Vg("click",function(){kd(e);let s=iC();return Od(s.cancelPasswordChange())}),nC(12,47),$l(),aT(13,Ln,2,2,"button",100)(14,wn,2,3,"button",101),$l();}if(i&2){let e=iC();CE(3),am("ngModel",e.passphrase),_D(),CE(4),yg("disabled",e.passphrase().length===0),am("ngModel",e.repeatPassphrase),_D(),CE(),cT(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),CE(3),Yg("loading",e.isUpdating()),CE(2),cT(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14);}}function xn(i,t){i&1&&(Qi(0,"sh-icon",104),jC(1,"check"),$l());}function kn(i,t){if(i&1){let e=vT();Qi(0,"div",73)(1,"button",99),Vg("click",function(){kd(e);let s=iC();return Od(s.openPassphraseForm())}),nC(2,50),$l(),aT(3,xn,2,0,"sh-icon",104),$l();}if(i&2){let e=iC();CE(3),cT(e.passwordUpdated()?3:-1);}}function Xn(i,t){i&1&&(Lg(0,11,1),vg(1,"span"),Fg());}function Jn(i,t){i&1&&(Lg(0,11,2),vg(1,"span"),Fg());}function zn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field")(1,"label",105),nC(2,51),$l(),Qi(3,"textarea",106),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.allowedHostnames,s)||(l.allowedHostnames=s),Od(s)}),$l(),CD(),$l(),Qi(4,"sh-alert",107),nC(5,52),$l(),Qi(6,"button",102),Vg("click",function(){kd(e);let s=iC();return Od(s.updateAllowedHostnames())}),nC(7,53),$l();}if(i&2){let e=iC();CE(3),am("ngModel",e.allowedHostnames),_D(),CE(3),Yg("loading",e.updatingAllowedHosts());}}function Vn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,54),$l(),Qi(4,"p"),nC(5,55),$l()(),Qi(6,"div",68)(7,"sh-select",108)(8,"input",75),Vg("ngModelChange",function(s){kd(e);let l=iC();return Od(l.updatePowerMode(s))}),$l(),CD(),$l()()();}if(i&2){let e=iC();CE(7),yg("options",e.powerModeOptions())("isClearable",false),CE(),yg("ngModel",e.powerModeCtrl())("ngModelOptions",KC(4,Se)),_D();}}function Un(i,t){if(i&1&&(Qi(0,"p"),nC(1,56),$l()),i&2){let e=iC();CE(),jg(e.sysinfo()?.ServerVersionName),rC(1);}}function Bn(i,t){i&1&&vg(0,"sh-progress-bar",80);}function Hn(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.label," ");}}function Wn(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.label," ");}}function jn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,57),$l(),Qi(4,"p")(5,"span"),nC(6,58),$l(),Qi(7,"a",109),nC(8,59),$l(),vg(9,"br")(10,"br"),Qi(11,"span"),nC(12,60),$l()()(),Qi(13,"div",68)(14,"sh-select",110)(15,"input",75),Vg("ngModelChange",function(s){kd(e);let l=iC();return Od(l.updateUsageStatistics(s))}),$l(),CD(),ag(16,Wn,1,1,"ng-template"),$l()()();}if(i&2){let e=iC();CE(14),yg("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),CE(),yg("ngModel",e.usageStatistics())("ngModelOptions",KC(4,Se)),_D();}}function qn(i,t){i&1&&(Qi(0,"label"),nC(1,63),$l());}function Kn(i,t){i&1&&(Qi(0,"label"),nC(1,64),$l());}function Qn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,61),$l(),Qi(4,"p"),nC(5,62),$l()(),Qi(6,"div",91)(7,"p"),jC(8,"Backup process isolation"),$l(),Qi(9,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC();return Od(l.saveControllerIpcState(s))}),aT(10,qn,2,0,"label")(11,Kn,2,0,"label"),$l()()();}if(i&2){let e=iC();CE(9),yg("checked",e.isControllerIpcEnabled()),CE(),cT(e.isControllerIpcEnabled()?10:11);}}function Yn(i,t,e){let[n]=_s(i,e?.equal),s=n,l=n[j],E;return s.set=S=>{clearTimeout(E),E=setTimeout(()=>{ft(l,S);},t);},s.update=S=>{clearTimeout(E),E=setTimeout(()=>{go(l,S);},t);},s}var Zn=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],on=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],fe=class i{#n=T(be);#i=T(m);#e=T(m$1);#t=T(O);#o=T(C);#r=T(I);#s=T(f);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#e.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=Ge("list");previousLang=this.#a;langCtrl=Ge(this.#a);powerModeCtrl=Ge("");usageStatistics=Ge("");updatingUsageStatistics=Ge(false);remoteControlStatus=this.#o.statusMessage;remoteControlState=this.#o.state;updatingChannel=Ge(false);updateChannel=Ge("");isUsingRelay=this.#r.relayIsEnabled;defaultClient=Ge(this.#d());hasIpcController=this.#e.hasIpcController;usageStatisticsDisabled=Nt(()=>(this.#e.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");additionalReportingUrl=Nt(()=>{let t=this.#t.serverSettings();return t&&t["additional-report-url"]||""});#T=za(()=>{let t=this.#e.systemInfo()?.DefaultUsageReportLevel??"",e=on;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e);});remoteControlTooltip=Ge($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
3
- registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=Ge($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(qu(()=>this.updatingChannel.set(false))).subscribe();}allowRemoteAccess=Ge(false);allowedHostnames=Ge("");loadedAllowedHostnames=Ge("");updatingRemoteAccess=Ge(false);updatingAllowedHosts=Ge(false);updatingConsoleControl=Ge(false);consoleControlDisabled=Ge(false);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;isControllerIpcEnabled=this.#t.isControllerIpcEnabled;updateRemoteAccess(t){this.allowRemoteAccess.set(t),this.#t.setRemoteAccessInterface(t?"any":"loopback").pipe(qu(()=>this.updatingRemoteAccess.set(false))).subscribe();}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(true),this.#t.setRemoteAccessAllowedHostnames(t).pipe(qu(()=>this.updatingAllowedHosts.set(false))).subscribe();}toggleConsoleControl(t){this.consoleControlDisabled.set(!t),this.#t.setDisableConsoleControl(!t).pipe(qu(()=>this.updatingConsoleControl.set(false))).subscribe();}updatingDisableTrayIconLogin=Ge(false);disableTrayIconLogin=Ge(false);saveDisableTrayIconLogin(t){let e=t;this.updatingDisableTrayIconLogin.set(true),this.#t.setDisableTrayIconLogin(e).pipe(qu(()=>this.updatingDisableTrayIconLogin.set(false))).subscribe();}updatingHideConsoleConnectionStatus=Ge(false);saveHideConsoleConnectionStatus(t){this.updatingHideConsoleConnectionStatus.set(true),this.#t.setHideConsoleConnectionStatus(!t).pipe(qu(()=>this.updatingHideConsoleConnectionStatus.set(false))).subscribe();}updatingControllerIpcState=Ge(false);saveControllerIpcState(t){this.updatingControllerIpcState.set(true),this.#t.setControllerIpcState(!!t).pipe(qu(()=>this.updatingControllerIpcState.set(false))).subscribe();}showPassphraseForm=Ge(false);isUpdating=Ge(false);passphrase=Ge("");repeatPassphrase=Ge("");passwordUpdated=Ge(false);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(true),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(qu(()=>this.isUpdating.set(false))).subscribe({next:()=>{this.showPassphraseForm.set(false),this.passwordUpdated.set(true),setTimeout(()=>{this.passwordUpdated.set(false);},3e3);}}));}openPassphraseForm(){this.showPassphraseForm.set(true);}cancelPasswordChange(){this.showPassphraseForm.set(false);}languageOptions=Ge([...xt].sort((t,e)=>t.label.localeCompare(e.label)));powerModeOptions=Nt(()=>{let t=this.#e.systemInfo();return !t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=Ge(on);timeTypeOptions=Ge(Zn);timeType=Ge("none");timeValue=Yn(0,300);timeRange=Nt(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#s.setItem("locale",t),window.location.reload());}updateTimeValue(t){this.timeValue.set(t),this.#_();}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_();}#l;#_(){this.#l&&clearTimeout(this.#l),this.#l=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),n=e==="none"||t===0?"":`${t}${e}`;n!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(n).subscribe();},1e3);}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(true),this.#t.setUsageReporterLevel(t).subscribe());}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe());}serverSettingsEffect=za(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),s=e.slice(0,-1),l=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":l.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(s));let E=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(E);});setDarkMode(){this.#i.setDarkMode();}setLightMode(){this.#i.setLightMode();}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#n.open(h,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#c(t));}}):this.#c(t));}openLegacyUI(){this.#n.open(h,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank");}});}#c(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t);}#d(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let n=t[e].trim();if(n.startsWith("default-client="))return n.substring(15)}return "ngclient"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-settings"]],decls:130,vars:38,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let s;s=$localize`Customize your application theme`;let l;l=$localize`Passwords`;let E;E=$localize`Change server passphrase`;let S;S=$localize`Language`;let m;m=$localize`Select a language for the platform`;let f;f=$localize`Use legacy interface`;let W;W=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let ue;ue=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#47\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let J;J=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*51:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*52:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*52:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,J=oC(J);let z;z=$localize`Allow remote access (requires restart)`;let Q;Q=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Y;Y=$localize`Allow remote access`;let Ie;Ie=$localize`Prevent tray icon automatic log-in`;let Me;Me=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Pe;Pe=$localize`Prevent tray icon automatic log-in`;let Oe;Oe=$localize`Update channel`;let be;be=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let ve;ve=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Re;Re=$localize`Stable`;let Ge;Ge=$localize`Official stable release.`;let ye;ye=$localize`Beta`;let Fe;Fe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let $e;$e=$localize`Experimental`;let Ae;Ae=$localize`Early previews of new features. Not for use with important data.`;let Le;Le=$localize`Canary`;let we;we=$localize`Builds for developers and testers only. Not for use with important data.`;let De;De=$localize`Pause after startup or hibernation`;let xe;xe=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let ke;ke=$localize`Advanced options`;let Xe;Xe=$localize`Console connection status`;let Je;Je=$localize`Reporting configured by server`;let ze;ze=$localize`Connect to console`;let Ve;Ve=$localize`Configure console control`;let Ue;Ue=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Be;Be=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let He;He=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let We;We=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let je;je=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let qe;qe=$localize`Toggle console connection status`;let Ke;Ke=$localize`Toggle the visibility of the console connection status indicator.`;let Qe;Qe=$localize`Console connection status is hidden`;let Ye;Ye=$localize`Console connection status is visible`;let Ze;Ze=$localize`Enter new password`;let et;et=$localize`Repeat password`;let ge;ge=$localize`Password have to be filled and have to match`;let tt;tt=$localize`Passphrase`;let nt;nt=$localize`Repeat passphrase`;let it;it=$localize`Cancel`;let ot;ot=$localize` Update passphrase `;let st;st=$localize` Update passphrase `;let at;at=$localize`Change password`;let rt;rt=$localize`Allowed hostnames`;let lt;lt=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let _t;_t=$localize` Update allowed hostnames `;let ct;ct=$localize`Power mode provider`;let dt;dt=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let Tt;Tt=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let St;St=$localize`Usage statistics`;let ut;ut=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let gt;gt=$localize`public usage statistics.`;let pt;pt=$localize` All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `;let Ct;Ct=$localize`Experimental options`;let mt;mt=$localize`Toggle experimental options.`;let Et;Et=$localize`Operations run in an isolated process`;let Nt;return Nt=$localize`Operations run inside the server process`,[t,e,n,s,l,E,S,m,f,W,ue,J,z,Q,Y,Ie,Me,Pe,Oe,be,ve,Re,Ge,ye,Fe,$e,Ae,Le,we,De,xe,ke,Xe,Je,ze,Ve,Ue,Be,He,We,je,qe,Ke,Qe,Ye,tt,nt,it,ot,st,at,rt,lt,_t,ct,dt,Tt,St,ut,gt,pt,Ct,mt,Et,Nt,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"checkedChange","checked"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised",3,"checked"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"reporting-url","primary","simple"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","new-password","placeholder",Ze,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","new-password","placeholder",et,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",ge,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ge,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){e&1&&(vg(0,"app-status-bar"),Qi(1,"div",65)(2,"header")(3,"div",66)(4,"h2"),nC(5,0),$l(),Qi(6,"p"),nC(7,1),$l()()(),aT(8,In,8,2,"section")(9,Fn,10,2),Qi(10,"section")(11,"div",67)(12,"h3"),nC(13,2),$l(),Qi(14,"p"),nC(15,3),$l()(),Qi(16,"div",68)(17,"div",69)(18,"img",70),Vg("click",function(){return n.setLightMode()}),$l(),Qi(19,"img",71),Vg("click",function(){return n.setDarkMode()}),$l()()()(),Qi(20,"section")(21,"div",67)(22,"h3"),nC(23,4),$l(),Qi(24,"p"),nC(25,5),$l()(),Qi(26,"div",72),aT(27,Dn,15,7)(28,kn,4,1,"div",73),$l()(),Qi(29,"section")(30,"div",67)(31,"h3"),nC(32,6),$l(),Qi(33,"p"),nC(34,7),$l()(),Qi(35,"div",68)(36,"sh-select",74)(37,"input",75),Vg("ngModelChange",function(l){return n.updateLocale(l)}),$l(),CD(),$l()()(),Qi(38,"section")(39,"div",67)(40,"h3"),nC(41,8),$l(),Qi(42,"p"),nC(43,9),$l()(),Qi(44,"div",76)(45,"button",77),Vg("click",function(){return n.openLegacyUI()}),Lg(46,10),vg(47,"sh-icon"),Fg(),$l(),Qi(48,"button",77),Vg("click",function(){return n.changeDefaultClientTo(n.defaultClient()==="ngclient"?"ngax":"ngclient")}),Lg(49,11),vg(50,"sh-icon"),aT(51,Xn,2,0,"span")(52,Jn,2,0,"span"),Fg(),$l()()(),Qi(53,"section")(54,"div",67)(55,"h3"),nC(56,12),$l(),Qi(57,"p"),nC(58,13),$l()(),Qi(59,"div",78)(60,"sh-toggle",79),Vg("checkedChange",function(l){return n.updateRemoteAccess(l)}),Qi(61,"label"),nC(62,14),$l()(),aT(63,zn,8,3),$l()(),Qi(64,"section")(65,"div",67)(66,"h3"),nC(67,15),$l(),Qi(68,"p"),nC(69,16),$l()(),Qi(70,"div",68)(71,"sh-toggle",79),Vg("checkedChange",function(l){return n.saveDisableTrayIconLogin(l)}),Qi(72,"label"),nC(73,17),$l()()()(),aT(74,Vn,9,5,"section"),Qi(75,"section")(76,"div",67)(77,"h3"),nC(78,18),$l(),aT(79,Un,2,1,"p"),aT(80,Bn,1,0,"sh-progress-bar",80),$l(),Qi(81,"div",81)(82,"div",82),Vg("click",function(){return n.setNewChannel("")}),Qi(83,"sh-radio",83),nC(84,19),$l(),Qi(85,"p"),nC(86,20),$l()(),Qi(87,"div",82),Vg("click",function(){return n.setNewChannel("stable")}),Qi(88,"sh-radio",83),nC(89,21),$l(),Qi(90,"p"),nC(91,22),$l()(),Qi(92,"div",82),Vg("click",function(){return n.setNewChannel("beta")}),Qi(93,"sh-radio",83),nC(94,23),$l(),Qi(95,"p"),nC(96,24),$l()(),Qi(97,"div",82),Vg("click",function(){return n.setNewChannel("experimental")}),Qi(98,"sh-radio",83),nC(99,25),$l(),Qi(100,"p"),nC(101,26),$l()(),Qi(102,"div",82),Vg("click",function(){return n.setNewChannel("canary")}),Qi(103,"sh-radio",83),nC(104,27),$l(),Qi(105,"p"),nC(106,28),$l()()()(),Qi(107,"section")(108,"div",67)(109,"h3"),nC(110,29),$l(),Qi(111,"p"),nC(112,30),$l()(),Qi(113,"div",68)(114,"div",84)(115,"sh-range-slider",85)(116,"input",86),cm("ngModelChange",function(l){return UC(n.timeValue,l)||(n.timeValue=l),l}),Vg("ngModelChange",function(l){return n.updateTimeValue(l)}),$l(),CD(),$l(),Qi(117,"sh-select",87)(118,"input",88),Vg("ngModelChange",function(l){return n.updateTimeType(l)}),$l(),CD(),ag(119,Hn,1,1,"ng-template"),$l()()()(),aT(120,jn,17,5,"section"),aT(121,Qn,12,2,"section"),$l(),vg(122,"sh-divider"),Qi(123,"div",65)(124,"section")(125,"div",89)(126,"h3"),nC(127,31),$l(),vg(128,"app-advanced-options-settings"),$l()()(),vg(129,"sh-divider")),e&2&&(CE(8),cT(n.isUsingRelay()?8:9),CE(10),Yg("active",!n.isDarkMode()),CE(),Yg("active",n.isDarkMode()),CE(8),cT(n.showPassphraseForm()?27:28),CE(9),yg("options",n.languageOptions())("isClearable",false)("inlineSearch",true),CE(),yg("ngModel",n.langCtrl())("ngModelOptions",KC(36,Se)),_D(),CE(14),cT(n.defaultClient()==="ngax"?51:52),CE(9),yg("checked",n.allowRemoteAccess()),CE(3),cT(n.allowRemoteAccess()?63:-1),CE(8),yg("checked",n.disableTrayIconLogin()),CE(3),cT(n.powerModeOptions().length>0?74:-1),CE(5),cT(n.sysinfo()?.ServerVersion?79:-1),CE(),cT(n.updatingChannel()?80:-1),CE(3),yg("checked",n.updateChannel()===""),CE(),jg(n.sysinfo()?.DefaultUpdateChannel),rC(84),CE(2),jg(n.sysinfo()?.ServerVersionType),rC(86),CE(2),yg("checked",n.updateChannel()==="stable"),CE(5),yg("checked",n.updateChannel()==="beta"),CE(5),yg("checked",n.updateChannel()==="experimental"),CE(5),yg("checked",n.updateChannel()==="canary"),CE(12),yg("unit",n.timeType()==="none"?"s":n.timeType()),CE(),yg("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),am("ngModel",n.timeValue),yg("ngModelOptions",KC(37,Se)),_D(),CE(),yg("options",n.timeTypeOptions())("isClearable",false),CE(),yg("ngModel",n.timeType()),_D(),CE(2),cT(n.usageStatisticsDisabled()?-1:120),CE(),cT(n.hasIpcController()?121:-1));},dependencies:[Bn$1,Ze,on$1,Rn$1,Jt,Gn$1,ee,Te,K,v,O$1,tn,d,J,at,Fe,N,c,ue,Nt$1,D],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"]})};
1
+ import {e as ee}from'./chunk-C4GeR7BF.js';import'./chunk-CUaRQ2FJ.js';import {O as O$1}from'./chunk-aOMoAKYY.js';import {m}from'./chunk-BEhUV7oX.js';import {J}from'./chunk-DUYvFN8m.js';import {N as Nt$1}from'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import {c}from'./chunk-B53Wj4F9.js';import {D}from'./chunk-BTgf5lfZ.js';import {bj as _s,bk as j,bl as ft,bm as go,T,a6 as be,m as m$1,I,bn as f,G as Ge,N as Nt,z as za,H as qu,bo as wt,at as h,h as hw,v,d as N,u as ue,j as vg,Q as Qi,n as nC,$ as $l,f as aT,V as Vg,s as CD,L as Lg,F as Fg,p as cm,bg as ag,C as CE,i as cT,Y as Yg,A as yg,a3 as KC,y as _D,au as jg,av as rC,x as am,o as oC,U as UC,ab as C$1,E as D1,b3 as cg,b4 as oT,b5 as iT,W as Wg,K as fC,ae as eo,b as I1,af as E1,b9 as ce,M as aC,P as Ul,X as cC,S as Wl,w as jC,an as Hg,R as Ig,aB as im,ag as Zg,g as NC,k as iC,J as om,l as vT,r as kd,O as Od,ar as Qp,a9 as GC,aa as Ql}from'./main-VVQP2YE7.js';import {d}from'./chunk-B8uF0dom.js';import {F as Fe}from'./chunk-B9maI7Xa.js';import {B as Bn$1,Z as Ze,o as on$1,R as Rn$1,J as Jt,G as Gn$1}from'./chunk-BO2GlieG.js';import {a as at}from'./chunk-CKnRcyHZ.js';import {C}from'./chunk-CwKy8pxa.js';import {O}from'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';var sn=[[["label"]],[["input","type","range"]]],an=["label","input[type=range]"],tn=(()=>{class i{constructor(){this.hasInput=Ge(false),this.#n=T(eo),this.#i=null,this.#e=null,this.#t=0,this.unit=I1(""),this.value=E1(this.#t),this.inputState=Ge({min:0,max:100,step:1}),this.color=I1(null),this.variant=I1(null),this.size=I1(null),this.sharp=I1(void 0),this.alwaysShow=I1(void 0),this.hostClasses=ce("rangeSlider",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,alwaysShow:this.alwaysShow}),this.valuePercentage=Nt(()=>{let{min:e,max:n}=this.inputState(),s=this.value()??e;if(isNaN(s))return 0;let l=n-e;if(l===0)return 0;let E=(s-e)/l*100;return Math.max(0,Math.min(100,E))}),this.trackFilledPercentage=Nt(()=>this.valuePercentage()),this.thumbPositionPercentage=Nt(()=>this.valuePercentage()),this.syncModelToInputEffect=za(()=>{let e=this.value();if(this.#e){let n=parseFloat(this.#e.value);(isNaN(n)||String(n)!==String(e))&&(this.#e.value=String(e));}});}#n;#i;#e;#t;ngAfterViewInit(){this.#e=this.#n.nativeElement.querySelector('input[type="range"]'),this.#e?(this.hasInput.set(true),this.#a(this.#e),this.#e.oninput=()=>{this.setNewInputValue(this.#e.value);},this.#e.addEventListener("inputValueChanged",e=>{this.setNewInputValue(e.detail.value);}),queueMicrotask(()=>this.#o(true)),this.#r()):console.error('ShipRangeSlider: No <input type="range"> element found projected inside.');}setNewInputValue(e){let n=parseFloat(e??"0");if(!isNaN(n)){let{min:s,max:l}=this.inputState();this.value.set(Math.max(s,Math.min(l,n)));}}trackEvent(e){if(!this.#e||this.#e.readOnly||this.#e.disabled){e.preventDefault(),e.stopPropagation();return}if(e.target===this.#e||e.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let s=e.currentTarget.getBoundingClientRect(),l=e.clientX-s.left,E=s.width,{min:S,max:m,step:f}=this.inputState(),W=m-S;if(E>0&&W!==0&&f>0){let J=(l/E*W+S-S)/f,z=S+Math.round(J)*f,Q=this.#s(f);z=parseFloat(z.toFixed(Q));let Y=Math.max(S,Math.min(m,z));this.value.set(Y);}}#o(e=false){if(!this.#e)return;let n=parseFloat(this.#e.min??"0")??0,s=parseFloat(this.#e.max??"100")??100,l=this.#e.step,E=1;if(l&&l.toLowerCase()!=="any"){let m=parseFloat(l);!isNaN(m)&&m>0&&(E=m);}this.inputState.set({min:n,max:s,step:E});let S=parseFloat(this.#e.value??String(n))??n;if(e&&this.value()!==this.#t){let m=this.value(),f=Math.max(n,Math.min(s,m));S!==f&&(this.#e.value=String(f)),m!==f&&this.value.set(f);}else {let m=Math.max(n,Math.min(s,S));this.value()!==m&&this.value.set(m);}}#r(){if(!this.#e||typeof MutationObserver>"u")return;let e=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(n=>{let s=false;for(let l of n)if(l.type==="attributes"&&e.includes(l.attributeName??"")){s=true;break}s&&this.#o(false);}),this.#i.observe(this.#e,{attributes:true,attributeFilter:e});}#s(e){if(isNaN(e)||Math.floor(e)===e)return 0;let s=e.toString().split(".")[1];return s?s.length:0}#a(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(n){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,n);let l=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:n}});return this.dispatchEvent(l),n}});}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#e&&(this.#e.oninput=null);}static{this.\u0275fac=function(n){return new(n||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-range-slider"]],hostVars:6,hostBindings:function(n,s){n&2&&(NC(s.hostClasses()),Yg("sh-range-slider",true)("has-input",s.hasInput()));},inputs:{unit:[1,"unit"],value:[1,"value"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],alwaysShow:[1,"alwaysShow"]},outputs:{value:"valueChange"},ngContentSelectors:an,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(n,s){n&1&&(aC(sn),Ul(0,"div",0),cC(1),Wl(),Ul(2,"div",1)(3,"div",2),jC(4),Wl(),Ul(5,"div",3),Hg("click",function(E){return s.trackEvent(E)}),cC(6,1),Ul(7,"div",4),Ig(8,"div",5),Wl(),Ul(9,"div",6)(10,"div",7)(11,"div",8),jC(12),Wl()()()(),Ul(13,"div",9),jC(14),Wl()()),n&2&&(CE(4),im("",s.inputState().min,"",s.unit()),CE(4),Zg("width",s.trackFilledPercentage(),"%"),CE(),Zg("left",s.thumbPositionPercentage(),"%"),CE(3),im("",s.value(),"",s.unit()),CE(2),im("",s.inputState().max,"",s.unit()));},styles:[`sh-range-slider{--rs-h: 2.5rem;--rs-f: var(--paragraph-30);--rs-unit-g: .75rem;--rs-unit-c: var(--base-8);--rst: var(--base-3);--rst-bc: var(--base-1);--rst-bg: var(--base-4);--rst-h: .5rem;--rst-s: calc(var(--shape-2) / 2);--rs-thumb-c: var(--base-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--base-4);--rs-thumb-arrow: var(--rs-thumb-value-bg);--rs-thumb-value-c: var(--base-8);--rs-thumb-si: 1rem;--rs-thumb-w: var(--rs-thumb-si);--rs-thumb-s: calc(var(--rs-thumb-w) / 2);display:flex;flex-direction:column;width:100%;font:var(--rs-f)}sh-range-slider.sharp{--rst-s: .125rem;--rs-thumb-s: .125rem;--rs-thumb-bc: transparent !important}sh-range-slider .label{display:flex;align-items:center;gap:.5rem;padding-bottom:.25rem}sh-range-slider .label>label{display:flex;align-items:center;gap:.25rem}sh-range-slider .label sh-icon{color:var(--grey-500);font-size:1rem}sh-range-slider .label:empty{display:none}sh-range-slider[readonly]:not([readonly=false]),sh-range-slider:has(input[type=range][readonly]:not([readonly=false])),sh-range-slider[disabled]:not([disabled=false]),sh-range-slider:has(input[type=range][disabled]:not([disabled=false])){opacity:.4;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-range-slider:has(input[type=range][readonly]) .thumb .value-indicator,sh-range-slider.always-show .thumb .value-indicator{opacity:1}sh-range-slider input[type=range]{appearance:none;width:100%;height:100%;position:absolute;inset:0;opacity:0;margin:0;z-index:1000}sh-range-slider .input-wrap{display:flex;align-items:center;justify-content:center;width:100%;min-height:var(--rs-h);position:relative;gap:var(--rs-unit-g)}sh-range-slider .thumb-wrap{position:absolute;top:0}sh-range-slider .thumb{position:relative;margin-top:calc(-1 * var(--rs-thumb-si) / 4);width:var(--rs-thumb-w);height:var(--rs-thumb-si);border-radius:var(--rs-thumb-s);background-color:var(--rs-thumb-c);border:1px solid var(--rs-thumb-bc);box-shadow:var(--box-shadow-20);transform:translate(-50%)}sh-range-slider .track-wrap{position:relative;width:100%;height:var(--rst-h)}sh-range-slider .track{position:relative;width:100%;height:var(--rst-h);border-radius:var(--rst-s);background-color:var(--rst);border:1px solid var(--rst-bc);overflow:hidden}sh-range-slider .track-filled{position:absolute;top:0;left:0;bottom:0;background:var(--rst-bg);width:0}sh-range-slider .min-indicator,sh-range-slider .max-indicator{white-space:nowrap;color:var(--rs-unit-c)}sh-range-slider input[type=range]:hover~.thumb-wrap .value-indicator,sh-range-slider input[type=range]:focus~.thumb-wrap .value-indicator{opacity:1}sh-range-slider .value-indicator{position:absolute;top:-1.875rem;height:1.5rem;min-width:1.5rem;border-radius:var(--shape-2);left:50%;margin:auto;transform:translate(-50%);padding:.25rem .5rem;background:var(--rs-thumb-value-bg);color:var(--rs-thumb-value-c);white-space:nowrap;opacity:0;transition:opacity 125ms linear;-webkit-user-select:none;user-select:none;pointer-events:none}sh-range-slider .value-indicator:after{content:"";border-top:.3125rem solid var(--rs-thumb-arrow);border-left:.3125rem solid transparent;border-right:.3125rem solid transparent;position:absolute;top:calc(100% - 1px);left:50%;margin-left:-.3125rem}sh-range-slider.primary{--rst-bg: var(--primary-8);--rs-thumb-arrow: var(--primary-8);--rs-thumb-value-bg: var(--primary-8);--rs-thumb-value-c: #fff}sh-range-slider.accent{--rst-bg: var(--accent-8);--rs-thumb-arrow: var(--accent-8);--rs-thumb-value-bg: var(--accent-8);--rs-thumb-value-c: #fff}sh-range-slider.warn{--rst-bg: var(--warn-8);--rs-thumb-arrow: var(--warn-8);--rs-thumb-value-bg: var(--warn-8);--rs-thumb-value-c: #fff}sh-range-slider.error{--rst-bg: var(--error-8);--rs-thumb-arrow: var(--error-8);--rs-thumb-value-bg: var(--error-8);--rs-thumb-value-c: #fff}sh-range-slider.success{--rst-bg: var(--success-8);--rs-thumb-arrow: var(--success-8);--rs-thumb-value-bg: var(--success-8);--rs-thumb-value-c: #fff}sh-range-slider.simple{--rst-h: 1rem;--rst-s: var(--shape-2)}sh-range-slider.simple .thumb{width:1px;height:var(--rst-h);margin-top:0;border-radius:0;border:none;box-shadow:none}sh-range-slider.simple.primary{--rst-bg: var(--primary-8);--rst: var(--primary-2);--rs-thumb-c: var(--primary-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--primary-8);--rs-thumb-value-c: var(--primary-2)}sh-range-slider.simple.accent{--rst-bg: var(--accent-8);--rst: var(--accent-2);--rs-thumb-c: var(--accent-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--accent-8);--rs-thumb-value-c: var(--accent-2)}sh-range-slider.simple.warn{--rst-bg: var(--warn-8);--rst: var(--warn-2);--rs-thumb-c: var(--warn-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--warn-8);--rs-thumb-value-c: var(--warn-2)}sh-range-slider.simple.error{--rst-bg: var(--error-8);--rst: var(--error-2);--rs-thumb-c: var(--error-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--error-8);--rs-thumb-value-c: var(--error-2)}sh-range-slider.simple.success{--rst-bg: var(--success-8);--rst: var(--success-2);--rs-thumb-c: var(--success-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--success-8);--rs-thumb-value-c: var(--success-2)}sh-range-slider.outlined{--rst: var(--base-1);--rst-bc: var(--base-4);--rs-thumb-c: var(--base-6);--rs-thumb-bc: var(--base-1);--rs-thumb-arrow: var(--base-4)}sh-range-slider.outlined.primary,sh-range-slider.outlined.accent,sh-range-slider.outlined.warn,sh-range-slider.outlined.error,sh-range-slider.outlined.success{--rst: var(--base-2)}sh-range-slider.outlined.primary{--rst-bg: var(--primary-4);--rst-bc: var(--primary-8);--rs-thumb-c: var(--primary-8);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--primary-4);--rs-thumb-value-c: var(--primary-8);--rs-thumb-arrow: var(--primary-4)}sh-range-slider.outlined.accent{--rs-thumb-c: var(--accent-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--accent-4);--rs-thumb-value-c: var(--accent-8);--rs-thumb-arrow: var(--accent-4)}sh-range-slider.outlined.warn{--rs-thumb-c: var(--warn-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--warn-4);--rs-thumb-value-c: var(--warn-8);--rs-thumb-arrow: var(--warn-4)}sh-range-slider.outlined.error{--rs-thumb-c: var(--error-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--error-4);--rs-thumb-value-c: var(--error-8);--rs-thumb-arrow: var(--error-4)}sh-range-slider.outlined.success{--rs-thumb-c: var(--success-4);--rs-thumb-bc: var(--base-1);--rs-thumb-value-bg: var(--success-4);--rs-thumb-value-c: var(--success-8);--rs-thumb-arrow: var(--success-4)}sh-range-slider.flat{--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4)}sh-range-slider.flat.primary,sh-range-slider.flat.accent,sh-range-slider.flat.warn,sh-range-slider.flat.error,sh-range-slider.flat.success{--rst: var(--base-3);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4);--rs-thumb-value-bg: var(--base-8);--rs-thumb-value-c: #fff}sh-range-slider.flat.primary{--rst-bg: var(--primary-8);--rs-thumb-value-bg: var(--primary-8)}sh-range-slider.flat.accent{--rst-bg: var(--accent-8);--rs-thumb-value-bg: var(--accent-8)}sh-range-slider.flat.warn{--rst-bg: var(--warn-8);--rs-thumb-value-bg: var(--warn-8)}sh-range-slider.flat.error{--rst-bg: var(--error-8);--rs-thumb-value-bg: var(--error-8)}sh-range-slider.flat.success{--rst-bg: var(--success-8);--rs-thumb-value-bg: var(--success-8)}sh-range-slider.raised{--rst-bg: var(--base-g2);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4)}sh-range-slider.raised.primary,sh-range-slider.raised.accent,sh-range-slider.raised.warn,sh-range-slider.raised.error,sh-range-slider.raised.success{--rst: var(--base-3);--rs-thumb-c: #fff;--rs-thumb-bc: var(--base-4);--rs-thumb-value-bg: var(--base-g6);--rs-thumb-value-c: #fff}sh-range-slider.raised.primary{--rst-bg: var(--primary-g2);--rs-thumb-arrow: var(--primary-8);--rs-thumb-value-bg: var(--primary-g3)}sh-range-slider.raised.accent{--rst-bg: var(--accent-g2);--rs-thumb-arrow: var(--accent-8);--rs-thumb-value-bg: var(--accent-8)}sh-range-slider.raised.warn{--rst-bg: var(--warn-g2);--rs-thumb-arrow: var(--warn-8);--rs-thumb-value-bg: var(--warn-8)}sh-range-slider.raised.error{--rst-bg: var(--error-g2);--rs-thumb-arrow: var(--error-8);--rs-thumb-value-bg: var(--error-8)}sh-range-slider.raised.success{--rst-bg: var(--success-g2);--rs-thumb-arrow: var(--success-8);--rs-thumb-value-bg: var(--success-8)}
2
+ `],encapsulation:2});}}return i})();var rn=["formRef"],ln=()=>[import('./chunk-CZoVeRAG.js').then(i=>i.OptionsListComponent)];function _n(i,t){i&1&&(Qi(0,"sh-alert",3),nC(1,1),$l());}function cn(i,t){if(i&1){let e=vT();Qi(0,"app-options-list",5),cm("optionsChange",function(s){kd(e);let l=iC();return UC(l.settings,s)||(l.settings=s),Od(s)}),$l();}if(i&2){let e=iC();am("options",e.settings),yg("hasFreeTextSettings",true);}}var K=class i{#n=T(O);#i=T(C$1);formRef=D1.required("formRef");settings=Ge([]);isSubmitting=Ge(false);isLoadingOptions=Ge(true);saved=Ge(false);lastRecievedServerSettings=Ge({});serverSettingsEffect=za(()=>{let t=this.#n.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(true);let e=Object.entries(t);e.forEach(([n,s],l)=>{if(n.startsWith("--")){let E=n.substring(2);this.settings.update(S=>(S.some(m=>m.Name===E||m.Name===n)||S.push({Name:n,Value:s}),S));}l===e.length-1&&this.isLoadingOptions.set(false);});});submit(){this.isSubmitting.set(true);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(S=>S.Name?.startsWith("--")?S.Name:`--${S.Name}`),l=Object.keys(e).filter(S=>S.startsWith("--")).filter(S=>!n.includes(S)),E=t.reduce((S,m)=>{let f=m.Name?.startsWith("--")?m.Name:`--${m.Name}`;return S[f]=m.Value,S},{});l.forEach(S=>{E[S]=null;}),this.#i.patchApiV1Serversettings({requestBody:E}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.#n.refreshServerSettings(),this.saved.set(true),setTimeout(()=>{this.saved.set(false);},3e3);}});}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&Wg(n.formRef,rn,5),e&2&&fC();},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(Qi(0,"div",2),aT(1,_n,2,0,"sh-alert",3),Qi(2,"button",4),Vg("click",function(){return n.submit()}),Lg(3,0),vg(4,"sh-icon"),Fg(),$l()(),cg(5,cn,1,2),oT(6,5,ln)),e&2&&(CE(),cT(n.saved()?1:-1),CE(),Yg("loading",n.isSubmitting()),CE(4),iT(!n.isLoadingOptions()));},dependencies:[Gn$1,v,N,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"]})};function Tn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field",12)(1,"input",13),cm("ngModelChange",function(s){kd(e);let l=iC(2);return UC(l.registerUrl,s)||(l.registerUrl=s),Od(s)}),$l(),CD(),$l(),Qi(2,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.register())}),nC(3,0),$l();}if(i&2){let e=iC(2);CE(),am("ngModel",e.registerUrl),_D();}}function Sn(i,t){if(i&1&&(Qi(0,"div",9)(1,"label"),nC(2,1),$l(),Qi(3,"a",15),jC(4),$l()()),i&2){let e=iC(2);CE(3),yg("href",GC(e.claimUrl()),Qp),CE(),om(e.claimUrl());}}function un(i,t){i&1&&(Qi(0,"div",9)(1,"label"),nC(2,2),$l()());}function gn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.cancel())}),nC(1,3),$l();}}function pn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.disable())}),nC(1,4),$l();}}function Cn(i,t){if(i&1){let e=vT();Qi(0,"button",14),Vg("click",function(){kd(e);let s=iC(2);return Od(s.enable())}),nC(1,5),$l(),Qi(2,"button",16),Vg("click",function(){kd(e);let s=iC(2);return Od(s.delete())}),nC(3,6),$l();}}function mn(i,t){i&1&&(Lg(0,7,1),vg(1,"sh-icon"),Fg());}function En(i,t){i&1&&(Lg(0,7,2),vg(1,"sh-icon"),Fg());}function Nn(i,t){if(i&1){let e=vT();Qi(0,"sh-chip",17),Vg("click",function(){kd(e);let s=iC(2);return Od(s.copyReportingUrl())}),Lg(1,7),aT(2,mn,2,0,"sh-icon")(3,En,2,0,"sh-icon"),Fg(),$l();}if(i&2){let e=iC(2);CE(2),cT(e.copiedReportingUrl()===true?2:3);}}function hn(i,t){if(i&1&&(Qi(0,"div",8),aT(1,Tn,4,1),aT(2,Sn,5,3,"div",9),aT(3,un,3,0,"div",9),aT(4,gn,2,0,"button",10),aT(5,pn,2,0,"button",10),aT(6,Cn,4,0),aT(7,Nn,4,1,"sh-chip",11),$l()),i&2){let e=iC();CE(),cT(e.state()==="inactive"?1:-1),CE(),cT(e.state()==="registered"?2:-1),CE(),cT(e.state()==="registering"?3:-1),CE(),cT(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),CE(),cT(e.state()==="connected"||e.state()==="connecting"?5:-1),CE(),cT(e.state()==="disabled"?6:-1),CE(),cT(e.additionalReportingUrl()!==""&&e.state()!=="registered"?7:-1);}}var Te=class i{#n=T(C);#i=T(O);state=this.#n.state;claimUrl=this.#n.claimUrl;registerUrl=this.#n.registerUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return t&&t["additional-report-url"]||""});copiedReportingUrl=Ge(false);ngOnInit(){this.#n.refreshRemoteControlStatus();}cancel(){this.#n.cancelRemoteRegistration();}register(){this.#n.beginRemoteRegistration();}disable(){this.#n.disableRemoteControl();}enable(){this.#n.enableRemoteControl();}delete(){this.#n.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let s;s=$localize`Cancel registration`;let l;l=$localize`Disable console connection`;let E;E=$localize`Enable console connection`;let S;S=$localize` Delete console connection setup `;let m;return m=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=oC(m),[t,e,n,s,l,E,S,m,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&aT(0,hn,8,7,"div",8),e&2&&cT(n.state()!=="unknown"?0:-1);},dependencies:[Bn$1,Ze,Rn$1,Jt,Fe,v,D,N],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"]})};var Se=()=>({standalone:true});function fn(i,t){i&1&&(Qi(0,"sh-chip",90),nC(1,33),$l());}function In(i,t){if(i&1&&(Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,32),$l(),Qi(4,"p"),jC(5),$l()(),Qi(6,"div",68),aT(7,fn,2,0,"sh-chip",90),$l()()),i&2){let e=iC();CE(5),om(e.remoteControlStatus()),CE(2),cT(e.additionalReportingUrl()!==""&&e.remoteControlState()!=="registered"?7:-1);}}function Mn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,37),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.remoteControlTooltip());}}function Pn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,38),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.remoteControlTooltip());}}function On(i,t){if(i&1&&(Qi(0,"label"),Lg(1,39),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.connectionStatusIndicatorTooltip());}}function bn(i,t){if(i&1&&(Qi(0,"label"),Lg(1,40),vg(2,"sh-icon",92),Fg(),$l()),i&2){let e=iC(3);CE(2),yg("shTooltip",e.connectionStatusIndicatorTooltip());}}function vn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,35),$l(),Qi(4,"p"),nC(5,36),$l()(),Qi(6,"div",91)(7,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.toggleConsoleControl(s))}),aT(8,Mn,3,1,"label")(9,Pn,3,1,"label"),$l(),Qi(10,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.saveHideConsoleConnectionStatus(s))}),aT(11,On,3,1,"label")(12,bn,3,1,"label"),$l()()();}if(i&2){let e=iC(2);CE(7),yg("checked",!e.consoleControlDisabled()),CE(),cT(e.consoleControlDisabled()?8:9),CE(2),yg("checked",!e.hideConsoleConnectionStatus()),CE(),cT(e.hideConsoleConnectionStatus()?11:12);}}function Rn(i,t){i&1&&(Qi(0,"label"),nC(1,43),$l());}function Gn(i,t){i&1&&(Qi(0,"label"),nC(1,44),$l());}function yn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,41),$l(),Qi(4,"p"),nC(5,42),$l()(),Qi(6,"div",68)(7,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC(2);return Od(l.saveHideConsoleConnectionStatus(s))}),aT(8,Rn,2,0,"label")(9,Gn,2,0,"label"),$l()()();}if(i&2){let e=iC(2);CE(7),yg("checked",!e.hideConsoleConnectionStatus()),CE(),cT(e.hideConsoleConnectionStatus()?8:9);}}function Fn(i,t){if(i&1&&(Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,34),$l(),Qi(4,"p"),jC(5),$l()(),Qi(6,"div",68),vg(7,"app-remote-control"),$l()(),aT(8,vn,13,4,"section")(9,yn,10,2,"section")),i&2){let e=iC();CE(5),om(e.remoteControlStatus()),CE(3),cT(e.remoteControlState()!="inactive"?8:9);}}function $n(i,t){i&1&&(Qi(0,"sh-icon",97),jC(1,"check"),$l());}function An(i,t){i&1&&(Qi(0,"sh-icon",98),jC(1,"prohibit"),$l());}function Ln(i,t){if(i&1){let e=vT();Qi(0,"button",102),Vg("click",function(){kd(e);let s=iC(2);return Od(s.updatePassphrase())}),nC(1,48),$l();}if(i&2){let e=iC(2);Yg("loading",e.isUpdating());}}function wn(i,t){if(i&1){let e=vT();Qi(0,"button",103),Vg("click",function(){kd(e);let s=iC(2);return Od(s.updatePassphrase())}),nC(1,49),$l();}if(i&2){let e=iC(2);Yg("loading",e.isUpdating()),yg("disabled",true);}}function Dn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field")(1,"label",93),nC(2,45),$l(),Qi(3,"input",94),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.passphrase,s)||(l.passphrase=s),Od(s)}),$l(),CD(),$l(),Qi(4,"sh-form-field")(5,"label",95),nC(6,46),$l(),Qi(7,"input",96),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.repeatPassphrase,s)||(l.repeatPassphrase=s),Od(s)}),$l(),CD(),aT(8,$n,2,0,"sh-icon",97)(9,An,2,0,"sh-icon",98),$l(),Qi(10,"div",73)(11,"button",99),Vg("click",function(){kd(e);let s=iC();return Od(s.cancelPasswordChange())}),nC(12,47),$l(),aT(13,Ln,2,2,"button",100)(14,wn,2,3,"button",101),$l();}if(i&2){let e=iC();CE(3),am("ngModel",e.passphrase),_D(),CE(4),yg("disabled",e.passphrase().length===0),am("ngModel",e.repeatPassphrase),_D(),CE(),cT(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),CE(3),Yg("loading",e.isUpdating()),CE(2),cT(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14);}}function xn(i,t){i&1&&(Qi(0,"sh-icon",104),jC(1,"check"),$l());}function kn(i,t){if(i&1){let e=vT();Qi(0,"div",73)(1,"button",99),Vg("click",function(){kd(e);let s=iC();return Od(s.openPassphraseForm())}),nC(2,50),$l(),aT(3,xn,2,0,"sh-icon",104),$l();}if(i&2){let e=iC();CE(3),cT(e.passwordUpdated()?3:-1);}}function Xn(i,t){i&1&&(Lg(0,11,1),vg(1,"span"),Fg());}function Jn(i,t){i&1&&(Lg(0,11,2),vg(1,"span"),Fg());}function zn(i,t){if(i&1){let e=vT();Qi(0,"sh-form-field")(1,"label",105),nC(2,51),$l(),Qi(3,"textarea",106),cm("ngModelChange",function(s){kd(e);let l=iC();return UC(l.allowedHostnames,s)||(l.allowedHostnames=s),Od(s)}),$l(),CD(),$l(),Qi(4,"sh-alert",107),nC(5,52),$l(),Qi(6,"button",102),Vg("click",function(){kd(e);let s=iC();return Od(s.updateAllowedHostnames())}),nC(7,53),$l();}if(i&2){let e=iC();CE(3),am("ngModel",e.allowedHostnames),_D(),CE(3),Yg("loading",e.updatingAllowedHosts());}}function Vn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,54),$l(),Qi(4,"p"),nC(5,55),$l()(),Qi(6,"div",68)(7,"sh-select",108)(8,"input",75),Vg("ngModelChange",function(s){kd(e);let l=iC();return Od(l.updatePowerMode(s))}),$l(),CD(),$l()()();}if(i&2){let e=iC();CE(7),yg("options",e.powerModeOptions())("isClearable",false),CE(),yg("ngModel",e.powerModeCtrl())("ngModelOptions",KC(4,Se)),_D();}}function Un(i,t){if(i&1&&(Qi(0,"p"),nC(1,56),$l()),i&2){let e=iC();CE(),jg(e.sysinfo()?.ServerVersionName),rC(1);}}function Bn(i,t){i&1&&vg(0,"sh-progress-bar",80);}function Hn(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.label," ");}}function Wn(i,t){if(i&1&&jC(0),i&2){let e=t.$implicit;Ql(" ",e.label," ");}}function jn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,57),$l(),Qi(4,"p")(5,"span"),nC(6,58),$l(),Qi(7,"a",109),nC(8,59),$l(),vg(9,"br")(10,"br"),Qi(11,"span"),nC(12,60),$l()()(),Qi(13,"div",68)(14,"sh-select",110)(15,"input",75),Vg("ngModelChange",function(s){kd(e);let l=iC();return Od(l.updateUsageStatistics(s))}),$l(),CD(),ag(16,Wn,1,1,"ng-template"),$l()()();}if(i&2){let e=iC();CE(14),yg("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),CE(),yg("ngModel",e.usageStatistics())("ngModelOptions",KC(4,Se)),_D();}}function qn(i,t){i&1&&(Qi(0,"label"),nC(1,63),$l());}function Kn(i,t){i&1&&(Qi(0,"label"),nC(1,64),$l());}function Qn(i,t){if(i&1){let e=vT();Qi(0,"section")(1,"div",67)(2,"h3"),nC(3,61),$l(),Qi(4,"p"),nC(5,62),$l()(),Qi(6,"div",91)(7,"p"),jC(8,"Backup process isolation"),$l(),Qi(9,"sh-toggle",79),Vg("checkedChange",function(s){kd(e);let l=iC();return Od(l.saveControllerIpcState(s))}),aT(10,qn,2,0,"label")(11,Kn,2,0,"label"),$l()()();}if(i&2){let e=iC();CE(9),yg("checked",e.isControllerIpcEnabled()),CE(),cT(e.isControllerIpcEnabled()?10:11);}}function Yn(i,t,e){let[n]=_s(i,e?.equal),s=n,l=n[j],E;return s.set=S=>{clearTimeout(E),E=setTimeout(()=>{ft(l,S);},t);},s.update=S=>{clearTimeout(E),E=setTimeout(()=>{go(l,S);},t);},s}var Zn=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],on=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],fe=class i{#n=T(be);#i=T(m);#e=T(m$1);#t=T(O);#o=T(C);#r=T(I);#s=T(f);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#e.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=Ge("list");previousLang=this.#a;langCtrl=Ge(this.#a);powerModeCtrl=Ge("");usageStatistics=Ge("");updatingUsageStatistics=Ge(false);remoteControlStatus=this.#o.statusMessage;remoteControlState=this.#o.state;updatingChannel=Ge(false);updateChannel=Ge("");isUsingRelay=this.#r.relayIsEnabled;defaultClient=Ge(this.#d());hasIpcController=this.#e.hasIpcController;usageStatisticsDisabled=Nt(()=>(this.#e.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");additionalReportingUrl=Nt(()=>{let t=this.#t.serverSettings();return t&&t["additional-report-url"]||""});#T=za(()=>{let t=this.#e.systemInfo()?.DefaultUsageReportLevel??"",e=on;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e);});remoteControlTooltip=Ge($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
3
+ registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=Ge($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(qu(()=>this.updatingChannel.set(false))).subscribe();}allowRemoteAccess=Ge(false);allowedHostnames=Ge("");loadedAllowedHostnames=Ge("");updatingRemoteAccess=Ge(false);updatingAllowedHosts=Ge(false);updatingConsoleControl=Ge(false);consoleControlDisabled=Ge(false);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;isControllerIpcEnabled=this.#t.isControllerIpcEnabled;updateRemoteAccess(t){this.allowRemoteAccess.set(t),this.#t.setRemoteAccessInterface(t?"any":"loopback").pipe(qu(()=>this.updatingRemoteAccess.set(false))).subscribe();}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(true),this.#t.setRemoteAccessAllowedHostnames(t).pipe(qu(()=>this.updatingAllowedHosts.set(false))).subscribe();}toggleConsoleControl(t){this.consoleControlDisabled.set(!t),this.#t.setDisableConsoleControl(!t).pipe(qu(()=>this.updatingConsoleControl.set(false))).subscribe();}updatingDisableTrayIconLogin=Ge(false);disableTrayIconLogin=Ge(false);saveDisableTrayIconLogin(t){let e=t;this.updatingDisableTrayIconLogin.set(true),this.#t.setDisableTrayIconLogin(e).pipe(qu(()=>this.updatingDisableTrayIconLogin.set(false))).subscribe();}updatingHideConsoleConnectionStatus=Ge(false);saveHideConsoleConnectionStatus(t){this.updatingHideConsoleConnectionStatus.set(true),this.#t.setHideConsoleConnectionStatus(!t).pipe(qu(()=>this.updatingHideConsoleConnectionStatus.set(false))).subscribe();}updatingControllerIpcState=Ge(false);saveControllerIpcState(t){this.updatingControllerIpcState.set(true),this.#t.setControllerIpcState(!!t).pipe(qu(()=>this.updatingControllerIpcState.set(false))).subscribe();}showPassphraseForm=Ge(false);isUpdating=Ge(false);passphrase=Ge("");repeatPassphrase=Ge("");passwordUpdated=Ge(false);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(true),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(qu(()=>this.isUpdating.set(false))).subscribe({next:()=>{this.showPassphraseForm.set(false),this.passwordUpdated.set(true),setTimeout(()=>{this.passwordUpdated.set(false);},3e3);}}));}openPassphraseForm(){this.showPassphraseForm.set(true);}cancelPasswordChange(){this.showPassphraseForm.set(false);}languageOptions=Ge([...wt].sort((t,e)=>t.label.localeCompare(e.label)));powerModeOptions=Nt(()=>{let t=this.#e.systemInfo();return !t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=Ge(on);timeTypeOptions=Ge(Zn);timeType=Ge("none");timeValue=Yn(0,300);timeRange=Nt(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#s.setItem("locale",t),window.location.reload());}updateTimeValue(t){this.timeValue.set(t),this.#_();}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_();}#l;#_(){this.#l&&clearTimeout(this.#l),this.#l=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),n=e==="none"||t===0?"":`${t}${e}`;n!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(n).subscribe();},1e3);}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(true),this.#t.setUsageReporterLevel(t).subscribe());}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe());}serverSettingsEffect=za(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),s=e.slice(0,-1),l=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":l.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(s));let E=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(E);});setDarkMode(){this.#i.setDarkMode();}setLightMode(){this.#i.setLightMode();}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#n.open(h,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#c(t));}}):this.#c(t));}openLegacyUI(){this.#n.open(h,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank");}});}#c(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t);}#d(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let n=t[e].trim();if(n.startsWith("default-client="))return n.substring(15)}return "ngclient"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-settings"]],decls:130,vars:38,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let s;s=$localize`Customize your application theme`;let l;l=$localize`Passwords`;let E;E=$localize`Change server passphrase`;let S;S=$localize`Language`;let m;m=$localize`Select a language for the platform`;let f;f=$localize`Use legacy interface`;let W;W=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let ue;ue=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#47\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let J;J=$localize`${"\uFFFD#50\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#50\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*51:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*52:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*52:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,J=oC(J);let z;z=$localize`Allow remote access (requires restart)`;let Q;Q=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Y;Y=$localize`Allow remote access`;let Ie;Ie=$localize`Prevent tray icon automatic log-in`;let Me;Me=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Pe;Pe=$localize`Prevent tray icon automatic log-in`;let Oe;Oe=$localize`Update channel`;let be;be=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let ve;ve=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Re;Re=$localize`Stable`;let Ge;Ge=$localize`Official stable release.`;let ye;ye=$localize`Beta`;let Fe;Fe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let $e;$e=$localize`Experimental`;let Ae;Ae=$localize`Early previews of new features. Not for use with important data.`;let Le;Le=$localize`Canary`;let we;we=$localize`Builds for developers and testers only. Not for use with important data.`;let De;De=$localize`Pause after startup or hibernation`;let xe;xe=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let ke;ke=$localize`Advanced options`;let Xe;Xe=$localize`Console connection status`;let Je;Je=$localize`Reporting configured by server`;let ze;ze=$localize`Connect to console`;let Ve;Ve=$localize`Configure console control`;let Ue;Ue=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Be;Be=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let He;He=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let We;We=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let je;je=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let qe;qe=$localize`Toggle console connection status`;let Ke;Ke=$localize`Toggle the visibility of the console connection status indicator.`;let Qe;Qe=$localize`Console connection status is hidden`;let Ye;Ye=$localize`Console connection status is visible`;let Ze;Ze=$localize`Enter new password`;let et;et=$localize`Repeat password`;let ge;ge=$localize`Password have to be filled and have to match`;let tt;tt=$localize`Passphrase`;let nt;nt=$localize`Repeat passphrase`;let it;it=$localize`Cancel`;let ot;ot=$localize` Update passphrase `;let st;st=$localize` Update passphrase `;let at;at=$localize`Change password`;let rt;rt=$localize`Allowed hostnames`;let lt;lt=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let _t;_t=$localize` Update allowed hostnames `;let ct;ct=$localize`Power mode provider`;let dt;dt=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let Tt;Tt=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let St;St=$localize`Usage statistics`;let ut;ut=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let gt;gt=$localize`public usage statistics.`;let pt;pt=$localize` All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `;let Ct;Ct=$localize`Experimental options`;let mt;mt=$localize`Toggle experimental options.`;let Et;Et=$localize`Operations run in an isolated process`;let Nt;return Nt=$localize`Operations run inside the server process`,[t,e,n,s,l,E,S,m,f,W,ue,J,z,Q,Y,Ie,Me,Pe,Oe,be,ve,Re,Ge,ye,Fe,$e,Ae,Le,we,De,xe,ke,Xe,Je,ze,Ve,Ue,Be,He,We,je,qe,Ke,Qe,Ye,tt,nt,it,ot,st,at,rt,lt,_t,ct,dt,Tt,St,ut,gt,pt,Ct,mt,Et,Nt,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"checkedChange","checked"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised",3,"checked"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"reporting-url","primary","simple"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","new-password","placeholder",Ze,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","new-password","placeholder",et,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",ge,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ge,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){e&1&&(vg(0,"app-status-bar"),Qi(1,"div",65)(2,"header")(3,"div",66)(4,"h2"),nC(5,0),$l(),Qi(6,"p"),nC(7,1),$l()()(),aT(8,In,8,2,"section")(9,Fn,10,2),Qi(10,"section")(11,"div",67)(12,"h3"),nC(13,2),$l(),Qi(14,"p"),nC(15,3),$l()(),Qi(16,"div",68)(17,"div",69)(18,"img",70),Vg("click",function(){return n.setLightMode()}),$l(),Qi(19,"img",71),Vg("click",function(){return n.setDarkMode()}),$l()()()(),Qi(20,"section")(21,"div",67)(22,"h3"),nC(23,4),$l(),Qi(24,"p"),nC(25,5),$l()(),Qi(26,"div",72),aT(27,Dn,15,7)(28,kn,4,1,"div",73),$l()(),Qi(29,"section")(30,"div",67)(31,"h3"),nC(32,6),$l(),Qi(33,"p"),nC(34,7),$l()(),Qi(35,"div",68)(36,"sh-select",74)(37,"input",75),Vg("ngModelChange",function(l){return n.updateLocale(l)}),$l(),CD(),$l()()(),Qi(38,"section")(39,"div",67)(40,"h3"),nC(41,8),$l(),Qi(42,"p"),nC(43,9),$l()(),Qi(44,"div",76)(45,"button",77),Vg("click",function(){return n.openLegacyUI()}),Lg(46,10),vg(47,"sh-icon"),Fg(),$l(),Qi(48,"button",77),Vg("click",function(){return n.changeDefaultClientTo(n.defaultClient()==="ngclient"?"ngax":"ngclient")}),Lg(49,11),vg(50,"sh-icon"),aT(51,Xn,2,0,"span")(52,Jn,2,0,"span"),Fg(),$l()()(),Qi(53,"section")(54,"div",67)(55,"h3"),nC(56,12),$l(),Qi(57,"p"),nC(58,13),$l()(),Qi(59,"div",78)(60,"sh-toggle",79),Vg("checkedChange",function(l){return n.updateRemoteAccess(l)}),Qi(61,"label"),nC(62,14),$l()(),aT(63,zn,8,3),$l()(),Qi(64,"section")(65,"div",67)(66,"h3"),nC(67,15),$l(),Qi(68,"p"),nC(69,16),$l()(),Qi(70,"div",68)(71,"sh-toggle",79),Vg("checkedChange",function(l){return n.saveDisableTrayIconLogin(l)}),Qi(72,"label"),nC(73,17),$l()()()(),aT(74,Vn,9,5,"section"),Qi(75,"section")(76,"div",67)(77,"h3"),nC(78,18),$l(),aT(79,Un,2,1,"p"),aT(80,Bn,1,0,"sh-progress-bar",80),$l(),Qi(81,"div",81)(82,"div",82),Vg("click",function(){return n.setNewChannel("")}),Qi(83,"sh-radio",83),nC(84,19),$l(),Qi(85,"p"),nC(86,20),$l()(),Qi(87,"div",82),Vg("click",function(){return n.setNewChannel("stable")}),Qi(88,"sh-radio",83),nC(89,21),$l(),Qi(90,"p"),nC(91,22),$l()(),Qi(92,"div",82),Vg("click",function(){return n.setNewChannel("beta")}),Qi(93,"sh-radio",83),nC(94,23),$l(),Qi(95,"p"),nC(96,24),$l()(),Qi(97,"div",82),Vg("click",function(){return n.setNewChannel("experimental")}),Qi(98,"sh-radio",83),nC(99,25),$l(),Qi(100,"p"),nC(101,26),$l()(),Qi(102,"div",82),Vg("click",function(){return n.setNewChannel("canary")}),Qi(103,"sh-radio",83),nC(104,27),$l(),Qi(105,"p"),nC(106,28),$l()()()(),Qi(107,"section")(108,"div",67)(109,"h3"),nC(110,29),$l(),Qi(111,"p"),nC(112,30),$l()(),Qi(113,"div",68)(114,"div",84)(115,"sh-range-slider",85)(116,"input",86),cm("ngModelChange",function(l){return UC(n.timeValue,l)||(n.timeValue=l),l}),Vg("ngModelChange",function(l){return n.updateTimeValue(l)}),$l(),CD(),$l(),Qi(117,"sh-select",87)(118,"input",88),Vg("ngModelChange",function(l){return n.updateTimeType(l)}),$l(),CD(),ag(119,Hn,1,1,"ng-template"),$l()()()(),aT(120,jn,17,5,"section"),aT(121,Qn,12,2,"section"),$l(),vg(122,"sh-divider"),Qi(123,"div",65)(124,"section")(125,"div",89)(126,"h3"),nC(127,31),$l(),vg(128,"app-advanced-options-settings"),$l()()(),vg(129,"sh-divider")),e&2&&(CE(8),cT(n.isUsingRelay()?8:9),CE(10),Yg("active",!n.isDarkMode()),CE(),Yg("active",n.isDarkMode()),CE(8),cT(n.showPassphraseForm()?27:28),CE(9),yg("options",n.languageOptions())("isClearable",false)("inlineSearch",true),CE(),yg("ngModel",n.langCtrl())("ngModelOptions",KC(36,Se)),_D(),CE(14),cT(n.defaultClient()==="ngax"?51:52),CE(9),yg("checked",n.allowRemoteAccess()),CE(3),cT(n.allowRemoteAccess()?63:-1),CE(8),yg("checked",n.disableTrayIconLogin()),CE(3),cT(n.powerModeOptions().length>0?74:-1),CE(5),cT(n.sysinfo()?.ServerVersion?79:-1),CE(),cT(n.updatingChannel()?80:-1),CE(3),yg("checked",n.updateChannel()===""),CE(),jg(n.sysinfo()?.DefaultUpdateChannel),rC(84),CE(2),jg(n.sysinfo()?.ServerVersionType),rC(86),CE(2),yg("checked",n.updateChannel()==="stable"),CE(5),yg("checked",n.updateChannel()==="beta"),CE(5),yg("checked",n.updateChannel()==="experimental"),CE(5),yg("checked",n.updateChannel()==="canary"),CE(12),yg("unit",n.timeType()==="none"?"s":n.timeType()),CE(),yg("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),am("ngModel",n.timeValue),yg("ngModelOptions",KC(37,Se)),_D(),CE(),yg("options",n.timeTypeOptions())("isClearable",false),CE(),yg("ngModel",n.timeType()),_D(),CE(2),cT(n.usageStatisticsDisabled()?-1:120),CE(),cT(n.hasIpcController()?121:-1));},dependencies:[Bn$1,Ze,on$1,Rn$1,Jt,Gn$1,ee,Te,K,v,O$1,tn,d,J,at,Fe,N,c,ue,Nt$1,D],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"]})};
4
4
  export{Yn as debounceSignal,fe as default};
@@ -1,2 +1,2 @@
1
- import {O}from'./chunk-BYJ0fSUP.js';import {bs as x,T,a6 as be,ab as C$1,m,a as T$1,bh as Q,G as Ge,N as Nt,z as za,at as h,aZ as ee}from'./main-QLXVXD6E.js';var S=new x("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});var C=class l{#c=T(S);#g=T(be);#t=T(C$1);#o=T(m);#l=T(T$1);#n=T(Q);#u=T(O);constructor(){this.#l.subscribe("remotecontrol");}repeatRegisterTimer=null;#s=null;#r=0;#h=5;#m=2e3;pendingRefresh=false;state=Ge("unknown");claimUrl=Ge(null);registerUrl=Ge("");customRegisterUrl=Ge("");statusMessage=Nt(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=za(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"");});remoteEffect=za(()=>{let e=this.#l.remoteControlState();e&&this.#e(e);});pendingRefreshEffect=za(()=>{this.#n.isConnectionMethodSet()&&this.pendingRefresh&&(this.pendingRefresh=false,this.refreshRemoteControlStatus());});#a=Nt(()=>{let e=this.#n.getConnectionMethod()==="websocket",i=this.#o.hasWsRemoteControl();return e&&i});#f(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");}#e(e){if(this.#r=0,this.#f(e),this.#a())return;let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#e(t)});}#i(e){if(this.#s!==null&&(clearTimeout(this.#s),this.#s=null),this.#r>=this.#h){this.state.set("registeringfaulted"),this.#r=0;return}let i=this.#m*Math.pow(2,this.#r);this.#r++,this.#s=setTimeout(()=>{this.#s=null,this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},i);}refreshRemoteControlStatus(){if(!this.#a()){if(!this.#n.isConnectionMethodSet()){this.pendingRefresh=true;return}this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}}beginRemoteRegistration(e=false){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#e(i),error:i=>this.#i(i)});}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}deleteRemoteControl(){let e=this;this.#g.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#e(t),error:t=>e.#i(t)});}});}openConsole(e="/app/machines",i){let t=this.#u.serverSettings(),y=this.#o.systemInfo(),r="https://app.duplicati.com",c=y?.RemoteControlDashboardUrl??"";if(c.length>0&&(r=c),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let v=new URLSearchParams(i);r+=`?${v.toString()}`;}this.#c.open(r,"_blank");}static \u0275fac=function(i){return new(i||l)};static \u0275prov=ee({token:l,factory:l.\u0275fac,providedIn:"root"})};
1
+ import {O}from'./chunk-BVEyeg9y.js';import {bs as x,T,a6 as be,ab as C$1,m,a as T$1,bh as Q,G as Ge,N as Nt,z as za,at as h,aZ as ee}from'./main-VVQP2YE7.js';var S=new x("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});var C=class l{#c=T(S);#g=T(be);#t=T(C$1);#o=T(m);#l=T(T$1);#n=T(Q);#u=T(O);constructor(){this.#l.subscribe("remotecontrol");}repeatRegisterTimer=null;#s=null;#r=0;#h=5;#m=2e3;pendingRefresh=false;state=Ge("unknown");claimUrl=Ge(null);registerUrl=Ge("");customRegisterUrl=Ge("");statusMessage=Nt(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=za(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"");});remoteEffect=za(()=>{let e=this.#l.remoteControlState();e&&this.#e(e);});pendingRefreshEffect=za(()=>{this.#n.isConnectionMethodSet()&&this.pendingRefresh&&(this.pendingRefresh=false,this.refreshRemoteControlStatus());});#a=Nt(()=>{let e=this.#n.getConnectionMethod()==="websocket",i=this.#o.hasWsRemoteControl();return e&&i});#f(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");}#e(e){if(this.#r=0,this.#f(e),this.#a())return;let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#e(t)});}#i(e){if(this.#s!==null&&(clearTimeout(this.#s),this.#s=null),this.#r>=this.#h){this.state.set("registeringfaulted"),this.#r=0;return}let i=this.#m*Math.pow(2,this.#r);this.#r++,this.#s=setTimeout(()=>{this.#s=null,this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},i);}refreshRemoteControlStatus(){if(!this.#a()){if(!this.#n.isConnectionMethodSet()){this.pendingRefresh=true;return}this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}}beginRemoteRegistration(e=false){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#e(i),error:i=>this.#i(i)});}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}deleteRemoteControl(){let e=this;this.#g.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#e(t),error:t=>e.#i(t)});}});}openConsole(e="/app/machines",i){let t=this.#u.serverSettings(),y=this.#o.systemInfo(),r="https://app.duplicati.com",c=y?.RemoteControlDashboardUrl??"";if(c.length>0&&(r=c),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let v=new URLSearchParams(i);r+=`?${v.toString()}`;}this.#c.open(r,"_blank");}static \u0275fac=function(i){return new(i||l)};static \u0275prov=ee({token:l,factory:l.\u0275fac,providedIn:"root"})};
2
2
  export{C,S};
@@ -1,2 +1,2 @@
1
- import {v as v$1}from'./chunk-BRJ93eei.js';import {ShipTable as ot}from'./chunk-SycSMD-r.js';import {c}from'./chunk-CQv4eyEK.js';import {T,b as I1,z as za,G as Ge,h as hw,d as N,v as v$2,aJ as ci,f as aT,i as cT,Y as Yg,Q as Qi,n as nC,$ as $l,j as vg,a1 as dT,k as iC,ag as Zg,A as yg,C as CE,a2 as fT,l as vT,V as Vg,r as kd,O as Od,w as jC,aM as ob,J as om,aN as ab,aa as Ql,ap as lT}from'./main-QLXVXD6E.js';import'./chunk-C5p3bQwH.js';import'./chunk-PONAC1Ya.js';var B=(t,n)=>n.ID;function J(t,n){t&1&&(Qi(0,"div",4),nC(1,0),$l());}function U(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),om(e);}}function X(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Exception"),$l(),Qi(2,"ol",15),dT(3,U,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Exception));}}function j(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),om(e);}}function z(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Message"),$l(),Qi(2,"ol",15),dT(3,j,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Message));}}function W(t,n){if(t&1&&(Qi(0,"code"),aT(1,X,5,0),aT(2,z,5,0),$l()),t&2){let e=iC(2).$implicit;CE(),cT(e.Exception?1:-1),CE(),cT(e.Message?2:-1);}}function H(t,n){if(t&1&&(Qi(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),jC(4),$l(),Qi(5,"div",14),jC(6),$l(),Qi(7,"div",14),jC(8),$l(),Qi(9,"div",14),jC(10),$l(),Qi(11,"div",14),jC(12),$l()(),aT(13,W,3,2,"code"),$l()()),t&2){let e=iC().$implicit;CE(4),Ql("ID: ",e.ID),CE(2),Ql("Type: ",e.Type),CE(2),Ql("Tag: ",e.Tag),CE(2),Ql("TaskID: ",e.TaskID),CE(2),Ql("MessageID: ",e.MessageID),CE(),cT(e.Exception||e.Message?13:-1);}}function q(t,n){if(t&1){let e=vT();Qi(0,"tr",10),Vg("click",function(){let u=kd(e).$implicit,g=iC(2);return Od(g.toggleRow(u.ID))}),Qi(1,"td"),jC(2),ob(3,"date"),$l(),Qi(4,"td"),jC(5),$l(),Qi(6,"td",8)(7,"button",11)(8,"sh-icon"),jC(9,"caret-down"),$l()()()(),aT(10,H,14,6,"tr");}if(t&2){let e=n.$implicit,a=iC(2);CE(2),om(ab(3,5,e.When,"medium")),CE(3),om(a.subStringMessage(e.Message)),CE(2),Yg("rotated-icon",e.ID===a.openRowId()),CE(3),cT(e.ID===a.openRowId()?10:-1);}}function K(t,n){if(t&1&&(Qi(0,"sh-table",6)(1,"tr",7)(2,"th"),nC(3,1),$l(),Qi(4,"th"),nC(5,2),$l(),vg(6,"th",8),$l(),dT(7,q,11,8,null,null,B),Qi(9,"div",9),nC(10,3),$l()()),t&2){let e=iC();Zg("grid-template-columns","auto 1fr auto"),Yg("type-b",true),yg("data",e.logs())("loading",e.logsLoading()),CE(7),fT(e.logs());}}var v=class t{#e=T(v$1);whenFilter=I1();backupIdFilter=I1();polling=I1();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=za(()=>{let n=this.polling()??false;this.#e.isPolling.set(n);});openRowId=Ge(null);whenEffect=za(()=>{let n=this.whenFilter()??null;this.#e.setWhenFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});backupIdEffect=za(()=>{let n=this.backupIdFilter()??null;this.#e.setBackupIdFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});toggleRow(n){n!=null&&this.openRowId.set(n===this.openRowId()?null:n);}breakIntoLines(n){return n?n.split(`
1
+ import {v as v$1}from'./chunk-CIcBoEH1.js';import {ShipTable as ot}from'./chunk-B52v_pjw.js';import {c}from'./chunk-BpRWdcC8.js';import {T,b as I1,z as za,G as Ge,h as hw,d as N,v as v$2,aJ as ci,f as aT,i as cT,Y as Yg,Q as Qi,n as nC,$ as $l,j as vg,a1 as dT,k as iC,ag as Zg,A as yg,C as CE,a2 as fT,l as vT,V as Vg,r as kd,O as Od,w as jC,aM as ob,J as om,aN as ab,aa as Ql,ap as lT}from'./main-VVQP2YE7.js';import'./chunk-BTgf5lfZ.js';import'./chunk-B8uF0dom.js';var B=(t,n)=>n.ID;function J(t,n){t&1&&(Qi(0,"div",4),nC(1,0),$l());}function U(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),om(e);}}function X(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Exception"),$l(),Qi(2,"ol",15),dT(3,U,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Exception));}}function j(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),om(e);}}function z(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Message"),$l(),Qi(2,"ol",15),dT(3,j,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Message));}}function W(t,n){if(t&1&&(Qi(0,"code"),aT(1,X,5,0),aT(2,z,5,0),$l()),t&2){let e=iC(2).$implicit;CE(),cT(e.Exception?1:-1),CE(),cT(e.Message?2:-1);}}function H(t,n){if(t&1&&(Qi(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),jC(4),$l(),Qi(5,"div",14),jC(6),$l(),Qi(7,"div",14),jC(8),$l(),Qi(9,"div",14),jC(10),$l(),Qi(11,"div",14),jC(12),$l()(),aT(13,W,3,2,"code"),$l()()),t&2){let e=iC().$implicit;CE(4),Ql("ID: ",e.ID),CE(2),Ql("Type: ",e.Type),CE(2),Ql("Tag: ",e.Tag),CE(2),Ql("TaskID: ",e.TaskID),CE(2),Ql("MessageID: ",e.MessageID),CE(),cT(e.Exception||e.Message?13:-1);}}function q(t,n){if(t&1){let e=vT();Qi(0,"tr",10),Vg("click",function(){let u=kd(e).$implicit,g=iC(2);return Od(g.toggleRow(u.ID))}),Qi(1,"td"),jC(2),ob(3,"date"),$l(),Qi(4,"td"),jC(5),$l(),Qi(6,"td",8)(7,"button",11)(8,"sh-icon"),jC(9,"caret-down"),$l()()()(),aT(10,H,14,6,"tr");}if(t&2){let e=n.$implicit,a=iC(2);CE(2),om(ab(3,5,e.When,"medium")),CE(3),om(a.subStringMessage(e.Message)),CE(2),Yg("rotated-icon",e.ID===a.openRowId()),CE(3),cT(e.ID===a.openRowId()?10:-1);}}function K(t,n){if(t&1&&(Qi(0,"sh-table",6)(1,"tr",7)(2,"th"),nC(3,1),$l(),Qi(4,"th"),nC(5,2),$l(),vg(6,"th",8),$l(),dT(7,q,11,8,null,null,B),Qi(9,"div",9),nC(10,3),$l()()),t&2){let e=iC();Zg("grid-template-columns","auto 1fr auto"),Yg("type-b",true),yg("data",e.logs())("loading",e.logsLoading()),CE(7),fT(e.logs());}}var v=class t{#e=T(v$1);whenFilter=I1();backupIdFilter=I1();polling=I1();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=za(()=>{let n=this.polling()??false;this.#e.isPolling.set(n);});openRowId=Ge(null);whenEffect=za(()=>{let n=this.whenFilter()??null;this.#e.setWhenFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});backupIdEffect=za(()=>{let n=this.backupIdFilter()??null;this.#e.setBackupIdFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});toggleRow(n){n!=null&&this.openRowId.set(n===this.openRowId()?null:n);}breakIntoLines(n){return n?n.split(`
2
2
  `):[]}subStringMessage(n){return n?n.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&Yg("is-disabled",a.logLevel()==="Disabled");},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let n;n=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let u;return u=$localize`No data available`,[n,e,a,u,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["thead",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["shButton","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&aT(0,J,2,0,"div",4)(1,K,11,6,"sh-table",5),e&2&&cT(a.logLevel()==="Disabled"?0:1);},dependencies:[ot,N,c,v$2,ci],styles:["[_nghost-%COMP%]{display:block}.is-disabled[_nghost-%COMP%]{padding:0 2rem}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column;background:var(--base-2)}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1.5rem;border-radius:var(--shape-2);overflow:auto;white-space:pre;max-width:100%;width:100%}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0}code[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-block;margin-bottom:.25rem}code[_ngcontent-%COMP%] ol.line-numbers-ol[_ngcontent-%COMP%] + strong[_ngcontent-%COMP%]{margin-top:1.25rem}"]})};export{v as default};
@@ -1 +1 @@
1
- import {v}from'./chunk-BRJ93eei.js';import {v as ve}from'./chunk-DKacf9Tj.js';import {x}from'./chunk-gaP3Sx_C.js';import'./chunk-D3SUPUQT.js';import {T,e as ee,G as Ge,b7 as k,h as hw,v as v$1,d as N,Z as lr,a8 as To,_ as _t,Q as Qi,L as Lg,j as vg,F as Fg,$ as $l,f as aT,C as CE,i as cT,l as vT,n as nC,aP as ql,V as Vg,r as kd,k as iC,O as Od,aQ as Gl,A as yg,au as jg,av as rC}from'./main-QLXVXD6E.js';function W(u,S){if(u&1){let n=vT();Qi(0,"sh-menu",16)(1,"button",17),nC(2,2),$l(),ql(3,18),Qi(4,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Disabled"))}),Lg(5,3),vg(6,"sh-icon"),Fg(),$l(),Qi(7,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Verbose"))}),Lg(8,4),vg(9,"sh-icon"),Fg(),$l(),Qi(10,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("ExplicitOnly"))}),Lg(11,5),vg(12,"sh-icon"),Fg(),$l(),Qi(13,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Profiling"))}),Lg(14,6),vg(15,"sh-icon"),Fg(),$l(),Qi(16,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Retry"))}),Lg(17,7),vg(18,"sh-icon"),Fg(),$l(),Qi(19,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Information"))}),Lg(20,8),vg(21,"sh-icon"),Fg(),$l(),Qi(22,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("DryRun"))}),Lg(23,9),vg(24,"sh-icon"),Fg(),$l(),Qi(25,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Warning"))}),Lg(26,10),vg(27,"sh-icon"),Fg(),$l(),Qi(28,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Error"))}),Lg(29,11),vg(30,"sh-icon"),Fg(),$l(),Gl(),$l();}if(u&2){let n=iC();yg("openIndicator",true),CE(2),jg(n.logLevelByLabel()),rC(2);}}var O=class u{#n=T(ee);#e=T(v);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ge(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=hw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Qi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Lg(3,0),vg(4,"sh-icon"),Fg(),$l(),Qi(5,"button",15),Lg(6,1),vg(7,"sh-icon"),Fg(),$l()(),aT(8,W,31,2,"sh-menu",16),$l(),vg(9,"router-outlet")),n&2&&(CE(8),cT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v$1,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
1
+ import {v}from'./chunk-CIcBoEH1.js';import {v as ve}from'./chunk-DmDqcC4A.js';import {x}from'./chunk-CAwTsBqQ.js';import'./chunk-B9maI7Xa.js';import {T,e as ee,G as Ge,b7 as k,h as hw,v as v$1,d as N,Z as lr,a8 as To,_ as _t,Q as Qi,L as Lg,j as vg,F as Fg,$ as $l,f as aT,C as CE,i as cT,l as vT,n as nC,aP as ql,V as Vg,r as kd,k as iC,O as Od,aQ as Gl,A as yg,au as jg,av as rC}from'./main-VVQP2YE7.js';function W(u,S){if(u&1){let n=vT();Qi(0,"sh-menu",16)(1,"button",17),nC(2,2),$l(),ql(3,18),Qi(4,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Disabled"))}),Lg(5,3),vg(6,"sh-icon"),Fg(),$l(),Qi(7,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Verbose"))}),Lg(8,4),vg(9,"sh-icon"),Fg(),$l(),Qi(10,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("ExplicitOnly"))}),Lg(11,5),vg(12,"sh-icon"),Fg(),$l(),Qi(13,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Profiling"))}),Lg(14,6),vg(15,"sh-icon"),Fg(),$l(),Qi(16,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Retry"))}),Lg(17,7),vg(18,"sh-icon"),Fg(),$l(),Qi(19,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Information"))}),Lg(20,8),vg(21,"sh-icon"),Fg(),$l(),Qi(22,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("DryRun"))}),Lg(23,9),vg(24,"sh-icon"),Fg(),$l(),Qi(25,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Warning"))}),Lg(26,10),vg(27,"sh-icon"),Fg(),$l(),Qi(28,"button",19),Vg("click",function(){kd(n);let e=iC();return Od(e.updateLogLevel("Error"))}),Lg(29,11),vg(30,"sh-icon"),Fg(),$l(),Gl(),$l();}if(u&2){let n=iC();yg("openIndicator",true),CE(2),jg(n.logLevelByLabel()),rC(2);}}var O=class u{#n=T(ee);#e=T(v);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ge(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=hw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Qi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Lg(3,0),vg(4,"sh-icon"),Fg(),$l(),Qi(5,"button",15),Lg(6,1),vg(7,"sh-icon"),Fg(),$l()(),aT(8,W,31,2,"sh-menu",16),$l(),vg(9,"router-outlet")),n&2&&(CE(8),cT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v$1,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
@@ -1 +1 @@
1
- import {T,ab as C,a6 as be,a5 as g,e as ee,b as I1,N as Nt,G as Ge,at as h,H as qu,h as hw,v,d as N,_ as _t,aH as m,ak as um,Q as Qi,n as nC,$ as $l,f as aT,w as jC,V as Vg,al as WC,C as CE,au as jg,av as rC,i as cT,A as yg,a$ as JC,a3 as KC,Y as Yg,o as oC,l as vT,p as cm,r as kd,k as iC,U as UC,O as Od,s as CD,x as am,y as _D,aM as ob,ao as qC,aS as cb,aG as pt,b0 as Hs,b1 as oy}from'./main-QLXVXD6E.js';import {B as Bn,y as yt,R as Rn,J as Jt}from'./chunk-DoYGADYB.js';import {$}from'./chunk-D3d-eReU.js';import {U}from'./chunk-D2aWqPl_.js';var Ee=l=>["/backup",l,"export"],ue=()=>["/"];function Ce(l,_){if(l&1){let e=vT();Qi(0,"section")(1,"h4"),nC(2,4),$l(),Qi(3,"p"),nC(4,5),$l(),Qi(5,"sh-checkbox",11),jC(6," Delete local database "),Qi(7,"input",12),cm("ngModelChange",function(t){kd(e);let a=iC();return UC(a.deleteLocalDb,t)||(a.deleteLocalDb=t),Od(t)}),$l(),CD(),$l()();}if(l&2){let e=iC();CE(7),am("ngModel",e.deleteLocalDb),_D();}}function de(l,_){if(l&1){let e=vT();Qi(0,"section")(1,"h4"),nC(2,6),$l(),Qi(3,"p"),nC(4,7),ob(5,"bytes"),$l(),Qi(6,"sh-checkbox",11),jC(7," Delete remote files "),Qi(8,"input",12),cm("ngModelChange",function(t){kd(e);let a=iC();return UC(a.deleteRemoteFiles,t)||(a.deleteRemoteFiles=t),Od(t)}),$l(),CD(),$l()();}if(l&2){let e=iC(),t=qC(0)?.Backup?.Metadata?.TargetFilesSize??0;CE(5),jg(e.fileCount())(e.fileCount())(cb(5,4,t,true,true)),rC(4),CE(3),am("ngModel",e.deleteRemoteFiles),_D();}}var R=class l{#t=T(C);#n=T(be);#e=T(g);#o=T(ee);id=I1.required();backup=Nt(()=>this.#e.getBackupById(this.id()));noLocalDbResource=$({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(pt(()=>true),Hs(()=>oy(false)))});fileCount=Nt(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=Ge(false);deleteRemoteFiles=Ge(false);isDeleting=Ge(false);deleteBackup(){let _=this.id(),e=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(true),this.#n.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#e.deleteBackup({id:_,deleteLocalDb:e,deleteRemoteFiles:i}).pipe(qu(()=>this.isDeleting.set(false))).subscribe({next:()=>{this.#o.navigate(["/"]);}});}});}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=hw({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let t;t=$localize`Cancel`;let a;a=$localize`Delete local database`;let O;O=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let y;y=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=oC(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let k;return k=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,e,i,t,a,O,y,k,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(e,i){if(e&1&&(um(0),Qi(1,"h3"),nC(2,0),$l(),aT(3,Ce,8,1,"section"),Qi(4,"section")(5,"h4"),nC(6,1),$l(),Qi(7,"p"),nC(8,2),$l(),Qi(9,"button",8),jC(10," Export configuration "),Qi(11,"sh-icon"),jC(12,"caret-right"),$l()()(),aT(13,de,9,8,"section"),Qi(14,"div",9)(15,"button",8),nC(16,3),$l(),Qi(17,"button",10),Vg("click",function(){return i.deleteBackup()}),jC(18,"Delete backup"),$l()()),e&2){let t=WC(i.backup()),a=i.noLocalDbResource.value();CE(2),jg(t?.Backup?.Name),rC(2),CE(),cT(a?3:-1),CE(6),yg("routerLink",JC(8,Ee,i.id())),CE(4),cT(a?13:-1),CE(2),yg("routerLink",KC(10,ue)),CE(2),Yg("loading",i.isDeleting());}},dependencies:[U,v,N,Bn,yt,Rn,Jt,_t,m],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"]})};export{R as default};
1
+ import {T,ab as C,a6 as be,a5 as g,e as ee,b as I1,N as Nt,G as Ge,at as h,H as qu,h as hw,v,d as N,_ as _t,aH as m,ak as um,Q as Qi,n as nC,$ as $l,f as aT,w as jC,V as Vg,al as WC,C as CE,au as jg,av as rC,i as cT,A as yg,a$ as JC,a3 as KC,Y as Yg,o as oC,l as vT,p as cm,r as kd,k as iC,U as UC,O as Od,s as CD,x as am,y as _D,aM as ob,ao as qC,aS as cb,aG as pt,b0 as Hs,b1 as oy}from'./main-VVQP2YE7.js';import {B as Bn,y as yt,R as Rn,J as Jt}from'./chunk-BO2GlieG.js';import {$}from'./chunk-Box6Lckh.js';import {U}from'./chunk-DqIU7ViF.js';var Ee=l=>["/backup",l,"export"],ue=()=>["/"];function Ce(l,_){if(l&1){let e=vT();Qi(0,"section")(1,"h4"),nC(2,4),$l(),Qi(3,"p"),nC(4,5),$l(),Qi(5,"sh-checkbox",11),jC(6," Delete local database "),Qi(7,"input",12),cm("ngModelChange",function(t){kd(e);let a=iC();return UC(a.deleteLocalDb,t)||(a.deleteLocalDb=t),Od(t)}),$l(),CD(),$l()();}if(l&2){let e=iC();CE(7),am("ngModel",e.deleteLocalDb),_D();}}function de(l,_){if(l&1){let e=vT();Qi(0,"section")(1,"h4"),nC(2,6),$l(),Qi(3,"p"),nC(4,7),ob(5,"bytes"),$l(),Qi(6,"sh-checkbox",11),jC(7," Delete remote files "),Qi(8,"input",12),cm("ngModelChange",function(t){kd(e);let a=iC();return UC(a.deleteRemoteFiles,t)||(a.deleteRemoteFiles=t),Od(t)}),$l(),CD(),$l()();}if(l&2){let e=iC(),t=qC(0)?.Backup?.Metadata?.TargetFilesSize??0;CE(5),jg(e.fileCount())(e.fileCount())(cb(5,4,t,true,true)),rC(4),CE(3),am("ngModel",e.deleteRemoteFiles),_D();}}var R=class l{#t=T(C);#n=T(be);#e=T(g);#o=T(ee);id=I1.required();backup=Nt(()=>this.#e.getBackupById(this.id()));noLocalDbResource=$({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(pt(()=>true),Hs(()=>oy(false)))});fileCount=Nt(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=Ge(false);deleteRemoteFiles=Ge(false);isDeleting=Ge(false);deleteBackup(){let _=this.id(),e=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(true),this.#n.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#e.deleteBackup({id:_,deleteLocalDb:e,deleteRemoteFiles:i}).pipe(qu(()=>this.isDeleting.set(false))).subscribe({next:()=>{this.#o.navigate(["/"]);}});}});}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=hw({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let t;t=$localize`Cancel`;let a;a=$localize`Delete local database`;let O;O=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let y;y=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=oC(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let k;return k=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,e,i,t,a,O,y,k,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(e,i){if(e&1&&(um(0),Qi(1,"h3"),nC(2,0),$l(),aT(3,Ce,8,1,"section"),Qi(4,"section")(5,"h4"),nC(6,1),$l(),Qi(7,"p"),nC(8,2),$l(),Qi(9,"button",8),jC(10," Export configuration "),Qi(11,"sh-icon"),jC(12,"caret-right"),$l()()(),aT(13,de,9,8,"section"),Qi(14,"div",9)(15,"button",8),nC(16,3),$l(),Qi(17,"button",10),Vg("click",function(){return i.deleteBackup()}),jC(18,"Delete backup"),$l()()),e&2){let t=WC(i.backup()),a=i.noLocalDbResource.value();CE(2),jg(t?.Backup?.Name),rC(2),CE(),cT(a?3:-1),CE(6),yg("routerLink",JC(8,Ee,i.id())),CE(4),cT(a?13:-1),CE(2),yg("routerLink",KC(10,ue)),CE(2),Yg("loading",i.isDeleting());}},dependencies:[U,v,N,Bn,yt,Rn,Jt,_t,m],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"]})};export{R as default};
@@ -1,2 +1,2 @@
1
- import {T,bv as N,b as I1,af as E1,z as za,b9 as ce,h as hw,d as N$1,M as aC,Q as Qi,V as Vg,X as cC,f as aT,$ as $l,aC as mg,C as CE,i as cT,g as NC,Y as Yg,w as jC}from'./main-QLXVXD6E.js';var k=[[["","title",""]],"*"],M=["[title]","*"];function j(t,S){t&1&&jC(0,"Title");}function E(t,S){t&1&&(Qi(0,"sh-icon",1),jC(1,"caret-down"),$l());}var I=(()=>{class t{constructor(){this.#e=T(N),this.disableToggle=I1(false),this.isActive=E1(false),this.#t=za(()=>{this.disableToggle()&&this.isActive.set(true);}),this.color=I1(null),this.variant=I1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}#e;#t;toggle(){this.isActive.set(!this.isActive());}handleKeyDown(o){this.#e.matches(o,"toggle-card.toggle")&&(o.preventDefault(),this.toggle());}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=hw({type:t,selectors:[["sh-toggle-card"]],hostVars:4,hostBindings:function(i,e){i&2&&(NC(e.hostClasses()),Yg("active",e.isActive()));},inputs:{disableToggle:[1,"disableToggle"],isActive:[1,"isActive"],color:[1,"color"],variant:[1,"variant"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:7,vars:4,consts:[["role","button",3,"click","keydown"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(i,e){i&1&&(aC(k),Qi(0,"h3",0),Vg("click",function(){return e.disableToggle()?null:e.toggle()})("keydown",function(D){return e.disableToggle()?null:e.handleKeyDown(D)}),cC(1,0,null,j,1,0),aT(3,E,2,0,"sh-icon",1),$l(),Qi(4,"div",2)(5,"div",3),cC(6,1),$l()()),i&2&&(mg("tabindex",e.disableToggle()?null:"0")("aria-expanded",e.disableToggle()?null:e.isActive()?"true":"false")("aria-disabled",e.disableToggle()?"true":null),CE(3),cT(e.disableToggle()?-1:3));},dependencies:[N$1],styles:[`sh-toggle-card{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}sh-toggle-card.type-a{background-color:transparent;border:var(--border-10)}sh-toggle-card.active .collapsable{grid-template-rows:1fr}sh-toggle-card.active .content{padding:0 1rem 1rem}sh-toggle-card.active .content:empty{padding:0 1rem}sh-toggle-card.active sh-icon.toggle-icon{transform:rotate(180deg)}sh-toggle-card h3{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);padding:1rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-toggle-card sh-icon.toggle-icon{cursor:pointer;transform:rotate(0);transform-origin:center;transition:transform .2s ease}sh-toggle-card .collapsable{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s linear;overflow:hidden}sh-toggle-card .content{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;min-height:0;overflow:hidden}
1
+ import {T,bv as N,b as I1,af as E1,z as za,b9 as ce,h as hw,d as N$1,M as aC,Q as Qi,V as Vg,X as cC,f as aT,$ as $l,aC as mg,C as CE,i as cT,g as NC,Y as Yg,w as jC}from'./main-VVQP2YE7.js';var k=[[["","title",""]],"*"],M=["[title]","*"];function j(t,S){t&1&&jC(0,"Title");}function E(t,S){t&1&&(Qi(0,"sh-icon",1),jC(1,"caret-down"),$l());}var I=(()=>{class t{constructor(){this.#e=T(N),this.disableToggle=I1(false),this.isActive=E1(false),this.#t=za(()=>{this.disableToggle()&&this.isActive.set(true);}),this.color=I1(null),this.variant=I1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}#e;#t;toggle(){this.isActive.set(!this.isActive());}handleKeyDown(o){this.#e.matches(o,"toggle-card.toggle")&&(o.preventDefault(),this.toggle());}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=hw({type:t,selectors:[["sh-toggle-card"]],hostVars:4,hostBindings:function(i,e){i&2&&(NC(e.hostClasses()),Yg("active",e.isActive()));},inputs:{disableToggle:[1,"disableToggle"],isActive:[1,"isActive"],color:[1,"color"],variant:[1,"variant"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:7,vars:4,consts:[["role","button",3,"click","keydown"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(i,e){i&1&&(aC(k),Qi(0,"h3",0),Vg("click",function(){return e.disableToggle()?null:e.toggle()})("keydown",function(D){return e.disableToggle()?null:e.handleKeyDown(D)}),cC(1,0,null,j,1,0),aT(3,E,2,0,"sh-icon",1),$l(),Qi(4,"div",2)(5,"div",3),cC(6,1),$l()()),i&2&&(mg("tabindex",e.disableToggle()?null:"0")("aria-expanded",e.disableToggle()?null:e.isActive()?"true":"false")("aria-disabled",e.disableToggle()?"true":null),CE(3),cT(e.disableToggle()?-1:3));},dependencies:[N$1],styles:[`sh-toggle-card{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}sh-toggle-card.type-a{background-color:transparent;border:var(--border-10)}sh-toggle-card.active .collapsable{grid-template-rows:1fr}sh-toggle-card.active .content{padding:0 1rem 1rem}sh-toggle-card.active .content:empty{padding:0 1rem}sh-toggle-card.active sh-icon.toggle-icon{transform:rotate(180deg)}sh-toggle-card h3{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);padding:1rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-toggle-card sh-icon.toggle-icon{cursor:pointer;transform:rotate(0);transform-origin:center;transition:transform .2s ease}sh-toggle-card .collapsable{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s linear;overflow:hidden}sh-toggle-card .content{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;min-height:0;overflow:hidden}
2
2
  `],encapsulation:2});}}return t})();export{I};
@@ -1,2 +1,2 @@
1
- import {T,N as Nt,h as hw,P as Ul,w as jC,S as Wl,f as aT,C as CE,i as cT,ab as C,G as Ge,H as qu,aZ as ee,a1 as dT,k as iC,ag as Zg,a2 as fT,J as om,ap as lT}from'./main-QLXVXD6E.js';var l=class e{#e=T(C);isLoaded=Ge(false);crashLog=Ge(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(qu(()=>this.isLoaded.set(true))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null);}});}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};function P(e,t){e&1&&(Ul(0,"div",0),jC(1,"Loading ..."),Wl());}function O(e,t){e&1&&(Ul(0,"div",0),jC(1,"No crash log found"),Wl());}function S(e,t){if(e&1&&(Ul(0,"li"),jC(1),Wl()),e&2){let n=t.$implicit;CE(),om(n);}}function w(e,t){if(e&1&&(Ul(0,"div",2)(1,"code")(2,"ol",3),dT(3,S,2,1,"li",null,lT),Wl()()()),e&2){let n=iC();Zg("grid-column","1 / -1")("height","auto"),CE(3),fT(n.breakIntoLines(n.crashLog()));}}var m=class e{#e=T(l);logsLoading=Nt(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load();}breakIntoLines(t){return t?t.split(`
1
+ import {T,N as Nt,h as hw,P as Ul,w as jC,S as Wl,f as aT,C as CE,i as cT,ab as C,G as Ge,H as qu,aZ as ee,a1 as dT,k as iC,ag as Zg,a2 as fT,J as om,ap as lT}from'./main-VVQP2YE7.js';var l=class e{#e=T(C);isLoaded=Ge(false);crashLog=Ge(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(qu(()=>this.isLoaded.set(true))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null);}});}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};function P(e,t){e&1&&(Ul(0,"div",0),jC(1,"Loading ..."),Wl());}function O(e,t){e&1&&(Ul(0,"div",0),jC(1,"No crash log found"),Wl());}function S(e,t){if(e&1&&(Ul(0,"li"),jC(1),Wl()),e&2){let n=t.$implicit;CE(),om(n);}}function w(e,t){if(e&1&&(Ul(0,"div",2)(1,"code")(2,"ol",3),dT(3,S,2,1,"li",null,lT),Wl()()()),e&2){let n=iC();Zg("grid-column","1 / -1")("height","auto"),CE(3),fT(n.breakIntoLines(n.crashLog()));}}var m=class e{#e=T(l);logsLoading=Nt(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load();}breakIntoLines(t){return t?t.split(`
2
2
  `):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=hw({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,d){n&1&&(Ul(0,"h3"),jC(1,"Crash log"),Wl(),aT(2,P,2,0,"div",0)(3,O,2,0,"div",0)(4,w,5,4,"div",1)),n&2&&(CE(2),cT(d.logsLoading()?2:d.crashLog()==null||d.crashLog()?.length===0?3:4));},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{m as default};
@@ -0,0 +1 @@
1
+ var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import('./chunk-CtEMAj2d.js')},{path:"encryption",loadComponent:()=>import('./chunk-CTRzgLM9.js').then(function(n){return n.c})},{path:"select-files",loadComponent:()=>import('./chunk-CTRzgLM9.js').then(function(n){return n.a})},{path:"options",loadComponent:()=>import('./chunk-CTRzgLM9.js').then(function(n){return n.b})},{path:":taskid/progress",loadComponent:()=>import('./chunk-BkUa7yBI.js')}],t=o;export{t as default};
@@ -1,2 +1,2 @@
1
- import {T,ae as eo,bv as N,E as D1,bV as B$1,af as E1,b as I1,b9 as ce,h as hw,M as aC,P as Ul,R as Ig,S as Wl,X as cC,f as aT,C as CE,i as cT,V as Vg,aC as mg,g as NC,W as Wg,K as fC,l as vT,an as Hg,r as kd,k as iC,O as Od,aq as wg}from'./main-QLXVXD6E.js';var H=["internalInput"],z=["*"];function B(g,K){if(g&1){let o=vT();Ul(0,"input",4,0),Hg("change",function(t){kd(o);let c=iC();return Od(c.onInternalInputChange(t))}),Wl();}if(g&2){let o=iC();wg("checked",o.checked()),mg("disabled",o.disabled()?"":null);}}var J=(()=>{class g{constructor(){this.#e=T(eo),this.#t=T(N),this.internalInput=D1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=E1(false),this.color=I1(null),this.variant=I1(null),this.readonly=I1(false),this.disabled=I1(false),this.noInternalInput=I1(false),this.hostClasses=ce("toggle",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#t;onInternalInputChange(o){if(this.disabled())return;let e=o.target;this.checked.set(e.checked);}onKeyDown(o){if(this.#t.matches(o,"toggle.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),o.preventDefault();}}static{this.\u0275fac=function(e){return new(e||g)};}static{this.\u0275cmp=hw({type:g,selectors:[["sh-toggle"]],viewQuery:function(e,t){e&1&&Wg(t.internalInput,H,5),e&2&&fC();},hostVars:6,hostBindings:function(e,t){e&1&&Vg("keydown",function(V){return t.onKeyDown(V)}),e&2&&(mg("disabled",t.disabled()?"":null)("role",t.noInternalInput()?"switch":null)("aria-checked",t.noInternalInput()?t.checked():null)("tabindex",t.noInternalInput()?t.disabled()?"-1":"0":null),NC(t.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:z,decls:4,vars:1,consts:[["internalInput",""],[1,"box"],[1,"knob"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,t){e&1&&(aC(),Ul(0,"div",1),Ig(1,"div",2),Wl(),cC(2),aT(3,B,2,2,"input",3)),e&2&&(CE(3),cT(t.projectedInputs().length===0&&!t.noInternalInput()?3:-1));},styles:[`sh-toggle{--toggle-bg: var(--base-4);--toggle-b: 0;--togglek-bg: var(--base-2);--togglek-bs: var(--box-shadow-20);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}sh-toggle:focus-visible>.box,sh-toggle:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-toggle label{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1}sh-toggle .box{display:block;width:2.125rem;min-width:2.125rem;height:1.25rem;cursor:pointer;position:relative;border-radius:999px;background:var(--toggle-bg);border:var(--toggle-b);transition:background .15s linear}sh-toggle>input[type=checkbox]{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-toggle>input[type=checkbox]:focus,sh-toggle>input[type=checkbox]:focus-visible{outline:none}sh-toggle:has(>input:not(.internal-input))>input.internal-input{display:none}sh-toggle:has(input[disabled]),sh-toggle[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-toggle .knob{position:absolute;top:.125rem;left:.125rem;width:1rem;height:1rem;border-radius:50%;background:var(--togglek-bg);box-shadow:var(--togglek-bs);box-sizing:border-box;transition:left 125ms ease-in-out}sh-toggle:has(input[type=checkbox]:checked),sh-toggle.active{--togglek-bg: var(--base-8)}sh-toggle:has(input[type=checkbox]:checked) .knob,sh-toggle.active .knob{left:1rem}sh-toggle:has(input[type=checkbox]:checked).primary,sh-toggle.active.primary{--toggle-bg: var(--primary-3);--togglek-bg: var(--primary-8)}sh-toggle:has(input[type=checkbox]:checked).accent,sh-toggle.active.accent{--toggle-bg: var(--accent-3);--togglek-bg: var(--accent-8)}sh-toggle:has(input[type=checkbox]:checked).warn,sh-toggle.active.warn{--toggle-bg: var(--warn-3);--togglek-bg: var(--warn-8)}sh-toggle:has(input[type=checkbox]:checked).error,sh-toggle.active.error{--toggle-bg: var(--error-3);--togglek-bg: var(--error-8)}sh-toggle:has(input[type=checkbox]:checked).success,sh-toggle.active.success{--toggle-bg: var(--success-3);--togglek-bg: var(--success-8)}sh-toggle.outlined{--toggle-bg: var(--base-1);--togglek-bg: var(--base-5);--togglek-bs: none;--toggle-b: 1px solid var(--base-5)}sh-toggle.outlined .knob{width:.875rem;height:.875rem}sh-toggle.outlined.active{--togglek-bg: var(--base-8);--toggle-b: 1px solid var(--base-8)}sh-toggle.outlined.active.primary{--togglek-bg: var(--primary-8);--toggle-b: 1px solid var(--primary-8)}sh-toggle.outlined.active.accent{--togglek-bg: var(--accent-8);--toggle-b: 1px solid var(--accent-8)}sh-toggle.outlined.active.warn{--togglek-bg: var(--warn-8);--toggle-b: 1px solid var(--warn-8)}sh-toggle.outlined.active.error{--togglek-bg: var(--error-8);--toggle-b: 1px solid var(--error-8)}sh-toggle.outlined.active.success{--togglek-bg: var(--success-8);--toggle-b: 1px solid var(--success-8)}sh-toggle.simple{--togglek-bg: #fff}sh-toggle.simple:has(input[type=checkbox]:checked),sh-toggle.simple.active{--togglek-bg: var(--base-8)}sh-toggle.simple:has(input[type=checkbox]:checked).primary,sh-toggle.simple.active.primary{--togglek-bg: var(--primary-8);--toggle-bg: var(--primary-3)}sh-toggle.simple:has(input[type=checkbox]:checked).accent,sh-toggle.simple.active.accent{--togglek-bg: var(--accent-8);--toggle-bg: var(--accent-3)}sh-toggle.simple:has(input[type=checkbox]:checked).warn,sh-toggle.simple.active.warn{--togglek-bg: var(--warn-8);--toggle-bg: var(--warn-3)}sh-toggle.simple:has(input[type=checkbox]:checked).error,sh-toggle.simple.active.error{--togglek-bg: var(--error-8);--toggle-bg: var(--error-3)}sh-toggle.simple:has(input[type=checkbox]:checked).success,sh-toggle.simple.active.success{--togglek-bg: var(--success-8);--toggle-bg: var(--success-3)}sh-toggle.flat{--togglek-bg: #fff}sh-toggle.flat:has(input[type=checkbox]:checked),sh-toggle.flat.active{--togglek-bg: #fff;--toggle-bg: var(--base-8)}sh-toggle.flat:has(input[type=checkbox]:checked).primary,sh-toggle.flat.active.primary{--toggle-bg: var(--primary-8)}sh-toggle.flat:has(input[type=checkbox]:checked).accent,sh-toggle.flat.active.accent{--toggle-bg: var(--accent-8)}sh-toggle.flat:has(input[type=checkbox]:checked).warn,sh-toggle.flat.active.warn{--toggle-bg: var(--warn-8)}sh-toggle.flat:has(input[type=checkbox]:checked).error,sh-toggle.flat.active.error{--toggle-bg: var(--error-8)}sh-toggle.flat:has(input[type=checkbox]:checked).success,sh-toggle.flat.active.success{--toggle-bg: var(--success-8)}sh-toggle.raised{--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked),sh-toggle.raised.active{--toggle-bg: var(--base-g2);--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked).primary,sh-toggle.raised.active.primary{--toggle-bg: var(--primary-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).accent,sh-toggle.raised.active.accent{--toggle-bg: var(--accent-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).warn,sh-toggle.raised.active.warn{--toggle-bg: var(--warn-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).error,sh-toggle.raised.active.error{--toggle-bg: var(--error-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).success,sh-toggle.raised.active.success{--toggle-bg: var(--success-g2)}
1
+ import {T,ae as eo,bv as N,E as D1,bV as B$1,af as E1,b as I1,b9 as ce,h as hw,M as aC,P as Ul,R as Ig,S as Wl,X as cC,f as aT,C as CE,i as cT,V as Vg,aC as mg,g as NC,W as Wg,K as fC,l as vT,an as Hg,r as kd,k as iC,O as Od,aq as wg}from'./main-VVQP2YE7.js';var H=["internalInput"],z=["*"];function B(g,K){if(g&1){let o=vT();Ul(0,"input",4,0),Hg("change",function(t){kd(o);let c=iC();return Od(c.onInternalInputChange(t))}),Wl();}if(g&2){let o=iC();wg("checked",o.checked()),mg("disabled",o.disabled()?"":null);}}var J=(()=>{class g{constructor(){this.#e=T(eo),this.#t=T(N),this.internalInput=D1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=E1(false),this.color=I1(null),this.variant=I1(null),this.readonly=I1(false),this.disabled=I1(false),this.noInternalInput=I1(false),this.hostClasses=ce("toggle",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#t;onInternalInputChange(o){if(this.disabled())return;let e=o.target;this.checked.set(e.checked);}onKeyDown(o){if(this.#t.matches(o,"toggle.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),o.preventDefault();}}static{this.\u0275fac=function(e){return new(e||g)};}static{this.\u0275cmp=hw({type:g,selectors:[["sh-toggle"]],viewQuery:function(e,t){e&1&&Wg(t.internalInput,H,5),e&2&&fC();},hostVars:6,hostBindings:function(e,t){e&1&&Vg("keydown",function(V){return t.onKeyDown(V)}),e&2&&(mg("disabled",t.disabled()?"":null)("role",t.noInternalInput()?"switch":null)("aria-checked",t.noInternalInput()?t.checked():null)("tabindex",t.noInternalInput()?t.disabled()?"-1":"0":null),NC(t.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:z,decls:4,vars:1,consts:[["internalInput",""],[1,"box"],[1,"knob"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,t){e&1&&(aC(),Ul(0,"div",1),Ig(1,"div",2),Wl(),cC(2),aT(3,B,2,2,"input",3)),e&2&&(CE(3),cT(t.projectedInputs().length===0&&!t.noInternalInput()?3:-1));},styles:[`sh-toggle{--toggle-bg: var(--base-4);--toggle-b: 0;--togglek-bg: var(--base-2);--togglek-bs: var(--box-shadow-20);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}sh-toggle:focus-visible>.box,sh-toggle:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-toggle label{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1}sh-toggle .box{display:block;width:2.125rem;min-width:2.125rem;height:1.25rem;cursor:pointer;position:relative;border-radius:999px;background:var(--toggle-bg);border:var(--toggle-b);transition:background .15s linear}sh-toggle>input[type=checkbox]{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-toggle>input[type=checkbox]:focus,sh-toggle>input[type=checkbox]:focus-visible{outline:none}sh-toggle:has(>input:not(.internal-input))>input.internal-input{display:none}sh-toggle:has(input[disabled]),sh-toggle[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-toggle .knob{position:absolute;top:.125rem;left:.125rem;width:1rem;height:1rem;border-radius:50%;background:var(--togglek-bg);box-shadow:var(--togglek-bs);box-sizing:border-box;transition:left 125ms ease-in-out}sh-toggle:has(input[type=checkbox]:checked),sh-toggle.active{--togglek-bg: var(--base-8)}sh-toggle:has(input[type=checkbox]:checked) .knob,sh-toggle.active .knob{left:1rem}sh-toggle:has(input[type=checkbox]:checked).primary,sh-toggle.active.primary{--toggle-bg: var(--primary-3);--togglek-bg: var(--primary-8)}sh-toggle:has(input[type=checkbox]:checked).accent,sh-toggle.active.accent{--toggle-bg: var(--accent-3);--togglek-bg: var(--accent-8)}sh-toggle:has(input[type=checkbox]:checked).warn,sh-toggle.active.warn{--toggle-bg: var(--warn-3);--togglek-bg: var(--warn-8)}sh-toggle:has(input[type=checkbox]:checked).error,sh-toggle.active.error{--toggle-bg: var(--error-3);--togglek-bg: var(--error-8)}sh-toggle:has(input[type=checkbox]:checked).success,sh-toggle.active.success{--toggle-bg: var(--success-3);--togglek-bg: var(--success-8)}sh-toggle.outlined{--toggle-bg: var(--base-1);--togglek-bg: var(--base-5);--togglek-bs: none;--toggle-b: 1px solid var(--base-5)}sh-toggle.outlined .knob{width:.875rem;height:.875rem}sh-toggle.outlined.active{--togglek-bg: var(--base-8);--toggle-b: 1px solid var(--base-8)}sh-toggle.outlined.active.primary{--togglek-bg: var(--primary-8);--toggle-b: 1px solid var(--primary-8)}sh-toggle.outlined.active.accent{--togglek-bg: var(--accent-8);--toggle-b: 1px solid var(--accent-8)}sh-toggle.outlined.active.warn{--togglek-bg: var(--warn-8);--toggle-b: 1px solid var(--warn-8)}sh-toggle.outlined.active.error{--togglek-bg: var(--error-8);--toggle-b: 1px solid var(--error-8)}sh-toggle.outlined.active.success{--togglek-bg: var(--success-8);--toggle-b: 1px solid var(--success-8)}sh-toggle.simple{--togglek-bg: #fff}sh-toggle.simple:has(input[type=checkbox]:checked),sh-toggle.simple.active{--togglek-bg: var(--base-8)}sh-toggle.simple:has(input[type=checkbox]:checked).primary,sh-toggle.simple.active.primary{--togglek-bg: var(--primary-8);--toggle-bg: var(--primary-3)}sh-toggle.simple:has(input[type=checkbox]:checked).accent,sh-toggle.simple.active.accent{--togglek-bg: var(--accent-8);--toggle-bg: var(--accent-3)}sh-toggle.simple:has(input[type=checkbox]:checked).warn,sh-toggle.simple.active.warn{--togglek-bg: var(--warn-8);--toggle-bg: var(--warn-3)}sh-toggle.simple:has(input[type=checkbox]:checked).error,sh-toggle.simple.active.error{--togglek-bg: var(--error-8);--toggle-bg: var(--error-3)}sh-toggle.simple:has(input[type=checkbox]:checked).success,sh-toggle.simple.active.success{--togglek-bg: var(--success-8);--toggle-bg: var(--success-3)}sh-toggle.flat{--togglek-bg: #fff}sh-toggle.flat:has(input[type=checkbox]:checked),sh-toggle.flat.active{--togglek-bg: #fff;--toggle-bg: var(--base-8)}sh-toggle.flat:has(input[type=checkbox]:checked).primary,sh-toggle.flat.active.primary{--toggle-bg: var(--primary-8)}sh-toggle.flat:has(input[type=checkbox]:checked).accent,sh-toggle.flat.active.accent{--toggle-bg: var(--accent-8)}sh-toggle.flat:has(input[type=checkbox]:checked).warn,sh-toggle.flat.active.warn{--toggle-bg: var(--warn-8)}sh-toggle.flat:has(input[type=checkbox]:checked).error,sh-toggle.flat.active.error{--toggle-bg: var(--error-8)}sh-toggle.flat:has(input[type=checkbox]:checked).success,sh-toggle.flat.active.success{--toggle-bg: var(--success-8)}sh-toggle.raised{--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked),sh-toggle.raised.active{--toggle-bg: var(--base-g2);--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked).primary,sh-toggle.raised.active.primary{--toggle-bg: var(--primary-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).accent,sh-toggle.raised.active.accent{--toggle-bg: var(--accent-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).warn,sh-toggle.raised.active.warn{--toggle-bg: var(--warn-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).error,sh-toggle.raised.active.error{--toggle-bg: var(--error-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).success,sh-toggle.raised.active.success{--toggle-bg: var(--success-g2)}
2
2
  `],encapsulation:2});}}return g})();export{J};
@@ -1,2 +1,2 @@
1
- import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import {s as st,o as on,l as lt,Q as Qt,t as tn}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import'./chunk-CmexLvf7.js';import'./chunk-Bgx4dtaL.js';import'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import {h,G,V}from'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import {c}from'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,a5 as g,a6 as be$1,E as D1,G as Ge$1,N as Nt,z as za,at as h$1,h as hw,v,d as N,j as vg,Q as Qi,f as aT,$ as $l,C as CE,i as cT,o as oC,W as Wg,K as fC,n as nC,k as iC,l as vT,V as Vg,r as kd,O as Od,w as jC,L as Lg,F as Fg,au as jg,av as rC,Y as Yg,A as yg,a1 as dT,ap as lT,a2 as fT,p as cm,U as UC,s as CD,x as am,y as _D,J as om}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe$1}from'./chunk-D3SUPUQT.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';function Ee(n,t){n&1&&(Qi(0,"div",13),vg(1,"sh-progress-bar",14),Qi(2,"div",15)(3,"h3"),nC(4,2),$l()()());}function Fe(n,t){n&1&&(Qi(0,"sh-divider"),nC(1,5),$l());}function Ie(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit;CE(),om(e.Description);}}function Ne(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit,o=iC(3);CE(),om(o.getSimplePath(e.BaseUrl));}}function ye(n,t){if(n&1){let e=vT();Qi(0,"button",25),Vg("click",function(i){kd(e);let r=iC().$implicit,f=iC(3);return Od(f.updateBackupsSync(r,i))}),jC(1," Update backups "),$l();}if(n&2){let e=iC(4);yg("disabled",e.isSaving());}}function he(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",18),Vg("click",function(){let i=kd(e).$implicit,r=iC(3);return Od(r.selectDestination(i))}),Qi(1,"h3",19),jC(2),$l(),aT(3,Ie,2,1,"p",20)(4,Ne,2,1,"p",20),Qi(5,"div",21),aT(6,ye,2,1,"button",22),Qi(7,"button",23),Vg("click",function(i){let r=kd(e).$implicit,f=iC(3);return Od(f.deleteDestination(r.ID,i))}),Qi(8,"sh-icon"),jC(9,"trash"),$l()(),Qi(10,"button",24),Lg(11,6),vg(12,"sh-icon"),Fg(),$l()()();}if(n&2){let e=t.$implicit,o=iC(3);yg("targetUrl",e.BaseUrl),CE(2),om(e.Name||e.BaseUrl),CE(),cT(e.Description?3:4),CE(3),cT(o.isOutOfSync(e)?6:-1);}}function Oe(n,t){if(n&1){let e=vT();Qi(0,"sh-card",16),Vg("click",function(){kd(e);let i=iC(2);return Od(i.selectDestination("new"))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),jC(2,"plus-circle"),$l(),Qi(3,"div",15)(4,"h3"),nC(5,3),$l(),Qi(6,"p"),nC(7,4),$l()()(),aT(8,Fe,2,0,"sh-divider"),dT(9,he,13,4,"app-destination-list-item",17,lT);}if(n&2){let e=iC(2);CE(8),cT(e.destinations().length>0?8:-1),CE(),fT(e.destinations());}}function xe(n,t){if(n&1&&(Qi(0,"h2"),nC(1,1),$l(),aT(2,Ee,5,0,"div",13)(3,Oe,11,1)),n&2){let e=iC();CE(2),cT(e.isLoading()?2:3);}}function Be(n,t){n&1&&nC(0,10,1);}function Pe(n,t){n&1&&nC(0,10,2);}function Ae(n,t){n&1&&nC(0,10,3);}function Me(n,t){if(n&1){let e=vT();Qi(0,"button",37),Vg("click",function(){kd(e);let i=iC(2);return Od(i.testDestination())}),Lg(1,10),aT(2,Be,1,0)(3,Pe,1,0)(4,Ae,1,0),Fg(),$l();}if(n&2){let e=iC(2);yg("disabled",e.testSignal()=="testing"),CE(2),cT(e.testSignal()=="testing"?2:e.testResponse()?.action==="success"?3:4);}}function be(n,t){if(n&1){let e=vT();Qi(0,"div",32)(1,"sh-form-field")(2,"label"),nC(3,11),$l(),Qi(4,"input",38),cm("ngModelChange",function(i){kd(e);let r=iC(2);return UC(r.editName,i)||(r.editName=i),Od(i)}),$l(),CD(),$l()();}if(n&2){let e=iC(2);CE(4),am("ngModel",e.editName),_D();}}function $e(n,t){if(n&1){let e=vT();Qi(0,"app-test-url",39,0),cm("targetUrlChange",function(i){kd(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Od(i)})("testSignalChange",function(i){kd(e);let r=iC(2);return UC(r.testSignal,i)||(r.testSignal=i),Od(i)}),$l();}if(n&2){let e=iC(2);am("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),yg("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",true)("askToCreate",true)("testExpectation","any")("readOnlyTest",false)("moduleType","Backend");}}function ke(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",40)(1,"button",41),Vg("click",function(){kd(e);let i=iC(2);return Od(i.removeDestination())}),nC(2,12),$l()(),Qi(3,"app-single-destination",42),cm("targetUrlChange",function(i){kd(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Od(i)}),$l();}if(n&2){let e=iC(2);yg("targetUrl",e.editBaseUrl()),CE(3),am("targetUrl",e.editBaseUrl);}}function Re(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list",43),Vg("setDestination",function(i){kd(e);let r=iC(2);return Od(r.setDestination(i))}),$l();}}function Le(n,t){n&1&&nC(0,9,1);}function we(n,t){n&1&&nC(0,9,2);}function Ue(n,t){n&1&&nC(0,9,3);}function ve(n,t){n&1&&nC(0,9,4);}function Ge(n,t){if(n&1){let e=vT();Qi(0,"header",26)(1,"button",23),Vg("click",function(){kd(e);let i=iC();return Od(i.cancelEdit())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l()()(),Qi(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),nC(8,7),$l(),Qi(9,"div",30),aT(10,Me,5,2,"button",31),$l()(),aT(11,be,5,1,"div",32),aT(12,$e,2,10,"app-test-url",33),aT(13,ke,4,2)(14,Re,1,0,"app-destination-list"),$l(),Qi(15,"div",34)(16,"button",35),Vg("click",function(){kd(e);let i=iC();return Od(i.cancelEdit())}),nC(17,8),$l(),Qi(18,"button",36),Vg("click",function(){kd(e);let i=iC();return Od(i.testResponse()?.action==="success"||i.testResponse()?.action==="missing-folder"||!i.isUrlChanged()?i.save():i.testDestination())}),Lg(19,9),aT(20,Le,1,0)(21,we,1,0)(22,Ue,1,0)(23,ve,1,0),Fg(),$l()()();}if(n&2){let e=iC();CE(8),jg(e.selectedDestination()==="new"?"New Destination":"Edit Destination"),rC(8),CE(2),cT(e.editBaseUrl()?10:-1),CE(),cT(e.selectedDestination()!=="new"?11:-1),CE(),cT(e.editBaseUrl()?12:-1),CE(),cT(e.editBaseUrl()?13:14),CE(5),Yg("primary",e.testResponse()?.action==="success"||!e.isUrlChanged())("warn",e.isUrlChanged()&&e.testSignal()===null||e.testSignal()==="testing"||e.testResponse()?.action==="missing-folder")("error",e.testResponse()&&e.testResponse()?.action!=="success"&&e.testResponse()?.action!=="missing-folder"),yg("disabled",!e.editBaseUrl()||e.isSaving()||e.testSignal()==="testing"),CE(2),cT(e.isSaving()?20:e.testSignal()==="testing"?21:e.testResponse()?.action==="success"||e.testResponse()?.action==="missing-folder"||!e.isUrlChanged()?22:23);}}var R=class n{#e=T(st);#t=T(g);#n=T(be$1);getSimplePath=h;backups=this.#t.backups;constructor(){this.#t.getBackups();}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=D1(on);selectedDestination=Ge$1(null);selectedDestinationId=Nt(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=Ge$1(null);editDescription=Ge$1(null);editBaseUrl=Ge$1(null);initialBaseUrl=Ge$1(null);isUrlChanged=Nt(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?true:t!==e});testSignal=Ge$1(null);testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return [];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let i=e.get(o.ID);return i&&i.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=za(()=>{this.editBaseUrl(),this.testSignal.set(null);});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null));}));}cancelEdit(){this.selectedDestination.set(null);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`);}}removeDestination(){this.editBaseUrl.set(null);}async testDestination(){(await this.testUrl()?.testDestination(false))?.action==="missing-folder"&&this.promptCreateFolder();}promptCreateFolder(){this.#n.open(h$1,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder();}});}save(){let t=this.selectedDestination();t&&this.performSave(t);}performSave(t){let e=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(t==="new"){let I=V(i??"")?.displayName??"Destination",y=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${y+1}`,o=null;}let r={Name:e,Description:o,BaseUrl:i};this.#e.save(t,r).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(true);});}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open(h$1,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(true);});}});}deleteDestination(t,e){e.stopPropagation(),this.#n.open(h$1,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload();});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&Wg(o.testUrl,on,5),e&2&&fC();},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let r;r=$localize`Or manage your saved destinations`;let f;f=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let y;y=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=oC(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,i,r,f,I,y,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(vg(0,"app-status-bar"),Qi(1,"section"),aT(2,xe,4,1)(3,Ge,24,13),$l()),e&2&&(CE(2),cT(o.selectedDestination()===null?2:3));},dependencies:[lt,Qt,tn,ee,d,v,N,f,Fe$1,c,on,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"]})};
1
+ import {e as ee}from'./chunk-C4GeR7BF.js';import'./chunk-CUaRQ2FJ.js';import'./chunk-aOMoAKYY.js';import'./chunk-BEhUV7oX.js';import {s as st,o as on,l as lt,Q as Qt,t as tn}from'./chunk-kU0H989B.js';import'./chunk-C80zvTbO.js';import'./chunk-Cjb79u3p.js';import'./chunk-DJJ8GbYi.js';import'./chunk-DUYvFN8m.js';import'./chunk-BpRWdcC8.js';import {h,G,V}from'./chunk-ihUnHtR7.js';import'./chunk-Bb6BmVO4.js';import'./chunk-DmDqcC4A.js';import'./chunk-CAwTsBqQ.js';import {c}from'./chunk-B53Wj4F9.js';import'./chunk-BTgf5lfZ.js';import {T,a5 as g,a6 as be$1,E as D1,G as Ge$1,N as Nt,z as za,at as h$1,h as hw,v,d as N,j as vg,Q as Qi,f as aT,$ as $l,C as CE,i as cT,o as oC,W as Wg,K as fC,n as nC,k as iC,l as vT,V as Vg,r as kd,O as Od,w as jC,L as Lg,F as Fg,au as jg,av as rC,Y as Yg,A as yg,a1 as dT,ap as lT,a2 as fT,p as cm,U as UC,s as CD,x as am,y as _D,J as om}from'./main-VVQP2YE7.js';import {f}from'./chunk-Bja52qI7.js';import {d}from'./chunk-B8uF0dom.js';import {F as Fe$1}from'./chunk-B9maI7Xa.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BO2GlieG.js';import'./chunk-CKnRcyHZ.js';import'./chunk-CwKy8pxa.js';import'./chunk-BVEyeg9y.js';import'./chunk-DqIU7ViF.js';import'./chunk-Box6Lckh.js';function Ee(n,t){n&1&&(Qi(0,"div",13),vg(1,"sh-progress-bar",14),Qi(2,"div",15)(3,"h3"),nC(4,2),$l()()());}function Fe(n,t){n&1&&(Qi(0,"sh-divider"),nC(1,5),$l());}function Ie(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit;CE(),om(e.Description);}}function Ne(n,t){if(n&1&&(Qi(0,"p",20),jC(1),$l()),n&2){let e=iC().$implicit,o=iC(3);CE(),om(o.getSimplePath(e.BaseUrl));}}function ye(n,t){if(n&1){let e=vT();Qi(0,"button",25),Vg("click",function(i){kd(e);let r=iC().$implicit,f=iC(3);return Od(f.updateBackupsSync(r,i))}),jC(1," Update backups "),$l();}if(n&2){let e=iC(4);yg("disabled",e.isSaving());}}function he(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",18),Vg("click",function(){let i=kd(e).$implicit,r=iC(3);return Od(r.selectDestination(i))}),Qi(1,"h3",19),jC(2),$l(),aT(3,Ie,2,1,"p",20)(4,Ne,2,1,"p",20),Qi(5,"div",21),aT(6,ye,2,1,"button",22),Qi(7,"button",23),Vg("click",function(i){let r=kd(e).$implicit,f=iC(3);return Od(f.deleteDestination(r.ID,i))}),Qi(8,"sh-icon"),jC(9,"trash"),$l()(),Qi(10,"button",24),Lg(11,6),vg(12,"sh-icon"),Fg(),$l()()();}if(n&2){let e=t.$implicit,o=iC(3);yg("targetUrl",e.BaseUrl),CE(2),om(e.Name||e.BaseUrl),CE(),cT(e.Description?3:4),CE(3),cT(o.isOutOfSync(e)?6:-1);}}function Oe(n,t){if(n&1){let e=vT();Qi(0,"sh-card",16),Vg("click",function(){kd(e);let i=iC(2);return Od(i.selectDestination("new"))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),jC(2,"plus-circle"),$l(),Qi(3,"div",15)(4,"h3"),nC(5,3),$l(),Qi(6,"p"),nC(7,4),$l()()(),aT(8,Fe,2,0,"sh-divider"),dT(9,he,13,4,"app-destination-list-item",17,lT);}if(n&2){let e=iC(2);CE(8),cT(e.destinations().length>0?8:-1),CE(),fT(e.destinations());}}function xe(n,t){if(n&1&&(Qi(0,"h2"),nC(1,1),$l(),aT(2,Ee,5,0,"div",13)(3,Oe,11,1)),n&2){let e=iC();CE(2),cT(e.isLoading()?2:3);}}function Be(n,t){n&1&&nC(0,10,1);}function Pe(n,t){n&1&&nC(0,10,2);}function Ae(n,t){n&1&&nC(0,10,3);}function Me(n,t){if(n&1){let e=vT();Qi(0,"button",37),Vg("click",function(){kd(e);let i=iC(2);return Od(i.testDestination())}),Lg(1,10),aT(2,Be,1,0)(3,Pe,1,0)(4,Ae,1,0),Fg(),$l();}if(n&2){let e=iC(2);yg("disabled",e.testSignal()=="testing"),CE(2),cT(e.testSignal()=="testing"?2:e.testResponse()?.action==="success"?3:4);}}function be(n,t){if(n&1){let e=vT();Qi(0,"div",32)(1,"sh-form-field")(2,"label"),nC(3,11),$l(),Qi(4,"input",38),cm("ngModelChange",function(i){kd(e);let r=iC(2);return UC(r.editName,i)||(r.editName=i),Od(i)}),$l(),CD(),$l()();}if(n&2){let e=iC(2);CE(4),am("ngModel",e.editName),_D();}}function $e(n,t){if(n&1){let e=vT();Qi(0,"app-test-url",39,0),cm("targetUrlChange",function(i){kd(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Od(i)})("testSignalChange",function(i){kd(e);let r=iC(2);return UC(r.testSignal,i)||(r.testSignal=i),Od(i)}),$l();}if(n&2){let e=iC(2);am("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),yg("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",true)("askToCreate",true)("testExpectation","any")("readOnlyTest",false)("moduleType","Backend");}}function ke(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list-item",40)(1,"button",41),Vg("click",function(){kd(e);let i=iC(2);return Od(i.removeDestination())}),nC(2,12),$l()(),Qi(3,"app-single-destination",42),cm("targetUrlChange",function(i){kd(e);let r=iC(2);return UC(r.editBaseUrl,i)||(r.editBaseUrl=i),Od(i)}),$l();}if(n&2){let e=iC(2);yg("targetUrl",e.editBaseUrl()),CE(3),am("targetUrl",e.editBaseUrl);}}function Re(n,t){if(n&1){let e=vT();Qi(0,"app-destination-list",43),Vg("setDestination",function(i){kd(e);let r=iC(2);return Od(r.setDestination(i))}),$l();}}function Le(n,t){n&1&&nC(0,9,1);}function we(n,t){n&1&&nC(0,9,2);}function Ue(n,t){n&1&&nC(0,9,3);}function ve(n,t){n&1&&nC(0,9,4);}function Ge(n,t){if(n&1){let e=vT();Qi(0,"header",26)(1,"button",23),Vg("click",function(){kd(e);let i=iC();return Od(i.cancelEdit())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l()()(),Qi(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),nC(8,7),$l(),Qi(9,"div",30),aT(10,Me,5,2,"button",31),$l()(),aT(11,be,5,1,"div",32),aT(12,$e,2,10,"app-test-url",33),aT(13,ke,4,2)(14,Re,1,0,"app-destination-list"),$l(),Qi(15,"div",34)(16,"button",35),Vg("click",function(){kd(e);let i=iC();return Od(i.cancelEdit())}),nC(17,8),$l(),Qi(18,"button",36),Vg("click",function(){kd(e);let i=iC();return Od(i.testResponse()?.action==="success"||i.testResponse()?.action==="missing-folder"||!i.isUrlChanged()?i.save():i.testDestination())}),Lg(19,9),aT(20,Le,1,0)(21,we,1,0)(22,Ue,1,0)(23,ve,1,0),Fg(),$l()()();}if(n&2){let e=iC();CE(8),jg(e.selectedDestination()==="new"?"New Destination":"Edit Destination"),rC(8),CE(2),cT(e.editBaseUrl()?10:-1),CE(),cT(e.selectedDestination()!=="new"?11:-1),CE(),cT(e.editBaseUrl()?12:-1),CE(),cT(e.editBaseUrl()?13:14),CE(5),Yg("primary",e.testResponse()?.action==="success"||!e.isUrlChanged())("warn",e.isUrlChanged()&&e.testSignal()===null||e.testSignal()==="testing"||e.testResponse()?.action==="missing-folder")("error",e.testResponse()&&e.testResponse()?.action!=="success"&&e.testResponse()?.action!=="missing-folder"),yg("disabled",!e.editBaseUrl()||e.isSaving()||e.testSignal()==="testing"),CE(2),cT(e.isSaving()?20:e.testSignal()==="testing"?21:e.testResponse()?.action==="success"||e.testResponse()?.action==="missing-folder"||!e.isUrlChanged()?22:23);}}var R=class n{#e=T(st);#t=T(g);#n=T(be$1);getSimplePath=h;backups=this.#t.backups;constructor(){this.#t.getBackups();}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=D1(on);selectedDestination=Ge$1(null);selectedDestinationId=Nt(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=Ge$1(null);editDescription=Ge$1(null);editBaseUrl=Ge$1(null);initialBaseUrl=Ge$1(null);isUrlChanged=Nt(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?true:t!==e});testSignal=Ge$1(null);testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return [];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let i=e.get(o.ID);return i&&i.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=za(()=>{this.editBaseUrl(),this.testSignal.set(null);});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null));}));}cancelEdit(){this.selectedDestination.set(null);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`);}}removeDestination(){this.editBaseUrl.set(null);}async testDestination(){(await this.testUrl()?.testDestination(false))?.action==="missing-folder"&&this.promptCreateFolder();}promptCreateFolder(){this.#n.open(h$1,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder();}});}save(){let t=this.selectedDestination();t&&this.performSave(t);}performSave(t){let e=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(t==="new"){let I=V(i??"")?.displayName??"Destination",y=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${y+1}`,o=null;}let r={Name:e,Description:o,BaseUrl:i};this.#e.save(t,r).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(true);});}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open(h$1,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(true);});}});}deleteDestination(t,e){e.stopPropagation(),this.#n.open(h$1,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload();});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&Wg(o.testUrl,on,5),e&2&&fC();},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let r;r=$localize`Or manage your saved destinations`;let f;f=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let y;y=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=oC(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,i,r,f,I,y,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(vg(0,"app-status-bar"),Qi(1,"section"),aT(2,xe,4,1)(3,Ge,24,13),$l()),e&2&&(CE(2),cT(o.selectedDestination()===null?2:3));},dependencies:[lt,Qt,tn,ee,d,v,N,f,Fe$1,c,on,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"]})};
2
2
  export{R as default};