@duplicati/ngclient 0.0.28 → 0.0.29

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 (67) hide show
  1. package/assets/spk.woff2 +0 -0
  2. package/{chunk-B7SRENJI.js → chunk-2WU6GJ2L.js} +1 -1
  3. package/{chunk-6TFXXYVK.js → chunk-3IEVUFHW.js} +1 -1
  4. package/chunk-3LDFRXNZ.js +1 -0
  5. package/{chunk-ZAREJJZA.js → chunk-4KO6DAFG.js} +1 -1
  6. package/{chunk-DESW2TCQ.js → chunk-57EM3QNL.js} +1 -1
  7. package/{chunk-UMY3Y7LR.js → chunk-5NGUXCQH.js} +1 -1
  8. package/{chunk-2PUTRWRI.js → chunk-5XF5JD57.js} +1 -1
  9. package/{chunk-47O5BYLZ.js → chunk-6IDRMU4P.js} +1 -1
  10. package/{chunk-YDJZQ6GS.js → chunk-6V6L7ZNP.js} +1 -1
  11. package/{chunk-L7M2MTRL.js → chunk-6ZKECEPL.js} +1 -1
  12. package/{chunk-UPIWGO32.js → chunk-7JE7D2ZI.js} +1 -1
  13. package/{chunk-T6ENXWPD.js → chunk-7SDO46CK.js} +1 -1
  14. package/{chunk-ZVT4YXH5.js → chunk-B5E33CXC.js} +1 -1
  15. package/chunk-BP3UCGO5.js +1 -0
  16. package/{chunk-3EBWYIH7.js → chunk-BREOPUVA.js} +1 -1
  17. package/chunk-CEFENMMO.js +1 -0
  18. package/{chunk-LUAN4O53.js → chunk-CRF5AN7X.js} +1 -1
  19. package/{chunk-WV3AOW4R.js → chunk-DFGOAXZ2.js} +1 -1
  20. package/{chunk-AIQQJSGP.js → chunk-DTFSSXIP.js} +1 -1
  21. package/chunk-EPBET4G4.js +1 -0
  22. package/chunk-FTPIALBZ.js +2 -0
  23. package/chunk-G76L6TQ6.js +1 -0
  24. package/{chunk-2SYB6ABM.js → chunk-GQI6XZIF.js} +1 -1
  25. package/{chunk-C5O62M3L.js → chunk-I5C7ICSO.js} +1 -1
  26. package/{chunk-RJDP2FPE.js → chunk-ILNG56CV.js} +6 -6
  27. package/{chunk-RMZR2OAY.js → chunk-ITR23I5T.js} +1 -1
  28. package/{chunk-GAJ43GZE.js → chunk-KQWAEJSA.js} +1 -1
  29. package/chunk-L5ZD3XGL.js +1 -0
  30. package/{chunk-57W6Z6XZ.js → chunk-LESUULT7.js} +1 -1
  31. package/chunk-M3D5CWEA.js +1 -0
  32. package/{chunk-VAAI6C2V.js → chunk-MLIDBHU2.js} +1 -1
  33. package/{chunk-GBWXFIBZ.js → chunk-P3FQ2AHT.js} +1 -1
  34. package/{chunk-C4S5PKAB.js → chunk-PMQQNQUC.js} +1 -1
  35. package/{chunk-HH2EA6LF.js → chunk-PRRWBIUL.js} +1 -1
  36. package/chunk-PWCYVE3X.js +2 -0
  37. package/{chunk-TLFDZKKI.js → chunk-RNQMP76A.js} +1 -1
  38. package/{chunk-5X5UJ7CP.js → chunk-S57FCDO6.js} +1 -1
  39. package/chunk-SJGIDZMQ.js +1 -0
  40. package/{chunk-MFLGWG77.js → chunk-SNV5NHOU.js} +1 -1
  41. package/chunk-UAIXGIJV.js +1 -0
  42. package/chunk-UHDKSMMI.js +1 -0
  43. package/{chunk-BVTTY2FQ.js → chunk-VKC5JNTF.js} +1 -1
  44. package/chunk-VWW2CUXB.js +1 -0
  45. package/{chunk-4Y76KESB.js → chunk-WARSRDZI.js} +1 -1
  46. package/{chunk-4SJ35CHE.js → chunk-WKUHBDJS.js} +1 -1
  47. package/{chunk-BR45PK72.js → chunk-WRY3VN45.js} +1 -1
  48. package/{chunk-PD6257G7.js → chunk-WW3OAVSF.js} +1 -1
  49. package/{chunk-RONXYSR4.js → chunk-WWJLZQVS.js} +1 -1
  50. package/index.html +2 -2
  51. package/{main-YA4MEBAC.js → main-U3DYJNKX.js} +1 -1
  52. package/package.json +1 -1
  53. package/styles-67FI3DMG.css +1 -0
  54. package/chunk-CGWELGPM.js +0 -1
  55. package/chunk-DOGZZDWG.js +0 -1
  56. package/chunk-EPVXOSHI.js +0 -1
  57. package/chunk-FAAAWY76.js +0 -1
  58. package/chunk-MHCUWVA2.js +0 -1
  59. package/chunk-P7LAQN3J.js +0 -1
  60. package/chunk-QL753AWG.js +0 -1
  61. package/chunk-QNP3LI3Y.js +0 -1
  62. package/chunk-SDVRKDZS.js +0 -1
  63. package/chunk-UGZKHGQT.js +0 -1
  64. package/chunk-UVZO552H.js +0 -1
  65. package/chunk-VJACGH6X.js +0 -1
  66. package/chunk-ZAVS5NW7.js +0 -1
  67. package/styles-QLKBXZ7T.css +0 -1
