@duplicati/ngclient 0.0.1 → 0.0.5

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 (197) hide show
  1. package/chunk-2DCEAXBG.js +1 -0
  2. package/chunk-2WYEYW3N.js +1 -0
  3. package/chunk-43IMNGQL.js +1 -0
  4. package/chunk-63RKHEAK.js +1 -0
  5. package/chunk-6HCEXB2Z.js +1 -0
  6. package/chunk-7POJIDMZ.js +1 -0
  7. package/chunk-7PZ2UDVE.js +1 -0
  8. package/chunk-AYLGFKRR.js +1 -0
  9. package/chunk-BFEHLVAY.js +1 -0
  10. package/chunk-BHHWIMLQ.js +1 -0
  11. package/chunk-BOT7P6RM.js +1 -0
  12. package/chunk-BRNQESTL.js +1 -0
  13. package/chunk-EIZWLO2R.js +2 -0
  14. package/chunk-EJZT4TGZ.js +1 -0
  15. package/chunk-F3A4UEZK.js +1 -0
  16. package/chunk-GAT3R5MA.js +2 -0
  17. package/chunk-GBVLF3BS.js +1 -0
  18. package/chunk-GY2VPOAT.js +1 -0
  19. package/chunk-HHIFLECY.js +1 -0
  20. package/chunk-IMLDBH2T.js +1 -0
  21. package/chunk-IOM7KF2W.js +1 -0
  22. package/chunk-J6KTHSHX.js +1 -0
  23. package/chunk-JRXXG6O7.js +1 -0
  24. package/chunk-LD5EWOQM.js +1 -0
  25. package/chunk-LT6J7X37.js +1 -0
  26. package/chunk-OP5BV4PG.js +1 -0
  27. package/chunk-OX435KV6.js +1 -0
  28. package/chunk-PJNE2N54.js +1 -0
  29. package/chunk-QTQWYR6H.js +1 -0
  30. package/chunk-RCES7NCR.js +1 -0
  31. package/chunk-RL2VWNJG.js +8 -0
  32. package/chunk-RZUDMW24.js +1 -0
  33. package/chunk-S2HNK7TK.js +1 -0
  34. package/chunk-S2YPSAFD.js +1 -0
  35. package/chunk-TGC6GY4N.js +1 -0
  36. package/chunk-UJYJZACJ.js +1 -0
  37. package/chunk-VAAR5GXC.js +1 -0
  38. package/chunk-VF6HT3GY.js +1 -0
  39. package/chunk-XBN37RRV.js +1 -0
  40. package/chunk-YC5LTBFM.js +1 -0
  41. package/index.html +15 -0
  42. package/main-TLCKWB2W.js +1 -0
  43. package/package.json +3 -40
  44. package/sparkle-ui-assets/fonts/InterTight-VariableFont_wght.ttf +0 -0
  45. package/sparkle-ui-assets/fonts/InterTight-VariableFont_wght.woff2 +0 -0
  46. package/styles-6W7ZCKNM.css +1 -0
  47. package/.dockerignore +0 -13
  48. package/.github/workflows/npm-publish.yml +0 -59
  49. package/.prettierignore +0 -13
  50. package/.prettierrc +0 -12
  51. package/.vscode/extensions.json +0 -4
  52. package/.vscode/launch.json +0 -13
  53. package/.vscode/settings.json +0 -8
  54. package/.vscode/tasks.json +0 -24
  55. package/Dockerfile +0 -38
  56. package/LICENSE +0 -21
  57. package/README.md +0 -27
  58. package/angular.json +0 -98
  59. package/bun.lockb +0 -0
  60. package/openapi-ts.config.ts +0 -13
  61. package/scripts/generate-package-json.ts +0 -15
  62. package/src/app/about/about.component.html +0 -15
  63. package/src/app/about/about.component.scss +0 -19
  64. package/src/app/about/about.component.ts +0 -13
  65. package/src/app/about/changelog/changelog.component.html +0 -3
  66. package/src/app/about/changelog/changelog.component.scss +0 -7
  67. package/src/app/about/changelog/changelog.component.ts +0 -18
  68. package/src/app/about/general/general.component.html +0 -9
  69. package/src/app/about/general/general.component.scss +0 -23
  70. package/src/app/about/general/general.component.ts +0 -30
  71. package/src/app/about/libraries/libraries.component.html +0 -3
  72. package/src/app/about/libraries/libraries.component.scss +0 -7
  73. package/src/app/about/libraries/libraries.component.ts +0 -18
  74. package/src/app/about/logs/logs.component.html +0 -5
  75. package/src/app/about/logs/logs.component.scss +0 -7
  76. package/src/app/about/logs/logs.component.ts +0 -18
  77. package/src/app/about/system-info/system-info.component.html +0 -3
  78. package/src/app/about/system-info/system-info.component.scss +0 -7
  79. package/src/app/about/system-info/system-info.component.ts +0 -17
  80. package/src/app/add-backup/add-backup.component.html +0 -29
  81. package/src/app/add-backup/add-backup.component.scss +0 -38
  82. package/src/app/add-backup/add-backup.component.ts +0 -14
  83. package/src/app/app.component.ts +0 -35
  84. package/src/app/app.config.ts +0 -23
  85. package/src/app/app.routes.ts +0 -121
  86. package/src/app/core/components/file-tree/file-tree.component.html +0 -87
  87. package/src/app/core/components/file-tree/file-tree.component.scss +0 -80
  88. package/src/app/core/components/file-tree/file-tree.component.ts +0 -485
  89. package/src/app/core/components/logo/logo.component.html +0 -22
  90. package/src/app/core/components/logo/logo.component.scss +0 -12
  91. package/src/app/core/components/logo/logo.component.ts +0 -11
  92. package/src/app/core/components/status-bar/status-bar.component.html +0 -38
  93. package/src/app/core/components/status-bar/status-bar.component.scss +0 -27
  94. package/src/app/core/components/status-bar/status-bar.component.ts +0 -33
  95. package/src/app/core/components/status-bar/status-bar.state.ts +0 -182
  96. package/src/app/core/components/toggle-card/toggle-card.component.html +0 -11
  97. package/src/app/core/components/toggle-card/toggle-card.component.scss +0 -49
  98. package/src/app/core/components/toggle-card/toggle-card.component.ts +0 -28
  99. package/src/app/core/interceptors/http.interceptor.ts +0 -69
  100. package/src/app/core/interceptors/websocket.interceptor.ts +0 -66
  101. package/src/app/core/openapi/core/ApiError.ts +0 -21
  102. package/src/app/core/openapi/core/ApiRequestOptions.ts +0 -21
  103. package/src/app/core/openapi/core/ApiResult.ts +0 -7
  104. package/src/app/core/openapi/core/OpenAPI.ts +0 -55
  105. package/src/app/core/openapi/core/request.ts +0 -337
  106. package/src/app/core/openapi/index.ts +0 -6
  107. package/src/app/core/openapi/schemas.gen.ts +0 -3611
  108. package/src/app/core/openapi/services.gen.ts +0 -1460
  109. package/src/app/core/openapi/types.gen.ts +0 -1510
  110. package/src/app/core/pipes/duration.pipe.ts +0 -27
  111. package/src/app/core/pipes/relative-time.pipe.ts +0 -14
  112. package/src/app/core/providers/dayjs.ts +0 -16
  113. package/src/app/core/services/dict.en.ts +0 -0
  114. package/src/app/core/services/dictionary.service.ts +0 -12
  115. package/src/app/core/services/localstorage.token.ts +0 -82
  116. package/src/app/core/services/password-generator.service.ts +0 -39
  117. package/src/app/core/services/relay-websocket.service.ts +0 -268
  118. package/src/app/core/services/timespan-literals.service.ts +0 -25
  119. package/src/app/core/states/app-auth.state.ts +0 -87
  120. package/src/app/core/states/backups.state.ts +0 -71
  121. package/src/app/core/states/relayconfig.state.ts +0 -23
  122. package/src/app/core/states/sysinfo.state.ts +0 -31
  123. package/src/app/core/states/tasks.state.ts +0 -34
  124. package/src/app/core/types/subscribed.ts +0 -7
  125. package/src/app/core/validators/custom.validators.ts +0 -120
  126. package/src/app/create-edit-backup/create-edit-backup.component.html +0 -28
  127. package/src/app/create-edit-backup/create-edit-backup.component.scss +0 -15
  128. package/src/app/create-edit-backup/create-edit-backup.component.ts +0 -33
  129. package/src/app/create-edit-backup/create-edit-backup.state.ts +0 -582
  130. package/src/app/create-edit-backup/destination/destination.component.html +0 -367
  131. package/src/app/create-edit-backup/destination/destination.component.scss +0 -85
  132. package/src/app/create-edit-backup/destination/destination.component.ts +0 -249
  133. package/src/app/create-edit-backup/destination/destination.config.ts +0 -103
  134. package/src/app/create-edit-backup/destination/destination.mapper.ts +0 -177
  135. package/src/app/create-edit-backup/general/general.component.html +0 -108
  136. package/src/app/create-edit-backup/general/general.component.scss +0 -34
  137. package/src/app/create-edit-backup/general/general.component.ts +0 -136
  138. package/src/app/create-edit-backup/options/options.component.html +0 -95
  139. package/src/app/create-edit-backup/options/options.component.scss +0 -42
  140. package/src/app/create-edit-backup/options/options.component.ts +0 -113
  141. package/src/app/create-edit-backup/schedule/schedule.component.html +0 -102
  142. package/src/app/create-edit-backup/schedule/schedule.component.scss +0 -38
  143. package/src/app/create-edit-backup/schedule/schedule.component.ts +0 -137
  144. package/src/app/create-edit-backup/source-data/source-data.component.html +0 -93
  145. package/src/app/create-edit-backup/source-data/source-data.component.scss +0 -41
  146. package/src/app/create-edit-backup/source-data/source-data.component.ts +0 -114
  147. package/src/app/home/backup.const.ts +0 -167
  148. package/src/app/home/home.component.html +0 -98
  149. package/src/app/home/home.component.scss +0 -88
  150. package/src/app/home/home.component.ts +0 -54
  151. package/src/app/layout/layout.component.html +0 -64
  152. package/src/app/layout/layout.component.scss +0 -24
  153. package/src/app/layout/layout.component.ts +0 -51
  154. package/src/app/layout/layout.state.ts +0 -70
  155. package/src/app/login/login.component.html +0 -12
  156. package/src/app/login/login.component.scss +0 -25
  157. package/src/app/login/login.component.ts +0 -34
  158. package/src/app/logout/logout.component.html +0 -1
  159. package/src/app/logout/logout.component.scss +0 -3
  160. package/src/app/logout/logout.component.ts +0 -18
  161. package/src/app/restore/restore.component.html +0 -56
  162. package/src/app/restore/restore.component.scss +0 -37
  163. package/src/app/restore/restore.component.ts +0 -55
  164. package/src/app/restore-flow/options/options.component.html +0 -57
  165. package/src/app/restore-flow/options/options.component.scss +0 -16
  166. package/src/app/restore-flow/options/options.component.ts +0 -58
  167. package/src/app/restore-flow/restore-flow.component.html +0 -14
  168. package/src/app/restore-flow/restore-flow.component.scss +0 -15
  169. package/src/app/restore-flow/restore-flow.component.ts +0 -23
  170. package/src/app/restore-flow/restore-flow.state.ts +0 -120
  171. package/src/app/restore-flow/select-files/select-files.component.html +0 -42
  172. package/src/app/restore-flow/select-files/select-files.component.scss +0 -16
  173. package/src/app/restore-flow/select-files/select-files.component.ts +0 -129
  174. package/src/app/settings/settings.component.html +0 -256
  175. package/src/app/settings/settings.component.scss +0 -106
  176. package/src/app/settings/settings.component.ts +0 -475
  177. package/src/environments/environment-token.ts +0 -4
  178. package/src/environments/environment.prod.ts +0 -6
  179. package/src/environments/environment.ts +0 -6
  180. package/src/index.html +0 -15
  181. package/src/main.ts +0 -6
  182. package/src/proxy.conf.mjs +0 -6
  183. package/src/styles.scss +0 -41
  184. package/tsconfig.app.json +0 -15
  185. package/tsconfig.json +0 -30
  186. /package/{src/assets → assets}/duplicati-logo.png +0 -0
  187. /package/{src/assets → assets}/duplicati-logo.svg +0 -0
  188. /package/{src/assets → assets}/favicon.ico +0 -0
  189. /package/{src/assets → assets}/images/backup.png +0 -0
  190. /package/{src/assets → assets}/images/dark-theme.png +0 -0
  191. /package/{src/assets → assets}/images/folder.png +0 -0
  192. /package/{src/assets → assets}/images/light-theme.png +0 -0
  193. /package/{src/assets → assets}/images/new-backup.png +0 -0
  194. /package/{src/assets → assets}/images/restore.png +0 -0
  195. /package/{src/assets → assets}/images/system-theme.png +0 -0
  196. /package/{src/assets → assets}/spk.css +0 -0
  197. /package/{src/assets → assets}/spk.woff2 +0 -0
