@duplicati/ngclient 0.0.131 → 0.0.133

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 (115) hide show
  1. package/assets/spk.css +0 -3
  2. package/chunk-2VN6VG4I.js +1 -0
  3. package/{chunk-FPLBURO5.js → chunk-2YHX57UE.js} +1 -1
  4. package/{chunk-YFRT24NZ.js → chunk-32H7KC5E.js} +1 -1
  5. package/chunk-3EVYTAP3.js +1 -0
  6. package/{chunk-JWFYA3TO.js → chunk-3Q5JEF3K.js} +1 -1
  7. package/{chunk-EKZRKTLM.js → chunk-4MAZCWVO.js} +1 -1
  8. package/{chunk-ZE5QAS4M.js → chunk-5CUMYXCI.js} +1 -1
  9. package/{chunk-KA4H3PM5.js → chunk-5MMV45NA.js} +1 -1
  10. package/{chunk-K5AQUIEE.js → chunk-5RPDEEQ3.js} +1 -1
  11. package/{chunk-WY2KPAVB.js → chunk-67XQIEG5.js} +1 -1
  12. package/{chunk-K6EZTPNQ.js → chunk-67YRCRMI.js} +6 -6
  13. package/chunk-7RNTRIB4.js +3 -0
  14. package/chunk-7V6ZELYA.js +1 -0
  15. package/{chunk-4D2NUH5S.js → chunk-A7BFGBWF.js} +1 -1
  16. package/{chunk-R43ZLOB3.js → chunk-ACVXVBJ2.js} +1 -1
  17. package/chunk-AUWIW323.js +1 -0
  18. package/{chunk-RFBJR3ZC.js → chunk-B3N2KM6G.js} +1 -1
  19. package/{chunk-TUOSYDUU.js → chunk-BD5AB4OK.js} +1 -1
  20. package/{chunk-VNYGRDVP.js → chunk-BKHSNMGE.js} +1 -1
  21. package/{chunk-P4ZYFRD3.js → chunk-BSRYIN2F.js} +1 -1
  22. package/chunk-BWJZ3AMO.js +1 -0
  23. package/{chunk-DDV32SDB.js → chunk-CHCHAUQD.js} +1 -1
  24. package/{chunk-Q5QHAGHB.js → chunk-D3OE4S5N.js} +1 -1
  25. package/{chunk-LQ2PCH6Q.js → chunk-DLVU5GHR.js} +1 -1
  26. package/chunk-DNBOZ26J.js +1 -0
  27. package/{chunk-7LEXBIXG.js → chunk-DQM3ATT4.js} +1 -1
  28. package/chunk-EBYGIC45.js +1 -0
  29. package/chunk-EGCW3WY7.js +1 -0
  30. package/{chunk-Z2VKXGKY.js → chunk-EK2B2CO4.js} +1 -1
  31. package/{chunk-UHRBTTCA.js → chunk-EW3XN62R.js} +1 -1
  32. package/{chunk-XD26KCAE.js → chunk-F66HJES7.js} +1 -1
  33. package/{chunk-3PYBMCOB.js → chunk-FC45TEB6.js} +1 -1
  34. package/chunk-FX2XKS5C.js +1 -0
  35. package/chunk-G6LCHQJE.js +1 -0
  36. package/chunk-GORQL5YP.js +1 -0
  37. package/{chunk-VKD4Y3YQ.js → chunk-GP2W7XZF.js} +1 -1
  38. package/{chunk-MXNLMTFY.js → chunk-GQTJISMN.js} +1 -1
  39. package/chunk-HJQBTK5I.js +1 -0
  40. package/{chunk-KV7SEZ24.js → chunk-HPZ6HLJE.js} +1 -1
  41. package/{chunk-HWCTRSCV.js → chunk-IVP5ZHDB.js} +1 -1
  42. package/{chunk-Z24H5QI5.js → chunk-J64ETWKB.js} +1 -1
  43. package/chunk-KAKRPBPP.js +1 -0
  44. package/{chunk-K5P3KNHL.js → chunk-L6BZ6TEU.js} +1 -1
  45. package/{chunk-Q3ILJYED.js → chunk-LSNBRSNG.js} +1 -1
  46. package/chunk-LXZXQU7D.js +1 -0
  47. package/{chunk-BISTLAYK.js → chunk-MDO4PWV6.js} +1 -1
  48. package/{chunk-W2XSKJJ5.js → chunk-MOOM536C.js} +1 -1
  49. package/chunk-MVJXYZIV.js +1 -0
  50. package/chunk-NUL6XFC4.js +1 -0
  51. package/{chunk-WWHML7QK.js → chunk-O4HSW7GI.js} +1 -1
  52. package/{chunk-UVLJAD66.js → chunk-OQHMS5HM.js} +1 -1
  53. package/{chunk-LZGUK3CQ.js → chunk-PEPDXQBY.js} +1 -1
  54. package/{chunk-P45GAY6A.js → chunk-PETCW5PK.js} +1 -1
  55. package/{chunk-ABF3SFY5.js → chunk-PL2MNRTA.js} +1 -1
  56. package/chunk-PTFQBTH3.js +1 -0
  57. package/{chunk-KU6D4KVX.js → chunk-Q2YREFUE.js} +1 -1
  58. package/{chunk-D6CQCWWK.js → chunk-QNWYJ7OR.js} +1 -1
  59. package/chunk-SUMEJCXQ.js +1 -0
  60. package/chunk-T27DQWUZ.js +1 -0
  61. package/{chunk-CPQOWCF6.js → chunk-TIPHYMRQ.js} +1 -1
  62. package/{chunk-FWZV4DTQ.js → chunk-TKOD3RB3.js} +1 -1
  63. package/chunk-TVOVJS5N.js +1 -0
  64. package/{chunk-76QLZQIX.js → chunk-U44OBOIE.js} +1 -1
  65. package/{chunk-GU7U3EFF.js → chunk-UD32EXWK.js} +1 -1
  66. package/chunk-UUOPMSDB.js +1 -0
  67. package/chunk-VFFFKPK4.js +6 -0
  68. package/chunk-VNTD2QIZ.js +1 -0
  69. package/{chunk-CYLI6ZJ3.js → chunk-VWH7EODO.js} +1 -1
  70. package/{chunk-U4OAPG74.js → chunk-WBYTRHI7.js} +1 -1
  71. package/{chunk-E4Z6XEMU.js → chunk-WCMRN2KQ.js} +1 -1
  72. package/{chunk-F74MXVWD.js → chunk-WZIEF5KL.js} +1 -1
  73. package/chunk-X4NRDSTJ.js +1 -0
  74. package/chunk-X7GQQCVS.js +1 -0
  75. package/{chunk-KQAO2YHR.js → chunk-XBP565VF.js} +1 -1
  76. package/{chunk-FWVOVJCG.js → chunk-XD6MBGQY.js} +1 -1
  77. package/chunk-XHUQCM6F.js +1 -0
  78. package/chunk-XKDJSEMU.js +1 -0
  79. package/{chunk-B5FKLIHW.js → chunk-Y4VREVFM.js} +1 -1
  80. package/{chunk-XOZRQBBW.js → chunk-YPAIKA7K.js} +1 -1
  81. package/chunk-ZCT7SRIM.js +1 -0
  82. package/{chunk-WIJ3HW7I.js → chunk-ZIJ7ZEHR.js} +1 -1
  83. package/index.html +2 -2
  84. package/{main-JMFOP3Z7.js → main-BQ3NFYOR.js} +1 -1
  85. package/package.json +1 -1
  86. package/styles-4QA7NM7N.css +1 -0
  87. package/chunk-3IRKJXHE.js +0 -6
  88. package/chunk-3KIPRGE2.js +0 -1
  89. package/chunk-5PEBIF7G.js +0 -1
  90. package/chunk-5ZODA7EN.js +0 -1
  91. package/chunk-AGU2PEL5.js +0 -1
  92. package/chunk-CTRHZCKS.js +0 -1
  93. package/chunk-DM2VSIZA.js +0 -1
  94. package/chunk-FLMFEFKM.js +0 -1
  95. package/chunk-FO4W6SOP.js +0 -1
  96. package/chunk-GGT3NXAX.js +0 -1
  97. package/chunk-GW37Y5Z7.js +0 -1
  98. package/chunk-IAE5MH6W.js +0 -1
  99. package/chunk-LPSXYSH2.js +0 -1
  100. package/chunk-LXOONGVP.js +0 -1
  101. package/chunk-MHALSLG3.js +0 -1
  102. package/chunk-N334RUEQ.js +0 -1
  103. package/chunk-OMZ3W4RW.js +0 -1
  104. package/chunk-R3TWV35H.js +0 -4
  105. package/chunk-RVLLX2SW.js +0 -1
  106. package/chunk-RZWJA6W3.js +0 -3
  107. package/chunk-TOP2X7ZJ.js +0 -1
  108. package/chunk-UFZFKKK7.js +0 -1
  109. package/chunk-UIC4BWTY.js +0 -1
  110. package/chunk-UUG7G5LZ.js +0 -1
  111. package/chunk-UYWLCW5G.js +0 -1
  112. package/chunk-XHQO75TB.js +0 -1
  113. package/chunk-YBFTPRR5.js +0 -1
  114. package/chunk-YXIITZFM.js +0 -1
  115. package/styles-ORRIWQJ5.css +0 -1