@@ -1 +1 @@
1
- import{a as se}from"./chunk-GBWXFIBZ.js";import{a as $}from"./chunk-TLFDZKKI.js";import{b as L}from"./chunk-ZVT4YXH5.js";import{a as le}from"./chunk-T6ENXWPD.js";import{b as q,d as z,e as W,h as j,j as H,l as J,m as K,o as Q,p as X,q as Y,r as Z,s as ee,t as te}from"./chunk-6TFXXYVK.js";import"./chunk-ZAREJJZA.js";import{a as ae}from"./chunk-LUAN4O53.js";import"./chunk-2SYB6ABM.js";import{a as G}from"./chunk-BVTTY2FQ.js";import{g as ne,k as ie,o as oe,q as re}from"./chunk-QL753AWG.js";import"./chunk-4Y76KESB.js";import"./chunk-DESW2TCQ.js";import"./chunk-AIQQJSGP.js";import{Ab as d,Bb as x,Cb as T,Db as R,Dc as A,Eb as n,Fb as o,Fc as B,Gb as p,Hb as I,Ib as D,K as v,Kb as h,Oa as U,Qb as m,Ra as s,Rb as c,Ub as N,X as y,Za as S,c as P,cc as r,dc as k,ea as C,ec as b,fa as _,fb as F,lb as E,p as V,vb as u,xb as w}from"./chunk-RJDP2FPE.js";import"./chunk-7CGTOI24.js";function ce(a,e){if(a&1){let t=h();n(0,"spk-form-field",30),p(1,"input",31),o(),n(2,"button",32),m("click",function(){C(t);let l=c(2);return _(l.beginRemoteRegistration())}),r(3," Register for remote control "),o()}}function ue(a,e){if(a&1&&(n(0,"div",28)(1,"label"),r(2,"Machine is now registered, open this link to add it to your account:"),o(),n(3,"a",33),r(4),o()()),a&2){let t=c(2);s(3),N("href",t.remoteControlClaimUrl(),U),s(),k(t.remoteControlClaimUrl())}}function de(a,e){a&1&&(n(0,"div",28)(1,"label"),r(2,"Registering, please wait..."),o()())}function ge(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.cancelRemoteRegistration())}),r(1," Cancel registration "),o()}}function Ce(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.disableRemoteControl())}),r(1," Disable remote control "),o()}}function _e(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.enableRemoteControl())}),r(1," Enable remote control "),o(),n(2,"button",34),m("click",function(){C(t);let l=c(2);return _(l.deleteRemoteControl())}),r(3," Delete remote control setup "),o()}}function fe(a,e){if(a&1&&(n(0,"div",5),E(1,ce,4,0)(2,ue,5,2,"div",28)(3,de,3,0,"div",28)(4,ge,2,0,"button",29)(5,Ce,2,0,"button",29)(6,_e,4,0),o()),a&2){let t=c();s(),d(t.remoteControlState()==="inactive"?1:-1),s(),d(t.remoteControlState()==="registered"?2:-1),s(),d(t.remoteControlState()==="registering"?3:-1),s(),d(t.remoteControlState()==="registering"||t.remoteControlState()==="registeringfaulted"||t.remoteControlState()==="registered"?4:-1),s(),d(t.remoteControlState()==="connected"||t.remoteControlState()==="enabled"?5:-1),s(),d(t.remoteControlState()==="disabled"?6:-1)}}function Se(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t),s(),k(t)}}function he(a,e){if(a&1){let t=h();n(0,"option",35),m("click",function(){let l=C(t).$implicit,f=c();return _(f.pauseSettings.controls.timeType.setValue(l.value))}),r(1),o()}if(a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}function be(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}var g=new Z,me=[{value:"s",label:"Seconds"},{value:"m",label:"Minutes"},{value:"h",label:"Hours"}],O=[{value:"en",label:"English"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"it",label:"Italian"}],pe=[{value:"",label:"System default (information)"},{value:"information",label:"Usage statistics, warnings, errors, and crashes"},{value:"warning",label:"Warnings, errors and crashes"},{value:"error",label:"Errors and crashes"},{value:"crash",label:"Crashes only"},{value:"none",label:"None / disabled"}],M=class a{#i=y(le);#o=y($);#e=y(G);sysinfo=this.#o.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=S("list");settingsForm=g.group({pauseSettings:g.group({time:g.control(0),timeType:g.control("s")}),language:g.control("en"),usageStatistics:g.control(""),updateChannel:g.control(""),remoteControlRegisterUrl:g.control("")});remoteControlState=S("unknown");remoteControlClaimUrl=S(null);sysInfoEffect=B(()=>{this.settingsForm.controls.remoteControlRegisterUrl.patchValue(this.sysinfo()?.RemoteControlRegistrationUrl??"")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}langSignal=L(this.settingsForm.controls.language.valueChanges);timeTypeOptions=S(me);timeOptions=se([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],P(V(([e,t])=>{let i=this.#r(e);return t!==null?i.filter(l=>l.toString().includes(t.toString())):i}),v([])));languageOptions=A(()=>this.langSignal()?O.filter(e=>e.value===this.langSignal()):O);usageStatisticsOptions=S(pe);ngOnInit(){this.refreshRemoteControlStatus(),this.getServerSettings()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#e.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#e.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],i=t.slice(-1),l=t.slice(0,-1),f=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(l==""?"0":l),timeType:f.includes(i)?i:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(e){return e?O.find(t=>t.value===e)?.label??null:null}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:me.find(i=>i.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:pe.find(i=>i.value===t)?.label??null}}setDarkMode(){this.#i.setDarkMode()}setLightMode(){this.#i.setLightMode()}#r(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((i,l)=>l)}repeatRegisterTimer=null;#t(e){e.RegistrationUrl&&this.remoteControlClaimUrl.set(e.RegistrationUrl),console.log(e),e.IsConnected?this.remoteControlState.set("connected"):e.IsEnabled?this.remoteControlState.set("enabled"):e.CanEnable?this.remoteControlState.set("disabled"):e.IsRegisteringFaulted?this.remoteControlState.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.remoteControlState.set("registered"):this.remoteControlState.set("registering"):this.remoteControlState.set("inactive");let t=this.remoteControlState();console.log(t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>{this.#t(i)}})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}beginRemoteRegistration(){this.remoteControlState.set("registering");let e=this.settingsForm.controls.remoteControlRegisterUrl.value;this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e}}).subscribe({next:t=>{this.#t(t)},error:t=>{this.#n(t)}})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>{e.#t(t)},error:t=>{e.#n(t)}})}getRemoteControlStatusText(){let e=this.remoteControlState();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"}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=F({type:a,selectors:[["app-settings"]],decls:98,vars:13,consts:[[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right","remote-control"],[1,"field-row"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["options",""],[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","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl","formControlName","remoteControlRegisterUrl"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"],[3,"click","value"]],template:function(t,i){if(t&1&&(p(0,"app-status-bar"),n(1,"form",0),m("submit",function(){return i.submit()}),n(2,"header")(3,"div",1)(4,"h2"),r(5,"Settings"),o(),n(6,"p"),r(7,"Configure your backup settings."),o()(),n(8,"button",2),r(9,"Save changes"),o()(),n(10,"section")(11,"div",3)(12,"h3"),r(13,"Remote access control"),o(),n(14,"p"),r(15),o()(),n(16,"div",4),E(17,fe,7,6,"div",5),o()(),n(18,"section")(19,"div",3)(20,"h3"),r(21,"Pause after startup or hibernation"),o(),n(22,"p"),r(23," 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. "),o()(),n(24,"div",6)(25,"div",7)(26,"spk-select",8),p(27,"input",9),T(28,Se,2,2,"option",10,x),o(),n(30,"spk-select",11),p(31,"input",12),I(32,13),T(33,he,2,2,"option",10,x),D(),o()()()(),n(35,"section")(36,"div",3)(37,"h3"),r(38,"Color theme"),o(),n(39,"p"),r(40,"Customize your application theme"),o()(),n(41,"div",6)(42,"div",14)(43,"img",15),m("click",function(){return i.setLightMode()}),o(),n(44,"img",16),m("click",function(){return i.setDarkMode()}),o()()()(),n(45,"section")(46,"div",3)(47,"h3"),r(48,"Update channel"),o(),n(49,"p"),r(50,"Update channel selection is not implemented yet."),o()(),n(51,"div",17)(52,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("")}),n(53,"spk-radio",19),r(54),p(55,"input",20),o(),n(56,"p"),r(57),o()(),n(58,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("stable")}),n(59,"spk-radio",19),r(60," Stable "),p(61,"input",21),o(),n(62,"p"),r(63,"Official releases"),o()(),n(64,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("beta")}),n(65,"spk-radio",19),r(66," Beta "),p(67,"input",22),o(),n(68,"p"),r(69," 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. "),o()(),n(70,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("experimental")}),n(71,"spk-radio",19),r(72," Experimental "),p(73,"input",23),o(),n(74,"p"),r(75,"Specific builds for developers only. Not for use with important data."),o()(),n(76,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("canary")}),n(77,"spk-radio",19),r(78," Canary "),p(79,"input",24),o(),n(80,"p"),r(81,"Individual builds for developers only. Not for use with important data."),o()()()(),n(82,"section")(83,"div",3)(84,"h3"),r(85,"Usage statistics"),o(),n(86,"p"),r(87," Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate "),n(88,"a",25),r(89,"public usage statistics."),o(),p(90,"br")(91,"br"),r(92," 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. "),o()(),n(93,"div",6)(94,"spk-select",26),p(95,"input",27),T(96,be,2,2,"option",10,x),o()()()()),t&2){let l,f;s(),u("formGroup",i.settingsForm),s(14),k(i.getRemoteControlStatusText()),s(2),d(i.remoteControlState()!=="unknown"?17:-1),s(9),u("hideClearButton",!0),s(2),R(i.timeOptions()),s(2),u("displayFn",i.typeDisplay())("hideClearButton",!0),s(3),R(i.timeTypeOptions()),s(10),w("active",!i.isDarkMode()),s(),w("active",i.isDarkMode()),s(10),b(" Default (",(l=i.sysinfo())==null?null:l.DefaultUpdateChannel,") "),s(3),b("Same as the base install version: ",(f=i.sysinfo())==null?null:f.ServerVersionType,""),s(37),u("displayFn",i.usageDisplay()),s(2),R(i.usageStatisticsOptions())}},dependencies:[ee,j,X,Y,q,H,z,W,te,J,Q,K,ae,ne,oe,ie,re],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}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-level-40)}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%}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;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-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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}.remote-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0})};export{M as default};
1
+ import{a as se}from"./chunk-P3FQ2AHT.js";import{a as $}from"./chunk-RNQMP76A.js";import{b as L}from"./chunk-B5E33CXC.js";import{a as le}from"./chunk-7SDO46CK.js";import{b as q,d as z,e as W,h as j,j as H,l as J,m as K,o as Q,p as X,q as Y,r as Z,s as ee,t as te}from"./chunk-3IEVUFHW.js";import"./chunk-4KO6DAFG.js";import{a as ae}from"./chunk-CRF5AN7X.js";import"./chunk-GQI6XZIF.js";import{a as G}from"./chunk-VKC5JNTF.js";import{g as ne,k as ie,o as oe,q as re}from"./chunk-UHDKSMMI.js";import"./chunk-WARSRDZI.js";import"./chunk-57EM3QNL.js";import"./chunk-DTFSSXIP.js";import{Ab as d,Bb as x,Cb as T,Db as R,Eb as n,Ec as A,Fb as o,Gb as p,Gc as B,Hb as I,Ib as D,K as v,Kb as h,Oa as U,Qb as m,Ra as s,Rb as c,Ub as N,X as y,Za as S,c as P,cc as r,dc as k,ea as C,ec as b,fa as _,fb as F,lb as E,p as V,vb as u,xb as w}from"./chunk-ILNG56CV.js";import"./chunk-7CGTOI24.js";function ce(a,e){if(a&1){let t=h();n(0,"spk-form-field",30),p(1,"input",31),o(),n(2,"button",32),m("click",function(){C(t);let l=c(2);return _(l.beginRemoteRegistration())}),r(3," Register for remote control "),o()}}function ue(a,e){if(a&1&&(n(0,"div",28)(1,"label"),r(2,"Machine is now registered, open this link to add it to your account:"),o(),n(3,"a",33),r(4),o()()),a&2){let t=c(2);s(3),N("href",t.remoteControlClaimUrl(),U),s(),k(t.remoteControlClaimUrl())}}function de(a,e){a&1&&(n(0,"div",28)(1,"label"),r(2,"Registering, please wait..."),o()())}function ge(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.cancelRemoteRegistration())}),r(1," Cancel registration "),o()}}function Ce(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.disableRemoteControl())}),r(1," Disable remote control "),o()}}function _e(a,e){if(a&1){let t=h();n(0,"button",32),m("click",function(){C(t);let l=c(2);return _(l.enableRemoteControl())}),r(1," Enable remote control "),o(),n(2,"button",34),m("click",function(){C(t);let l=c(2);return _(l.deleteRemoteControl())}),r(3," Delete remote control setup "),o()}}function fe(a,e){if(a&1&&(n(0,"div",5),E(1,ce,4,0)(2,ue,5,2,"div",28)(3,de,3,0,"div",28)(4,ge,2,0,"button",29)(5,Ce,2,0,"button",29)(6,_e,4,0),o()),a&2){let t=c();s(),d(t.remoteControlState()==="inactive"?1:-1),s(),d(t.remoteControlState()==="registered"?2:-1),s(),d(t.remoteControlState()==="registering"?3:-1),s(),d(t.remoteControlState()==="registering"||t.remoteControlState()==="registeringfaulted"||t.remoteControlState()==="registered"?4:-1),s(),d(t.remoteControlState()==="connected"||t.remoteControlState()==="enabled"?5:-1),s(),d(t.remoteControlState()==="disabled"?6:-1)}}function Se(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t),s(),k(t)}}function he(a,e){if(a&1){let t=h();n(0,"option",35),m("click",function(){let l=C(t).$implicit,f=c();return _(f.pauseSettings.controls.timeType.setValue(l.value))}),r(1),o()}if(a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}function be(a,e){if(a&1&&(n(0,"option",10),r(1),o()),a&2){let t=e.$implicit;u("value",t.value),s(),b(" ",t.label," ")}}var g=new Z,me=[{value:"s",label:"Seconds"},{value:"m",label:"Minutes"},{value:"h",label:"Hours"}],O=[{value:"en",label:"English"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"it",label:"Italian"}],pe=[{value:"",label:"System default (information)"},{value:"information",label:"Usage statistics, warnings, errors, and crashes"},{value:"warning",label:"Warnings, errors and crashes"},{value:"error",label:"Errors and crashes"},{value:"crash",label:"Crashes only"},{value:"none",label:"None / disabled"}],M=class a{#i=y(le);#o=y($);#e=y(G);sysinfo=this.#o.systemInfo;isDarkMode=this.#i.isDarkMode;editAs=S("list");settingsForm=g.group({pauseSettings:g.group({time:g.control(0),timeType:g.control("s")}),language:g.control("en"),usageStatistics:g.control(""),updateChannel:g.control(""),remoteControlRegisterUrl:g.control("")});remoteControlState=S("unknown");remoteControlClaimUrl=S(null);sysInfoEffect=B(()=>{this.settingsForm.controls.remoteControlRegisterUrl.patchValue(this.sysinfo()?.RemoteControlRegistrationUrl??"")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}langSignal=L(this.settingsForm.controls.language.valueChanges);timeTypeOptions=S(me);timeOptions=se([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],P(V(([e,t])=>{let i=this.#r(e);return t!==null?i.filter(l=>l.toString().includes(t.toString())):i}),v([])));languageOptions=A(()=>this.langSignal()?O.filter(e=>e.value===this.langSignal()):O);usageStatisticsOptions=S(pe);ngOnInit(){this.refreshRemoteControlStatus(),this.getServerSettings()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#e.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#e.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],i=t.slice(-1),l=t.slice(0,-1),f=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(l==""?"0":l),timeType:f.includes(i)?i:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(e){return e?O.find(t=>t.value===e)?.label??null:null}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:me.find(i=>i.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:pe.find(i=>i.value===t)?.label??null}}setDarkMode(){this.#i.setDarkMode()}setLightMode(){this.#i.setLightMode()}#r(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((i,l)=>l)}repeatRegisterTimer=null;#t(e){e.RegistrationUrl&&this.remoteControlClaimUrl.set(e.RegistrationUrl),console.log(e),e.IsConnected?this.remoteControlState.set("connected"):e.IsEnabled?this.remoteControlState.set("enabled"):e.CanEnable?this.remoteControlState.set("disabled"):e.IsRegisteringFaulted?this.remoteControlState.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.remoteControlState.set("registered"):this.remoteControlState.set("registering"):this.remoteControlState.set("inactive");let t=this.remoteControlState();console.log(t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:i=>{this.#t(i)},error:i=>{this.#n(i)}})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:i=>{this.#t(i)}})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>{this.#t(t)}})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}beginRemoteRegistration(){this.remoteControlState.set("registering");let e=this.settingsForm.controls.remoteControlRegisterUrl.value;this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e}}).subscribe({next:t=>{this.#t(t)},error:t=>{this.#n(t)}})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>{this.#t(e)},error:e=>{this.#n(e)}})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>{e.#t(t)},error:t=>{e.#n(t)}})}getRemoteControlStatusText(){let e=this.remoteControlState();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"}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=F({type:a,selectors:[["app-settings"]],decls:98,vars:13,consts:[[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right","remote-control"],[1,"field-row"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["options",""],[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","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl","formControlName","remoteControlRegisterUrl"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","warn",3,"click"],[3,"click","value"]],template:function(t,i){if(t&1&&(p(0,"app-status-bar"),n(1,"form",0),m("submit",function(){return i.submit()}),n(2,"header")(3,"div",1)(4,"h2"),r(5,"Settings"),o(),n(6,"p"),r(7,"Configure your backup settings."),o()(),n(8,"button",2),r(9,"Save changes"),o()(),n(10,"section")(11,"div",3)(12,"h3"),r(13,"Remote access control"),o(),n(14,"p"),r(15),o()(),n(16,"div",4),E(17,fe,7,6,"div",5),o()(),n(18,"section")(19,"div",3)(20,"h3"),r(21,"Pause after startup or hibernation"),o(),n(22,"p"),r(23," 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. "),o()(),n(24,"div",6)(25,"div",7)(26,"spk-select",8),p(27,"input",9),T(28,Se,2,2,"option",10,x),o(),n(30,"spk-select",11),p(31,"input",12),I(32,13),T(33,he,2,2,"option",10,x),D(),o()()()(),n(35,"section")(36,"div",3)(37,"h3"),r(38,"Color theme"),o(),n(39,"p"),r(40,"Customize your application theme"),o()(),n(41,"div",6)(42,"div",14)(43,"img",15),m("click",function(){return i.setLightMode()}),o(),n(44,"img",16),m("click",function(){return i.setDarkMode()}),o()()()(),n(45,"section")(46,"div",3)(47,"h3"),r(48,"Update channel"),o(),n(49,"p"),r(50,"Update channel selection is not implemented yet."),o()(),n(51,"div",17)(52,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("")}),n(53,"spk-radio",19),r(54),p(55,"input",20),o(),n(56,"p"),r(57),o()(),n(58,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("stable")}),n(59,"spk-radio",19),r(60," Stable "),p(61,"input",21),o(),n(62,"p"),r(63,"Official releases"),o()(),n(64,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("beta")}),n(65,"spk-radio",19),r(66," Beta "),p(67,"input",22),o(),n(68,"p"),r(69," 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. "),o()(),n(70,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("experimental")}),n(71,"spk-radio",19),r(72," Experimental "),p(73,"input",23),o(),n(74,"p"),r(75,"Specific builds for developers only. Not for use with important data."),o()(),n(76,"div",18),m("click",function(){return i.settingsForm.controls.updateChannel.setValue("canary")}),n(77,"spk-radio",19),r(78," Canary "),p(79,"input",24),o(),n(80,"p"),r(81,"Individual builds for developers only. Not for use with important data."),o()()()(),n(82,"section")(83,"div",3)(84,"h3"),r(85,"Usage statistics"),o(),n(86,"p"),r(87," Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate "),n(88,"a",25),r(89,"public usage statistics."),o(),p(90,"br")(91,"br"),r(92," 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. "),o()(),n(93,"div",6)(94,"spk-select",26),p(95,"input",27),T(96,be,2,2,"option",10,x),o()()()()),t&2){let l,f;s(),u("formGroup",i.settingsForm),s(14),k(i.getRemoteControlStatusText()),s(2),d(i.remoteControlState()!=="unknown"?17:-1),s(9),u("hideClearButton",!0),s(2),R(i.timeOptions()),s(2),u("displayFn",i.typeDisplay())("hideClearButton",!0),s(3),R(i.timeTypeOptions()),s(10),w("active",!i.isDarkMode()),s(),w("active",i.isDarkMode()),s(10),b(" Default (",(l=i.sysinfo())==null?null:l.DefaultUpdateChannel,") "),s(3),b("Same as the base install version: ",(f=i.sysinfo())==null?null:f.ServerVersionType,""),s(37),u("displayFn",i.usageDisplay()),s(2),R(i.usageStatisticsOptions())}},dependencies:[ee,j,X,Y,q,H,z,W,te,J,Q,K,ae,ne,oe,ie,re],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}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-level-40)}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%}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;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-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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}.remote-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0})};export{M as default};
@@ -0,0 +1 @@
1
+ import{l as a,m as b}from"./chunk-I5C7ICSO.js";import"./chunk-5XF5JD57.js";import"./chunk-DNHLTHLR.js";import"./chunk-RNQMP76A.js";import"./chunk-B5E33CXC.js";import"./chunk-3IEVUFHW.js";import"./chunk-VKC5JNTF.js";import"./chunk-UHDKSMMI.js";import"./chunk-WW3OAVSF.js";import"./chunk-2WU6GJ2L.js";import"./chunk-WARSRDZI.js";import"./chunk-57EM3QNL.js";import"./chunk-ILNG56CV.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{a as L}from"./chunk-2SYB6ABM.js";import{a as R,b as V}from"./chunk-BVTTY2FQ.js";import{n as O}from"./chunk-QL753AWG.js";import{a as M}from"./chunk-AIQQJSGP.js";import{Ab as T,Dc as c,E as h,Eb as l,Fb as o,Fc as v,Gb as w,L as B,R as I,Ra as u,Rb as S,X as r,Za as i,cc as p,fb as y,fc as k,ib as C,l as b,lb as _,oc as A,p as D,pc as E,vb as x}from"./chunk-RJDP2FPE.js";import{a as f,b as g}from"./chunk-7CGTOI24.js";var m=class a{#t=r(M);transform(e,...t){return this.#t(e).fromNow()}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=C({name:"appRelativeTime",type:a,pure:!0})};var d=class a{#t=1e3;#d=r(V);#o=r(R);#n=r(L);#e=i(!1);#i=i(!1);#u=i(this.#t);#p=i(null);#r=i(!1);#s=i(!1);#a=i(null);#f=i(!1);statusData=this.#p.asReadonly();serverState=c(()=>{let e=this.#a();return e?(e.ProposedSchedule=e?.ProposedSchedule?.map(t=>{let s=t.Item1?this.#n.getBackupById(t.Item1):null;return g(f({},t),{backup:s})}),e):null});isFetching=this.#i.asReadonly();#l=null;#g=v(()=>{let e=this.#e(),t=this.#u();if(!e||!t||t<this.#t){this.#l&&window.clearInterval(this.#l);return}this.#l=window.setInterval(()=>{this.#m()},t)});start(){this.#r.set(!0),this.#c()}stop(){this.#r.set(!1)}startPollingProgress(){this.#m(),this.#e.set(!0)}stopPollingProgress(){this.#e.set(!1)}setProgressStatePollingInterval(e){if(e<this.#t){console.error(`Polling interval must be at least ${this.#t}ms`);return}this.#u.set(e)}serverStateEffect=v(()=>{if(this.#f()){this.stopPollingProgress();return}!this.#s()&&this.#r()?setTimeout(()=>{this.startPollingProgress(),this.#c()},1e3):this.stopPollingProgress()});#c(){if(this.#s())return;this.#s.set(!0);let e=this.#a()?.LastEventID,t=e==null?{}:{lastEventId:e,longpoll:!0,duration:"299s"};this.#o.getApiV1Serverstate(t).pipe(h(()=>this.#s.set(!1))).subscribe({next:s=>{this.#a()?.LastDataUpdateID!==s.LastDataUpdateID&&this.#n.getBackups(),this.#a.set(s)}})}#m(){this.#i.set(!0),this.#d.getApiV1Progressstate().pipe(B(e=>{let t=e.TaskID??null;return t===null?b(e):this.#o.getApiV1TaskByTaskid({taskid:t}).pipe(D(s=>g(f({},e),{task:s??null})))}),h(()=>this.#i.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,s=e.BackupID??null;if(t!==null&&s!==null){let n=this.#n.getBackupById(s);e.backup=n}e.task?.Status==="Completed"?this.#e.set(!1):this.#e.set(!0),this.#p.set(e)},error:e=>{e.status===404&&this.#e.set(!1)}})}static \u0275fac=function(t){return new(t||a)};static \u0275prov=I({token:a,factory:a.\u0275fac,providedIn:"root"})};function j(a,e){if(a&1&&(l(0,"div",2),p(1),o(),w(2,"spk-progress-bar",3)),a&2){let t,s,n=S();u(),k("",(t=n.statusData())==null||t.task==null?null:t.task.Status," - ",(t=n.statusData())==null||t.backup==null||t.backup.Backup==null?null:t.backup.Backup.Name,""),u(),x("value",(s=n.statusData())!=null&&s.OverallProgress?((s=n.statusData())==null?null:s.OverallProgress)*100:3)}}function G(a,e){if(a&1&&(l(0,"div",2),p(1),A(2,"appRelativeTime"),o()),a&2){let t,s=S();u(),k("",(t=s.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",E(2,2,s.nextBackup().time),"")}}function F(a,e){a&1&&(l(0,"div",2),p(1,"No scheduled tasks"),o())}function U(a,e){a&1&&(l(0,"div",2),p(1,"Loading..."),o())}var P=class a{#t=r(d);statusData=this.#t.statusData;serverState=this.#t.serverState;nextBackup=c(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#t.start()}ngOnDestroy(){this.#t.stop()}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=y({type:a,selectors:[["app-status-bar"]],decls:6,vars:1,consts:[[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"raised","primary",3,"value"]],template:function(t,s){if(t&1&&(l(0,"div",0)(1,"div",1),_(2,j,3,3)(3,G,3,4,"div",2)(4,F,2,0,"div",2)(5,U,2,0,"div",2),o()()),t&2){let n;u(2),T(!((n=s.statusData())==null||n.task==null)&&n.task.Status&&((n=s.statusData())==null||n.task==null?null:n.task.Status)!=="Completed"?2:s.nextBackup()?3:!s.statusData()||((n=s.statusData())==null||n.task==null?null:n.task.Status)==="Completed"?4:5)}},dependencies:[O,m],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{P as a};
1
+ import{a as L}from"./chunk-GQI6XZIF.js";import{a as R,b as V}from"./chunk-VKC5JNTF.js";import{n as O}from"./chunk-UHDKSMMI.js";import{a as M}from"./chunk-DTFSSXIP.js";import{Ab as T,E as h,Eb as l,Ec as c,Fb as o,Gb as w,Gc as v,L as B,R as I,Ra as u,Rb as S,X as r,Za as i,cc as p,fb as y,fc as k,ib as C,l as b,lb as _,p as D,pc as A,qc as E,vb as x}from"./chunk-ILNG56CV.js";import{a as f,b as g}from"./chunk-7CGTOI24.js";var m=class a{#t=r(M);transform(e,...t){return this.#t(e).fromNow()}static \u0275fac=function(t){return new(t||a)};static \u0275pipe=C({name:"appRelativeTime",type:a,pure:!0})};var d=class a{#t=1e3;#d=r(V);#o=r(R);#n=r(L);#e=i(!1);#i=i(!1);#u=i(this.#t);#p=i(null);#r=i(!1);#s=i(!1);#a=i(null);#f=i(!1);statusData=this.#p.asReadonly();serverState=c(()=>{let e=this.#a();return e?(e.ProposedSchedule=e?.ProposedSchedule?.map(t=>{let s=t.Item1?this.#n.getBackupById(t.Item1):null;return g(f({},t),{backup:s})}),e):null});isFetching=this.#i.asReadonly();#l=null;#g=v(()=>{let e=this.#e(),t=this.#u();if(!e||!t||t<this.#t){this.#l&&window.clearInterval(this.#l);return}this.#l=window.setInterval(()=>{this.#m()},t)});start(){this.#r.set(!0),this.#c()}stop(){this.#r.set(!1)}startPollingProgress(){this.#m(),this.#e.set(!0)}stopPollingProgress(){this.#e.set(!1)}setProgressStatePollingInterval(e){if(e<this.#t){console.error(`Polling interval must be at least ${this.#t}ms`);return}this.#u.set(e)}serverStateEffect=v(()=>{if(this.#f()){this.stopPollingProgress();return}!this.#s()&&this.#r()?setTimeout(()=>{this.startPollingProgress(),this.#c()},1e3):this.stopPollingProgress()});#c(){if(this.#s())return;this.#s.set(!0);let e=this.#a()?.LastEventID,t=e==null?{}:{lastEventId:e,longpoll:!0,duration:"299s"};this.#o.getApiV1Serverstate(t).pipe(h(()=>this.#s.set(!1))).subscribe({next:s=>{this.#a()?.LastDataUpdateID!==s.LastDataUpdateID&&this.#n.getBackups(),this.#a.set(s)}})}#m(){this.#i.set(!0),this.#d.getApiV1Progressstate().pipe(B(e=>{let t=e.TaskID??null;return t===null?b(e):this.#o.getApiV1TaskByTaskid({taskid:t}).pipe(D(s=>g(f({},e),{task:s??null})))}),h(()=>this.#i.set(!1))).subscribe({next:e=>{let t=e.TaskID??null,s=e.BackupID??null;if(t!==null&&s!==null){let n=this.#n.getBackupById(s);e.backup=n}e.task?.Status==="Completed"?this.#e.set(!1):this.#e.set(!0),this.#p.set(e)},error:e=>{e.status===404&&this.#e.set(!1)}})}static \u0275fac=function(t){return new(t||a)};static \u0275prov=I({token:a,factory:a.\u0275fac,providedIn:"root"})};function j(a,e){if(a&1&&(l(0,"div",2),p(1),o(),w(2,"spk-progress-bar",3)),a&2){let t,s,n=S();u(),k("",(t=n.statusData())==null||t.task==null?null:t.task.Status," - ",(t=n.statusData())==null||t.backup==null||t.backup.Backup==null?null:t.backup.Backup.Name,""),u(),x("value",(s=n.statusData())!=null&&s.OverallProgress?((s=n.statusData())==null?null:s.OverallProgress)*100:3)}}function G(a,e){if(a&1&&(l(0,"div",2),p(1),A(2,"appRelativeTime"),o()),a&2){let t,s=S();u(),k("",(t=s.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",E(2,2,s.nextBackup().time),"")}}function F(a,e){a&1&&(l(0,"div",2),p(1,"No scheduled tasks"),o())}function U(a,e){a&1&&(l(0,"div",2),p(1,"Loading..."),o())}var P=class a{#t=r(d);statusData=this.#t.statusData;serverState=this.#t.serverState;nextBackup=c(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#t.start()}ngOnDestroy(){this.#t.stop()}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=y({type:a,selectors:[["app-status-bar"]],decls:6,vars:1,consts:[[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"raised","primary",3,"value"]],template:function(t,s){if(t&1&&(l(0,"div",0)(1,"div",1),_(2,j,3,3)(3,G,3,4,"div",2)(4,F,2,0,"div",2)(5,U,2,0,"div",2),o()()),t&2){let n;u(2),T(!((n=s.statusData())==null||n.task==null)&&n.task.Status&&((n=s.statusData())==null||n.task==null?null:n.task.Status)!=="Completed"?2:s.nextBackup()?3:!s.statusData()||((n=s.statusData())==null||n.task==null?null:n.task.Status)==="Completed"?4:5)}},dependencies:[O,m],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{P as a};
@@ -1 +1 @@
1
- import{n as k}from"./chunk-C5O62M3L.js";import"./chunk-2PUTRWRI.js";import"./chunk-DNHLTHLR.js";import"./chunk-TLFDZKKI.js";import{b as l}from"./chunk-ZVT4YXH5.js";import"./chunk-6TFXXYVK.js";import{a as P}from"./chunk-LUAN4O53.js";import{a as O}from"./chunk-2SYB6ABM.js";import{a as F}from"./chunk-BVTTY2FQ.js";import{n as L,o as I,s as T}from"./chunk-QL753AWG.js";import{H as D,L as C,Y as y,Z as _}from"./chunk-PD6257G7.js";import"./chunk-B7SRENJI.js";import"./chunk-4Y76KESB.js";import"./chunk-DESW2TCQ.js";import"./chunk-AIQQJSGP.js";import{Ab as S,B as h,Eb as p,Fb as s,Fc as B,Gb as o,Ra as r,X as m,cc as u,fb as b,jc as v,lb as g,mc as d,vb as c}from"./chunk-RJDP2FPE.js";import"./chunk-7CGTOI24.js";var R=(t,e)=>[t,e,"general"],E=(t,e)=>[t,e,"destination"],w=(t,e)=>[t,e,"source-data"],x=(t,e)=>[t,e,"schedule"],A=(t,e)=>[t,e,"options"];function G(t,e){t&1&&o(0,"spk-progress-bar",1)}function j(t,e){t&1&&(p(0,"section"),o(1,"router-outlet"),s())}var f=class t{#t=m(D);#e=m(k);#a=m(O);#i=m(F);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#n=l(this.#t.params);#o=l(this.#t.url);paramsChanged=B(()=>{let e=this.#n()?.id,a=!!this.#o()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(h(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let i=n=>{this.#e.mapScheduleToForm(n.Schedule??null),n.Backup&&(this.#e.mapGeneralToForm(n.Backup),this.#e.mapDestinationToForm(n.Backup),this.#e.mapSourceDataToForm(n.Backup),this.#e.mapOptionsToForms(n.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let n=this.#a.draftBackups().find(M=>M.id===e);if(!n){alert("Backup not found");return}i(n.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=b({type:t,selectors:[["app-backup"]],features:[v([k])],decls:20,vars:21,consts:[["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]],template:function(a,i){a&1&&(o(0,"app-status-bar"),p(1,"header")(2,"spk-stepper")(3,"div",0),o(4,"spk-radio"),u(5," General "),s(),p(6,"div",0),o(7,"spk-radio"),u(8," Destination "),s(),p(9,"div",0),o(10,"spk-radio"),u(11," Source Data "),s(),p(12,"div",0),o(13,"spk-radio"),u(14," Schedule "),s(),p(15,"div",0),o(16,"spk-radio"),u(17," Options "),s()()(),g(18,G,1,0,"spk-progress-bar",1)(19,j,2,0,"section")),a&2&&(r(3),c("routerLink",d(6,R,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(9,E,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(12,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(15,x,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(18,A,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),S(i.finishedLoading()?19:18))},dependencies:[C,y,_,P,I,T,L],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow:hidden}"],changeDetection:0})};export{f as default};
1
+ import{n as k}from"./chunk-I5C7ICSO.js";import"./chunk-5XF5JD57.js";import"./chunk-DNHLTHLR.js";import"./chunk-RNQMP76A.js";import{b as l}from"./chunk-B5E33CXC.js";import"./chunk-3IEVUFHW.js";import{a as P}from"./chunk-CRF5AN7X.js";import{a as O}from"./chunk-GQI6XZIF.js";import{a as F}from"./chunk-VKC5JNTF.js";import{n as L,o as I,s as T}from"./chunk-UHDKSMMI.js";import{H as D,L as C,Y as y,Z as _}from"./chunk-WW3OAVSF.js";import"./chunk-2WU6GJ2L.js";import"./chunk-WARSRDZI.js";import"./chunk-57EM3QNL.js";import"./chunk-DTFSSXIP.js";import{Ab as S,B as h,Eb as p,Fb as s,Gb as o,Gc as B,Ra as r,X as m,cc as u,fb as b,kc as v,lb as g,nc as d,vb as c}from"./chunk-ILNG56CV.js";import"./chunk-7CGTOI24.js";var R=(t,e)=>[t,e,"general"],E=(t,e)=>[t,e,"destination"],w=(t,e)=>[t,e,"source-data"],x=(t,e)=>[t,e,"schedule"],A=(t,e)=>[t,e,"options"];function G(t,e){t&1&&o(0,"spk-progress-bar",1)}function j(t,e){t&1&&(p(0,"section"),o(1,"router-outlet"),s())}var f=class t{#t=m(D);#e=m(k);#a=m(O);#i=m(F);isDraft=this.#e.isDraft;backupId=this.#e.backupId;finishedLoading=this.#e.finishedLoading;#n=l(this.#t.params);#o=l(this.#t.url);paramsChanged=B(()=>{let e=this.#n()?.id,a=!!this.#o()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,a):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(h(1)).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(e.Backup),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,a=!1){let i=n=>{this.#e.mapScheduleToForm(n.Schedule??null),n.Backup&&(this.#e.mapGeneralToForm(n.Backup),this.#e.mapDestinationToForm(n.Backup),this.#e.mapSourceDataToForm(n.Backup),this.#e.mapOptionsToForms(n.Backup)),this.#e.finishedLoading.set(!0)};if(a){this.isDraft.set(a);let n=this.#a.draftBackups().find(M=>M.id===e);if(!n){alert("Backup not found");return}i(n.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=b({type:t,selectors:[["app-backup"]],features:[v([k])],decls:20,vars:21,consts:[["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]],template:function(a,i){a&1&&(o(0,"app-status-bar"),p(1,"header")(2,"spk-stepper")(3,"div",0),o(4,"spk-radio"),u(5," General "),s(),p(6,"div",0),o(7,"spk-radio"),u(8," Destination "),s(),p(9,"div",0),o(10,"spk-radio"),u(11," Source Data "),s(),p(12,"div",0),o(13,"spk-radio"),u(14," Schedule "),s(),p(15,"div",0),o(16,"spk-radio"),u(17," Options "),s()()(),g(18,G,1,0,"spk-progress-bar",1)(19,j,2,0,"section")),a&2&&(r(3),c("routerLink",d(6,R,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(9,E,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(12,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(15,x,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),c("routerLink",d(18,A,i.isDraft()?"/backup-draft":"/backup",i.backupId())),r(3),S(i.finishedLoading()?19:18))},dependencies:[C,y,_,P,I,T,L],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-level-40)}header[_ngcontent-%COMP%] spk-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow:hidden}"],changeDetection:0})};export{f as default};
@@ -1 +1 @@
1
- import{U as it}from"./chunk-RJDP2FPE.js";var at=60,ot=at*60,ut=ot*24,yt=ut*7,_=1e3,Y=at*_,x=ot*_,H=ut*_,z=yt*_,b="millisecond",g="second",E="minute",N="hour",y="day",k="week",S="month",V="quarter",p="year",w="date",ct="YYYY-MM-DDTHH:mm:ssZ",tt="Invalid Date",ft=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;var ht={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var r=["th","st","nd","rd"],e=t%100;return"["+t+(r[(e-20)%10]||r[e]||r[0])+"]"}};var et=function(t,r,e){var s=String(t);return!s||s.length>=r?t:""+Array(r+1-s.length).join(e)+t},pt=function(t){var r=-t.utcOffset(),e=Math.abs(r),s=Math.floor(e/60),n=e%60;return(r<=0?"+":"-")+et(s,2,"0")+":"+et(n,2,"0")},_t=function u(t,r){if(t.date()<r.date())return-u(r,t);var e=(r.year()-t.year())*12+(r.month()-t.month()),s=t.clone().add(e,S),n=r-s<0,i=t.clone().add(e+(n?-1:1),S);return+(-(e+(r-s)/(n?s-i:i-s))||0)},Ot=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},It=function(t){var r={M:S,y:p,w:k,d:y,D:w,h:N,m:E,s:g,ms:b,Q:V};return r[t]||String(t||"").toLowerCase().replace(/s$/,"")},gt=function(t){return t===void 0},dt={s:et,z:pt,m:_t,a:Ot,p:It,u:gt};var P="en",U={};U[P]=ht;var lt="$isDayjsObject",st=function(t){return t instanceof B||!!(t&&t[lt])},X=function u(t,r,e){var s;if(!t)return P;if(typeof t=="string"){var n=t.toLowerCase();U[n]&&(s=n),r&&(U[n]=r,s=n);var i=t.split("-");if(!s&&i.length>1)return u(i[0])}else{var a=t.name;U[a]=t,s=a}return!e&&s&&(P=s),s||!e&&P},v=function(t,r){if(st(t))return t.clone();var e=typeof r=="object"?r:{};return e.date=t,e.args=arguments,new B(e)},Et=function(t,r){return v(t,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})},h=dt;h.l=X;h.i=st;h.w=Et;var Nt=function(t){var r=t.date,e=t.utc;if(r===null)return new Date(NaN);if(h.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var s=r.match(ft);if(s){var n=s[2]-1||0,i=(s[7]||"0").substring(0,3);return e?new Date(Date.UTC(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)):new Date(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)}}return new Date(r)},B=function(){function u(r){this.$L=X(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[lt]=!0}var t=u.prototype;return t.parse=function(e){this.$d=Nt(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return h},t.isValid=function(){return this.$d.toString()!==tt},t.isSame=function(e,s){var n=v(e);return this.startOf(s)<=n&&n<=this.endOf(s)},t.isAfter=function(e,s){return v(e)<this.startOf(s)},t.isBefore=function(e,s){return this.endOf(s)<v(e)},t.$g=function(e,s,n){return h.u(e)?this[s]:this.set(n,e)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(e,s){var n=this,i=h.u(s)?!0:s,a=h.p(e),o=function(I,m){var l=h.w(n.$u?Date.UTC(n.$y,m,I):new Date(n.$y,m,I),n);return i?l:l.endOf(y)},c=function(I,m){var l=[0,0,0,0],D=[23,59,59,999];return h.w(n.toDate()[I].apply(n.toDate("s"),(i?l:D).slice(m)),n)},f=this.$W,$=this.$M,d=this.$D,M="set"+(this.$u?"UTC":"");switch(a){case p:return i?o(1,0):o(31,11);case S:return i?o(1,$):o(0,$+1);case k:{var C=this.$locale().weekStart||0,L=(f<C?f+7:f)-C;return o(i?d-L:d+(6-L),$)}case y:case w:return c(M+"Hours",0);case N:return c(M+"Minutes",1);case E:return c(M+"Seconds",2);case g:return c(M+"Milliseconds",3);default:return this.clone()}},t.endOf=function(e){return this.startOf(e,!1)},t.$set=function(e,s){var n,i=h.p(e),a="set"+(this.$u?"UTC":""),o=(n={},n[y]=a+"Date",n[w]=a+"Date",n[S]=a+"Month",n[p]=a+"FullYear",n[N]=a+"Hours",n[E]=a+"Minutes",n[g]=a+"Seconds",n[b]=a+"Milliseconds",n)[i],c=i===y?this.$D+(s-this.$W):s;if(i===S||i===p){var f=this.clone().set(w,1);f.$d[o](c),f.init(),this.$d=f.set(w,Math.min(this.$D,f.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},t.set=function(e,s){return this.clone().$set(e,s)},t.get=function(e){return this[h.p(e)]()},t.add=function(e,s){var n=this,i;e=Number(e);var a=h.p(s),o=function(d){var M=v(n);return h.w(M.date(M.date()+Math.round(d*e)),n)};if(a===S)return this.set(S,this.$M+e);if(a===p)return this.set(p,this.$y+e);if(a===y)return o(1);if(a===k)return o(7);var c=(i={},i[E]=Y,i[N]=x,i[g]=_,i)[a]||1,f=this.$d.getTime()+e*c;return h.w(f,this)},t.subtract=function(e,s){return this.add(e*-1,s)},t.format=function(e){var s=this,n=this.$locale();if(!this.isValid())return n.invalidDate||tt;var i=e||ct,a=h.z(this),o=this.$H,c=this.$m,f=this.$M,$=n.weekdays,d=n.months,M=n.meridiem,C=function(l,D,T,W){return l&&(l[D]||l(s,i))||T[D].slice(0,W)},L=function(l){return h.s(o%12||12,l,"0")},O=M||function(m,l,D){var T=m<12?"AM":"PM";return D?T.toLowerCase():T},I=function(l){switch(l){case"YY":return String(s.$y).slice(-2);case"YYYY":return h.s(s.$y,4,"0");case"M":return f+1;case"MM":return h.s(f+1,2,"0");case"MMM":return C(n.monthsShort,f,d,3);case"MMMM":return C(d,f);case"D":return s.$D;case"DD":return h.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return C(n.weekdaysMin,s.$W,$,2);case"ddd":return C(n.weekdaysShort,s.$W,$,3);case"dddd":return $[s.$W];case"H":return String(o);case"HH":return h.s(o,2,"0");case"h":return L(1);case"hh":return L(2);case"a":return O(o,c,!0);case"A":return O(o,c,!1);case"m":return String(c);case"mm":return h.s(c,2,"0");case"s":return String(s.$s);case"ss":return h.s(s.$s,2,"0");case"SSS":return h.s(s.$ms,3,"0");case"Z":return a;default:break}return null};return i.replace(Z,function(m,l){return l||I(m)||a.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(e,s,n){var i=this,a=h.p(s),o=v(e),c=(o.utcOffset()-this.utcOffset())*Y,f=this-o,$=function(){return h.m(i,o)},d;switch(a){case p:d=$()/12;break;case S:d=$();break;case V:d=$()/3;break;case k:d=(f-c)/z;break;case y:d=(f-c)/H;break;case N:d=f/x;break;case E:d=f/Y;break;case g:d=f/_;break;default:d=f;break}return n?d:h.a(d)},t.daysInMonth=function(){return this.endOf(S).$D},t.$locale=function(){return U[this.$L]},t.locale=function(e,s){if(!e)return this.$L;var n=this.clone(),i=X(e,s,!0);return i&&(n.$L=i),n},t.clone=function(){return h.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},u}(),vt=B.prototype;v.prototype=vt;[["$ms",b],["$s",g],["$m",E],["$H",N],["$W",y],["$M",S],["$y",p],["$D",w]].forEach(function(u){vt[u[1]]=function(t){return this.$g(t,u[0],u[1])}});v.extend=function(u,t){return u.$i||(u(t,B,v),u.$i=!0),v};v.locale=X;v.isDayjs=st;v.unix=function(u){return v(u*1e3)};v.en=U[P];v.Ls=U;v.p={};var K=v;var q=H*365,nt=q/12,At=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,j={years:q,months:nt,days:H,hours:x,minutes:Y,seconds:_,milliseconds:1,weeks:z},Q=function(t){return t instanceof St},mt,A,G=function(t,r,e){return new St(t,e,r.$l)},J=function(t){return A.p(t)+"s"},Mt=function(t){return t<0},F=function(t){return Mt(t)?Math.ceil(t):Math.floor(t)},Lt=function(t){return Math.abs(t)},R=function(t,r){return t?Mt(t)?{negative:!0,format:""+Lt(t)+r}:{negative:!1,format:""+t+r}:{negative:!1,format:""}},St=function(){function u(r,e,s){var n=this;if(this.$d={},this.$l=s,r===void 0&&(this.$ms=0,this.parseFromMilliseconds()),e)return G(r*j[J(e)],this);if(typeof r=="number")return this.$ms=r,this.parseFromMilliseconds(),this;if(typeof r=="object")return Object.keys(r).forEach(function(c){n.$d[J(c)]=r[c]}),this.calMilliseconds(),this;if(typeof r=="string"){var i=r.match(At);if(i){var a=i.slice(2),o=a.map(function(c){return c!=null?Number(c):0});return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var t=u.prototype;return t.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(s,n){return s+(e.$d[n]||0)*j[n]},0)},t.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=F(e/q),e%=q,this.$d.months=F(e/nt),e%=nt,this.$d.days=F(e/H),e%=H,this.$d.hours=F(e/x),e%=x,this.$d.minutes=F(e/Y),e%=Y,this.$d.seconds=F(e/_),e%=_,this.$d.milliseconds=e},t.toISOString=function(){var e=R(this.$d.years,"Y"),s=R(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=this.$d.weeks*7);var i=R(n,"D"),a=R(this.$d.hours,"H"),o=R(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(c*1e3)/1e3);var f=R(c,"S"),$=e.negative||s.negative||i.negative||a.negative||o.negative||f.negative,d=a.format||o.format||f.format?"T":"",M=$?"-":"",C=M+"P"+e.format+s.format+i.format+d+a.format+o.format+f.format;return C==="P"||C==="-P"?"P0D":C},t.toJSON=function(){return this.toISOString()},t.format=function(e){var s=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:A.s(this.$d.years,2,"0"),YYYY:A.s(this.$d.years,4,"0"),M:this.$d.months,MM:A.s(this.$d.months,2,"0"),D:this.$d.days,DD:A.s(this.$d.days,2,"0"),H:this.$d.hours,HH:A.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:A.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:A.s(this.$d.seconds,2,"0"),SSS:A.s(this.$d.milliseconds,3,"0")};return s.replace(Z,function(i,a){return a||String(n[i])})},t.as=function(e){return this.$ms/j[J(e)]},t.get=function(e){var s=this.$ms,n=J(e);return n==="milliseconds"?s%=1e3:n==="weeks"?s=F(s/j[n]):s=this.$d[n],s||0},t.add=function(e,s,n){var i;return s?i=e*j[J(s)]:Q(e)?i=e.$ms:i=G(e,this).$ms,G(this.$ms+i*(n?-1:1),this)},t.subtract=function(e,s){return this.add(e,s,!0)},t.locale=function(e){var s=this.clone();return s.$l=e,s},t.clone=function(){return G(this.$ms,this)},t.humanize=function(e){return mt().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},t.valueOf=function(){return this.asMilliseconds()},t.milliseconds=function(){return this.get("milliseconds")},t.asMilliseconds=function(){return this.as("milliseconds")},t.seconds=function(){return this.get("seconds")},t.asSeconds=function(){return this.as("seconds")},t.minutes=function(){return this.get("minutes")},t.asMinutes=function(){return this.as("minutes")},t.hours=function(){return this.get("hours")},t.asHours=function(){return this.as("hours")},t.days=function(){return this.get("days")},t.asDays=function(){return this.as("days")},t.weeks=function(){return this.get("weeks")},t.asWeeks=function(){return this.as("weeks")},t.months=function(){return this.get("months")},t.asMonths=function(){return this.as("months")},t.years=function(){return this.get("years")},t.asYears=function(){return this.as("years")},u}(),$t=function(t,r,e){return t.add(r.years()*e,"y").add(r.months()*e,"M").add(r.days()*e,"d").add(r.hours()*e,"h").add(r.minutes()*e,"m").add(r.seconds()*e,"s").add(r.milliseconds()*e,"ms")},Ct=function(u,t,r){mt=r,A=r().$utils(),r.duration=function(n,i){var a=r.locale();return G(n,{$l:a},i)},r.isDuration=Q;var e=t.prototype.add,s=t.prototype.subtract;t.prototype.add=function(n,i){return Q(n)?$t(this,n,1):e.bind(this)(n,i)},t.prototype.subtract=function(n,i){return Q(n)?$t(this,n,-1):s.bind(this)(n,i)}};var Dt=function(u,t,r){u=u||{};var e=t.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};r.en.relativeTime=s,e.fromToBase=function(a,o,c,f,$){for(var d=c.$locale().relativeTime||s,M=u.thresholds||[{l:"s",r:44,d:g},{l:"m",r:89},{l:"mm",r:44,d:E},{l:"h",r:89},{l:"hh",r:21,d:N},{l:"d",r:35},{l:"dd",r:25,d:y},{l:"M",r:45},{l:"MM",r:10,d:S},{l:"y",r:17},{l:"yy",d:p}],C=M.length,L,O,I,m=0;m<C;m+=1){var l=M[m];l.d&&(L=f?r(a).diff(c,l.d,!0):c.diff(a,l.d,!0));var D=(u.rounding||Math.round)(Math.abs(L));if(I=L>0,D<=l.r||!l.r){D<=1&&m>0&&(l=M[m-1]);var T=d[l.l];$&&(D=$(""+D)),typeof T=="string"?O=T.replace("%d",D):O=T(D,o,l.l,I);break}}if(o)return O;var W=I?d.future:d.past;return typeof W=="function"?W(O):W.replace("%s",O)};function n(a,o,c,f){return e.fromToBase(a,o,c,f)}e.to=function(a,o){return n(a,o,this,!0)},e.from=function(a,o){return n(a,o,this)};var i=function(o){return o.$u?r.utc():r()};e.toNow=function(a){return this.to(i(this),a)},e.fromNow=function(a){return this.from(i(this),a)}};var Tt=new it("Dayjs"),Gt={provide:Tt,useFactory:()=>(K.extend(Dt),K.extend(Ct),K)};export{Tt as a,Gt as b};
1
+ import{U as it}from"./chunk-ILNG56CV.js";var at=60,ot=at*60,ut=ot*24,yt=ut*7,_=1e3,Y=at*_,x=ot*_,H=ut*_,z=yt*_,b="millisecond",g="second",E="minute",N="hour",y="day",k="week",S="month",V="quarter",p="year",w="date",ct="YYYY-MM-DDTHH:mm:ssZ",tt="Invalid Date",ft=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;var ht={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var r=["th","st","nd","rd"],e=t%100;return"["+t+(r[(e-20)%10]||r[e]||r[0])+"]"}};var et=function(t,r,e){var s=String(t);return!s||s.length>=r?t:""+Array(r+1-s.length).join(e)+t},pt=function(t){var r=-t.utcOffset(),e=Math.abs(r),s=Math.floor(e/60),n=e%60;return(r<=0?"+":"-")+et(s,2,"0")+":"+et(n,2,"0")},_t=function u(t,r){if(t.date()<r.date())return-u(r,t);var e=(r.year()-t.year())*12+(r.month()-t.month()),s=t.clone().add(e,S),n=r-s<0,i=t.clone().add(e+(n?-1:1),S);return+(-(e+(r-s)/(n?s-i:i-s))||0)},Ot=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},It=function(t){var r={M:S,y:p,w:k,d:y,D:w,h:N,m:E,s:g,ms:b,Q:V};return r[t]||String(t||"").toLowerCase().replace(/s$/,"")},gt=function(t){return t===void 0},dt={s:et,z:pt,m:_t,a:Ot,p:It,u:gt};var P="en",U={};U[P]=ht;var lt="$isDayjsObject",st=function(t){return t instanceof B||!!(t&&t[lt])},X=function u(t,r,e){var s;if(!t)return P;if(typeof t=="string"){var n=t.toLowerCase();U[n]&&(s=n),r&&(U[n]=r,s=n);var i=t.split("-");if(!s&&i.length>1)return u(i[0])}else{var a=t.name;U[a]=t,s=a}return!e&&s&&(P=s),s||!e&&P},v=function(t,r){if(st(t))return t.clone();var e=typeof r=="object"?r:{};return e.date=t,e.args=arguments,new B(e)},Et=function(t,r){return v(t,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})},h=dt;h.l=X;h.i=st;h.w=Et;var Nt=function(t){var r=t.date,e=t.utc;if(r===null)return new Date(NaN);if(h.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var s=r.match(ft);if(s){var n=s[2]-1||0,i=(s[7]||"0").substring(0,3);return e?new Date(Date.UTC(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)):new Date(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)}}return new Date(r)},B=function(){function u(r){this.$L=X(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[lt]=!0}var t=u.prototype;return t.parse=function(e){this.$d=Nt(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return h},t.isValid=function(){return this.$d.toString()!==tt},t.isSame=function(e,s){var n=v(e);return this.startOf(s)<=n&&n<=this.endOf(s)},t.isAfter=function(e,s){return v(e)<this.startOf(s)},t.isBefore=function(e,s){return this.endOf(s)<v(e)},t.$g=function(e,s,n){return h.u(e)?this[s]:this.set(n,e)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(e,s){var n=this,i=h.u(s)?!0:s,a=h.p(e),o=function(I,m){var l=h.w(n.$u?Date.UTC(n.$y,m,I):new Date(n.$y,m,I),n);return i?l:l.endOf(y)},c=function(I,m){var l=[0,0,0,0],D=[23,59,59,999];return h.w(n.toDate()[I].apply(n.toDate("s"),(i?l:D).slice(m)),n)},f=this.$W,$=this.$M,d=this.$D,M="set"+(this.$u?"UTC":"");switch(a){case p:return i?o(1,0):o(31,11);case S:return i?o(1,$):o(0,$+1);case k:{var C=this.$locale().weekStart||0,L=(f<C?f+7:f)-C;return o(i?d-L:d+(6-L),$)}case y:case w:return c(M+"Hours",0);case N:return c(M+"Minutes",1);case E:return c(M+"Seconds",2);case g:return c(M+"Milliseconds",3);default:return this.clone()}},t.endOf=function(e){return this.startOf(e,!1)},t.$set=function(e,s){var n,i=h.p(e),a="set"+(this.$u?"UTC":""),o=(n={},n[y]=a+"Date",n[w]=a+"Date",n[S]=a+"Month",n[p]=a+"FullYear",n[N]=a+"Hours",n[E]=a+"Minutes",n[g]=a+"Seconds",n[b]=a+"Milliseconds",n)[i],c=i===y?this.$D+(s-this.$W):s;if(i===S||i===p){var f=this.clone().set(w,1);f.$d[o](c),f.init(),this.$d=f.set(w,Math.min(this.$D,f.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},t.set=function(e,s){return this.clone().$set(e,s)},t.get=function(e){return this[h.p(e)]()},t.add=function(e,s){var n=this,i;e=Number(e);var a=h.p(s),o=function(d){var M=v(n);return h.w(M.date(M.date()+Math.round(d*e)),n)};if(a===S)return this.set(S,this.$M+e);if(a===p)return this.set(p,this.$y+e);if(a===y)return o(1);if(a===k)return o(7);var c=(i={},i[E]=Y,i[N]=x,i[g]=_,i)[a]||1,f=this.$d.getTime()+e*c;return h.w(f,this)},t.subtract=function(e,s){return this.add(e*-1,s)},t.format=function(e){var s=this,n=this.$locale();if(!this.isValid())return n.invalidDate||tt;var i=e||ct,a=h.z(this),o=this.$H,c=this.$m,f=this.$M,$=n.weekdays,d=n.months,M=n.meridiem,C=function(l,D,T,W){return l&&(l[D]||l(s,i))||T[D].slice(0,W)},L=function(l){return h.s(o%12||12,l,"0")},O=M||function(m,l,D){var T=m<12?"AM":"PM";return D?T.toLowerCase():T},I=function(l){switch(l){case"YY":return String(s.$y).slice(-2);case"YYYY":return h.s(s.$y,4,"0");case"M":return f+1;case"MM":return h.s(f+1,2,"0");case"MMM":return C(n.monthsShort,f,d,3);case"MMMM":return C(d,f);case"D":return s.$D;case"DD":return h.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return C(n.weekdaysMin,s.$W,$,2);case"ddd":return C(n.weekdaysShort,s.$W,$,3);case"dddd":return $[s.$W];case"H":return String(o);case"HH":return h.s(o,2,"0");case"h":return L(1);case"hh":return L(2);case"a":return O(o,c,!0);case"A":return O(o,c,!1);case"m":return String(c);case"mm":return h.s(c,2,"0");case"s":return String(s.$s);case"ss":return h.s(s.$s,2,"0");case"SSS":return h.s(s.$ms,3,"0");case"Z":return a;default:break}return null};return i.replace(Z,function(m,l){return l||I(m)||a.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(e,s,n){var i=this,a=h.p(s),o=v(e),c=(o.utcOffset()-this.utcOffset())*Y,f=this-o,$=function(){return h.m(i,o)},d;switch(a){case p:d=$()/12;break;case S:d=$();break;case V:d=$()/3;break;case k:d=(f-c)/z;break;case y:d=(f-c)/H;break;case N:d=f/x;break;case E:d=f/Y;break;case g:d=f/_;break;default:d=f;break}return n?d:h.a(d)},t.daysInMonth=function(){return this.endOf(S).$D},t.$locale=function(){return U[this.$L]},t.locale=function(e,s){if(!e)return this.$L;var n=this.clone(),i=X(e,s,!0);return i&&(n.$L=i),n},t.clone=function(){return h.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},u}(),vt=B.prototype;v.prototype=vt;[["$ms",b],["$s",g],["$m",E],["$H",N],["$W",y],["$M",S],["$y",p],["$D",w]].forEach(function(u){vt[u[1]]=function(t){return this.$g(t,u[0],u[1])}});v.extend=function(u,t){return u.$i||(u(t,B,v),u.$i=!0),v};v.locale=X;v.isDayjs=st;v.unix=function(u){return v(u*1e3)};v.en=U[P];v.Ls=U;v.p={};var K=v;var q=H*365,nt=q/12,At=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,j={years:q,months:nt,days:H,hours:x,minutes:Y,seconds:_,milliseconds:1,weeks:z},Q=function(t){return t instanceof St},mt,A,G=function(t,r,e){return new St(t,e,r.$l)},J=function(t){return A.p(t)+"s"},Mt=function(t){return t<0},F=function(t){return Mt(t)?Math.ceil(t):Math.floor(t)},Lt=function(t){return Math.abs(t)},R=function(t,r){return t?Mt(t)?{negative:!0,format:""+Lt(t)+r}:{negative:!1,format:""+t+r}:{negative:!1,format:""}},St=function(){function u(r,e,s){var n=this;if(this.$d={},this.$l=s,r===void 0&&(this.$ms=0,this.parseFromMilliseconds()),e)return G(r*j[J(e)],this);if(typeof r=="number")return this.$ms=r,this.parseFromMilliseconds(),this;if(typeof r=="object")return Object.keys(r).forEach(function(c){n.$d[J(c)]=r[c]}),this.calMilliseconds(),this;if(typeof r=="string"){var i=r.match(At);if(i){var a=i.slice(2),o=a.map(function(c){return c!=null?Number(c):0});return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var t=u.prototype;return t.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(s,n){return s+(e.$d[n]||0)*j[n]},0)},t.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=F(e/q),e%=q,this.$d.months=F(e/nt),e%=nt,this.$d.days=F(e/H),e%=H,this.$d.hours=F(e/x),e%=x,this.$d.minutes=F(e/Y),e%=Y,this.$d.seconds=F(e/_),e%=_,this.$d.milliseconds=e},t.toISOString=function(){var e=R(this.$d.years,"Y"),s=R(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=this.$d.weeks*7);var i=R(n,"D"),a=R(this.$d.hours,"H"),o=R(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(c*1e3)/1e3);var f=R(c,"S"),$=e.negative||s.negative||i.negative||a.negative||o.negative||f.negative,d=a.format||o.format||f.format?"T":"",M=$?"-":"",C=M+"P"+e.format+s.format+i.format+d+a.format+o.format+f.format;return C==="P"||C==="-P"?"P0D":C},t.toJSON=function(){return this.toISOString()},t.format=function(e){var s=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:A.s(this.$d.years,2,"0"),YYYY:A.s(this.$d.years,4,"0"),M:this.$d.months,MM:A.s(this.$d.months,2,"0"),D:this.$d.days,DD:A.s(this.$d.days,2,"0"),H:this.$d.hours,HH:A.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:A.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:A.s(this.$d.seconds,2,"0"),SSS:A.s(this.$d.milliseconds,3,"0")};return s.replace(Z,function(i,a){return a||String(n[i])})},t.as=function(e){return this.$ms/j[J(e)]},t.get=function(e){var s=this.$ms,n=J(e);return n==="milliseconds"?s%=1e3:n==="weeks"?s=F(s/j[n]):s=this.$d[n],s||0},t.add=function(e,s,n){var i;return s?i=e*j[J(s)]:Q(e)?i=e.$ms:i=G(e,this).$ms,G(this.$ms+i*(n?-1:1),this)},t.subtract=function(e,s){return this.add(e,s,!0)},t.locale=function(e){var s=this.clone();return s.$l=e,s},t.clone=function(){return G(this.$ms,this)},t.humanize=function(e){return mt().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},t.valueOf=function(){return this.asMilliseconds()},t.milliseconds=function(){return this.get("milliseconds")},t.asMilliseconds=function(){return this.as("milliseconds")},t.seconds=function(){return this.get("seconds")},t.asSeconds=function(){return this.as("seconds")},t.minutes=function(){return this.get("minutes")},t.asMinutes=function(){return this.as("minutes")},t.hours=function(){return this.get("hours")},t.asHours=function(){return this.as("hours")},t.days=function(){return this.get("days")},t.asDays=function(){return this.as("days")},t.weeks=function(){return this.get("weeks")},t.asWeeks=function(){return this.as("weeks")},t.months=function(){return this.get("months")},t.asMonths=function(){return this.as("months")},t.years=function(){return this.get("years")},t.asYears=function(){return this.as("years")},u}(),$t=function(t,r,e){return t.add(r.years()*e,"y").add(r.months()*e,"M").add(r.days()*e,"d").add(r.hours()*e,"h").add(r.minutes()*e,"m").add(r.seconds()*e,"s").add(r.milliseconds()*e,"ms")},Ct=function(u,t,r){mt=r,A=r().$utils(),r.duration=function(n,i){var a=r.locale();return G(n,{$l:a},i)},r.isDuration=Q;var e=t.prototype.add,s=t.prototype.subtract;t.prototype.add=function(n,i){return Q(n)?$t(this,n,1):e.bind(this)(n,i)},t.prototype.subtract=function(n,i){return Q(n)?$t(this,n,-1):s.bind(this)(n,i)}};var Dt=function(u,t,r){u=u||{};var e=t.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};r.en.relativeTime=s,e.fromToBase=function(a,o,c,f,$){for(var d=c.$locale().relativeTime||s,M=u.thresholds||[{l:"s",r:44,d:g},{l:"m",r:89},{l:"mm",r:44,d:E},{l:"h",r:89},{l:"hh",r:21,d:N},{l:"d",r:35},{l:"dd",r:25,d:y},{l:"M",r:45},{l:"MM",r:10,d:S},{l:"y",r:17},{l:"yy",d:p}],C=M.length,L,O,I,m=0;m<C;m+=1){var l=M[m];l.d&&(L=f?r(a).diff(c,l.d,!0):c.diff(a,l.d,!0));var D=(u.rounding||Math.round)(Math.abs(L));if(I=L>0,D<=l.r||!l.r){D<=1&&m>0&&(l=M[m-1]);var T=d[l.l];$&&(D=$(""+D)),typeof T=="string"?O=T.replace("%d",D):O=T(D,o,l.l,I);break}}if(o)return O;var W=I?d.future:d.past;return typeof W=="function"?W(O):W.replace("%s",O)};function n(a,o,c,f){return e.fromToBase(a,o,c,f)}e.to=function(a,o){return n(a,o,this,!0)},e.from=function(a,o){return n(a,o,this)};var i=function(o){return o.$u?r.utc():r()};e.toNow=function(a){return this.to(i(this),a)},e.fromNow=function(a){return this.from(i(this),a)}};var Tt=new it("Dayjs"),Gt={provide:Tt,useFactory:()=>(K.extend(Dt),K.extend(Ct),K)};export{Tt as a,Gt as b};
@@ -0,0 +1 @@
1
+ import{a,b,c}from"./chunk-I5C7ICSO.js";import"./chunk-5XF5JD57.js";import"./chunk-DNHLTHLR.js";import"./chunk-RNQMP76A.js";import"./chunk-B5E33CXC.js";import"./chunk-3IEVUFHW.js";import"./chunk-VKC5JNTF.js";import"./chunk-UHDKSMMI.js";import"./chunk-WW3OAVSF.js";import"./chunk-2WU6GJ2L.js";import"./chunk-WARSRDZI.js";import"./chunk-57EM3QNL.js";import"./chunk-ILNG56CV.js";import"./chunk-7CGTOI24.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
@@ -0,0 +1,2 @@
1
+ import{a as F}from"./chunk-VKC5JNTF.js";import{a as N,t as V}from"./chunk-UHDKSMMI.js";import"./chunk-WARSRDZI.js";import{pa as $}from"./chunk-57EM3QNL.js";import{Ab as M,Bb as y,Cb as S,Db as I,E as C,Eb as i,Fb as o,Gb as u,Kb as E,Na as b,Qb as P,Ra as a,Rb as d,X as x,Za as c,cc as r,dc as m,ea as h,fa as f,fb as v,gc as T,hc as D,ic as O,lb as k,pc as B,rc as R,vb as g,wb as w,xb as L}from"./chunk-ILNG56CV.js";import"./chunk-7CGTOI24.js";function H(s,n){if(s&1&&(i(0,"tr")(1,"td",6)(2,"code"),u(3,"ol",7),o()()()),s&2){let e=d().$implicit,t=d();a(),w("grid-column","1 / -1")("height","auto"),a(2),g("innerHTML",t.breakIntoLines(e.Exception),b)}}function W(s,n){if(s&1){let e=E();i(0,"tr",3),P("click",function(){let l=h(e).$index,p=d();return f(p.toggleRow(l))}),i(1,"td"),r(2),B(3,"date"),o(),i(4,"td",4),r(5),o(),i(6,"td"),r(7),o(),i(8,"td")(9,"button",5)(10,"spk-icon"),r(11,"caret-down"),o()()()(),k(12,H,4,5,"tr")}if(s&2){let e=n.$implicit,t=n.$index,l=d();a(2),m(R(3,6,e.Timestamp,"MMM dd. hh:mm")),a(3),m(e.BackupID>=0?e.BackupID:"-"),a(2),m(e.Message),a(2),L("rotated-icon",t===l.openRowIndex()),a(3),M(t===l.openRowIndex()?12:-1)}}var j=["BackupID","Timestamp","Message","actions"],_=class s{#e=x(F);displayedColumns=c(j);logsLoading=c(!0);openRowIndex=c(null);logs=c([]);ngOnInit(){this.init()}init(){this.#e.getApiV1LogdataLog().pipe(C(()=>this.logsLoading.set(!1))).subscribe({next:n=>{console.log(n),this.logs.set(n)}})}toggleRow(n){this.openRowIndex.set(n===this.openRowIndex()?null:n)}breakIntoLines(n){let e=n.split(`
2
+ `),t="";for(let l=0;l<e.length;l++)t+=`<li>${e[l]}</li>`;return t}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=v({type:s,selectors:[["app-logs"]],decls:15,vars:2,consts:[[3,"dataChange","data","loading"],["table-header",""],["table-no-rows",""],[3,"click"],[1,"id"],["spk-button","","type","button",1,"outlined","small"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol",3,"innerHTML"]],template:function(e,t){e&1&&(i(0,"h3"),r(1,"Logs"),o(),i(2,"spk-table",0),O("dataChange",function(p){return D(t.logs,p)||(t.logs=p),p}),i(3,"tr",1)(4,"th"),r(5,"Timestamp"),o(),i(6,"th"),r(7,"Backup ID"),o(),i(8,"th"),r(9,"Message"),o(),u(10,"th"),o(),S(11,W,13,9,null,null,y),i(13,"div",2),r(14,"No data available"),o()()),e&2&&(a(2),T("data",t.logs),g("loading",t.logsLoading()),a(9),I(t.logs()))},dependencies:[V,$,N],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}spk-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}spk-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}spk-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{_ as default};
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-6V6L7ZNP.js";import"./chunk-P3FQ2AHT.js";import"./chunk-5XF5JD57.js";import"./chunk-RNQMP76A.js";import"./chunk-B5E33CXC.js";import"./chunk-3IEVUFHW.js";import"./chunk-VKC5JNTF.js";import"./chunk-UHDKSMMI.js";import"./chunk-WW3OAVSF.js";import"./chunk-2WU6GJ2L.js";import"./chunk-WARSRDZI.js";import"./chunk-57EM3QNL.js";import"./chunk-ILNG56CV.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-BVTTY2FQ.js";import{B as a,E as i,N as r,R as u,X as n,Za as s}from"./chunk-RJDP2FPE.js";var l=class p{#s=n(o);#p=null;#t=s([]);#e=s([]);#a=s(!1);#i=s(!1);#r=s(null);backups=this.#e.asReadonly();backupsLoading=this.#a.asReadonly();startingBackup=this.#i.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#t.asReadonly();addDraftBackup(t){let e=crypto.randomUUID();return this.#t.set([...this.#t(),{id:e,data:t}]),e}removeDraftBackupById(t){this.#t.set(this.#t().filter(e=>e.id!==t))}getBackupById(t){return this.#e().find(e=>e.Backup?.ID===t)??null}getBackups(t=!1){let e=this.#p,c=Date.now(),k=e&&c-e<15*60*1e3;!1||!t&&k&&this.#e().length||(this.#p=c,this.#a.set(!0),this.#s.getApiV1Backups().pipe(a(1),r(B=>this.#e.set(B)),i(()=>this.#a.set(!1))).subscribe())}startBackup(t){this.#i.set(!0),this.#s.postApiV1BackupByIdStart({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#i.set(!1))).subscribe()}deleteBackup(t){this.#r.set(t),this.#s.deleteApiV1BackupById({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#r.set(null))).subscribe()}static \u0275fac=function(e){return new(e||p)};static \u0275prov=u({token:p,factory:p.\u0275fac,providedIn:"root"})};export{l as a};
1
+ import{a as o}from"./chunk-VKC5JNTF.js";import{B as a,E as i,N as r,R as u,X as n,Za as s}from"./chunk-ILNG56CV.js";var l=class p{#s=n(o);#p=null;#t=s([]);#e=s([]);#a=s(!1);#i=s(!1);#r=s(null);backups=this.#e.asReadonly();backupsLoading=this.#a.asReadonly();startingBackup=this.#i.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#t.asReadonly();addDraftBackup(t){let e=crypto.randomUUID();return this.#t.set([...this.#t(),{id:e,data:t}]),e}removeDraftBackupById(t){this.#t.set(this.#t().filter(e=>e.id!==t))}getBackupById(t){return this.#e().find(e=>e.Backup?.ID===t)??null}getBackups(t=!1){let e=this.#p,c=Date.now(),k=e&&c-e<15*60*1e3;!1||!t&&k&&this.#e().length||(this.#p=c,this.#a.set(!0),this.#s.getApiV1Backups().pipe(a(1),r(B=>this.#e.set(B)),i(()=>this.#a.set(!1))).subscribe())}startBackup(t){this.#i.set(!0),this.#s.postApiV1BackupByIdStart({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#i.set(!1))).subscribe()}deleteBackup(t){this.#r.set(t),this.#s.deleteApiV1BackupById({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#r.set(null))).subscribe()}static \u0275fac=function(e){return new(e||p)};static \u0275prov=u({token:p,factory:p.\u0275fac,providedIn:"root"})};export{l as a};