@@ -0,0 +1 @@
1
+ import{a as P}from"./chunk-S2YPSAFD.js";import"./chunk-QTQWYR6H.js";import{a as I}from"./chunk-VF6HT3GY.js";import{a as y,d as M,e as D,k as R}from"./chunk-LT6J7X37.js";import{d as v}from"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import{a as O}from"./chunk-GBVLF3BS.js";import{$ as m,Fb as r,Hb as B,Ib as S,Kb as b,Mb as h,Qa as l,Z as s,bb as d,db as k,hb as f,ib as g,jb as C,kb as _,lb as i,mb as p,nb as c,tb as x}from"./chunk-RL2VWNJG.js";var w=e=>["/restore-flow",e];function L(e,o){e&1&&c(0,"spk-progress-bar",0)}function T(e,o){if(e&1&&(i(0,"spk-card",1),c(1,"img",2),i(2,"div",3)(3,"h3"),r(4),p(),i(5,"p"),r(6),p()(),i(7,"button",4),r(8," Restore "),i(9,"spk-icon"),r(10,"arrow-right"),p()()()),e&2){let t,a,n=o.$implicit;l(4),B("Restore ",(t=n.Backup==null?null:n.Backup.Name)!==null&&t!==void 0?t:"Backup name missing",""),l(2),S(" ",(a=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),l(),k("routerLink",h(4,w,n.Backup==null?null:n.Backup.ID))}}function E(e,o){if(e&1&&C(0,T,11,6,"spk-card",1,g),e&2){let t=x();_(t.backups())}}function N(e,o){e&1&&r(0," No backups found ")}var u=class e{#e=s(I);#t=s(O);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(o){this.#t.postApiV1BackupByIdRestore({id:o.Backup?.ID,requestBody:{}})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=m({type:e,selectors:[["app-restore"]],standalone:!0,features:[b],decls:7,vars:1,consts:[[1,"indeterminate","primary"],[1,"type-a"],["src","/assets/images/folder.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"]],template:function(t,a){t&1&&(c(0,"app-status-bar"),i(1,"section")(2,"h2"),r(3,"Where do you want to restore from?"),p(),d(4,L,1,0,"spk-progress-bar",0)(5,E,2,0)(6,N,1,0),p()),t&2&&(l(4),f(a.backupsLoading()?4:a.backups().length?5:6))},dependencies:[P,D,M,y,R,v],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 0;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{u as default};
@@ -0,0 +1 @@
1
+ import{e as S}from"./chunk-43IMNGQL.js";import"./chunk-J6KTHSHX.js";import"./chunk-LD5EWOQM.js";import"./chunk-7PZ2UDVE.js";import"./chunk-IOM7KF2W.js";import{l as C,p as v}from"./chunk-LT6J7X37.js";import{a as f,b as k,d as w,e as g}from"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import"./chunk-GBVLF3BS.js";import{$ as u,Fb as p,Kb as d,Mb as l,Qa as s,Z as r,db as a,lb as o,mb as n,nb as i}from"./chunk-RL2VWNJG.js";var F=e=>["/restore-flow",e,"select-files"],R=e=>["/restore-flow",e,"options"],c=class e{#t=r(f);#e=r(S);backupId=this.#e.backupId;ngOnInit(){this.#e.init(this.#t.snapshot.params.id)}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=u({type:e,selectors:[["app-restore-flow"]],standalone:!0,features:[d],decls:9,vars:6,consts:[["spk-step","","routerLinkActive","active",3,"routerLink"]],template:function(t,m){t&1&&(o(0,"spk-stepper")(1,"div",0),i(2,"spk-radio"),p(3," Select files "),n(),o(4,"div",0),i(5,"spk-radio"),p(6," Options "),n()(),o(7,"section"),i(8,"router-outlet"),n()),t&2&&(s(),a("routerLink",l(2,F,m.backupId())),s(3),a("routerLink",l(4,R,m.backupId())))},dependencies:[v,C,k,w,g],styles:["[_nghost-%COMP%]{display:block}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{c as default};
@@ -0,0 +1 @@
1
+ import{a as be}from"./chunk-J6KTHSHX.js";import{a as L,b as Ce}from"./chunk-LD5EWOQM.js";import{b as q}from"./chunk-7PZ2UDVE.js";import{a as me,b as O,d as V,e as E,f as T,g as ce,h as ue,i as P,l as R,m as de,n as fe,o as N,q as I}from"./chunk-IOM7KF2W.js";import{a as B,d as D,k as ge,l as he,n as Fe,q as Se}from"./chunk-LT6J7X37.js";import{a as w,c as C}from"./chunk-JRXXG6O7.js";import{a as M}from"./chunk-GBVLF3BS.js";import{$ as k,A as X,F as Y,Fb as r,I as j,Ib as re,Jb as se,Kb as x,N as Z,O as ee,Pb as le,Qa as u,Rb as ae,T as te,Wa as d,Z as p,ac as pe,bb as $,db as c,h as K,hb as J,ib as ie,ja as f,jb as oe,ka as g,kb as ne,lb as i,mb as n,nb as m,nc as _,ob as h,pb as F,q as Q,rb as y,sb as S,tb as W,u as U}from"./chunk-RL2VWNJG.js";function we(l,t){l&1&&m(0,"spk-progress-bar",3)}function Oe(l,t){if(l&1&&(i(0,"option",10),r(1),le(2,"date"),n()),l&2){let e=t.$implicit;c("value",e.Version),u(),re("",e.Version,": ",ae(2,3,e.Time,"d MMM y, h:mm"),"")}}function Ve(l,t){if(l&1&&(i(0,"app-file-tree",11)(1,"label",12),r(2,"Path"),n(),m(3,"input",13),n()),l&2){let e=W(2);c("rootPath",e.rootPath())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function Ee(l,t){if(l&1&&(i(0,"spk-select",7),m(1,"input",8),h(2,9),oe(3,Oe,3,6,"option",10,ie),F(),n(),$(5,Ve,4,4,"app-file-tree",11)),l&2){let e=W();c("displayFn",e.displayFn()),u(3),ne(e.versionOptions()),u(2),J(e.rootPathLoaded()?5:-1)}}var A=new N,ke=()=>A.group({filesToRestore:A.control(""),selectedOption:A.control(null),passphrase:A.control(null)}),z=class l{#t=p(M);#e=p(b);#i=p(C);#o=p(w);#n=p(_);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;backupSettings=pe(()=>{let t=this.backupId(),e=this.selectFilesFormSignal()?.selectedOption;if(typeof e!="number"||!t)return null;let s=this.versionOptions()?.find(a=>a.Version===e)?.Time??null;return s?{id:t,time:s}:null});rootPathLoaded=d(!1);rootPath=be([this.selectFilesFormSignal,this.backupId],K(Z([null,null]),ee(([t,e])=>{let o=t?.selectedOption,s=e;if(typeof o!="number"||!s)return Q("/");let a=this.versionOptions()?.find(G=>G.Version===o);return this.#t.getApiV1BackupByIdFiles({id:s,time:a?.Time??"",prefixOnly:!1,folderContents:!0}).pipe(U(G=>(this.rootPathLoaded.set(!0),G.Files[0].Path)))})));displayFn(){let t=this.versionOptions();return e=>{if(!e)return"";let o=t?.find(s=>s.Version?.toString()===e);return o?`${o.Version}: ${this.#n.transform(o.Time,"d MMM y, h:mm")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#o.parent})}exit(){this.#e.exit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=k({type:l,selectors:[["app-select-files"]],standalone:!0,features:[se([_]),x],decls:15,vars:2,consts:[["formRef",""],[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"],[3,"displayFn"],["type","number","placeholder","Select an option...","formControlName","selectedOption"],["options",""],[3,"value"],[3,"rootPath","backupSettings","multiSelect","showFiles"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]],template:function(e,o){if(e&1){let s=y();i(0,"form",1,0),S("submit",function(){return f(s),g(o.next())}),i(2,"h3",2),r(3,"Select files"),n(),$(4,we,1,0,"spk-progress-bar",3)(5,Ee,6,2),i(6,"div",4)(7,"button",5),S("click",function(){return f(s),g(o.exit())}),i(8,"spk-icon"),r(9,"arrow-left"),n(),r(10," Exit "),n(),i(11,"button",6)(12,"spk-icon"),r(13,"arrow-right"),n(),r(14," Continue "),n()()()}e&2&&(c("formGroup",o.selectFilesForm),u(4),J(o.versionOptionsLoading()?4:5))},dependencies:[I,T,de,fe,O,ce,V,E,P,R,_,L,D,B,Fe,ge],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 b=class l{#t=p(C);#e=p(M);backupId=d(null);backup=d(null);selectFilesForm=ke();optionsForm=ye();optionsFormSignal=q(this.optionsForm.valueChanges);selectFilesFormSignal=q(this.selectFilesForm.valueChanges);versionOptionsLoading=d(!1);versionOptions=d([]);isSubmitting=d(!1);init(t){this.backupId.set(t),this.#i(t,!0)}submit(){this.isSubmitting.set(!0);let t=this.backupId(),e=this.optionsForm.value,o=this.selectFilesForm.value,s=this.versionOptions()?.find(a=>a.Version===o.selectedOption);this.#e.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(a=>`${a}*`)??[],passphrase:o.passphrase??null,time:s?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!0}}).pipe(j(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.exit()},error:a=>{console.error("restore error",a)}})}exit(){this.#o(),this.#t.navigate(["/"])}getVersionOptions(){this.versionOptions()}#i(t,e=!1){this.versionOptionsLoading.set(!0),X([this.#e.getApiV1BackupById({id:t}),this.#e.getApiV1BackupByIdFilesets({id:t})]).pipe(Y(1),j(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([o,s])=>{this.versionOptions.set(s),this.backup.set(o),e&&this.selectFilesForm.controls.selectedOption.setValue(s[0].Version)}})}#o(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||l)};static \u0275prov=te({token:l,factory:l.\u0275fac,providedIn:"root"})};var v=new N,ye=()=>v.group({restoreFrom:v.control("orignal"),restoreFromPath:v.control(""),handleExisting:v.control("overwrite"),permissions:v.control(!1)}),H=class l{#t=p(b);#e=p(C);#i=p(w);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#i.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=k({type:l,selectors:[["app-options"]],standalone:!0,features:[x],decls:41,vars:4,consts:[["formRef",""],[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,o){if(e&1){let s=y();i(0,"form",1,0),S("submit",function(){return f(s),g(o.submit())}),i(2,"h3",2),r(3,"Restore options"),n(),i(4,"app-toggle-card",3),h(5,4),r(6,"Where do you want to restore files from?"),F(),i(7,"spk-radio",5),r(8," Original location "),m(9,"input",6),n(),i(10,"spk-radio",5),r(11," Pick location "),m(12,"input",7),n(),i(13,"app-file-tree",8)(14,"label",9),r(15,"Path"),n(),m(16,"input",10),n()(),i(17,"app-toggle-card",3),h(18,4),r(19,"How do you want to handle existing files?"),F(),i(20,"spk-radio",5),r(21," Overwrite "),m(22,"input",11),n(),i(23,"spk-radio",5),r(24," Save different versions with timestamp in file name "),m(25,"input",12),n()(),i(26,"app-toggle-card"),h(27,4),r(28,"Permissions"),F(),i(29,"spk-toggle",13),r(30," Restore read/write permissions "),m(31,"input",14),n()(),i(32,"div",15)(33,"button",16),S("click",function(){return f(s),g(o.goBack())}),i(34,"spk-icon"),r(35,"arrow-left"),n(),r(36," Go back "),n(),i(37,"button",17)(38,"spk-icon"),r(39,"arrow-right"),n(),r(40," Submit "),n()()()}if(e&2){let s;c("formGroup",o.optionsForm),u(4),c("disallowToggle",!0),u(9),c("disabled",((s=o.optionsFormSignal())==null?null:s.restoreFrom)!=="pickLocation"),u(4),c("disallowToggle",!0)}},dependencies:[I,T,O,me,ue,V,E,P,R,Ce,L,Se,he,D,B],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,H as b,ke as c,z as d,b as e};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-GBVLF3BS.js";import{I as i,T as r,Wa as o,Z as n,ac as f}from"./chunk-RL2VWNJG.js";var c=class e{#e=n(a);isLoaded=o(!1);systemInfo=o(null);backendModules=f(()=>this.systemInfo()?.BackendModules??[]);preloadSystemInfo(s=!1){!s&&this.systemInfo()||this.#e.getApiV1Systeminfo().pipe(i(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.systemInfo.set(t)}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})};export{c as a};
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c}from"./chunk-GY2VPOAT.js";import"./chunk-LD5EWOQM.js";import"./chunk-7PZ2UDVE.js";import"./chunk-IOM7KF2W.js";import"./chunk-63RKHEAK.js";import"./chunk-LT6J7X37.js";import"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import"./chunk-GBVLF3BS.js";import"./chunk-RL2VWNJG.js";export{b as createAdvancedOption,a as createOptionsForm,c as default};
@@ -0,0 +1 @@
1
+ import{b as h}from"./chunk-7PZ2UDVE.js";import{a as s}from"./chunk-GBVLF3BS.js";import{$ as r,Fb as o,Gb as c,Kb as m,Qa as p,Z as g,lb as t,mb as n}from"./chunk-RL2VWNJG.js";var a=class i{#e=g(s);changelog=h(this.#e.getApiV1Changelog());static \u0275fac=function(e){return new(e||i)};static \u0275cmp=r({type:i,selectors:[["app-changelog"]],standalone:!0,features:[m],decls:4,vars:1,template:function(e,u){if(e&1&&(t(0,"h3"),o(1,"Changelog"),n(),t(2,"pre"),o(3),n()),e&2){let l;p(3),c((l=u.changelog())==null?null:l.Changelog)}},styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{a as default};
@@ -0,0 +1 @@
1
+ import{R as a,Wa as b,Z as d,ac as g,bc as y,cc as h,ha as l,n as f,oa as v,pa as c}from"./chunk-RL2VWNJG.js";function p(s,e){!e?.injector&&l(p);let n=e?.injector??d(v),o=new f(1),i=h(()=>{let t;try{t=s()}catch(u){y(()=>o.error(u));return}y(()=>o.next(t))},{injector:n,manualCleanup:!0});return n.get(c).onDestroy(()=>{i.destroy(),o.complete()}),o.asObservable()}function m(s,e){let n=!e?.manualCleanup;n&&!e?.injector&&l(m);let o=n?e?.injector?.get(c)??d(c):null,i=w(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{if(e?.rejectErrors)throw r;t.set({kind:2,error:r})}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return o?.onDestroy(u.unsubscribe.bind(u)),g(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function w(s=Object.is){return(e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}export{p as a,m as b};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-S2YPSAFD.js";import"./chunk-QTQWYR6H.js";import"./chunk-VF6HT3GY.js";import{a as u,d as g,e as k}from"./chunk-LT6J7X37.js";import{d as l}from"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import"./chunk-GBVLF3BS.js";import{$ as r,Fb as t,Kb as s,Lb as m,Qa as c,db as d,lb as e,mb as n,nb as i}from"./chunk-RL2VWNJG.js";var b=()=>["/backup/new"],o=class p{static \u0275fac=function(a){return new(a||p)};static \u0275cmp=r({type:p,selectors:[["app-add-backup"]],standalone:!0,features:[s],decls:15,vars:2,consts:[[1,"backup-types"],[1,"type-a"],["src","/assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]],template:function(a,x){a&1&&(i(0,"app-status-bar"),e(1,"section")(2,"h2"),t(3,"Add a new backup"),n(),e(4,"div",0)(5,"spk-card",1),i(6,"img",2),e(7,"h3"),t(8,"New backup"),n(),e(9,"p"),t(10,"Configure a new backup. Choose your destination, source data and schedule."),n(),e(11,"button",3),t(12," Add a new backup "),e(13,"spk-icon"),t(14,"plus"),n()()()()()),a&2&&(c(11),d("routerLink",m(1,b)))},dependencies:[f,g,k,u,l],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{o as default};
@@ -0,0 +1 @@
1
+ import{d as c}from"./chunk-LT6J7X37.js";import{b as l,d as m,e as p}from"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import{$ as a,Fb as n,Kb as s,lb as e,mb as t,nb as u}from"./chunk-RL2VWNJG.js";var i=class r{static \u0275fac=function(o){return new(o||r)};static \u0275cmp=a({type:r,selectors:[["app-about"]],standalone:!0,features:[s],decls:13,vars:0,consts:[[1,"nav"],["spk-button","","routerLink","/about/general","routerLinkActive","primary",1,"raised"],["spk-button","","routerLink","/about/changelog","routerLinkActive","primary",1,"raised"],["spk-button","","routerLink","/about/libraries","routerLinkActive","primary",1,"raised"],["spk-button","","routerLink","/about/system-info","routerLinkActive","primary",1,"raised"],["spk-button","","routerLink","/about/logs","routerLinkActive","primary",1,"raised"]],template:function(o,b){o&1&&(e(0,"div",0)(1,"button",1),n(2,"General"),t(),e(3,"button",2),n(4,"Changelog"),t(),e(5,"button",3),n(6,"Libraries"),t(),e(7,"button",4),n(8,"System info"),t(),e(9,"button",5),n(10,"Logs"),t()(),e(11,"section"),u(12,"router-outlet"),t())},dependencies:[c,l,m,p],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0;padding:2.5rem}.nav[_ngcontent-%COMP%]{display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem 0}"],changeDetection:0})};export{i as default};
@@ -0,0 +1 @@
1
+ import{a as N}from"./chunk-BRNQESTL.js";import"./chunk-RZUDMW24.js";import{b as f,c as d,d as C,e as h,f as b,i as y,l as v,o as F,q as S}from"./chunk-IOM7KF2W.js";import{a as _,d as w,h as x}from"./chunk-LT6J7X37.js";import{c as g}from"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import"./chunk-GBVLF3BS.js";import{$ as s,Fb as i,Kb as c,Z as o,db as l,lb as e,mb as n,nb as p,sb as u}from"./chunk-RL2VWNJG.js";var k=new F,r=class a{#e=o(g);#t=o(N);loginForm=k.group({pass:k.control("",d.required)});submit(){this.loginForm.value.pass&&this.#t.login(this.loginForm.value.pass).subscribe({next:()=>this.#e.navigate(["/"])})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=s({type:a,selectors:[["app-login"]],standalone:!0,features:[c],decls:8,vars:1,consts:[[3,"submit","formGroup"],[1,"login-row"],["placeholder","Enter your password","tabindex","1","formControlName","pass"],["spk-button","","type","submit",1,"raised","primary"]],template:function(t,m){t&1&&(e(0,"form",0),u("submit",function(){return m.submit()}),e(1,"div",1)(2,"spk-form-field"),p(3,"input",2),n(),e(4,"button",3),i(5," Login "),e(6,"spk-icon"),i(7,"arrow-right"),n()()()()),t&2&&l("formGroup",m.loginForm)},dependencies:[S,b,f,C,h,y,v,x,_,w],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}"],changeDetection:0})};export{r as default};
@@ -0,0 +1 @@
1
+ import{Aa as w,Ba as _,Ca as g,Da as v,Ea as G,Fa as Y,Ga as K,Ha as q,Ia as W,Ja as X,Ka as J,La as m,Pa as M,R as y,Sa as Q,T as l,W as O,Y as a,_ as E,_b as ee,a as b,b as V,ea as $,ec as L,fc as te,gc as ne,hc as f,kc as re,pc as oe,rc as P,sa as S,sc as se,ta as I,xa as Z,ya as N,za as z}from"./chunk-RL2VWNJG.js";var j=class extends ne{constructor(){super(...arguments),this.supportsDOMEvents=!0}},x=class r extends j{static makeCurrent(){te(new r)}onAndCancel(n,e,t){return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=pe();return e==null?null:me(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return re(document.cookie,n)}},T=null;function pe(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function me(r){return new URL(r,document.baseURI).pathname}var ye=(()=>{class r{build(){return new XMLHttpRequest}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),U=new O(""),ue=(()=>{class r{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o){return this._findPluginFor(t).addEventListener(e,t,o)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new y(5101,!1);return this._eventNameToPlugin.set(e,t),t}static{this.\u0275fac=function(t){return new(t||r)(a(U),a(S))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),C=class{constructor(n){this._doc=n}},H="ng-app-id",de=(()=>{class r{constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=P(s),this.resetHostNodes()}addStyles(e){for(let t of e)this.changeUsageCount(t,1)===1&&this.onStyleAdded(t)}removeStyles(e){for(let t of e)this.changeUsageCount(t,-1)<=0&&this.onStyleRemoved(t)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(t=>t.remove()),e.clear());for(let t of this.getAllStyles())this.onStyleRemoved(t);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let t of this.getAllStyles())this.addStyleToHost(e,t)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let t of this.hostNodes)this.addStyleToHost(t,e)}onStyleRemoved(e){let t=this.styleRef;t.get(e)?.elements?.forEach(o=>o.remove()),t.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${H}="${this.appId}"]`);if(e?.length){let t=new Map;return e.forEach(o=>{o.textContent!=null&&t.set(o.textContent,o)}),t}return null}changeUsageCount(e,t){let o=this.styleRef;if(o.has(e)){let s=o.get(e);return s.usage+=t,s.usage}return o.set(e,{usage:t,elements:[]}),t}getStyleElement(e,t){let o=this.styleNodesInDOM,s=o?.get(t);if(s?.parentNode===e)return o.delete(t),s.removeAttribute(H),s;{let i=this.doc.createElement("style");return this.nonce&&i.setAttribute("nonce",this.nonce),i.textContent=t,this.platformIsServer&&i.setAttribute(H,this.appId),e.appendChild(i),i}}addStyleToHost(e,t){let o=this.getStyleElement(e,t),s=this.styleRef,i=s.get(t)?.elements;i?i.push(o):s.set(t,{elements:[o],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(t){return new(t||r)(a(f),a(N),a(_,8),a(w))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),k={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},B=/%COMP%/g,le="%COMP%",ge=`_nghost-${le}`,ve=`_ngcontent-${le}`,Ee=!0,Se=new O("",{providedIn:"root",factory:()=>Ee});function we(r){return ve.replace(B,r)}function Me(r){return ge.replace(B,r)}function fe(r,n){return n.map(e=>e.replace(B,r))}var ie=(()=>{class r{constructor(e,t,o,s,i,c,u,d=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=u,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=P(c),this.defaultRenderer=new D(e,i,u,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===E.ShadowDom&&(t=V(b({},t),{encapsulation:E.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof A?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,u=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,p=this.platformIsServer;switch(t.encapsulation){case E.Emulated:s=new A(u,d,t,this.appId,h,i,c,p);break;case E.ShadowDom:return new F(u,d,e,t,i,c,this.nonce,p);default:s=new R(u,d,t,h,i,c,p);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(t){return new(t||r)(a(ue),a(de),a(N),a(Se),a(f),a(w),a(S),a(_))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),D=class{constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,e){return e?this.doc.createElementNS(k[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(ae(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(ae(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new y(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=k[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=k[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(M.DashCase|M.Important)?n.style.setProperty(e,t,o&M.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&M.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t){if(typeof n=="string"&&(n=L().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);return this.eventManager.addEventListener(n,e,this.decoratePreventDefault(t))}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function ae(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var F=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=fe(o.id,o.styles);for(let h of d){let p=document.createElement("style");c&&p.setAttribute("nonce",c),p.textContent=h,this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o,this.styles=u?fe(u,t.styles):t.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},A=class extends R{constructor(n,e,t,o,s,i,c,u){let d=o+"-"+t.id;super(n,e,t,s,i,c,u,d),this.contentAttr=we(d),this.hostAttr=Me(d)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Te=(()=>{class r extends C{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o){return e.addEventListener(t,o,!1),()=>this.removeEventListener(e,t,o)}removeEventListener(e,t,o){return e.removeEventListener(t,o)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),ce=["alt","control","meta","shift"],De={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Re={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ce=(()=>{class r extends C{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o){let s=r.parseEventName(t),i=r.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>L().onAndCancel(e,s.domEventName,i))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ce.forEach(d=>{let h=t.indexOf(d);h>-1&&(t.splice(h,1),i+=d+".")}),i+=s,t.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=i,u}static matchEventFullKeyCode(e,t){let o=De[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ce.forEach(i=>{if(i!==o){let c=Re[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();function ft(r,n){return ee(b({rootComponent:r},Ae(n)))}function Ae(r){return{appProviders:[..._e,...r?.providers??[]],platformProviders:Ne}}function be(){x.makeCurrent()}function Oe(){return new I}function Ie(){return Z(document),document}var Ne=[{provide:w,useValue:oe},{provide:z,useValue:be,multi:!0},{provide:f,useFactory:Ie,deps:[]}];var _e=[{provide:$,useValue:"root"},{provide:I,useFactory:Oe,deps:[]},{provide:U,useClass:Te,multi:!0,deps:[f,S,w]},{provide:U,useClass:Ce,multi:!0,deps:[f]},ie,de,ue,{provide:Q,useExisting:ie},{provide:se,useClass:ye,deps:[]},[]];var ht=(()=>{class r{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Le=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(Pe),o},providedIn:"root"})}}return r})(),Pe=(()=>{class r extends Le{constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case m.NONE:return t;case m.HTML:return v(t,"HTML")?g(t):J(this._doc,String(t)).toString();case m.STYLE:return v(t,"Style")?g(t):t;case m.SCRIPT:if(v(t,"Script"))return g(t);throw new y(5200,!1);case m.URL:return v(t,"URL")?g(t):X(String(t));case m.RESOURCE_URL:if(v(t,"ResourceURL"))return g(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return G(e)}bypassSecurityTrustStyle(e){return Y(e)}bypassSecurityTrustScript(e){return K(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return W(e)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{ft as a,ht as b,Le as c};
@@ -0,0 +1 @@
1
+ import{a as c}from"./chunk-RZUDMW24.js";import{c as h}from"./chunk-JRXXG6O7.js";import{a as u}from"./chunk-GBVLF3BS.js";import{F as t,Q as i,T as l,Wa as n,Z as s,cc as a}from"./chunk-RL2VWNJG.js";var m=class r{#t=s(c);#i=s(h);#s=s(u);#e=n(this.#t.getItemParsed("token")??null);#r=n(this.#t.getItemParsed("tokenSetTime")??null);tokenSetTime=this.#r.asReadonly();token=this.#e.asReadonly();#o=a(()=>{if(!this.#e()){this.#t.clearAll(),this.#i.navigate(["/login"]);return}let e=Date.now();this.#t.setItemParsed("tokenSetTime",e),this.#t.setItemParsed("token",this.#e()),this.#r.set(this.#e()?e:null)},{allowSignalWrites:!0});login(e="helloworld"){return this.#s.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(t(1),i(o=>this.#e.set(o.AccessToken??null)))}refreshToken(){return this.#s.postApiV1AuthRefresh().pipe(t(1),i(e=>this.#e.set(e.AccessToken??null)))}logout(){this.#s.postApiV1AuthRefreshLogout().pipe(t(1),i(e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])})).subscribe({error:e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])}})}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
@@ -0,0 +1,2 @@
1
+ import{b as M}from"./chunk-7PZ2UDVE.js";import{k as b}from"./chunk-LT6J7X37.js";import{c as S}from"./chunk-BOT7P6RM.js";import{a as k}from"./chunk-GBVLF3BS.js";import{$ as m,Fb as h,I as p,Kb as v,Ma as c,Qa as g,Wa as f,Z as i,bb as d,db as u,hb as C,lb as y,mb as o,nb as r,u as l}from"./chunk-RL2VWNJG.js";function D(n,e){n&1&&r(0,"spk-progress-bar",0)}var a=class n{#e=i(S);#n=i(k);isLoading=f(!0);generalInfo=M(this.#n.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements?this.#e.bypassSecurityTrustHtml(e.Acknowledgements.replace(/\r/g,`
2
+ `)):""),p(()=>this.isLoading.set(!1))));static \u0275fac=function(t){return new(t||n)};static \u0275cmp=m({type:n,selectors:[["app-general"]],standalone:!0,features:[v],decls:5,vars:2,consts:[[1,"indeterminate","primary"],[3,"innerHTML"]],template:function(t,s){t&1&&(d(0,D,1,0,"spk-progress-bar",0),y(1,"section")(2,"h3"),h(3,"General"),o(),r(4,"div",1),o()),t&2&&(C(s.isLoading()?0:-1),g(4),u("innerHTML",s.generalInfo(),c))},dependencies:[b],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30)}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-43IMNGQL.js";import"./chunk-J6KTHSHX.js";import"./chunk-LD5EWOQM.js";import"./chunk-7PZ2UDVE.js";import"./chunk-IOM7KF2W.js";import"./chunk-LT6J7X37.js";import"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import"./chunk-GBVLF3BS.js";import"./chunk-RL2VWNJG.js";export{a as createRestoreSelectFilesForm,b as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-RZUDMW24.js";import{T as s,Wa as e,Z as i,cc as r}from"./chunk-RL2VWNJG.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-BRNQESTL.js";import"./chunk-RZUDMW24.js";import"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import"./chunk-GBVLF3BS.js";import{$ as i,Fb as e,Kb as l,Z as a,lb as s,mb as p}from"./chunk-RL2VWNJG.js";var o=class n{#t=a(r);ngOnInit(){this.#t.logout()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=i({type:n,selectors:[["app-logout"]],standalone:!0,features:[l],decls:3,vars:0,template:function(t,c){t&1&&(s(0,"p"),e(1,"logout works!"),p(),e(2,`,
2
+ `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};export{o as default};
@@ -0,0 +1 @@
1
+ import{A as D,C as O,O as B,T as u,Y as y,a as m,b as V,q as k,r as f,tc as S,u as I,vc as c}from"./chunk-RL2VWNJG.js";var R=class{_fns;constructor(){this._fns=[]}eject(e){let a=this._fns.indexOf(e);a!==-1&&(this._fns=[...this._fns.slice(0,a),...this._fns.slice(a+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new R}};var d=class extends Error{url;status;statusText;body;request;constructor(e,a,p){super(p),this.name="ApiError",this.url=a.url,this.status=a.status,this.statusText=a.statusText,this.body=a.body,this.request=e}};var b=s=>typeof s=="string",P=s=>b(s)&&s!=="",T=s=>s instanceof Blob,v=s=>s instanceof FormData,j=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},F=s=>{let e=[],a=(n,i)=>{e.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`)},p=(n,i)=>{i!=null&&(i instanceof Date?a(n,i.toISOString()):Array.isArray(i)?i.forEach(o=>p(n,o)):typeof i=="object"?Object.entries(i).forEach(([o,l])=>p(`${n}[${o}]`,l)):a(n,i))};return Object.entries(s).forEach(([n,i])=>p(n,i)),e.length?`?${e.join("&")}`:""},L=(s,e)=>{let a=s.ENCODE_PATH||encodeURI,p=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(i,o)=>e.path?.hasOwnProperty(o)?a(String(e.path[o])):i),n=s.BASE+p;return e.query?n+F(e.query):n},H=s=>{if(s.formData){let e=new FormData,a=(p,n)=>{b(n)||T(n)?e.append(p,n):e.append(p,JSON.stringify(n))};return Object.entries(s.formData).filter(([,p])=>p!=null).forEach(([p,n])=>{Array.isArray(n)?n.forEach(i=>a(p,i)):a(p,n)}),e}},g=async(s,e)=>typeof e=="function"?e(s):e,q=(s,e)=>D({token:g(e,s.TOKEN),username:g(e,s.USERNAME),password:g(e,s.PASSWORD),additionalHeaders:g(e,s.HEADERS)}).pipe(I(({token:a,username:p,password:n,additionalHeaders:i})=>{let o=Object.entries(m(m({Accept:"application/json"},i),e.headers)).filter(([,l])=>l!=null).reduce((l,[A,h])=>V(m({},l),{[A]:String(h)}),{});if(P(a)&&(o.Authorization=`Bearer ${a}`),P(p)&&P(n)){let l=j(`${p}:${n}`);o.Authorization=`Basic ${l}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:T(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":b(e.body)?o["Content-Type"]="text/plain":v(e.body)||(o["Content-Type"]="application/json")),new S(o)})),w=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):b(s.body)||T(s.body)||v(s.body)?s.body:JSON.stringify(s.body)},U=(s,e,a,p,n,i,o)=>a.request(e.method,p,{headers:o,body:n??i,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),z=(s,e)=>{if(e){let a=s.headers.get(e);if(b(a))return a}},W=s=>{if(s.status!==204&&s.body!==null)return s.body},K=(s,e)=>{let p=m({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(p)throw new d(s,e,p);if(!e.ok){let n=e.status??"unknown",i=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new d(s,e,`Generic Error: status: ${n}; status text: ${i}; body: ${o}`)}},r=(s,e,a)=>{let p=L(s,a),n=H(a),i=w(a);return q(s,a).pipe(B(o=>U(s,a,e,p,i,n,o)),B(async o=>{for(let N of s.interceptors.response._fns)o=await N(o);let l=W(o),A=z(o,a.responseHeader),h=l;return a.responseTransformer&&o.ok&&(h=await a.responseTransformer(l)),{url:p,ok:o.ok,status:o.status,statusText:o.statusText,body:A??h}}),O(o=>o.status?k({url:p,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):f(()=>o)),I(o=>(K(a,o),o.body)),O(o=>f(()=>o)))};var $=class s{constructor(e){this.http=e}getApiV1Commandline(){return r(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(a){return new(a||s)(y(c))};static \u0275prov=u({token:s,factory:s.\u0275fac,providedIn:"root"})},C=class s{constructor(e){this.http=e}postApiV1Commandline(e){return r(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return r(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return r(t,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return r(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return r(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return r(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return r(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return r(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}getApiV1Backupdefaults(){return r(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(){return r(t,this.http,{method:"GET",url:"/api/v1/backups"})}postApiV1Backups(e){return r(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return r(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return r(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1CaptchaByToken(e){return r(t,this.http,{method:"GET",url:"/api/v1/captcha/{token}",path:{token:e.token}})}postApiV1CaptchaByToken(e){return r(t,this.http,{method:"POST",url:"/api/v1/captcha/{token}",path:{token:e.token},body:e.requestBody,mediaType:"application/json"})}postApiV1Captcha(e){return r(t,this.http,{method:"POST",url:"/api/v1/captcha",body:e.requestBody,mediaType:"application/json"})}getApiV1Changelog(e={}){return r(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return r(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return r(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return r(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return r(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return r(t,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return r(t,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return r(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return r(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return r(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1Mssql(){return r(t,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return r(t,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return r(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return r(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return r(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1RemotecontrolStatus(){return r(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemotecontrolEnable(){return r(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return r(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return r(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return r(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return r(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemoteoperationDbpath(e){return r(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return r(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return r(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return r(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return r(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return r(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return r(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return r(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return r(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration}})}postApiV1ServerstateResume(){return r(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return r(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return r(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1TaskByTaskid(e){return r(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStopaftercurrentfile(e){return r(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stopaftercurrentfile",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStopnow(e){return r(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stopnow",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return r(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return r(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}getApiV1UisettingsByScheme(e){return r(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return r(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1WebmoduleByModulekey(e){return r(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return r(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return r(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,"captcha-token":e.captchaToken,"captcha-answer":e.captchaAnswer,force:e.force}})}getApiV1BackupByIdFiles(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return r(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id}})}postApiV1BackupByIdRun(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id}})}postApiV1BackupByIdReportRemoteSize(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return r(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}static \u0275fac=function(a){return new(a||s)(y(c))};static \u0275prov=u({token:s,factory:s.\u0275fac,providedIn:"root"})},x=class s{constructor(e){this.http=e}getApiV1Progressstate(){return r(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}static \u0275fac=function(a){return new(a||s)(y(c))};static \u0275prov=u({token:s,factory:s.\u0275fac,providedIn:"root"})},G=class s{constructor(e){this.http=e}getApiV1Tasks(){return r(t,this.http,{method:"GET",url:"/api/v1/tasks"})}static \u0275fac=function(a){return new(a||s)(y(c))};static \u0275prov=u({token:s,factory:s.\u0275fac,providedIn:"root"})},M=class s{constructor(e){this.http=e}postApiV1UpdatesCheck(){return r(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}static \u0275fac=function(a){return new(a||s)(y(c))};static \u0275prov=u({token:s,factory:s.\u0275fac,providedIn:"root"})},E=class s{constructor(e){this.http=e}getApiV1Webmodules(){return r(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(a){return new(a||s)(y(c))};static \u0275prov=u({token:s,factory:s.\u0275fac,providedIn:"root"})};export{C as a,x as b,G as c};
@@ -0,0 +1 @@
1
+ import{a as ze,b as ge}from"./chunk-LD5EWOQM.js";import{b as Se}from"./chunk-7PZ2UDVE.js";import{a as be,b as H,c as he,d as Y,e as Z,f as J,g as ue,i as X,j as _e,k as $e,l as ee,m as te,n as ne,o as I,q as ie}from"./chunk-IOM7KF2W.js";import{a as Ce}from"./chunk-63RKHEAK.js";import{a as oe,d as fe,f as _t,h as re,j as Le,m as ft,n as ae,q as we}from"./chunk-LT6J7X37.js";import{a as W,c as M}from"./chunk-JRXXG6O7.js";import{a as Ct}from"./chunk-GBVLF3BS.js";import{$ as z,Cb as j,Db as q,Eb as xe,F as lt,Fb as l,Gb as G,Hb as P,I as ye,Kb as Q,Mb as Re,N as st,Ob as Be,Qa as s,Sb as ct,T as Fe,Wa as S,Xa as U,Z as h,a as de,ac as K,b as Ae,bb as _,c as at,cb as $,db as d,fb as mt,hb as f,ib as b,ja as g,jb as w,ka as y,kb as D,lb as r,mb as o,mc as dt,nb as p,ob as k,pb as v,qb as Me,rb as F,sb as x,tb as m,vc as ut,wb as se,xb as E,yb as pt}from"./chunk-RL2VWNJG.js";var Ue=class t{fromString(n){if(!n)return null;let e=n.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(n,e){return`${n}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})};var De=new I,Ve={file:{customFields:{path:{type:"file-tree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>De.control(t??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>De.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>De.control(t??"")},path:{type:"Path",name:"path",shortDescription:"File path on the server",longDescription:"File path on the server",formElement:t=>De.control(t??"")}},dynamicFields:["auth-username"]},s3:{customFields:{path:{type:"Path",name:"path",shortDescription:"File path on the server",longDescription:"File path on the server",formElement:t=>De.control(t??"")},bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>De.control(t??"")}},dynamicFields:["use-ssl","s3-server-name","auth-username","auth-password"]},gcs:{dynamicFields:["gcs-location","gcs-storage-class","authid"]},googledrive:{oauthField:"path",dynamicFields:["path","authid"]}};function Pe(t,n){let e={},i={};return n.searchParams.forEach((a,c)=>{Ve[t].dynamicFields?.includes(c)?i[c]=decodeURIComponent(a):e[c]=decodeURIComponent(a)}),{advanced:e,dynamic:i}}function je(t){let n=t.map(([e,i])=>`${e}=${i?encodeURIComponent(i.toString()):""}`).join("&");return n?"?"+n:""}var Te={file:{to:t=>{let n=je([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${n}`},from:(t,n,e)=>{let i=e.indexOf("file:///")===0,a=e.split(i?"///":"//")[1].substring(0,1)+n.hostname.substring(1);return de({destinationType:t,custom:{path:`${i?"/":""}${a}${n.pathname}`}},Pe(t,n))}},ssh:{to:t=>{let n=je([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.server}${t.custom.port?":"+t.custom.port:""}${t.custom.path.startsWith("/")?t.custom.path:"/"+t.custom.path}${n}`},from:(t,n,e)=>de({destinationType:t,custom:{server:n.hostname,port:n.port,path:n.pathname}},Pe(t,n))},s3:{to:t=>{let n=je([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.bucket}${t.custom.path}${n}`},from:(t,n,e)=>de({destinationType:t,custom:{path:n.pathname,bucket:n.hostname}},Pe(t,n))},gcs:{to:t=>{let n=t.dynamic["gcs-location"]??"";delete t.dynamic["gcs-location"];let e=je([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${n}${e}`},from:(t,n,e)=>{let{advanced:i,dynamic:a}=Pe(t,n);return{destinationType:t,advanced:i,dynamic:Ae(de({},a),{"gcs-location":n.hostname+n.pathname})}}},fallbackMapper:{to:t=>"",from:(t,n,e)=>de({destinationType:t},Pe(t,n))}};function Ee(t){let n=t.destinationType;return!n||!Te.hasOwnProperty(n)?Te.fallbackMapper.to(t)??"":Te[n].to(t)??""}function gt(t){let n=URL.canParse(t),e=t.split("://")[0],i="http://"+t.split("://")[1],a=new URL(i);if(!Te.hasOwnProperty(e))return Te.fallbackMapper.from(e,a);if(!n)throw new Error("Invalid target path");return Te[e].from(e,a,t)}var wt=/[a-zA-Z0-9_\-\+\.]/,qe=class t{generate(n,e=wt){let i=this;return Array.apply(null,{length:n}).map(()=>{let a;for(;;)if(a=String.fromCharCode(i.#e()),e.test(a))return a},this).join("")}#e(){if(window.crypto&&window.crypto.getRandomValues){let n=new Uint8Array(1);return window.crypto.getRandomValues(n),n[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let n=new Uint8Array(1);return window.msCrypto.getRandomValues(n),n[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})};function Ye(t,n,e="conditional"){return i=>{if(!i.parent)return null;let a=null;if(t(i.parent)&&(a=(Array.isArray(n)?n:[n]).find(A=>A(i)!==null)??null),e&&a){let c={};c[e]=a,a=c}return a}}function yt(){return t=>(t.parent&&Object.values(t.parent.controls).forEach(n=>{n!==t&&n.updateValueAndValidity()}),null)}var Dt=["formRef"];function Tt(t,n){if(t&1&&(r(0,"option",14),l(1),o()),t&2){let e=n.$implicit;d("value",e.Key),s(),G(e.DisplayName)}}function Et(t,n){t&1&&(r(0,"spk-icon"),l(1,"eye-slash"),o(),l(2," hide "))}function Nt(t,n){t&1&&(r(0,"spk-icon"),l(1,"eye"),o(),l(2," show "))}function Ot(t,n){t&1&&(r(0,"spk-icon",23),l(1,"check"),o())}function Vt(t,n){t&1&&(r(0,"spk-icon"),l(1,"copy"),o())}function Pt(t,n){if(t&1){let e=F();r(0,"button",22),x("click",function(){g(e);let a=m(3);return y(a.copyPassword())}),_(1,Ot,2,0,"spk-icon",23)(2,Vt,2,0,"spk-icon"),l(3),o()}if(t&2){let e=m(3);s(),f(e.copiedPassword()?1:2),s(2),P(" ",e.copiedPassword()?"Copied":"Copy"," password ")}}function It(t,n){if(t&1){let e=F();r(0,"div",15)(1,"spk-form-field")(2,"label",16),l(3,"Create a password"),o(),p(4,"input",17),o(),r(5,"spk-form-field"),p(6,"input",18),o(),r(7,"div",19)(8,"button",20),x("click",function(){g(e);let a=m(2);return y(a.showPassword.set(!a.showPassword()))}),_(9,Et,3,0)(10,Nt,3,0),o(),r(11,"button",20),x("click",function(){g(e);let a=m(2);return y(a.generatePassword())}),r(12,"spk-icon"),l(13,"password"),o(),l(14," Generate password "),o(),_(15,Pt,4,2,"button",21),o()()}if(t&2){let e=m(2);s(4),d("type",e.showPassword()?"text":"password"),s(2),d("type",e.showPassword()?"text":"password"),s(3),f(e.showPassword()?9:10),s(6),f(e.showCopyPassword()?15:-1)}}function Gt(t,n){if(t&1&&(r(0,"spk-select",10)(1,"label",11),l(2,"Encryption"),o(),p(3,"input",12),k(4,13),w(5,Tt,2,2,"option",14,b),v(),o(),_(7,It,16,4,"div",15)),t&2){let e,i=m();d("displayValue",i.displayFn((e=i.generalForm.value.encryption)!==null&&e!==void 0?e:"")),s(5),D(i.encryptionOptions()),s(2),f(i.encryptionFieldSignal()!=="none"?7:-1)}}var Ne=new I,xt=(t={name:"",description:"",encryption:"none",password:"",repeatPassword:""})=>Ne.group({name:Ne.control(t.name,[he.required]),description:Ne.control(t.description),encryption:Ne.control(t.encryption,[he.required,yt()]),password:Ne.control(t.password,[Ye(n=>n?.value.encryption!=="none",[he.required])]),repeatPassword:Ne.control(t.repeatPassword,[Ye(n=>n?.value.encryption!=="none",[he.required])])}),Je={Key:"none",DisplayName:"None"},Ze=class t{#e=h(M);#t=h(W);#n=h(qe);#i=h(R);#o=h(Ce);formRef=U.required("formRef");generalForm=this.#i.generalForm;encryptionFieldSignal=this.#i.encryptionFieldSignal;encryptionOptions=this.#i.encryptionOptions;isNew=this.#i.isNew;showPassword=S(!1);copiedPassword=S(!1);showCopyPassword=S(!1);ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#i.exit()}async copyPassword(){let n=this.generalForm.controls.password.value;await this.#r(n??""),this.copiedPassword.set(!0)}async#r(n){try{await navigator.clipboard.writeText(n)}catch{try{let i=document.createElement("textarea");i.value=n,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i)}catch(i){console.error("Failed to copy text: ",i)}}}displayFn(n){let e=this.#o.systemInfo()?.EncryptionModules??[],i=[Je,...e].find(a=>a.Key===n);return i?`${i.DisplayName}`:""}generatePassword(){this.copiedPassword.set(!1);let n=this.#n.generate(16);this.generalForm.controls.password.setValue(n),this.generalForm.controls.repeatPassword.setValue(n),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-general"]],viewQuery:function(e,i){e&1&&j(i.formRef,Dt,5),e&2&&q()},standalone:!0,features:[Q],decls:23,vars:4,consts:[["formRef",""],["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder","Your backup name","formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder","Your backup description","formControlName","description"],[1,"form-actions"],["spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],[3,"displayValue"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder","Encryption","formControlName","encryption"],["options",""],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","placeholder","Password","formControlName","password",3,"type"],["id","repeatPassword","tabindex","5","placeholder","Repeat password","formControlName","repeatPassword",3,"type"],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]],template:function(e,i){if(e&1){let a=F();r(0,"form",1,0),x("submit",function(){return g(a),y(i.next())}),r(2,"h3",2),l(3,"General backup settings"),o(),r(4,"spk-form-field")(5,"label",3),l(6,"Backup name"),o(),p(7,"input",4),o(),r(8,"spk-form-field")(9,"label",5),l(10,"Backup description"),o(),p(11,"textarea",6),o(),_(12,Gt,8,2),r(13,"div",7)(14,"button",8),x("click",function(){return g(a),y(i.exit())}),r(15,"spk-icon"),l(16,"arrow-left"),o(),l(17," Exit "),o(),r(18,"div")(19,"button",9)(20,"spk-icon"),l(21,"arrow-right"),o(),l(22," Continue "),o()()()()}e&2&&(d("formGroup",i.generalForm),s(12),f(i.isNew()?12:-1),s(6),$("spk-tooltip-primary",i.generalForm.valid&&i.encryptionFieldSignal()==="none"||i.copiedPassword()?void 0:"Remember to copy the password"),s(),d("disabled",i.generalForm.invalid||i.encryptionFieldSignal()!=="none"&&i.showCopyPassword()&&!i.copiedPassword()))},dependencies:[ie,J,te,ne,H,Y,Z,X,ee,re,ae,fe,oe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var At=["formRef"];function Mt(t,n){if(t&1&&(r(0,"option",9),l(1),o()),t&2){let e=n.$implicit;d("value",e),s(),G(e)}}function Rt(t,n){if(t&1&&(r(0,"option",9),l(1),o()),t&2){let e=n.$implicit;d("value",e),s(),G(e)}}function Bt(t,n){if(t&1){let e=F();r(0,"button",22),x("click",function(){let a=g(e).$implicit,c=m();return y(c.addNewOption(a))}),l(1),o()}if(t&2){let e=n.$implicit;s(),G(e.Name)}}function $t(t,n){t&1&&(r(0,"label",23),l(1,"Name"),o())}function Lt(t,n){t&1&&(r(0,"label",25),l(1,"Value"),o())}function zt(t,n){if(t&1){let e=F();r(0,"div",18)(1,"spk-form-field"),_(2,$t,2,0,"label",23),p(3,"input",24),o(),r(4,"spk-form-field"),_(5,Lt,2,0,"label",25),p(6,"input",26),o(),r(7,"button",27),x("click",function(){let a=g(e).$index,c=m();return y(c.optionsForm.controls.advancedOptions.removeAt(a))}),r(8,"spk-icon"),l(9,"x-circle"),o()()()}if(t&2){let e=n.$implicit,i=n.$index;d("formGroup",e),s(2),f(i===0?2:-1),s(3),f(i===0?5:-1)}}var me=new I,Ut=["Bytes","KB","MB","GB","TB","PB"],jt=["Local folder","Local drive","Remote drive","Cloud drive"],ht=(t={remoteVolumeSize:0,size:"GB",backupRetention:"Local folder",advancedOptions:[]})=>me.group({remoteVolumeSize:me.group({size:me.control(t.remoteVolumeSize),unit:me.control(t.size)}),backupRetention:me.control(t.backupRetention),advancedOptions:me.array([])}),et=(t,n)=>me.group({name:me.control(t),value:me.control(n)}),Xe=class t{#e=h(Ce);#t=h(R);#n=h(M);#i=h(W);formRef=U.required("formRef");optionsForm=this.#t.optionsForm;sizeOptions=S(Ut);rentationOptions=S(jt);selectionAdvancedOptions=Se(this.optionsForm.controls.advancedOptions.valueChanges.pipe(st([])));advancedOptions=S(this.#e.systemInfo()?.Options??[]);nonSelectedAdvancedOptions=K(()=>this.advancedOptions().filter(n=>this.selectionAdvancedOptions()?.findIndex(e=>e.name===n.Name)===-1));addNewOption(n){this.optionsForm.controls.advancedOptions.push(et(n.Name,n.DefaultValue))}displayFn(){let n=this.advancedOptions();return e=>{let i=n.find(a=>a.Name===e);return i?`${i.Name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-options"]],viewQuery:function(e,i){e&1&&j(i.formRef,At,5),e&2&&q()},standalone:!0,features:[Q],decls:49,vars:2,consts:[["formRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder","Select an option...","formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],["type","text","placeholder","Local folder or drive","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["spk-menu-item","","type","button"],["formArrayName","advancedOptions"],[1,"advanced-option",3,"formGroup"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["spk-menu-item","","type","button",3,"click"],["for","name"],["type","text","id","name","formControlName","name"],["for","value"],["type","text","id","value","formControlName","value"],["spk-button","","type","button",1,"icon",3,"click"]],template:function(e,i){if(e&1){let a=F();r(0,"form",1,0),x("submit",function(){return g(a),y(i.submit())}),r(2,"h3",2),l(3,"Options"),o(),r(4,"div",3)(5,"div",4)(6,"spk-form-field")(7,"label",5),l(8,"Remote volume size"),o(),p(9,"input",6),o(),r(10,"spk-select"),p(11,"input",7),k(12,8),w(13,Mt,2,2,"option",9,b),v(),o()(),r(15,"p"),l(16," The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. "),r(17,"a",10),l(18,"Read more"),o()()(),r(19,"spk-select")(20,"label",5),l(21,"Backup retention"),o(),p(22,"input",11),k(23,8),w(24,Rt,2,2,"option",9,b),v(),o(),r(26,"app-toggle-card",12),k(27,13),l(28," Advanced options "),r(29,"spk-menu")(30,"button",14),l(31," Add advanced option "),r(32,"spk-icon"),l(33,"plus"),o()(),k(34,15),w(35,Bt,2,1,"button",16,b),v(),o(),v(),k(37,17),w(38,zt,10,3,"div",18,b),v(),o(),r(40,"div",19)(41,"button",20),x("click",function(){return g(a),y(i.goBack())}),r(42,"spk-icon"),l(43,"arrow-left"),o(),l(44," Go back "),o(),r(45,"button",21)(46,"spk-icon"),l(47,"arrow-right"),o(),l(48," Submit "),o()()()}e&2&&(d("formGroup",i.optionsForm),s(13),D(i.sizeOptions()),s(11),D(i.rentationOptions()),s(2),d("disallowToggle",!0),s(9),D(i.nonSelectedAdvancedOptions()),s(3),D(i.optionsForm.controls.advancedOptions.controls))},dependencies:[ie,J,te,ne,H,ue,Y,Z,X,ee,_e,$e,Le,ae,fe,oe,re,ge],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var qt=["formRef"];function Qt(t,n){if(t&1&&(r(0,"option",24),l(1),o()),t&2){let e=n.$implicit;d("value",e.key),s(),G(e.label)}}function Kt(t,n){if(t&1){let e=F();r(0,"div",11)(1,"spk-form-field")(2,"label",12),l(3,"Next time"),o(),r(4,"input",13,1),x("focus",function(){g(e);let a=xe(5);return y(a.showPicker())}),o(),r(6,"spk-icon",14),l(7,"clock"),o()(),r(8,"spk-form-field"),p(9,"label",15),r(10,"input",16,2),x("focus",function(){g(e);let a=xe(11);return y(a.showPicker())}),o(),r(12,"spk-icon",14),l(13,"calendar"),o()()(),k(14,17),r(15,"div",18)(16,"spk-form-field")(17,"label",19),l(18,"Run again every"),o(),p(19,"input",20),o(),r(20,"spk-select",21),p(21,"input",22),k(22,23),w(23,Qt,2,2,"option",24,b),v(),o()(),r(25,"app-toggle-card",25),k(26,26),l(27,"Allowed days"),v(),r(28,"div",27)(29,"spk-toggle",6),l(30," Monday "),p(31,"input",28),o(),r(32,"spk-toggle",6),l(33," Tuesday "),p(34,"input",29),o(),r(35,"spk-toggle",6),l(36," Wednesday "),p(37,"input",30),o(),r(38,"spk-toggle",6),l(39," Thursday "),p(40,"input",31),o(),r(41,"spk-toggle",6),l(42," Friday "),p(43,"input",32),o(),r(44,"spk-toggle",6),l(45," Saturday "),p(46,"input",33),o(),r(47,"spk-toggle",6),l(48," Sunday "),p(49,"input",34),o()()(),v()}if(t&2){let e=m();s(20),d("displayFn",e.displayFn),s(3),D(e.unitOptions),s(2),d("disallowToggle",!0)}}var O=new I,St=[{key:"s",label:"Seconds"},{key:"m",label:"Minutes"},{key:"h",label:"Hours"},{key:"D",label:"Days"},{key:"W",label:"Weeks"},{key:"M",label:"Months"},{key:"Y",label:"Years"}],kt=(t={autoRun:!1,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>O.group({autoRun:O.control(t.autoRun),nextTime:O.group({time:O.control(t.nextTime.time),date:O.control(t.nextTime.date)}),runAgain:O.group({repeatValue:O.control(t.runAgain.repeatValue),repeatUnit:O.control(t.runAgain.repeatUnit),allowedDays:O.group({mon:O.control(t.runAgain.allowedDays.mon),tue:O.control(t.runAgain.allowedDays.tue),wed:O.control(t.runAgain.allowedDays.wed),thu:O.control(t.runAgain.allowedDays.thu),fri:O.control(t.runAgain.allowedDays.fri),sat:O.control(t.runAgain.allowedDays.sat),sun:O.control(t.runAgain.allowedDays.sun)})})}),tt=class t{#e=h(R);#t=h(M);#n=h(W);formRef=U.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=St;displayFn(n){let e=St.find(i=>i.key===n);return e?`${e.label}`:""}goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#n.parent})}next(){this.#t.navigate(["options"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-schedule"]],viewQuery:function(e,i){e&1&&j(i.formRef,qt,5),e&2&&q()},standalone:!0,features:[Q],decls:20,vars:2,consts:[["formRef",""],["timeRef",""],["dateRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["spkSuffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]],template:function(e,i){if(e&1){let a=F();r(0,"form",3,0),x("submit",function(){return g(a),y(i.next())}),r(2,"h3",4),l(3,"Schedule"),o(),r(4,"div",5)(5,"spk-toggle",6),l(6," Automatically run backups "),p(7,"input",7),o(),r(8,"p"),l(9,"If a date was missed, the job will run as soon as possible."),o()(),_(10,Kt,50,2),r(11,"div",8)(12,"button",9),x("click",function(){return g(a),y(i.goBack())}),r(13,"spk-icon"),l(14,"arrow-left"),o(),l(15," Go back "),o(),r(16,"button",10)(17,"spk-icon"),l(18,"arrow-right"),o(),l(19," Continue "),o()()()}if(e&2){let a;d("formGroup",i.scheduleForm),s(10),f((a=i.scheduleFormSignal())!=null&&a.autoRun?-1:10)}},dependencies:[ie,J,te,ne,H,ue,be,Y,Z,X,ee,_e,re,ae,we,oe,fe,ge],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Wt=["formRef"];function Ht(t,n){if(t&1&&(r(0,"option",21),l(1),o()),t&2){let e=n.$implicit;d("value",e),s(),G(e)}}function Yt(t,n){if(t&1&&(r(0,"div",14)(1,"spk-form-field"),p(2,"input",18),o(),r(3,"spk-select"),p(4,"input",19),k(5,20),w(6,Ht,2,2,"option",21,b),v(),o()()),t&2){let e=m(2);s(6),D(e.sizeOptions())}}function Zt(t,n){if(t&1){let e=F();r(0,"form",2,0),x("submit",function(){g(e);let a=m();return y(a.next())}),r(2,"h3",3),l(3,"Source Data"),o(),r(4,"app-file-tree",4)(5,"label",5),l(6,"Folder path"),o(),p(7,"input",6),o(),r(8,"app-toggle-card",7),k(9,8),l(10,"Exclude"),v(),r(11,"spk-toggle",9),l(12," Hidden files "),p(13,"input",10),o(),r(14,"spk-toggle",9),l(15," System files "),p(16,"input",11),o(),r(17,"spk-toggle",9),l(18," Temporary files "),p(19,"input",12),o(),r(20,"spk-toggle",13),x("click",function(){g(e);let a=m();return y(a.toggleFilesLargerThan())}),l(21," Files larger than "),o(),_(22,Yt,8,0,"div",14),o(),r(23,"div",15)(24,"button",16),x("click",function(){g(e);let a=m();return y(a.goBack())}),r(25,"spk-icon"),l(26,"arrow-left"),o(),l(27," Go back "),o(),r(28,"button",17)(29,"spk-icon"),l(30,"arrow-right"),o(),l(31," Continue "),o()()()}if(t&2){let e=m();d("formGroup",e.sourceDataForm),s(4),d("multiSelect",!0)("startingPath",e.getPath()),s(4),d("isActive",!0),s(12),mt("active",e.filesLargerThan()),s(2),f(e.filesLargerThan()?22:-1)}}var pe=new I,Jt=["Bytes","KB","MB","GB","TB","PB"],Xt=["Contains","Does not contain","Is greater than","Is less than"];var vt=(t={path:"",excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>pe.group({path:pe.control(t.path),excludes:pe.group({hidden:pe.control(t.excludes.hidden),system:pe.control(t.excludes.system),temporary:pe.control(t.excludes.temporary),filesLargerThan:pe.group({size:pe.control(null),unit:pe.control(null)})})}),nt=class t{#e=h(R);#t=h(M);#n=h(W);formRef=U.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;destinationIsLoaded=this.#e.destinationIsLoaded;filesLargerThan=K(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=S(Jt);expressionOptions=S(Xt);getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#n.parent})}next(){this.#t.navigate(["schedule"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-source-data"]],viewQuery:function(e,i){e&1&&j(i.formRef,Wt,5),e&2&&q()},standalone:!0,features:[Q],decls:1,vars:1,consts:[["formRef",""],[3,"formGroup"],[3,"submit","formGroup"],[1,"title-30"],[3,"multiSelect","startingPath"],["for","path"],["type","text","id","path","tabindex","4","placeholder","Path","formControlName","path"],["formGroupName","excludes",3,"isActive"],["title",""],[1,"raised","primary"],["type","checkbox","placeholder","Hidden files","formControlName","hidden"],["type","checkbox","placeholder","System files","formControlName","system"],["type","checkbox","placeholder","Temporary files","formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder","Select an option..."],["options",""],[3,"value"]],template:function(e,i){e&1&&_(0,Zt,32,7,"form",1),e&2&&f(i.destinationIsLoaded()?0:-1)},dependencies:[ie,J,te,ne,H,ue,be,Y,Z,X,ee,_e,re,oe,fe,ae,we,ze,ge],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}.filter-inputs[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-end}.filter-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.filter-inputs[_ngcontent-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var L=new I,R=class t{#e=h(M);#t=h(Ce);#n=h(Ct);#i=h(Ue);destinationOptions=this.#t.backendModules;backupId=S(null);isSubmitting=S(!1);loadingBackup=S(!1);loadingDefaults=S(!0);destinationIsLoaded=S(!1);isNew=K(()=>this.backupId()==="new");backupDefaults=S(null);generalForm=xt();sourceDataForm=vt();scheduleForm=kt();destinationForm=Ft();optionsForm=ht();selectedAdvancedFormPair=S([]);notSelectedAdvancedFormPair=S([]);destinationFormPair=S({oauthField:null,custom:[],dynamic:[],advanced:[]});sourceDataFormSignal=Se(this.sourceDataForm.valueChanges);destinationFormSignal=Se(this.destinationForm.valueChanges);encryptionFieldSignal=Se(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=Se(this.scheduleForm.valueChanges);encryptionOptions=K(()=>{let n=this.#t.systemInfo()?.EncryptionModules??[];return[Je,...n]});init(n="new"){this.backupId.set(n),n!=="new"?this.getBackup(n):this.getDefaults()}submit(){this.isSubmitting.set(!0);let n=this.#m(),e=this.backupId();e==="new"||!e?this.#n.postApiV1Backups({requestBody:n}).pipe(ye(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{console.log("submitted res",i),this.exit()},error:i=>{console.error("submitted error",i)}}):this.#n.putApiV1BackupById({id:e,requestBody:n}).pipe(ye(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{console.log("submitted res",i),this.exit()},error:i=>{console.error("submitted error",i)}})}exit(){this.#d(),this.#e.navigate(["/"])}getDefaults(){this.loadingDefaults.set(!0),this.#n.getApiV1Backupdefaults().pipe(lt(1),ye(()=>this.loadingDefaults.set(!1))).subscribe({next:n=>{this.#a(n.Schedule),this.#s(n.Backup),this.backupDefaults.set(n),this.destinationIsLoaded.set(!0)}})}getBackup(n){this.loadingBackup.set(!0),this.#n.getApiV1BackupById({id:n}).pipe(ye(()=>this.loadingBackup.set(!1))).subscribe({next:e=>{this.#a(e.Schedule??null),e.Backup&&(this.#l(e.Backup),this.#r(e.Backup),this.#o(e.Backup),this.#s(e.Backup)),this.destinationIsLoaded.set(!0)}})}#o(n){let e=n.Sources??"",i=n.Filters?.map(N=>`${N.Include?"":"-"}${N.Expression}`)??[],a=n.Settings?.find(N=>N.Name==="--exclude-files-attributes")?.Value??"",c=n.Settings?.find(N=>N.Name==="--skip-files-larger-than")??null,A=c?.Value.replace(/[0-9]/g,"")??null,B=c?.Value.replace(/[^0-9]/g,"")??null,le={path:[...e,...i].join("\0"),excludes:{hiddenFiles:a.includes("hidden"),systemFiles:a.includes("system"),tempFiles:a.includes("temporary"),filesLargerThan:A&&B?{size:parseInt(B),unit:A.toUpperCase()}:null}};this.sourceDataForm.patchValue(le)}#r(n){let e=n.TargetURL?gt(n.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced})}#l(n){let e=n.Settings?.find(a=>a.Name==="encryption-module"),i=e?.Value&&e.Value.length?e.Value:"none";this.generalForm.patchValue({name:n.Name??"",description:n.Description??"",encryption:i})}#a(n){if(!n){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#i.fromString(n.Repeat)??null,a={nextTime:this.#c(n.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:n.AllowedDays?.includes("mon")??!1,tue:n.AllowedDays?.includes("tue")??!1,wed:n.AllowedDays?.includes("wed")??!1,thu:n.AllowedDays?.includes("thu")??!1,fri:n.AllowedDays?.includes("fri")??!1,sat:n.AllowedDays?.includes("sat")??!1,sun:n.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(a)}#s(n){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"];n.Settings?.forEach(i=>{if(i.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(i.Value??"None");i.Name&&e.includes(i.Name)||i.Name&&i.Value&&this.optionsForm.controls.advancedOptions.push(et(i.Name,i.Value))})}mapPub(){this.#m()}#m(){let n=this.generalForm.value,e=this.optionsForm.value,i=this.scheduleForm.value,a=this.sourceDataForm.value,A=this.destinationForm.value.destinations?.length?this.#p(this.destinationForm.controls.destinations):[],B=null;i.runAgain?.repeatUnit&&i.runAgain?.repeatValue&&(B=this.#i.toString(i.runAgain.repeatValue,i.runAgain.repeatUnit));let le=i.runAgain?.allowedDays?Object.entries(i.runAgain?.allowedDays).filter(([C,T])=>T).map(([C,T])=>C):[],N=a.path?.split("\0")??[],Ie=e.advancedOptions?.map(C=>({Name:C.name??null,Value:C.value&&C.value.length?C.value.toString():null}))??[],ve=[n.encryption==="none"?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:n.encryption??null},...Ie.filter(C=>C.Name&&C.Value)],V=Object.entries(a.excludes??{}).filter(([C,T])=>T&&C!=="filesLargerThan").map(([C])=>C),u=a.excludes?.filesLargerThan;return V.length&&ve.push({Name:"--exclude-files-attributes",Value:V.join(",")}),u&&u.size!==null&&u.unit!==null&&ve.push({Name:"--skip-files-larger-than",Value:`${u.size}${u.unit}`}),{Backup:{Name:n.name,Description:n.description,TargetURL:A[0]??null,Sources:N.filter(C=>!C.startsWith("-")),Settings:ve,Filters:N.filter(C=>C.startsWith("-")).map((C,T)=>({Order:T,Include:!1,Expression:C.slice(1)}))},Schedule:i.autoRun?null:{Repeat:B,Time:i.nextTime?.date?new Date(`${i.nextTime.date}T${i.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:le}}}#p(n){return n.controls.map(e=>{if(!e.controls.advanced)return Ee(e.value);let i=Object.keys(e.controls.advanced.controls).filter(a=>e.controls.advanced.controls[a].dirty);return Ee(Ae(de({},e.value),{advanced:i.reduce((a,c)=>(a[c]=e.controls.advanced.controls[c].value,a),{})}))})}#c(n){if(!n||n?.indexOf("T")===-1)return{time:n??"13:00"};let e=new Date(n),i={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return n.indexOf("T")!==-1&&(i.date=e.toISOString().split("T")[0]),i}addDestinationFormGroup(n,e){let i=this.destinationOptions().find(V=>V.Key===n);if(!i||!i.Options)return;let a=Ve.hasOwnProperty(n)&&Ve[n],c=a&&a.customFields?a.customFields:{},A=a&&a.dynamicFields?a.dynamicFields:[],B=a&&a.advancedFields?a.advancedFields:[],le=a&&a.oauthField?a.oauthField:null;this.destinationFormPair.set({oauthField:le,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]);let N=L.group({}),Ie=L.group({}),He=L.group({});if(c)for(n in c){let ve=c[n],{formElement:V}=ve,u=at(ve,["formElement"]);N.addControl(n,V(e?.custom[n])),this.destinationFormPair.update(C=>(C.custom.push(u),C))}for(let V=0;V<i.Options.length;V++){let u=i.Options[V];if(u.Deprecated)continue;let C=A.includes(u.Name),T=C?Ie:He;this.destinationFormPair.update(Oe=>(Oe[C?"dynamic":"advanced"].push({name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues}),Oe));let ce=(C?e?.dynamic[u.Name]:e?.advanced[u.Name])??u.DefaultValue;if(u.Type==="String"||u.Type==="Password"||u.Type==="Enumeration"||u.Type==="Path"){T.addControl(u.Name,L.control(ce));continue}if(u.Type==="Size"){let Oe=ce.replace(/[0-9]/g,""),rt=ce.replace(/[^0-9]/g,"");T.addControl(u.Name,L.group({size:L.control(rt?parseInt(rt):50),unit:L.control(Oe?Oe.toUpperCase():"MB")}))}if(u.Type==="Integer"){T.addControl(u.Name,L.control(ce?parseInt(ce):0));continue}if(u.Type==="Boolean"){T.addControl(u.Name,L.control(ce==="true"));continue}if(u.Type==="Flags"){T.addControl(u.Name,L.control(ce??""));continue}u.Type==="Timespan"&&T.addControl(u.Name,L.control(ce,[he.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]))}this.destinationForm.controls.destinations.length!==0&&this.destinationForm.controls.destinations.removeAt(0),this.destinationFormPair.update(V=>({oauthField:V.oauthField,custom:V.custom,dynamic:V.dynamic.sort((u,C)=>A.indexOf(u.name)-A.indexOf(C.name)),advanced:V.advanced.sort((u,C)=>{let T=B.indexOf(u.name),Ge=B.indexOf(C.name);return T===-1&&Ge!==-1?1:T!==-1&&Ge===-1?-1:T-Ge})})),this.notSelectedAdvancedFormPair.set(this.destinationFormPair().advanced),this.destinationForm.controls.destinations.push(bt({key:i.Key,customGroup:N,dynamicGroup:Ie,advancedGroup:He}))}#d(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.destinationForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=Fe({token:t,factory:t.\u0275fac,providedIn:"root"})};var en=["formRef"],tn=(t,n,e)=>({destination:t,index:n,formGroupName:"custom",oauthField:e}),ot=t=>({$implicit:t}),nn=(t,n,e)=>({destination:t,index:n,formGroupName:"dynamic",oauthField:e}),on=(t,n,e)=>({destination:t,index:n,formGroupName:"advanced",oauthField:e});function rn(t,n){if(t&1){let e=F();r(0,"p",9),x("click",function(){g(e);let a=m(2);return y(a.removeDestinationFormGroup(a.destinationCount()-1))}),l(1," Wanna select another destination? "),r(2,"span",10),l(3,"Click here"),o()()}}function an(t,n){if(t&1){let e=F();r(0,"div",11)(1,"div",12),x("click",function(){g(e);let a=m(2);return y(a.addDestinationFormGroup("file"))}),r(2,"h3"),l(3,"File system"),o(),r(4,"p"),l(5,"Store backups on your local file system."),o()(),r(6,"div",12),x("click",function(){g(e);let a=m(2);return y(a.addDestinationFormGroup("gcs"))}),r(7,"h3"),l(8,"Google Cloud Storage"),o(),r(9,"p"),l(10,"Store backups in Google Cloud Storage."),o()(),r(11,"div",12),x("click",function(){g(e);let a=m(2);return y(a.addDestinationFormGroup("s3"))}),r(12,"h3"),l(13,"S3 compatible bucket"),o(),r(14,"p"),l(15,"Store backups in any S3 compatible bucket."),o()(),r(16,"div",12),x("click",function(){g(e);let a=m(2);return y(a.addDestinationFormGroup("ssh"))}),r(17,"h3"),l(18,"SSH"),o(),r(19,"p"),l(20,"Store backups in SSH."),o()()(),r(21,"p"),l(22,"More destinations are coming soon."),o()}}function ln(t,n){t&1&&Me(0)}function sn(t,n){if(t&1&&_(0,ln,1,0,"ng-container",15),t&2){let e=n.$implicit,i=n.$index;m(2);let a=xe(6),c=m(2);d("ngTemplateOutlet",a)("ngTemplateOutletContext",Re(6,ot,Be(2,tn,e,i,c.destinationFormPair().oauthField)))}}function mn(t,n){if(t&1&&(k(0),w(1,sn,1,8,"ng-container",null,b),v()),t&2){let e=m(3);s(),D(e.destinationFormPair().custom)}}function pn(t,n){t&1&&Me(0)}function cn(t,n){if(t&1&&_(0,pn,1,0,"ng-container",15),t&2){let e=n.$implicit,i=n.$index;m(2);let a=xe(6),c=m(2);d("ngTemplateOutlet",a)("ngTemplateOutletContext",Re(6,ot,Be(2,nn,e,i,c.destinationFormPair().oauthField)))}}function dn(t,n){if(t&1&&(k(0),w(1,cn,1,8,"ng-container",null,b),v()),t&2){let e=m(3);s(),D(e.destinationFormPair().dynamic)}}function un(t,n){if(t&1){let e=F();r(0,"button",20),x("click",function(){let a=g(e).$implicit,c=m(4);return y(c.addAdvancedFormPair(a))}),l(1),o()}if(t&2){let e=n.$implicit;s(),P(" ",e.name," ")}}function _n(t,n){t&1&&Me(0)}function fn(t,n){if(t&1&&_(0,_n,1,0,"ng-container",15),t&2){let e=n.$implicit,i=n.$index;m(2);let a=xe(6),c=m(2);d("ngTemplateOutlet",a)("ngTemplateOutletContext",Re(6,ot,Be(2,on,e,i,c.destinationFormPair().oauthField)))}}function Cn(t,n){if(t&1&&(r(0,"app-toggle-card",14),k(1,16),l(2," Advanced options "),r(3,"spk-menu")(4,"button",17),l(5," Add advanced option "),r(6,"spk-icon"),l(7,"plus"),o()(),k(8,18),w(9,un,2,1,"button",19,b),v(),o(),v(),k(11),w(12,fn,1,8,"ng-container",null,b),v(),o()),t&2){let e=m(3);d("disallowToggle",!0),s(9),D(e.notSelectedAdvancedFormPair()),s(3),D(e.selectedAdvancedFormPair())}}function gn(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function yn(t,n){if(t&1&&(r(0,"app-file-tree",22)(1,"label",26),l(2),_(3,gn,2,1,"spk-icon",27),o(),p(4,"input",28),o()),t&2){let e,i=m().$implicit,a=m(3);d("startingPath",a.getFormFieldValue(i.index,i.formGroupName,i.destination.name)),s(),pt("for","destination-",i.formGroupName,"-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(),E("id","destination-",i.formGroupName,"-",i.index,""),se("formControlName",i.destination.name)}}function xn(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function hn(t,n){t&1&&(r(0,"spk-icon",29),l(1,"link"),o())}function Sn(t,n){t&1&&(r(0,"spk-icon",29),l(1,"textbox"),o())}function kn(t,n){if(t&1&&(r(0,"spk-form-field")(1,"label",26),l(2),_(3,xn,2,1,"spk-icon",27),o(),p(4,"input",28),_(5,hn,2,0,"spk-icon",29)(6,Sn,2,0,"spk-icon",29),o()),t&2){let e,i=m().$implicit;s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(),E("id","destination-",i.formGroupName,"-",i.index,""),se("formControlName",i.destination.name),s(),f(i.destination.type==="Path"?5:6)}}function vn(t,n){if(t&1){let e=F();r(0,"spk-icon",32),x("click",function(){g(e);let a=m(2).$implicit;return y(a.destination.showPassword=!a.destination.showPassword)}),l(1," eye "),o()}}function Fn(t,n){if(t&1){let e=F();r(0,"spk-icon",32),x("click",function(){g(e);let a=m(2).$implicit;return y(a.destination.showPassword=!a.destination.showPassword)}),l(1," eye-slash "),o()}}function bn(t,n){if(t&1&&(r(0,"spk-form-field")(1,"label",26),l(2),o(),p(3,"input",30),r(4,"spk-icon",29),l(5,"password"),o(),_(6,vn,2,0,"spk-icon",31)(7,Fn,2,0,"spk-icon",31),o()),t&2){let e,i=m().$implicit;s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),E("id","destination-",i.formGroupName,"-",i.index,""),se("formControlName",i.destination.name),d("type",i.destination.showPassword?"text":"password"),s(3),f(i.destination.showPassword?6:7)}}function wn(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function Dn(t,n){if(t&1&&(r(0,"option",35),l(1),o()),t&2){let e=n.$implicit;d("value",e),s(),G(e)}}function Tn(t,n){if(t&1&&(r(0,"spk-select")(1,"label",26),l(2),_(3,wn,2,1,"spk-icon",27),o(),p(4,"input",33),k(5,34),w(6,Dn,2,2,"option",35,b),v(),o()),t&2){let e,i=m().$implicit;s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(),E("id","destination-",i.formGroupName,"-",i.index,""),se("formControlName",i.destination.name),s(2),D(i.destination.options)}}function En(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function Nn(t,n){if(t&1&&(r(0,"option",35),l(1),o()),t&2){let e=n.$implicit;d("value",e),s(),G(e)}}function On(t,n){if(t&1&&(r(0,"div",23)(1,"label",26),l(2),_(3,En,2,1,"spk-icon",27),o(),r(4,"div",36)(5,"spk-form-field"),p(6,"input",37),r(7,"spk-icon",29),l(8,"resize"),o()(),r(9,"spk-select"),p(10,"label")(11,"input",38),k(12,34),w(13,Nn,2,2,"option",35,b),v(),o()()()),t&2){let e,i=m().$implicit,a=m(3);d("formGroupName",i.destination.name),s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(3),E("id","destination-",i.formGroupName,"-",i.index,""),s(7),D(a.sizeOptions())}}function Vn(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function Pn(t,n){if(t&1&&(r(0,"spk-form-field")(1,"label",26),l(2),_(3,Vn,2,1,"spk-icon",27),o(),p(4,"input",39),r(5,"spk-icon",29),l(6,"numpad"),o()()),t&2){let e,i=m().$implicit;s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(),E("id","destination-",i.formGroupName,"-",i.index,""),se("formControlName",i.destination.name)}}function In(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function Gn(t,n){if(t&1&&(r(0,"spk-toggle",24)(1,"label",26),l(2),_(3,In,2,1,"spk-icon",27),o(),p(4,"input",40),o()),t&2){let e,i=m().$implicit;s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(),E("id","destination-",i.formGroupName,"-",i.index,""),se("formControlName",i.destination.name)}}function An(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function Mn(t,n){t&1&&(r(0,"spk-option",42),l(1,"None"),o()),t&2&&d("value","None")}function Rn(t,n){if(t&1&&(r(0,"spk-option",35),l(1),p(2,"spk-checkbox",43),o()),t&2){let e=m().$implicit;d("value",e),s(),P(" ",e," ")}}function Bn(t,n){if(t&1&&_(0,Mn,2,1,"spk-option",42)(1,Rn,3,2,"spk-option",35),t&2){let e=n.$implicit;f(e==="None"?0:1)}}function $n(t,n){if(t&1&&(r(0,"spk-select",25)(1,"label",26),l(2),_(3,An,2,1,"spk-icon",27),o(),p(4,"input",41),k(5,34),w(6,Bn,2,1,null,null,b),v(),o()),t&2){let e,i=m().$implicit;d("selectMultiple",!0),s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(),se("formControlName",i.destination.name),s(2),D(i.destination.options)}}function Ln(t,n){if(t&1&&(r(0,"spk-icon",27),l(1," question "),o()),t&2){let e=m(2).$implicit;$("spk-tooltip-primary",e.destination.longDescription)}}function zn(t,n){if(t&1&&(r(0,"spk-form-field")(1,"label",26),l(2),_(3,Ln,2,1,"spk-icon",27),o(),p(4,"input",28)(5,"span",44),o()),t&2){let e,i=m().$implicit;s(),E("for","destination-",i.formGroupName,"-",i.index,""),s(),P(" ",(e=i.destination.shortDescription)!==null&&e!==void 0?e:i.destination.name," "),s(),f(i.destination.longDescription?3:-1),s(),E("id","destination-",i.formGroupName,"-",i.index,""),se("formControlName",i.destination.name)}}function Un(t,n){if(t&1&&(k(0,21),_(1,yn,5,11,"app-file-tree",22)(2,kn,7,10,"spk-form-field")(3,bn,8,10,"spk-form-field")(4,Tn,8,9,"spk-select")(5,On,15,9,"div",23)(6,Pn,7,9,"spk-form-field")(7,Gn,5,9,"spk-toggle",24)(8,$n,8,7,"spk-select",25)(9,zn,6,9,"spk-form-field"),v()),t&2){let e=n.$implicit;d("formGroupName",e.formGroupName),s(),f(e.destination.type==="file-tree"?1:e.destination.type==="String"||e.destination.type==="Path"?2:e.destination.type==="Password"?3:e.destination.type==="Enumeration"?4:e.destination.type==="Size"?5:e.destination.type==="Integer"?6:e.destination.type==="Boolean"?7:e.destination.type==="Flags"?8:e.destination.type==="Timespan"?9:-1)}}function jn(t,n){if(t&1&&(k(0,5)(1,13),_(2,mn,3,0,"ng-container")(3,dn,3,0,"ng-container")(4,Cn,14,1,"app-toggle-card",14)(5,Un,10,2,"ng-template",null,1,ct),v()()),t&2){let e=m(2);s(2),f(e.destinationFormPair().custom.length?2:-1),s(),f(e.destinationFormPair().dynamic.length?3:-1),s(),f(e.destinationFormPair().advanced.length?4:-1)}}function qn(t,n){if(t&1){let e=F();r(0,"form",3,0),x("submit",function(){g(e);let a=m();return y(a.next())}),r(2,"header")(3,"h3",4),l(4,"Backup destination"),o(),_(5,rn,4,0,"p"),o(),_(6,an,23,0)(7,jn,7,3,"ng-container",5),r(8,"div",6)(9,"button",7),x("click",function(){g(e);let a=m();return y(a.goBack())}),r(10,"spk-icon"),l(11,"arrow-left"),o(),l(12," Go back "),o(),r(13,"button",8)(14,"spk-icon"),l(15,"arrow-right"),o(),l(16," Continue "),o()()()}if(t&2){let e,i=m();d("formGroup",i.destinationForm),s(5),f(i.destinationCount()>0?5:-1),s(),f(i.destinationCount()===0?6:-1),s(),f(!((e=i.destinationFormSignal())==null||e.destinations==null)&&e.destinations.length?7:-1)}}var Qn=["Bytes","KB","MB","GB","TB","PB"],We=new I,Ft=(t={destinations:[]})=>We.group({destinations:We.array(t.destinations)}),bt=({key:t,customGroup:n,dynamicGroup:e,advancedGroup:i})=>We.group({destinationType:We.control(t),custom:n,dynamic:e,advanced:i}),it=class t{#e=h(M);#t=h(W);#n=h(Ce);#i=h(ut);#o=h(R);formRef=U.required("formRef");sysIsLoaded=this.#n.isLoaded;destinationIsLoaded=this.#o.destinationIsLoaded;destinationForm=this.#o.destinationForm;destinationFormPair=this.#o.destinationFormPair;selectedAdvancedFormPair=this.#o.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#o.notSelectedAdvancedFormPair;destinationOptions=this.#o.destinationOptions;destinationFormSignal=this.#o.destinationFormSignal;destinationCount=K(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=S(Qn);getFormFieldValue(n,e,i){return((this.destinationForm.controls.destinations.controls?.[n]).controls?.[e]).controls[i].value}addDestinationFormGroup(n){this.#o.addDestinationFormGroup(n)}addAdvancedFormPair(n){this.selectedAdvancedFormPair.update(e=>(e.push(n),e)),this.notSelectedAdvancedFormPair.update(e=>(e=e.filter(i=>i.name!==n.name),e))}targetUrl=K(()=>{let n=this.destinationFormSignal()?.destinations?.[0];return n?Ee(n):""});mapToTargetUrl(n){return Ee(n.value)}removeDestinationFormGroup(n){this.destinationForm.controls.destinations.removeAt(n)}displayFn(n){let e=this.destinationOptions().find(i=>i.Key===n);return e?`${e.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#t.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#t.parent})}#r=S("https://duplicati-oauth-handler.appspot.com/").asReadonly();#l=S(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=S(!1);#s=S(null);keyCreation(){}oauthStartTokenCreation(n){this.#a.set(!0);let e=450,i=600,a=this.#r()+"?type="+n+"&token="+this.#l(),c=screen.width/2-e/2,A=screen.height/2-i/2,B=window.open(a,"_blank","height="+i+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+c+",top="+A);B?.addEventListener("blur",le=>{console.log("event blur",le)}),B?.addEventListener("beforeunload",le=>{console.log("event beforeunload",le),this.#i.get(this.#r()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#l()}}).pipe(ye(()=>this.#a.set(!1))).subscribe({next:N=>{console.log("res",N),N?.authid&&this.#s.set(N.authid)}})})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=z({type:t,selectors:[["app-destination"]],viewQuery:function(e,i){e&1&&j(i.formRef,en,5),e&2&&q()},standalone:!0,features:[Q],decls:1,vars:1,consts:[["formRef",""],["fieldTemplate",""],[3,"formGroup"],[3,"submit","formGroup"],[1,"title-30"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile",3,"click"],["formGroupName","0"],[3,"disallowToggle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["spk-menu-item","","type","button"],["spk-menu-item","","type","button",3,"click"],[3,"formGroupName"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],[3,"for"],["spk-tooltip-right",""],["type","text",3,"id","formControlName"],["spkPrefix",""],[3,"type","id","formControlName"],["spkSuffix","",1,"clickable"],["spkSuffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],["options",""],[3,"value"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spkError",""]],template:function(e,i){e&1&&_(0,qn,17,4,"form",2),e&2&&f(i.destinationOptions().length&&i.sysIsLoaded()&&i.destinationIsLoaded()?0:-1)},dependencies:[ie,J,te,ne,H,ue,be,Y,Z,X,ee,_e,$e,dt,re,ae,Le,_t,ft,oe,we,ge,ze],styles:["[_nghost-%COMP%]{display:block}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}"],changeDetection:0})};export{Ft as a,bt as b,it as c,xt as d,Je as e,Ze as f,ht as g,et as h,Xe as i,kt as j,tt as k,vt as l,nt as m,R as n};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-43IMNGQL.js";import"./chunk-J6KTHSHX.js";import"./chunk-LD5EWOQM.js";import"./chunk-7PZ2UDVE.js";import"./chunk-IOM7KF2W.js";import"./chunk-LT6J7X37.js";import"./chunk-JRXXG6O7.js";import"./chunk-BOT7P6RM.js";import"./chunk-GBVLF3BS.js";import"./chunk-RL2VWNJG.js";export{a as createRestoreOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{b as S}from"./chunk-7PZ2UDVE.js";import{a as h}from"./chunk-GBVLF3BS.js";import{$ as l,Fb as p,Gb as d,Kb as f,Pb as u,Qa as n,Qb as C,Z as s,ib as c,jb as m,kb as g,lb as i,mb as a,oc as v}from"./chunk-RL2VWNJG.js";function L(t,o){if(t&1&&(i(0,"pre",0),p(1),u(2,"json"),a()),t&2){let e=o.$implicit;n(),d(C(2,1,e))}}var r=class t{#e=s(h);logs=S(this.#e.getApiV1LogdataLog());static \u0275fac=function(e){return new(e||t)};static \u0275cmp=l({type:t,selectors:[["app-logs"]],standalone:!0,features:[f],decls:4,vars:0,consts:[[2,"white-space","wrap"]],template:function(e,y){e&1&&(i(0,"h3"),p(1,"Logs"),a(),m(2,L,3,3,"pre",0,c)),e&2&&(n(2),g(y.logs()))},dependencies:[v],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{r as default};
@@ -0,0 +1 @@
1
+ import{A as ve,Jb as p,R as j,Ra as o,S as f,T as ie,Ta as A,U as B,Ub as Ve,W as C,Wa as N,Z as ye,Za as u,a as c,aa as U,ac as O,b as h,ba as l,bc as m,ec as se,fb as re,ia as ne,l as ge,ma as V,oa as Ce,p as me,ra as S,sb as g,u as _e,wa as b}from"./chunk-RL2VWNJG.js";var Oe=(()=>{class i{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b))}}static{this.\u0275dir=l({type:i})}}return i})(),I=(()=>{class i extends Oe{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,features:[u]})}}return i})(),D=new C(""),st={provide:D,useExisting:f(()=>ot),multi:!0},ot=(()=>{class i extends I{writeValue(e){this.setProperty("checked",e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},features:[p([st]),u]})}}return i})(),at={provide:D,useExisting:f(()=>xe),multi:!0};function lt(){let i=se()?se().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var ut=new C(""),xe=(()=>{class i extends Oe{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!lt())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b),o(ut,8))}}static{this.\u0275dir=l({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&g("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},features:[p([at]),u]})}}return i})();function _(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function Pe(i){return i!=null&&typeof i.length=="number"}var K=new C(""),J=new C(""),ct=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,De=class{static min(t){return dt(t)}static max(t){return ht(t)}static required(t){return ft(t)}static requiredTrue(t){return pt(t)}static email(t){return gt(t)}static minLength(t){return mt(t)}static maxLength(t){return _t(t)}static pattern(t){return vt(t)}static nullValidator(t){return ke(t)}static compose(t){return Ue(t)}static composeAsync(t){return Le(t)}};function dt(i){return t=>{if(_(t.value)||_(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<i?{min:{min:i,actual:t.value}}:null}}function ht(i){return t=>{if(_(t.value)||_(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function ft(i){return _(i.value)?{required:!0}:null}function pt(i){return i.value===!0?null:{required:!0}}function gt(i){return _(i.value)||ct.test(i.value)?null:{email:!0}}function mt(i){return t=>_(t.value)||!Pe(t.value)?null:t.value.length<i?{minlength:{requiredLength:i,actualLength:t.value.length}}:null}function _t(i){return t=>Pe(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function vt(i){if(!i)return ke;let t,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(_(n.value))return null;let r=n.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function ke(i){return null}function Ge(i){return i!=null}function Re(i){return Ve(i)?me(i):i}function Te(i){let t={};return i.forEach(e=>{t=e!=null?c(c({},t),e):t}),Object.keys(t).length===0?null:t}function je(i,t){return t.map(e=>e(i))}function yt(i){return!i.validate}function Be(i){return i.map(t=>yt(t)?t:e=>t.validate(e))}function Ue(i){if(!i)return null;let t=i.filter(Ge);return t.length==0?null:function(e){return Te(je(e,t))}}function He(i){return i!=null?Ue(Be(i)):null}function Le(i){if(!i)return null;let t=i.filter(Ge);return t.length==0?null:function(e){let n=je(e,t).map(Re);return ve(n).pipe(_e(Te))}}function $e(i){return i!=null?Le(Be(i)):null}function be(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function We(i){return i._rawValidators}function qe(i){return i._rawAsyncValidators}function oe(i){return i?Array.isArray(i)?i:[i]:[]}function $(i,t){return Array.isArray(i)?i.includes(t):i===t}function Ae(i,t){let e=oe(t);return oe(i).forEach(r=>{$(e,r)||e.push(r)}),e}function Me(i,t){return oe(t).filter(e=>!$(i,e))}var W=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=He(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=$e(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},d=class extends W{get formDirective(){return null}get path(){return null}},F=class extends W{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},q=class{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Ct={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},mi=h(c({},Ct),{"[class.ng-submitted]":"isSubmitted"}),_i=(()=>{class i extends q{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(F,2))}}static{this.\u0275dir=l({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[u]})}}return i})(),vi=(()=>{class i extends q{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(o(d,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[u]})}}return i})();var x="VALID",H="INVALID",M="PENDING",P="DISABLED",v=class{},z=class extends v{constructor(t,e){super(),this.value=t,this.source=e}},k=class extends v{constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends v{constructor(t,e){super(),this.touched=t,this.source=e}},E=class extends v{constructor(t,e){super(),this.status=t,this.source=e}},ae=class extends v{constructor(t){super(),this.source=t}},le=class extends v{constructor(t){super(),this.source=t}};function de(i){return(Q(i)?i.validators:i)||null}function Vt(i){return Array.isArray(i)?He(i):i||null}function he(i,t){return(Q(t)?t.asyncValidators:i)||null}function Dt(i){return Array.isArray(i)?$e(i):i||null}function Q(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function ze(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new j(1e3,"");if(!n[e])throw new j(1001,"")}function Ze(i,t,e){i._forEachChild((n,r)=>{if(e[r]===void 0)throw new j(1002,"")})}var w=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=O(()=>this.statusReactive()),this.statusReactive=N(void 0),this._pristine=O(()=>this.pristineReactive()),this.pristineReactive=N(!0),this._touched=O(()=>this.touchedReactive()),this.touchedReactive=N(!1),this._events=new ge,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}get valid(){return this.status===x}get invalid(){return this.status===H}get pending(){return this.status==M}get disabled(){return this.status===P}get enabled(){return this.status!==P}get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ae(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ae(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Me(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Me(t,this._rawAsyncValidators))}hasValidator(t){return $(this._rawValidators,t)}hasAsyncValidator(t){return $(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(h(c({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,n))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:n})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n),e&&t.emitEvent!==!1&&this._events.next(new G(!1,n))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(h(c({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new k(!1,n))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),e&&t.emitEvent!==!1&&this._events.next(new k(!0,n))}markAsPending(t={}){this.status=M;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new E(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(h(c({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this.errors=null,this._forEachChild(r=>{r.disable(h(c({},t),{onlySelf:!0}))}),this._updateValue();let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new z(this.value,n)),this._events.next(new E(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(h(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=x,this._forEachChild(n=>{n.enable(h(c({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(h(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===x||this.status===M)&&this._runAsyncValidator(n,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new z(this.value,e)),this._events.next(new E(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(h(c({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?P:x}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=M,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let n=Re(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,n){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||n)&&this._events.next(new E(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,n)}_initObservables(){this.valueChanges=new S,this.statusChanges=new S}_calculateStatus(){return this._allControlsDisabled()?P:this.errors?H:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(M)?M:this._anyControlsHaveStatus(H)?H:x}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new k(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Q(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Vt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Dt(this._rawAsyncValidators)}},Z=class extends w{constructor(t,e,n){super(de(e),he(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Ze(this,!0,t),Object.keys(t).forEach(n=>{ze(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,s)=>{n=e(n,r,s)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var ue=class extends Z{};var ee=new C("CallSetDisabledState",{providedIn:"root",factory:()=>R}),R="always";function fe(i,t){return[...t.path,i]}function Ee(i,t,e=R){pe(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),At(i,t),Et(i,t),Mt(i,t),bt(i,t)}function Fe(i,t,e=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),Y(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function X(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function bt(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function pe(i,t){let e=We(i);t.validator!==null?i.setValidators(be(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=qe(i);t.asyncValidator!==null?i.setAsyncValidators(be(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();X(t._rawValidators,r),X(t._rawAsyncValidators,r)}function Y(i,t){let e=!1;if(i!==null){if(t.validator!==null){let r=We(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,i.setValidators(s))}}if(t.asyncValidator!==null){let r=qe(i);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,i.setAsyncValidators(s))}}}let n=()=>{};return X(t._rawValidators,n),X(t._rawAsyncValidators,n),e}function At(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Xe(i,t)})}function Mt(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Xe(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function Xe(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function Et(i,t){let e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Ft(i,t){i==null,pe(i,t)}function wt(i,t){return Y(i,t)}function It(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function St(i){return Object.getPrototypeOf(i.constructor)===I}function Nt(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Ot(i,t){if(!t)return null;Array.isArray(t);let e,n,r;return t.forEach(s=>{s.constructor===xe?e=s:St(s)?n=s:r=s}),r||n||e||null}function xt(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function we(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function Ie(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var L=class extends w{constructor(t=null,e,n){super(de(e),he(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Q(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ie(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){we(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){we(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ie(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Pt=i=>i instanceof L,kt=(()=>{class i extends d{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,features:[u]})}}return i})();var Ci=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=l({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return i})(),Gt={provide:D,useExisting:f(()=>Rt),multi:!0},Rt=(()=>{class i extends I{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&g("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},features:[p([Gt]),u]})}}return i})(),Tt={provide:D,useExisting:f(()=>Bt),multi:!0};var jt=(()=>{class i{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e){this._accessors.splice(n,1);return}}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return e[0].control?e[0]._parent===n._control._parent&&e[1].name===n.name:!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=ie({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Bt=(()=>{class i extends I{constructor(e,n,r,s){super(e,n),this._registry=r,this._injector=s,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=ye(ee,{optional:!0})??R}ngOnInit(){this._control=this._injector.get(F),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static{this.\u0275fac=function(n){return new(n||i)(o(A),o(b),o(jt),o(Ce))}}static{this.\u0275dir=l({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[p([Tt]),u]})}}return i})();var Ye=new C("");var Ut={provide:d,useExisting:f(()=>Ke)},Ke=(()=>{class i extends d{get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,n,r){super(),this.callSetDisabledState=r,this._submitted=O(()=>this._submittedReactive()),this._submittedReactive=N(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new S,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Y(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return Ee(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){Fe(e.control||null,e,!1),xt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),Nt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ae(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new le(this.form))}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,r=this.form.get(e.path);n!==r&&(Fe(n||null,e),Pt(r)&&(Ee(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);Ft(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&wt(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){pe(this.form,this),this._oldForm&&Y(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(n){return new(n||i)(o(K,10),o(J,10),o(ee,8))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&g("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[p([Ut]),u,ne]})}}return i})(),Ht={provide:d,useExisting:f(()=>Je)},Je=(()=>{class i extends kt{constructor(e,n,r){super(),this.name=null,this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){et(this._parent)}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},features:[p([Ht]),u]})}}return i})(),Lt={provide:d,useExisting:f(()=>Qe)},Qe=(()=>{class i extends d{constructor(e,n,r){super(),this.name=null,this._parent=e,this._setValidators(n),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){et(this._parent)}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10))}}static{this.\u0275dir=l({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},features:[p([Lt]),u]})}}return i})();function et(i){return!(i instanceof Je)&&!(i instanceof Ke)&&!(i instanceof Qe)}var $t={provide:F,useExisting:f(()=>Wt)},Wt=(()=>{class i extends F{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,n,r,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new S,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ot(this,s)}ngOnChanges(e){this._added||this._setUpControl(),It(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(n){return new(n||i)(o(d,13),o(K,10),o(J,10),o(D,10),o(Ye,8))}}static{this.\u0275dir=l({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[p([$t]),u,ne]})}}return i})(),qt={provide:D,useExisting:f(()=>it),multi:!0};function tt(i,t){return i==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function zt(i){return i.split(":")[0]}var it=(()=>{class i extends I{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n=this._getOptionId(e),r=tt(n,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){let n=zt(e);return this._optionMap.has(n)?this._optionMap.get(n):e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[p([qt]),u]})}}return i})(),Vi=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(tt(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(b),o(A),o(it,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})(),Zt={provide:D,useExisting:f(()=>nt),multi:!0};function Se(i,t){return i==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${i}: ${t}`.slice(0,50))}function Xt(i){return i.split(":")[0]}var nt=(()=>{class i extends I{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let n;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));n=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else n=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{let r=[],s=n.selectedOptions;if(s!==void 0){let a=s;for(let y=0;y<a.length;y++){let T=a[y],te=this._getOptionValue(T.value);r.push(te)}}else{let a=n.options;for(let y=0;y<a.length;y++){let T=a[y];if(T.selected){let te=this._getOptionValue(T.value);r.push(te)}}}this.value=r,e(r)}}_registerOption(e){let n=(this._idCounter++).toString();return this._optionMap.set(n,e),n}_getOptionId(e){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,e))return n;return null}_getOptionValue(e){let n=Xt(e);return this._optionMap.has(n)?this._optionMap.get(n)._value:e}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=V(i)))(r||i)}})()}static{this.\u0275dir=l({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&g("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[p([Zt]),u]})}}return i})(),Di=(()=>{class i{constructor(e,n,r){this._element=e,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Se(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Se(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(n){return new(n||i)(o(b),o(A),o(nt,9))}}static{this.\u0275dir=l({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return i})();var rt=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({})}}return i})(),ce=class extends w{constructor(t,e,n){super(de(e),he(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,n={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(t,e={}){let n=this._adjustIndex(t);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,n={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Ze(this,!1,t),t.forEach((n,r)=>{ze(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Ne(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var bi=(()=>{class i{constructor(){this.useNonNullable=!1}get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,n=null){let r=this._reduceControls(e),s={};return Ne(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new Z(r,s)}record(e,n=null){let r=this._reduceControls(e);return new ue(r,n)}control(e,n,r){let s={};return this.useNonNullable?(Ne(n)?s=n:(s.validators=n,s.asyncValidators=r),new L(e,h(c({},s),{nonNullable:!0}))):new L(e,n,r)}array(e,n,r){let s=e.map(a=>this._createControl(a));return new ce(s,n,r)}_reduceControls(e){let n={};return Object.keys(e).forEach(r=>{n[r]=this._createControl(e[r])}),n}_createControl(e){if(e instanceof L)return e;if(e instanceof w)return e;if(Array.isArray(e)){let n=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(n,r,s)}else return this.control(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=ie({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ai=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:ee,useValue:e.callSetDisabledState??R}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({imports:[rt]})}}return i})(),Mi=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Ye,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ee,useValue:e.callSetDisabledState??R}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=U({type:i})}static{this.\u0275inj=B({imports:[rt]})}}return i})();export{ot as a,xe as b,De as c,_i as d,vi as e,Ci as f,Rt as g,Bt as h,Ke as i,Je as j,Qe as k,Wt as l,Vi as m,Di as n,bi as o,Ai as p,Mi as q};
@@ -0,0 +1 @@
1
+ import{a as m,b as u}from"./chunk-7PZ2UDVE.js";import{H as l,N as f,Va as v,Z as b,ac as V,bc as w,g as d,ga as I,ha as y,oa as S,p as j,s as h,v as c}from"./chunk-RL2VWNJG.js";function z(e,n,o){!n&&y(e);let i=n??b(S);return o?I(i,o):i}function C(...e){let{normalizedSources:n,hasInitValue:o,operator:i,options:r}=E(e),s=z(C,r?.injector);return o?u(c(n).pipe(i),{initialValue:r.initialValue,injector:s}):u(c(n).pipe(i),{injector:s,requireSync:!0})}function E(e){if(!e||!e.length||typeof e[0]!="object")throw new TypeError("derivedFrom needs sources");let n=typeof e[1]=="function";if(e.length==3&&!n)throw new TypeError("derivedFrom needs pipeable operator as a second argument");n||e.splice(1,0,d);let[o,i,r]=e,s=r?.initialValue!==void 0;return{normalizedSources:Object.entries(o).reduce((p,[a,t])=>{if(v(t))p[a]=m(t,{injector:r?.injector}).pipe(f(w(t)));else if(h(t))p[a]=t.pipe(l());else if(typeof t=="function"){let A=V(t);p[a]=m(A,{injector:r?.injector}).pipe(f(t()))}else p[a]=j(t).pipe(l());return p},Array.isArray(o)?[]:{}),operator:i,hasInitValue:s,options:r}}export{C as a};