package/assets/spk.css CHANGED
@@ -59,7 +59,6 @@ spk-icon.fill {
59
59
 
60
60
 
61
61
  spk-icon {
62
- /* use !important to prevent issues with browser extensions that change fonts */
63
62
  font-family: "spk" !important;
64
63
  speak: never;
65
64
  font-style: normal;
@@ -68,7 +67,6 @@ spk-icon {
68
67
  text-transform: none;
69
68
  line-height: 1;
70
69
 
71
- /* Enable Ligatures ================ */
72
70
  letter-spacing: 0;
73
71
  -webkit-font-feature-settings: "liga";
74
72
  -moz-font-feature-settings: "liga=1";
@@ -78,7 +76,6 @@ spk-icon {
78
76
  -webkit-font-variant-ligatures: discretionary-ligatures;
79
77
  font-variant-ligatures: discretionary-ligatures;
80
78
 
81
- /* Better Font Rendering =========== */
82
79
  -webkit-font-smoothing: antialiased;
83
80
  -moz-osx-font-smoothing: grayscale;
84
81
  }
@@ -0,0 +1 @@
1
+ import{a as ne}from"./chunk-L6BZ6TEU.js";import{a as pt}from"./chunk-LSNBRSNG.js";import"./chunk-67XQIEG5.js";import{a as Tt}from"./chunk-TKOD3RB3.js";import{a as St}from"./chunk-PL2MNRTA.js";import"./chunk-A7BFGBWF.js";import"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import{a as dt}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import{a as Q}from"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import{c as Z,e as J,i as Y,m as ct,s as ee,t as te}from"./chunk-ZCT7SRIM.js";import{a as tt}from"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{A as rt,C as _t,a as H,b as q,e as nt,g as j,k as it,l as K,p as ot,q as st,r as at,t as lt}from"./chunk-DNBOZ26J.js";import{h as k}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{B as b,Bb as P,F as R,Fc as x,Gc as $,Hb as V,Ib as z,Jb as l,Kb as se,La as qe,Lb as ae,Mb as Qe,Mc as et,Nb as p,Oa as r,Ob as S,S as He,Wb as Ze,X as f,Xb as Je,_a as w,_b as M,a as Ue,b as Be,ba as u,bc as O,c as We,ca as m,cc as U,db as F,dc as B,gc as y,hc as G,ic as A,la as c,mb as je,mc as Ye,n as v,nb as Ke,pb as C,qb as E,qc as W,ub as N,vb as i,wb as o,xb as I}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var mt=["formRef"],Ct=()=>[import("./chunk-EGCW3WY7.js").then(s=>s.OptionsListComponent)];function Et(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function ft(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=S();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=S();y("options",t.settings),N("hasFreeTextSettings",!0)}}var Nt=["Bytes","KB","MB","GB","TB","PB"],D=class s{#e=f(ne);#t=f(k);formRef=et.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Nt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#e.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let g=n.replace("--","");this.settings.update(T=>(T.some(h=>h.Name===g)||T.push({Name:g,Value:a}),T))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(T=>T.Name),_=Object.keys(t).filter(T=>T.startsWith("--")).filter(T=>!n.includes(T.replace("--",""))),g=e.reduce((T,h)=>(T[`--${h.Name}`]=h.Value,T),{});_.forEach(T=>{g[T]=null}),this.#t.patchApiV1Serversettings({requestBody:g}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ze(n.formRef,mt,5),t&2&&Je()},decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),C(1,Et,2,0,"spk-alert",3),i(2,"button",4),p("click",function(){return n.submit()}),V(3,0),I(4,"spk-icon"),z(),o()(),F(5,ft,1,2),je(6,5,Ct)),t&2&&(r(),E(n.saved()?1:-1),r(),M("loader",n.isSubmitting()),r(4),Ke(!n.isLoadingOptions()))},dependencies:[te,j,H,q],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}"],changeDetection:0})};var L=class s{#e=f(nt);#t=f(k);#o=f(Q);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=x(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):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");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#i(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#i(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#i(e)})}deleteRemoteControl(){let e=this;this.#e.open(dt,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#i(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function ht(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=S(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),p("click",function(){u(t);let a=S(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=S(2);r(),y("ngModel",t.registerUrl)}}function Pt(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=S(2);r(3),N("href",Ye(t.claimUrl()),qe),r(),U(t.claimUrl())}}function Ot(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function Rt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.cancel())}),l(1,3),o()}}function It(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.disable())}),l(1,4),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),p("click",function(){u(t);let a=S(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),p("click",function(){u(t);let a=S(2);return m(a.delete())}),l(3,6),o()}}function Gt(s,e){if(s&1&&(i(0,"div",7),C(1,ht,4,1),C(2,Pt,5,3,"div",8),C(3,Ot,3,0,"div",8),C(4,Rt,2,0,"button",9),C(5,It,2,0,"button",9),C(6,yt,4,0),o()),s&2){let t=S();r(),E(t.state()==="inactive"?1:-1),r(),E(t.state()==="registered"?2:-1),r(),E(t.state()==="registering"?3:-1),r(),E(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),E(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),E(t.state()==="disabled"?6:-1)}}var ie=class s{#e=f(L);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let g;g=$localize`Enable remote control`;let T;return T=$localize`Delete remote control setup`,[e,t,n,a,_,g,T,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(t,n){t&1&&C(0,Gt,7,6,"div",7),t&2&&E(n.state()!=="unknown"?0:-1)},dependencies:[ee,Z,J,Y,K],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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};function ut(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function At(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function $t(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function vt(s,e){if(s&1){let t=P();i(0,"button",74),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=S(2);M("loader",t.isUpdating())}}function bt(s,e){if(s&1){let t=P();i(0,"button",75),p("click",function(){u(t);let a=S(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=S(2);M("loader",t.isUpdating()),N("disabled",!0)}}function wt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=S();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=S();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),C(8,At,2,0,"spk-icon",69)(9,$t,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),p("click",function(){u(t);let a=S();return m(a.cancelPasswordChange())}),l(12,33),o(),C(13,vt,2,2,"button",72)(14,bt,2,3,"button",73),o()}if(s&2){let t=S();r(3),y("ngModel",t.passphrase),r(4),N("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),M("loader",t.isUpdating()),r(2),E(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function kt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Lt(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),p("click",function(){u(t);let a=S();return m(a.openPassphraseForm())}),l(2,36),o(),C(3,kt,2,0,"spk-icon",76),o()}if(s&2){let t=S();r(3),E(t.passwordUpdated()?3:-1)}}function Ft(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=S();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),p("click",function(){u(t);let a=S();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=S();r(3),y("ngModel",t.allowedHostnames),r(3),M("loader",t.updatingAllowedHosts())}}function xt(s,e){if(s&1&&O(0),s&2){let t,n=S();B(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Dt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Xt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;B(" ",t.label," ")}}function zt(s,e,t){let n=ut(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=g=>{clearTimeout(_),_=setTimeout(()=>Be(a,g),e)},n.update=g=>{clearTimeout(_),_=setTimeout(()=>We(a,g),e)},n}var Ut=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Bt=[{value:"none",label:$localize`System default (information)`},{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:"none",label:$localize`None / disabled`}],_e=class s{#e=f(St);#t=f(Q);#o=f(k);#n=f(ne);#i=f(L);#s=f(tt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#i.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#o.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#o.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Bt);timeTypeOptions=c(Ut);timeType=c("none");timeValue=zt(0,300);timeRange=x(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue(),t=this.#n.serverSettings();!t||t["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#o.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#o.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let g;g=$localize`Passwords`;let T;T=$localize`Change server passphrase`;let h;h=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let Se;Se=$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 pe;pe=$localize`Allow remote access`;let Te;Te=$localize`Prevent tray icon automatic log-in`;let ge;ge=$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 ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$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 Ae;Ae=$localize`Usage statistics`;let X;X=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK: 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. `,X=Qe(X);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let oe;oe=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$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 ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,g,T,h,de,ce,Se,pe,Te,ge,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,X,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[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","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[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"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",oe,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),p("click",function(){return n.setLightMode()}),o(),i(25,"img",46),p("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),C(33,wt,15,7)(34,Lt,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),p("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),p("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),C(54,Ft,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),p("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),C(70,xt,1,1),o(),C(71,Dt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),p("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),p("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),p("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),p("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),p("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),p("ngModelChange",function(_){return n.updateTimeType(_)}),o(),F(112,Xt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),V(118,29),I(119,"a",62)(120,"br")(121,"br"),z(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),p("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),F(125,Vt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,g;r(13),U(n.remoteControlStatus()),r(11),M("active",!n.isDarkMode()),r(),M("active",n.isDarkMode()),r(8),E(n.showPassphraseForm()?33:34),r(9),N("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),N("ngModel",n.langCtrl())("ngModelOptions",W(43,re)),r(8),M("active",n.allowRemoteAccess()),r(3),E(n.allowRemoteAccess()?54:-1),r(8),M("active",n.disableTrayIconLogin()),r(8),E(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),E(n.updatingChannel()?71:-1),r(3),M("active",n.updateChannel()===""),r(),se((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),ae(75),r(2),se((g=n.sysinfo())==null?null:g.ServerVersionType),ae(77),r(2),M("active",n.updateChannel()==="stable"),r(5),M("active",n.updateChannel()==="beta"),r(5),M("active",n.updateChannel()==="experimental"),r(5),M("active",n.updateChannel()==="canary"),r(14),N("unit",n.timeType()==="none"?"s":n.timeType()),r(),N("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),N("ngModelOptions",W(44,re)),r(),N("options",n.timeTypeOptions())("isClearable",!1),r(),N("ngModel",n.timeType()),r(12),N("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),N("ngModel",n.usageStatistics())("ngModelOptions",W(45,re))}},dependencies:[ee,Z,ct,J,Y,te,pt,ie,D,j,st,at,ot,rt,_t,K,H,it,q,lt],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;position:sticky;top:0;background:var(--base-1);z-index:1000;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)}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%] spk-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-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-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%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{zt as debounceSignal,_e as default};
@@ -1 +1 @@
1
- import{h as c}from"./chunk-FWVOVJCG.js";import{F as a,Gc as i,P as p,S as u,X as l,la as o}from"./chunk-K6EZTPNQ.js";var m=class r{#e=l(c);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=i(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=i(()=>{let s={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#s)??[]},e=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],n=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],d=this.systemInfo()?.EncryptionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[];return[s,...e,...n,...d]});allOptions=i(()=>this.allOptionsGrouped().reduce((s,e)=>[...s,...e.options],[]));hasWebSocket=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=i(()=>{let s=this.systemInfo()?.APIExtensions??[];return s.includes("v2:backup:list-filesets")&&s.includes("v2:backup:list-folder")});hasV2TestOperations=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasBackupListSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));preload(s=!1){let e=this.#e.getApiV1Systeminfo().pipe(p(n=>{this.systemInfo.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}preloadFilterGroups(s=!1){let e=this.#e.getApiV1SysteminfoFiltergroups().pipe(p(n=>{this.filterGroups.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}#s(s){return{name:s.Name,type:s.Type,shortDescription:s.ShortDescription??void 0,longDescription:s.LongDescription??void 0,deprecatedDescription:s.Deprecated??!1?s.DeprecationMessage??void 0:void 0,options:s.ValidValues,defaultValue:s.DefaultValue}}static \u0275fac=function(e){return new(e||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{h as c}from"./chunk-XD6MBGQY.js";import{F as a,Fc as i,P as p,S as u,X as l,la as o}from"./chunk-67YRCRMI.js";var m=class r{#e=l(c);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=i(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=i(()=>{let s={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#s)??[]},e=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],n=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],d=this.systemInfo()?.EncryptionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[];return[s,...e,...n,...d]});allOptions=i(()=>this.allOptionsGrouped().reduce((s,e)=>[...s,...e.options],[]));hasWebSocket=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=i(()=>{let s=this.systemInfo()?.APIExtensions??[];return s.includes("v2:backup:list-filesets")&&s.includes("v2:backup:list-folder")});hasV2TestOperations=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasBackupListSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));preload(s=!1){let e=this.#e.getApiV1Systeminfo().pipe(p(n=>{this.systemInfo.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}preloadFilterGroups(s=!1){let e=this.#e.getApiV1SysteminfoFiltergroups().pipe(p(n=>{this.filterGroups.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}#s(s){return{name:s.Name,type:s.Type,shortDescription:s.ShortDescription??void 0,longDescription:s.LongDescription??void 0,deprecatedDescription:s.Deprecated??!1?s.DeprecationMessage??void 0:void 0,options:s.ValidValues,defaultValue:s.DefaultValue}}static \u0275fac=function(e){return new(e||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-XD26KCAE.js";import"./chunk-KQAO2YHR.js";import"./chunk-RHW5QVAY.js";import"./chunk-FPLBURO5.js";import{b as v,c as G,e as L,f as w,i as U,n as K,q as X,r as x,t as V}from"./chunk-3KIPRGE2.js";import"./chunk-UVLJAD66.js";import{d as O,e as A}from"./chunk-7LEXBIXG.js";import"./chunk-P4ZYFRD3.js";import{A as y,a as b,c as R,g as N,l as E,m as $}from"./chunk-MHALSLG3.js";import{h as B}from"./chunk-FWVOVJCG.js";import"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{F as g,Hb as D,Ib as P,Jb as _,Mb as I,Nb as d,Oa as s,X as F,_a as T,_b as M,la as m,pb as C,qb as S,rc as k,ub as u,vb as r,wb as n,xb as l}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var z=()=>["/"];function j(c,t){c&1&&(r(0,"spk-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var p=new x,f=class c{#e=F(R);#t=F(B);#o=F(h);#n=F(O);isImporting=m(!1);isSecureFile=m(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),importMetadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=m([]);onFileDropped(t){let e=t[0];if(e){let o=new FileReader;this.isSecureFile.set(e.type!=="application/json"),o.onload=this.#i.bind(this),o.readAsArrayBuffer(e)}}#i(t){let e=t.target?.result;this.importForm.patchValue({config:this.#r(e)})}#r(t){let e=new Uint8Array(t),o=e.byteLength,a="";for(let i=0;i<o;i++)a+=String.fromCharCode(e[i]);return btoa(a)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:t=>{let e=this.#o.addDraftBackup(t.data);this.#n.navigate(["/backup-draft",e])},error:t=>{this.#e.error(t.message)}})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=T({type:c,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let t;t=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,t=I(t);let e;e=$localize`Import Metadata`;let o;o=$localize`Save now`;let a;return a=$localize`Passphrase`,[t,e,o,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"header")(1,"h3"),D(2,0),r(3,"div",4)(4,"button",5),l(5,"spk-icon"),n(),r(6,"button",6),d("click",function(){return o.submit()}),l(7,"spk-icon"),n()(),P(),n()(),r(8,"form",7)(9,"spk-file-upload",8),d("filesChange",function(i){return o.onFileDropped(i)}),n(),C(10,j,4,0,"spk-form-field"),r(11,"spk-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),r(15,"spk-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),u("routerLink",k(7,z)),s(2),M("loader",o.isImporting()),u("disabled",o.isImporting()),s(2),u("formGroup",o.importForm),s(),u("files",o.selectedFile()),s(),S(o.isSecureFile()?10:-1))},dependencies:[V,U,G,v,L,w,K,X,A,E,b,N,y,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}spk-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
1
+ import{a as h}from"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{b as v,c as G,e as L,f as w,j as U,o as K,q as X,r as x,t as V}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{d as O,e as A}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{A as y,a as b,c as R,g as N,l as E,m as $}from"./chunk-DNBOZ26J.js";import{h as B}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{F as g,Hb as D,Ib as P,Jb as _,Mb as I,Nb as d,Oa as s,X as F,_a as T,_b as M,la as m,pb as C,qb as S,qc as k,ub as u,vb as r,wb as n,xb as l}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var z=()=>["/"];function j(c,t){c&1&&(r(0,"spk-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var p=new x,f=class c{#e=F(R);#t=F(B);#o=F(h);#n=F(O);isImporting=m(!1);isSecureFile=m(!1);importForm=p.group({config:p.control(""),cmdline:p.control(!1),importMetadata:p.control(!1),direct:p.control(!1),passphrase:p.control("")});selectedFile=m([]);onFileDropped(t){let e=t[0];if(e){let o=new FileReader;this.isSecureFile.set(e.type!=="application/json"),o.onload=this.#i.bind(this),o.readAsArrayBuffer(e)}}#i(t){let e=t.target?.result;this.importForm.patchValue({config:this.#r(e)})}#r(t){let e=new Uint8Array(t),o=e.byteLength,a="";for(let i=0;i<o;i++)a+=String.fromCharCode(e[i]);return btoa(a)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:t=>{let e=this.#o.addDraftBackup(t.data);this.#n.navigate(["/backup-draft",e])},error:t=>{this.#e.error(t.message)}})}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=T({type:c,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let t;t=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,t=I(t);let e;e=$localize`Import Metadata`;let o;o=$localize`Save now`;let a;return a=$localize`Passphrase`,[t,e,o,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,o){e&1&&(r(0,"header")(1,"h3"),D(2,0),r(3,"div",4)(4,"button",5),l(5,"spk-icon"),n(),r(6,"button",6),d("click",function(){return o.submit()}),l(7,"spk-icon"),n()(),P(),n()(),r(8,"form",7)(9,"spk-file-upload",8),d("filesChange",function(i){return o.onFileDropped(i)}),n(),C(10,j,4,0,"spk-form-field"),r(11,"spk-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),r(15,"spk-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),u("routerLink",k(7,z)),s(2),M("loader",o.isImporting()),u("disabled",o.isImporting()),s(2),u("formGroup",o.importForm),s(),u("files",o.selectedFile()),s(),S(o.isSecureFile()?10:-1))},dependencies:[V,U,G,v,L,w,K,X,A,E,b,N,y,$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}spk-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
@@ -0,0 +1 @@
1
+ import{g as D}from"./chunk-4MAZCWVO.js";import{a as X}from"./chunk-LSNBRSNG.js";import{h as x}from"./chunk-PTFQBTH3.js";import"./chunk-EBYGIC45.js";import"./chunk-ZIJ7ZEHR.js";import"./chunk-5RPDEEQ3.js";import{a as g}from"./chunk-67XQIEG5.js";import"./chunk-A7BFGBWF.js";import"./chunk-F66HJES7.js";import"./chunk-XBP565VF.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{a as I,b as G,c as W,d as h,e as y,f as v}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{q as w,v as K}from"./chunk-DNBOZ26J.js";import"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Gc as N,Hb as _,Ib as F,Oa as l,Ob as E,X as c,_a as $,_b as L,la as A,pb as O,pc as M,qb as k,qc as T,rc as R,ub as r,vb as t,wb as n,xb as a}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var b=()=>["/restore-from-files/destination"],z=()=>["/restore-from-files/encryption"],B=()=>["/restore-from-files/select-files"],U=()=>["/restore-from-files/options"],j=e=>["/restore-draft",e,"select-files"],H=e=>["/restore-draft",e,"options"],V=e=>["/restore",e,"select-files"],q=e=>["/restore",e,"options"],J=e=>["/restore",e,"progress"];function Q(e,i){e&1&&(t(0,"div",9),_(1,0),a(2,"spk-radio"),F(),n(),t(3,"div",9),_(4,1),a(5,"spk-radio"),F(),n(),t(6,"div",9),_(7,2),a(8,"spk-radio"),F(),n(),t(9,"div",9),_(10,3),a(11,"spk-radio"),F(),n()),e&2&&(r("routerLink",T(4,b)),l(3),r("routerLink",T(5,z)),l(3),r("routerLink",T(6,B)),l(3),r("routerLink",T(7,U)))}function Y(e,i){if(e&1&&(t(0,"div",9),_(1,4),a(2,"spk-radio"),F(),n(),t(3,"div",9),_(4,5),a(5,"spk-radio"),F(),n()),e&2){let o=E();r("routerLink",R(2,j,o.backupId())),l(3),r("routerLink",R(4,H,o.backupId()))}}function Z(e,i){if(e&1&&(t(0,"div",9),_(1,6),a(2,"spk-radio"),F(),n(),t(3,"div",9),_(4,7),a(5,"spk-radio"),F(),n()),e&2){let o=E();r("routerLink",R(2,V,o.backupId())),l(3),r("routerLink",R(4,q,o.backupId()))}}function ee(e,i){if(e&1&&(t(0,"div",9),_(1,8),a(2,"spk-radio"),F(),n()),e&2){let o=E();r("routerLink",R(1,J,o.backupId()))}}var f=class e{#o=c(G);#t=c(h);#e=c(D);#n=g(this.#o.params);#i=g(this.#o.url);#a=g(this.#o.children[0].url);backupId=this.#e.backupId;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;isProgressPage=A(!1);paramsChanged=N(()=>{let i=this.#a(),o=this.#n()?.id,s=!!this.#i()?.find(S=>S.path==="restore-draft"),p=!!this.#i()?.find(S=>S.path==="restore-from-files"),u=!!i?.find(S=>S.path==="progress");this.isProgressPage.set(u),this.#e.init(o,p,p||s)});ngOnInit(){this.#t.events.subscribe(i=>{if(i instanceof I){let o=i.urlAfterRedirects;this.isProgressPage.set(o.includes("progress"))}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=$({type:e,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(o,s){o&2&&L("full-width",s.isProgressPage())},features:[M([D,x])],decls:8,vars:2,consts:()=>{let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Destination `;let o;o=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Encryption `;let s;s=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let p;p=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let u;u=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let S;S=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let P;P=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Select files `;let C;C=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_RADIO: Options `;let m;return m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_RADIO:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_RADIO: Progress `,[i,o,s,p,u,S,P,C,m,["step","","routerLinkActive","active",3,"routerLink"]]},template:function(o,s){o&1&&(a(0,"app-status-bar"),t(1,"spk-stepper"),O(2,Q,12,8)(3,Y,6,6)(4,Z,6,6),O(5,ee,3,3,"div",9),n(),t(6,"section"),a(7,"router-outlet"),n()),o&2&&(l(2),k(s.isFileRestore()?2:s.isDraft()?3:4),l(3),k(s.isProgressPage()?5:-1))},dependencies:[K,w,X,W,y,v],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{f as default};
@@ -1 +1 @@
1
- import{qa as l}from"./chunk-VKD4Y3YQ.js";import{X as p,bb as f}from"./chunk-K6EZTPNQ.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
1
+ import{qa as l}from"./chunk-GP2W7XZF.js";import{X as p,bb as f}from"./chunk-67YRCRMI.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-FLMFEFKM.js";import{a as Be}from"./chunk-WIJ3HW7I.js";import{a as oe}from"./chunk-WY2KPAVB.js";import{a as te}from"./chunk-3PYBMCOB.js";import{a as J}from"./chunk-FPLBURO5.js";import{b as Ae,c as y,e as L,f as $,h as ve,i as b,k as we,n as D,q as A,r as v,s as Ge,t as w}from"./chunk-3KIPRGE2.js";import{b as R,d as N}from"./chunk-7LEXBIXG.js";import{A as De,a as I,e as Me,g as k,l as ye,p as Le,q as $e,t as be}from"./chunk-MHALSLG3.js";import{h as M}from"./chunk-FWVOVJCG.js";import{la as H}from"./chunk-VKD4Y3YQ.js";import{B as Fe,Bb as B,E as ee,F as T,Hb as u,Hc as q,Ib as F,J as me,Jb as E,Kb as Te,Lb as Ee,N as Se,Nb as O,O as X,Oa as m,Ob as x,S as de,X as p,_a as h,_b as Oe,ba as f,bc as j,ca as C,db as ge,ec as fe,gc as Ce,hc as Re,i as _e,ic as Ne,la as _,o as ce,pb as z,qb as Y,qc as Pe,rc as he,ub as S,vb as r,vc as Ie,wb as l,x as Z,xb as c,xc as ke,y as ue,yb as K,zb as U}from"./chunk-K6EZTPNQ.js";var xe=new v,Xe=()=>xe.group({passphrase:xe.control("")}),ie=class a{#t=p(M);#e=p(P);#o=p(N);#n=p(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(T(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let o;return o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,o,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),O("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),E(3,0),l(),c(4,"input",5),l(),r(5,"div",6)(6,"button",7),O("click",function(){return t.back()}),u(7,1),c(8,"spk-icon"),F(),l(),r(9,"button",8),u(10,2),c(11,"spk-icon"),F(),l()()()),e&2&&S("formGroup",t.encryptionForm)},dependencies:[w,b,y,L,$,D,A,ye,I,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ke=()=>({standalone:!0});function Ue(a,i){a&1&&c(0,"spk-progress-bar",7)}function je(a,i){if(a&1&&(r(0,"div",14),j(1),Ie(2,"date"),l()),a&2){let e=i.$implicit;m(),fe("",e.Version,": ",ke(2,2,e.Time,"medium"))}}function qe(a,i){a&1&&c(0,"spk-progress-bar",7)}function He(a,i){if(a&1&&(r(0,"app-file-tree",13)(1,"label",15),E(2,4),l(),c(3,"input",16),l()),a&2){let e=x(2);S("rootPaths",e.rootPaths())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Je(a,i){if(a&1){let e=B();r(0,"spk-select",11),O("cleared",function(){f(e);let o=x();return C(o.abortLoading())}),r(1,"input",12),Ne("ngModelChange",function(o){f(e);let n=x();return Re(n.selectOption,o)||(n.selectOption=o),C(o)}),l(),ge(2,je,3,5,"ng-template"),l(),z(3,qe,1,0,"spk-progress-bar",7),z(4,He,4,4,"app-file-tree",13)}if(a&2){let e=x();S("options",e.versionOptions())("isClearable",!1),m(),Ce("ngModel",e.selectOption),S("ngModelOptions",he(6,Ke)),m(2),Y(e.isDraft()||e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),m(),Y(e.showFileTree()?4:-1)}}var se=new v,ze=()=>se.group({filesToRestore:se.control(""),passphrase:se.control(null)}),re=class a{#t=p(M);#e=p(P);#o=p(J);#n=p(N);#i=p(R);#s=p(H);#r=null;#a=null;selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);loadingRootPath=_(!1);isRepairing=_(!1);loadingEffect=q(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=q(()=>{let i=this.backupId(),e=this.isRepairing(),t=this.selectOption();if(!t||!i)return;let n=this.versionOptions()?.find(d=>d.Version===parseInt(t))?.Time??null;if(!n||e)return;let s={id:i+"",time:n};this.backupSettings.set(s),this.getRootPath(s)});repairEffect=q(()=>{let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#a===n)return;this.#a=n,this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(X(this.abortLoading$),T(()=>{this.#a=null})).subscribe(s=>{let d=s.ID;var G=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:d}).subscribe(W=>{W.Status==="Completed"&&(clearInterval(G),this.isRepairing.set(!1))})},1e3)})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#r===t||(this.#r=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#r=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}):this.#t.getApiV1BackupByIdFiles(e).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}))}abortLoading$=new _e;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#s.transform(t.Time,"medium")}`:""}}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#n.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-select-files"]],features:[Pe([H])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],i,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","backupSettings","multiSelect","showFiles"],[1,"custom-option"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",5,0),O("submit",function(){return f(o),C(t.next())}),r(2,"h3",6),E(3,1),l(),z(4,Ue,1,0,"spk-progress-bar",7)(5,Je,5,7),r(6,"div",8)(7,"button",9),O("click",function(){return f(o),C(t.back())}),u(8,2),c(9,"spk-icon"),F(),l(),r(10,"button",10),u(11,3),c(12,"spk-icon"),F(),l()()()}e&2&&(S("formGroup",t.selectFilesForm),m(4),Y(t.versionOptionsLoading()?4:5),m(5),Te(t.isFileRestore()?"Back":"Exit"),Ee(8))},dependencies:[Ge,b,y,L,$,ve,w,D,A,H,Q,k,I,be,Le],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var P=class a{#t=p(N);#e=p(R);#o=p(J);#n=p(Me);#i=p(M);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=ze();optionsForm=Ye();encryptionForm=Xe();optionsFormSignal=oe(this.optionsForm.valueChanges);selectFilesFormSignal=oe(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);init(i,e=!1,t=!1){this.backupId.set(i),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(T(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.navigate(["./progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(te,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#s(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Fe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?ce(()=>t):ue(1e3).pipe(Se(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?Z([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",d=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(d=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(d=$localize`The backup storage folder was not found.`),s&&(d=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(te,{data:{title:$localize`Failed to load backup filesets`,message:d,confirmText:$localize`OK`,cancelText:void 0},closed:G=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):Z([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(me(3))]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#s(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=de({token:a,factory:a.\u0275fac,providedIn:"root"})};var V=new v,Ye=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),ae=class a{#t=p(P);#e=p(N);#o=p(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let d;d=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let G;G=$localize`Permissions`;let W;W=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let le;le=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let pe;return pe=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,d,G,W,le,pe,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",12,0),O("submit",function(){return f(o),C(t.submit())}),r(2,"h3",13),E(3,1),l(),r(4,"app-toggle-card",14),K(5,15),E(6,2),U(),r(7,"spk-radio",16),u(8,3),c(9,"input",17),F(),l(),r(10,"spk-radio",16),u(11,4),c(12,"input",18),F(),l(),r(13,"app-file-tree",19)(14,"label",20),j(15,"Path"),l(),c(16,"input",21),l()(),r(17,"app-toggle-card",14),K(18,15),E(19,5),U(),r(20,"spk-radio",16),u(21,6),c(22,"input",22),F(),l(),r(23,"spk-radio",16),u(24,7),c(25,"input",23),F(),l()(),r(26,"app-toggle-card"),K(27,15),E(28,8),U(),r(29,"spk-toggle",24),u(30,9),c(31,"input",25),F(),l()(),r(32,"div",26)(33,"button",27),O("click",function(){return f(o),C(t.goBack())}),u(34,10),c(35,"spk-icon"),F(),l(),r(36,"button",28),u(37,11),c(38,"spk-icon"),F(),l()()()}if(e&2){let o;S("formGroup",t.optionsForm),m(4),S("disallowToggle",!0),m(9),S("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation"),m(4),S("disallowToggle",!0),m(19),Oe("loader",t.isSubmitting())}},dependencies:[w,b,y,Ae,we,L,$,D,A,Be,Q,De,$e,k,I],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ye as a,ae as b,Xe as c,ie as d,ze as e,re as f,P as g};
1
+ import{a as Q}from"./chunk-EBYGIC45.js";import{a as Be}from"./chunk-ZIJ7ZEHR.js";import{a as oe}from"./chunk-67XQIEG5.js";import{a as te}from"./chunk-FC45TEB6.js";import{a as J}from"./chunk-2YHX57UE.js";import{b as Ae,c as y,e as L,f as $,i as ve,j as b,l as we,o as D,q as A,r as v,s as Ge,t as w}from"./chunk-ZCT7SRIM.js";import{b as R,d as N}from"./chunk-DQM3ATT4.js";import{A as De,a as I,e as Me,g as k,l as ye,p as Le,q as $e,t as be}from"./chunk-DNBOZ26J.js";import{h as M}from"./chunk-XD6MBGQY.js";import{la as H}from"./chunk-GP2W7XZF.js";import{B as Fe,Bb as B,E as ee,F as T,Gc as q,Hb as u,Ib as F,J as me,Jb as E,Kb as Te,Lb as Ee,N as Se,Nb as O,O as X,Oa as m,Ob as x,S as de,X as p,_a as h,_b as Oe,ba as f,bc as j,ca as C,db as ge,ec as fe,gc as Ce,hc as Re,i as _e,ic as Ne,la as _,o as ce,pb as z,pc as Pe,qb as Y,qc as he,ub as S,uc as Ie,vb as r,wb as l,wc as ke,x as Z,xb as c,y as ue,yb as K,zb as U}from"./chunk-67YRCRMI.js";var xe=new v,Xe=()=>xe.group({passphrase:xe.control("")}),ie=class a{#t=p(M);#e=p(P);#o=p(N);#n=p(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=_(!1);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[{Name:"--no-encryption",Value:"true"}];e&&(t=[{Name:"--passphrase",Value:e}]),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(T(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-restore-encryption"]],decls:12,vars:1,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`${"\uFFFD#8\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let o;return o=$localize`${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `,[e,t,o,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",3),O("submit",function(){return t.next()}),r(1,"spk-form-field")(2,"label",4),E(3,0),l(),c(4,"input",5),l(),r(5,"div",6)(6,"button",7),O("click",function(){return t.back()}),u(7,1),c(8,"spk-icon"),F(),l(),r(9,"button",8),u(10,2),c(11,"spk-icon"),F(),l()()()),e&2&&S("formGroup",t.encryptionForm)},dependencies:[w,b,y,L,$,D,A,ye,I,k],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Ke=()=>({standalone:!0});function Ue(a,i){a&1&&c(0,"spk-progress-bar",7)}function je(a,i){if(a&1&&(r(0,"div",14),j(1),Ie(2,"date"),l()),a&2){let e=i.$implicit;m(),fe("",e.Version,": ",ke(2,2,e.Time,"medium"))}}function qe(a,i){a&1&&c(0,"spk-progress-bar",7)}function He(a,i){if(a&1&&(r(0,"app-file-tree",13)(1,"label",15),E(2,4),l(),c(3,"input",16),l()),a&2){let e=x(2);S("rootPaths",e.rootPaths())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Je(a,i){if(a&1){let e=B();r(0,"spk-select",11),O("cleared",function(){f(e);let o=x();return C(o.abortLoading())}),r(1,"input",12),Ne("ngModelChange",function(o){f(e);let n=x();return Re(n.selectOption,o)||(n.selectOption=o),C(o)}),l(),ge(2,je,3,5,"ng-template"),l(),z(3,qe,1,0,"spk-progress-bar",7),z(4,He,4,4,"app-file-tree",13)}if(a&2){let e=x();S("options",e.versionOptions())("isClearable",!1),m(),Ce("ngModel",e.selectOption),S("ngModelOptions",he(6,Ke)),m(2),Y(e.isDraft()||e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),m(),Y(e.showFileTree()?4:-1)}}var se=new v,ze=()=>se.group({filesToRestore:se.control(""),passphrase:se.control(null)}),re=class a{#t=p(M);#e=p(P);#o=p(J);#n=p(N);#i=p(R);#s=p(H);#r=null;#a=null;selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isDraft=this.#e.isDraft;isFileRestore=this.#e.isFileRestore;showFileTree=_(!1);backupSettings=_(null);rootPaths=_([]);loadingRootPath=_(!1);isRepairing=_(!1);loadingEffect=q(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=q(()=>{let i=this.backupId(),e=this.isRepairing(),t=this.selectOption();if(!t||!i)return;let n=this.versionOptions()?.find(d=>d.Version===parseInt(t))?.Time??null;if(!n||e)return;let s={id:i+"",time:n};this.backupSettings.set(s),this.getRootPath(s)});repairEffect=q(()=>{let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#a===n)return;this.#a=n,this.isRepairing.set(!0),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(X(this.abortLoading$),T(()=>{this.#a=null})).subscribe(s=>{let d=s.ID;var G=window.setInterval(()=>{this.#t.getApiV1TaskByTaskid({taskid:d}).subscribe(W=>{W.Status==="Completed"&&(clearInterval(G),this.isRepairing.set(!1))})},1e3)})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#r===t||(this.#r=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#o.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#r=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}):this.#t.getApiV1BackupByIdFiles(e).pipe(X(this.abortLoading$),T(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?this.rootPaths.set(n):this.rootPaths.set(["/"])}}))}abortLoading$=new _e;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#s.transform(t.Time,"medium")}`:""}}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}back(){this.#e.isFileRestore()?this.#n.navigate(["encryption"],{relativeTo:this.#i.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-select-files"]],features:[Pe([H])],decls:13,vars:3,consts:()=>{let i;i=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize`Select an option...`;let n;return n=$localize`Path`,[["formRef",""],i,e,t,n,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","backupSettings","multiSelect","showFiles"],[1,"custom-option"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",5,0),O("submit",function(){return f(o),C(t.next())}),r(2,"h3",6),E(3,1),l(),z(4,Ue,1,0,"spk-progress-bar",7)(5,Je,5,7),r(6,"div",8)(7,"button",9),O("click",function(){return f(o),C(t.back())}),u(8,2),c(9,"spk-icon"),F(),l(),r(10,"button",10),u(11,3),c(12,"spk-icon"),F(),l()()()}e&2&&(S("formGroup",t.selectFilesForm),m(4),Y(t.versionOptionsLoading()?4:5),m(5),Te(t.isFileRestore()?"Back":"Exit"),Ee(8))},dependencies:[Ge,b,y,L,$,ve,w,D,A,H,Q,k,I,be,Le],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var P=class a{#t=p(N);#e=p(R);#o=p(J);#n=p(Me);#i=p(M);backupId=_(null);backup=_(null);destinationTargetUrl=_(null);selectFilesForm=ze();optionsForm=Ye();encryptionForm=Xe();optionsFormSignal=oe(this.optionsForm.valueChanges);selectFilesFormSignal=oe(this.selectFilesForm.valueChanges);selectOption=_(null);versionOptionsLoading=_(!1);versionOptions=_([]);isSubmitting=_(!1);isDraft=_(!1);isFileRestore=_(!1);isFullWidthPage=_(!1);init(i,e=!1,t=!1){this.backupId.set(i),this.isFileRestore.set(e),this.isDraft.set(t),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId(),e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>`${s}*`)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(T(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.navigate(["./progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(te,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#s(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Fe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?ce(()=>t):ue(1e3).pipe(Se(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?Z([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);this.versionOptions.set((o.Data??[]).map(n=>({Version:n.Version??-1,IsFullBackup:n.IsFullBackup??void 0,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",d=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(d=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(d=$localize`The backup storage folder was not found.`),s&&(d=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(te,{data:{title:$localize`Failed to load backup filesets`,message:d,confirmText:$localize`OK`,cancelText:void 0},closed:G=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):Z([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(me(3))]).pipe(ee(1),T(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(t)}})}#s(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=de({token:a,factory:a.\u0275fac,providedIn:"root"})};var V=new v,Ye=()=>V.group({restoreFrom:V.control("orignal"),restoreFromPath:V.control(""),handleExisting:V.control("overwrite"),permissions:V.control(!1)}),ae=class a{#t=p(P);#e=p(N);#o=p(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=h({type:a,selectors:[["app-advanced-options-settings"]],decls:39,vars:6,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let d;d=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let G;G=$localize`Permissions`;let W;W=$localize` Restore read/write permissions ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let le;le=$localize`${"\uFFFD#35\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#35\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let pe;return pe=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,d,G,W,le,pe,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","permissions"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=B();r(0,"form",12,0),O("submit",function(){return f(o),C(t.submit())}),r(2,"h3",13),E(3,1),l(),r(4,"app-toggle-card",14),K(5,15),E(6,2),U(),r(7,"spk-radio",16),u(8,3),c(9,"input",17),F(),l(),r(10,"spk-radio",16),u(11,4),c(12,"input",18),F(),l(),r(13,"app-file-tree",19)(14,"label",20),j(15,"Path"),l(),c(16,"input",21),l()(),r(17,"app-toggle-card",14),K(18,15),E(19,5),U(),r(20,"spk-radio",16),u(21,6),c(22,"input",22),F(),l(),r(23,"spk-radio",16),u(24,7),c(25,"input",23),F(),l()(),r(26,"app-toggle-card"),K(27,15),E(28,8),U(),r(29,"spk-toggle",24),u(30,9),c(31,"input",25),F(),l()(),r(32,"div",26)(33,"button",27),O("click",function(){return f(o),C(t.goBack())}),u(34,10),c(35,"spk-icon"),F(),l(),r(36,"button",28),u(37,11),c(38,"spk-icon"),F(),l()()()}if(e&2){let o;S("formGroup",t.optionsForm),m(4),S("disallowToggle",!0),m(9),S("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation"),m(4),S("disallowToggle",!0),m(19),Oe("loader",t.isSubmitting())}},dependencies:[w,b,y,Ae,we,L,$,D,A,Be,Q,De,$e,k,I],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};export{Ye as a,ae as b,Xe as c,ie as d,ze as e,re as f,P as g};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-K5P3KNHL.js";import"./chunk-WY2KPAVB.js";import"./chunk-FWVOVJCG.js";import{oa as _}from"./chunk-VKD4Y3YQ.js";import"./chunk-WIDMAJIO.js";import{Jb as p,Oa as a,X as o,_a as S,bc as c,cc as g,vb as n,vc as l,wb as i,wc as m}from"./chunk-K6EZTPNQ.js";import"./chunk-EUDKD2JW.js";var r=class s{#e=o(d);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||s)};static \u0275cmp=S({type:s,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,f){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),l(5,"json"),i()()),e&2&&(a(4),g(m(5,1,f.serverSettings())))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{r as default};
1
+ import{a as d}from"./chunk-L6BZ6TEU.js";import"./chunk-67XQIEG5.js";import"./chunk-XD6MBGQY.js";import{oa as _}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Jb as p,Oa as a,X as o,_a as S,bc as c,cc as g,uc as l,vb as n,vc as m,wb as i}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var r=class s{#e=o(d);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||s)};static \u0275cmp=S({type:s,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,f){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),l(5,"json"),i()()),e&2&&(a(4),g(m(5,1,f.serverSettings())))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{r as default};
@@ -1 +1 @@
1
- import{a as O,c as P,e as E,h as v,j as N,s as I}from"./chunk-3KIPRGE2.js";import{l as y,o as X,t as Y}from"./chunk-MHALSLG3.js";import{Bb as x,Gc as m,Hc as h,Jb as F,Kb as A,Lb as D,Mc as c,Nb as W,Oa as s,Ob as M,Pb as T,Qb as d,Zb as j,_a as f,ba as $,bc as G,ca as k,db as w,ec as U,gc as g,hc as _,ic as C,la as l,ob as b,qc as S,rb as z,sb as R,tb as V,ub as p,vb as u,wb as a,yb as B,zb as L}from"./chunk-K6EZTPNQ.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=c();inputType=c();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=m(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),j("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=x();u(0,"button",7),W("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=c();inputType=c();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=m(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=m(()=>{let e=this.inputType();return e&&pe.includes(e)});timeOptions=m(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:6,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),B(8,5),R(9,ae,2,1,"button",6,z),L(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0),s(2),A(n.unitLabel()),D(7),s(2),V(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
1
+ import{a as O,c as P,e as E,i as v,k as N,s as I}from"./chunk-ZCT7SRIM.js";import{l as y,o as X,t as Y}from"./chunk-DNBOZ26J.js";import{Bb as x,Fc as m,Gc as h,Jb as F,Kb as A,Lb as D,Lc as c,Nb as W,Oa as s,Ob as M,Pb as T,Qb as d,Zb as j,_a as f,ba as $,bc as G,ca as k,db as w,ec as U,gc as g,hc as _,ic as C,la as l,ob as b,pc as S,rb as z,sb as R,tb as V,ub as p,vb as u,wb as a,yb as B,zb as L}from"./chunk-67YRCRMI.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=c();inputType=c();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=m(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),j("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=x();u(0,"button",7),W("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=c();inputType=c();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=m(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=m(()=>{let e=this.inputType();return e&&pe.includes(e.replace("--",""))});timeOptions=m(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:6,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),B(8,5),R(9,ae,2,1,"button",6,z),L(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0),s(2),A(n.unitLabel()),D(7),s(2),V(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
@@ -1 +1 @@
1
- import{b as s}from"./chunk-RHW5QVAY.js";import{S as c}from"./chunk-K6EZTPNQ.js";import{a as i}from"./chunk-EUDKD2JW.js";var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(s()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function F(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function y(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,F as b,y as c,C as d};
1
+ import{b as s}from"./chunk-RHW5QVAY.js";import{S as c}from"./chunk-67YRCRMI.js";import{a as i}from"./chunk-EUDKD2JW.js";var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(s()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function F(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function y(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,F as b,y as c,C as d};
@@ -1 +1 @@
1
- import{Gc as g,Ic as m,Jc as y,Q as a,X as p,ha as b,la as l}from"./chunk-K6EZTPNQ.js";import{a as v,b as f}from"./chunk-EUDKD2JW.js";function R(r,e){let u=!e?.manualCleanup?e?.injector?.get(b)??p(b):null,c=D(e?.equal),t;e?.requireSync?t=l({kind:0},{equal:c}):t=l({kind:1,value:e?.initialValue},{equal:c});let d,i=r.subscribe({next:n=>t.set({kind:1,value:n}),error:n=>{t.set({kind:2,error:n})},complete:()=>{d?.()}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return d=u?.onDestroy(i.unsubscribe.bind(i)),g(()=>{let n=t();switch(n.kind){case 1:return n.value;case 2:throw n.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function D(r=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&r(e.value,s.value)}function q(r){return m(f(v({},r),{loader:void 0,stream:e=>{let s,u=()=>s.unsubscribe();e.abortSignal.addEventListener("abort",u);let c=l({value:void 0}),t,d=new Promise(o=>t=o);function i(o){c.set(o),t?.(c),t=void 0}let n=r.stream??r.loader;if(n===void 0)throw new a(990,!1);return s=n(e).subscribe({next:o=>i({value:o}),error:o=>{i({error:y(o)}),e.abortSignal.removeEventListener("abort",u)},complete:()=>{t&&i({error:new a(991,!1)}),e.abortSignal.removeEventListener("abort",u)}}),d}}))}export{R as a,q as b};
1
+ import{Fc as g,Hc as m,Ic as y,Q as a,X as p,ha as b,la as l}from"./chunk-67YRCRMI.js";import{a as v,b as f}from"./chunk-EUDKD2JW.js";function R(r,e){let u=!e?.manualCleanup?e?.injector?.get(b)??p(b):null,c=D(e?.equal),t;e?.requireSync?t=l({kind:0},{equal:c}):t=l({kind:1,value:e?.initialValue},{equal:c});let d,i=r.subscribe({next:n=>t.set({kind:1,value:n}),error:n=>{t.set({kind:2,error:n})},complete:()=>{d?.()}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return d=u?.onDestroy(i.unsubscribe.bind(i)),g(()=>{let n=t();switch(n.kind){case 1:return n.value;case 2:throw n.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function D(r=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&r(e.value,s.value)}function q(r){return m(f(v({},r),{loader:void 0,stream:e=>{let s,u=()=>s.unsubscribe();e.abortSignal.addEventListener("abort",u);let c=l({value:void 0}),t,d=new Promise(o=>t=o);function i(o){c.set(o),t?.(c),t=void 0}let n=r.stream??r.loader;if(n===void 0)throw new a(990,!1);return s=n(e).subscribe({next:o=>i({value:o}),error:o=>{i({error:y(o)}),e.abortSignal.removeEventListener("abort",u)},complete:()=>{t&&i({error:new a(991,!1)}),e.abortSignal.removeEventListener("abort",u)}}),d}}))}export{R as a,q as b};