@duplicati/ngclient 0.0.161 → 0.0.163

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 (167) hide show
  1. package/assets/images/console.avif +0 -0
  2. package/chunk-2ASSYS3L.js +1 -0
  3. package/chunk-2RJJX7C2.js +1 -0
  4. package/chunk-35ZUPRX7.js +1 -0
  5. package/chunk-3OT227W4.js +1 -0
  6. package/chunk-3UJSVCAS.js +1 -0
  7. package/{chunk-XXVFRNSP.js → chunk-4HEWGBUJ.js} +1 -1
  8. package/{chunk-Z7WHLTVV.js → chunk-4VZNWPWO.js} +1 -1
  9. package/chunk-52VBZ35Q.js +1 -0
  10. package/chunk-53OIXPHF.js +1 -0
  11. package/chunk-5KAFOFRJ.js +1 -0
  12. package/chunk-5P2YZRI5.js +1 -0
  13. package/chunk-5PANYSIG.js +2 -0
  14. package/chunk-5XN6KKQ5.js +3 -0
  15. package/chunk-6QSMEZZ4.js +1 -0
  16. package/chunk-7I3YOHEE.js +1 -0
  17. package/chunk-7V6AACW7.js +1 -0
  18. package/chunk-7XAN363E.js +1 -0
  19. package/chunk-7ZE4C4XQ.js +1 -0
  20. package/chunk-A4RKBIZK.js +1 -0
  21. package/{chunk-5LX6M65H.js → chunk-AE7T2DAH.js} +1 -1
  22. package/chunk-AKJZOLGH.js +1 -0
  23. package/{chunk-YCORZV4Z.js → chunk-AL7GMUVT.js} +1 -1
  24. package/{chunk-JYWOYPSQ.js → chunk-AT6BXXSP.js} +1 -1
  25. package/chunk-ATGKEH5N.js +2 -0
  26. package/{chunk-4VY6SMSL.js → chunk-AWXWGD4T.js} +1 -1
  27. package/chunk-D2T243VR.js +1 -0
  28. package/{chunk-NSAY2K7E.js → chunk-DQAT6VCF.js} +1 -1
  29. package/chunk-EBVPGAHS.js +1 -0
  30. package/chunk-EUVXYJ2O.js +1 -0
  31. package/{chunk-PFZASYQH.js → chunk-FEJ33TSO.js} +3 -3
  32. package/chunk-FFL4DKFK.js +1 -0
  33. package/chunk-FLSO56F3.js +1 -0
  34. package/chunk-FO5YOQUM.js +1 -0
  35. package/chunk-G3QBP5CU.js +1 -0
  36. package/chunk-G6RLXZXM.js +2 -0
  37. package/{chunk-I2LW33GO.js → chunk-GNJTDWT4.js} +1 -1
  38. package/chunk-H3W2UQY2.js +1 -0
  39. package/chunk-HJAQV4HF.js +1 -0
  40. package/{chunk-LN26XMBJ.js → chunk-HVB6ARTT.js} +1 -1
  41. package/chunk-IDTGMCDE.js +1 -0
  42. package/{chunk-YJPY33RI.js → chunk-ISCGGOPN.js} +1 -1
  43. package/{chunk-CSL7HCLZ.js → chunk-IXLGVEIK.js} +1 -1
  44. package/chunk-J34TTKLN.js +1 -0
  45. package/chunk-JKXAMBD7.js +1 -0
  46. package/chunk-KCVV72VV.js +1 -0
  47. package/chunk-L34PDBPD.js +1 -0
  48. package/chunk-LC4PL7V2.js +1 -0
  49. package/chunk-LH6XLRJU.js +1 -0
  50. package/chunk-LMEZWWBD.js +1 -0
  51. package/{chunk-5ZSBXGHQ.js → chunk-NXROYR6L.js} +1 -1
  52. package/chunk-O5W6EGCB.js +1 -0
  53. package/chunk-OMKP4YQX.js +1 -0
  54. package/{chunk-H7ZKBS2Q.js → chunk-OYO6MNWR.js} +1 -1
  55. package/chunk-PIMTQKQK.js +1 -0
  56. package/{chunk-SR4YENFS.js → chunk-PKK4MIRQ.js} +1 -1
  57. package/{chunk-MHPSC3FM.js → chunk-POJT4MSX.js} +1 -1
  58. package/chunk-Q6KQWWNZ.js +1 -0
  59. package/chunk-Q7SVWHVY.js +1 -0
  60. package/{chunk-3V4DGTSM.js → chunk-QSPA3G65.js} +1 -1
  61. package/chunk-QU7TANXU.js +1 -0
  62. package/chunk-QY6647RY.js +1 -0
  63. package/chunk-R6CC4KYP.js +1 -0
  64. package/{chunk-K2BANUEJ.js → chunk-R7B32VI4.js} +1 -1
  65. package/chunk-R7CYCJUU.js +1 -0
  66. package/{chunk-RPUPXDQE.js → chunk-RAIB7LN4.js} +1 -1
  67. package/{chunk-GXGIGJ4W.js → chunk-RIX6H2ZX.js} +1 -1
  68. package/chunk-RPJFKWMV.js +2 -0
  69. package/chunk-SVQCV5AE.js +1 -0
  70. package/chunk-TC7HZO7D.js +1 -0
  71. package/chunk-TZQE4VY2.js +1 -0
  72. package/chunk-U5APXPQC.js +1 -0
  73. package/chunk-UYQXV7FY.js +1 -0
  74. package/chunk-V7NZ5WF5.js +1 -0
  75. package/{chunk-Z35OG2DV.js → chunk-VCLWADQK.js} +1 -1
  76. package/chunk-VITGSIEL.js +2 -0
  77. package/{chunk-Z27IQRKV.js → chunk-WJDMMKWE.js} +1 -1
  78. package/{chunk-S4OFJD2F.js → chunk-XTFTWEJS.js} +1 -1
  79. package/{chunk-ABYM5HWA.js → chunk-XUN5TTJC.js} +1 -1
  80. package/chunk-YATBNEED.js +1 -0
  81. package/chunk-YB374JOK.js +1 -0
  82. package/chunk-YOP2YAQF.js +1 -0
  83. package/chunk-YPAJPRDF.js +1 -0
  84. package/chunk-YWDTUV3V.js +1 -0
  85. package/chunk-Z4MDYLVI.js +1 -0
  86. package/chunk-ZBK64QS2.js +4 -0
  87. package/chunk-ZCH336WN.js +1 -0
  88. package/chunk-ZDBKQQ47.js +1 -0
  89. package/index.html +1 -1
  90. package/locale/messages.cs.json +4 -3
  91. package/locale/messages.da.json +4 -3
  92. package/locale/messages.de.json +59 -54
  93. package/locale/messages.en_GB.json +4 -3
  94. package/locale/messages.es.json +4 -3
  95. package/locale/messages.fr.json +4 -3
  96. package/locale/messages.it.json +34 -28
  97. package/locale/messages.ja_JP.json +4 -4
  98. package/locale/messages.nl_NL.json +188 -18
  99. package/locale/messages.pl.json +7 -10
  100. package/locale/messages.pt.json +4 -3
  101. package/locale/messages.pt_BR.json +4 -3
  102. package/locale/messages.ru.json +4 -3
  103. package/locale/messages.sr_RS.json +4 -3
  104. package/locale/messages.sv_SE.json +4 -3
  105. package/locale/messages.zh-Hans.json +302 -25
  106. package/locale/messages.zh_CN.json +299 -24
  107. package/locale/messages.zh_TW.json +5 -3
  108. package/main-TUINGPOM.js +1 -0
  109. package/package.json +1 -1
  110. package/chunk-2KU5X7TN.js +0 -1
  111. package/chunk-2MIEBBFN.js +0 -1
  112. package/chunk-2PUCHKOK.js +0 -1
  113. package/chunk-2YGOHGD2.js +0 -1
  114. package/chunk-3S7YCGEK.js +0 -1
  115. package/chunk-4FWCJIJ4.js +0 -1
  116. package/chunk-4KEA3KF7.js +0 -1
  117. package/chunk-4NOWNXOS.js +0 -1
  118. package/chunk-5CTM5KYC.js +0 -1
  119. package/chunk-6XI3IP27.js +0 -1
  120. package/chunk-A366Q7F5.js +0 -1
  121. package/chunk-AUR4SBGD.js +0 -1
  122. package/chunk-AVTEJPQ4.js +0 -1
  123. package/chunk-B32YSHV5.js +0 -1
  124. package/chunk-BF2IYOUB.js +0 -1
  125. package/chunk-BK2MSH26.js +0 -1
  126. package/chunk-BZ2XGEV5.js +0 -2
  127. package/chunk-C7EUC34O.js +0 -1
  128. package/chunk-CTAP3SAA.js +0 -1
  129. package/chunk-DJQOPNQJ.js +0 -1
  130. package/chunk-DUCPSWRQ.js +0 -1
  131. package/chunk-E6H2XELA.js +0 -2
  132. package/chunk-EYFTFGJS.js +0 -1
  133. package/chunk-F5Z5ZAIL.js +0 -1
  134. package/chunk-FIOBQPE7.js +0 -1
  135. package/chunk-FSG362SU.js +0 -2
  136. package/chunk-G6VJHFTW.js +0 -1
  137. package/chunk-GMUNZKVL.js +0 -1
  138. package/chunk-H44BDPZE.js +0 -1
  139. package/chunk-HHU5JW5J.js +0 -1
  140. package/chunk-HJBNADRP.js +0 -1
  141. package/chunk-HYQ6MPYI.js +0 -1
  142. package/chunk-IUK3B6GX.js +0 -1
  143. package/chunk-KIIJBHZE.js +0 -1
  144. package/chunk-KXJZEADJ.js +0 -1
  145. package/chunk-M7QQEZOU.js +0 -1
  146. package/chunk-MBYGBVHF.js +0 -1
  147. package/chunk-MTNOIKEK.js +0 -1
  148. package/chunk-MWXDEOZO.js +0 -3
  149. package/chunk-NCDXMDW5.js +0 -1
  150. package/chunk-NSPJ3ZXL.js +0 -1
  151. package/chunk-OJ3H3ZRA.js +0 -2
  152. package/chunk-P6IZFXXC.js +0 -1
  153. package/chunk-QF5WMLMJ.js +0 -1
  154. package/chunk-QONLYWYC.js +0 -4
  155. package/chunk-QWNOIRT4.js +0 -1
  156. package/chunk-R2FAS2C3.js +0 -1
  157. package/chunk-SPMSFKWG.js +0 -1
  158. package/chunk-SWAQMTBY.js +0 -1
  159. package/chunk-TI6AQ6OL.js +0 -1
  160. package/chunk-U562AGPC.js +0 -1
  161. package/chunk-U7GOWS7E.js +0 -1
  162. package/chunk-UCS5RU7N.js +0 -1
  163. package/chunk-WNJSKJGQ.js +0 -1
  164. package/chunk-XJ7KXQWK.js +0 -1
  165. package/chunk-YPJRYB54.js +0 -2
  166. package/chunk-YYJFEUNT.js +0 -1
  167. package/main-L6FT73U5.js +0 -1
Binary file
@@ -0,0 +1 @@
1
+ import{a as _e}from"./chunk-VITGSIEL.js";import{a as le}from"./chunk-OMKP4YQX.js";import"./chunk-5PANYSIG.js";import{h as ae}from"./chunk-YPAJPRDF.js";import{a as oe,b as ie,c as se}from"./chunk-ZDBKQQ47.js";import"./chunk-AL7GMUVT.js";import"./chunk-AWXWGD4T.js";import"./chunk-6Q6SSTBK.js";import"./chunk-POJT4MSX.js";import"./chunk-WJDMMKWE.js";import"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-TC7HZO7D.js";import{B as ee,G as ne,O as te,c as H,e as q,i as Y,k as j,s as Q,u as Z}from"./chunk-RAIB7LN4.js";import{b as W,d as V}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as p,Bc as U,Cb as m,Db as t,Eb as i,Fb as O,Mb as h,Rc as J,Sa as c,Tb as S,Ub as C,Vb as r,Yc as X,Zb as I,_ as g,cb as z,ea as N,fa as P,gc as v,hc as x,kc as K,pa as B,sc as u,tc as d,uc as T,xb as E,yb as f}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var re=["formRef"],ce=()=>["--skip-files-larger-than","dblock-size","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function pe(a,l){a&1&&(S(0,1,1),O(1,"sh-icon",20),C())}function ue(a,l){a&1&&(t(0,"p",21),r(1,6),i())}function de(a,l){a&1&&(t(0,"p"),r(1,7),i())}function Te(a,l){if(a&1){let n=h();t(0,"p"),r(1,8),i(),t(2,"app-timespan",18),T("ngModelChange",function(s){N(n);let o=p();return d(o.optionsFields.backupRetentionTime,s)||(o.optionsFields.backupRetentionTime=s),P(s)}),t(3,"label",30),r(4,9),i()()}if(a&2){let n=p();c(2),m("customId","backupRetentionTime"),u("ngModel",n.optionsFields.backupRetentionTime)}}function Se(a,l){if(a&1){let n=h();t(0,"p"),r(1,10),i(),t(2,"sh-form-field")(3,"label",31),r(4,11),i(),t(5,"input",32),T("ngModelChange",function(s){N(n);let o=p();return d(o.optionsFields.backupRetentionVersions,s)||(o.optionsFields.backupRetentionVersions=s),P(s)}),i()()}if(a&2){let n=p();c(5),u("ngModel",n.optionsFields.backupRetentionVersions)}}function Ce(a,l){a&1&&(t(0,"p"),r(1,12),i())}function me(a,l){if(a&1){let n=h();t(0,"p"),r(1,13),i(),t(2,"sh-form-field")(3,"p"),r(4,14),i(),t(5,"label",33),r(6,15),i(),t(7,"input",34),T("ngModelChange",function(s){N(n);let o=p();return d(o.optionsFields.backupRetentionCustom,s)||(o.optionsFields.backupRetentionCustom=s),P(s)}),i()()}if(a&2){let n=p();c(7),u("ngModel",n.optionsFields.backupRetentionCustom)}}var Oe=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],ge=1024*1024*1024*2,Ne=1024*1024*5,F=class a{#e=g(ae);#n=g(V);#t=g(W);formRef=X.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=B(Oe);exceededVolumeSize=J(()=>{let{size:l,unit:n}=ie(this.optionsFields.remoteVolumeSize());if(l==null||n===null||n===void 0)return!1;let e=l*Math.pow(1024,oe.findIndex(s=>s.value===n));return e>ge||e<Ne});goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){this.#e.submit()}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=z({type:a,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,re,5),n&2&&x()},decls:30,vars:16,consts:()=>{let l;l=$localize`Options`;let n;n=$localize` Remote volume size ${"\uFFFD*7:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#1:1\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*7:1\uFFFD"}:CLOSE_BLOCK_IF:`;let e;e=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#11\uFFFD"}:START_LINK: Read more ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-out${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#11\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let o;o=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#26\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let M;M=$localize`${"\uFFFD#29\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let R;R=$localize` The chosen size is outside the recommended range. This may cause performance issues, excessively large temporary files or other problems. `;let A;A=$localize`Nothing will be deleted. The backup size will grow with each change.`;let b;b=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let y;y=$localize`Time to keep versions`;let $;$=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let k;k=$localize`Number of versions`;let L;L=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let w;w=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let G;G=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let D;return D=$localize`Retention expression`,[l,n,e,s,o,M,R,A,b,y,$,k,L,w,G,D,[1,"title-30"],[1,"remote-volume-wrap"],[3,"ngModelChange","customId","ngModel"],["for","size"],[1,"warning"],[1,"warn"],["href","https://forum.duplicati.com/t/choosing-sizes-in-duplicati/17683","target","_blank",1,"sh-primary"],["suffix",""],["value","value","label","name",3,"options","inlineSearch","isClearable"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(t(0,"section")(1,"h3",16),r(2,0),i(),t(3,"div",17)(4,"app-size",18),T("ngModelChange",function(o){return d(e.optionsFields.remoteVolumeSize,o)||(e.optionsFields.remoteVolumeSize=o),o}),t(5,"label",19),S(6,1),E(7,pe,2,0,"sh-icon",20),C(),i()(),E(8,ue,2,0,"p",21),t(9,"p"),S(10,2),t(11,"a",22),O(12,"sh-icon",23),i(),C(),i()(),t(13,"sh-select",24)(14,"label",19),r(15,3),i(),t(16,"input",25),T("ngModelChange",function(o){return d(e.optionsFields.backupRetention,o)||(e.optionsFields.backupRetention=o),o}),i()(),E(17,de,2,0,"p")(18,Te,5,2)(19,Se,6,1)(20,Ce,2,0,"p")(21,me,8,1),t(22,"app-options-list",26),T("optionsChange",function(o){return d(e.settings,o)||(e.settings=o),o}),i(),t(23,"div",27)(24,"button",28),I("click",function(){return e.goBack()}),S(25,4),O(26,"sh-icon"),C(),i(),t(27,"button",29),I("click",function(){return e.submit()}),S(28,5),O(29,"sh-icon"),C(),i()()()),n&2&&(c(4),m("customId","size"),u("ngModel",e.optionsFields.remoteVolumeSize),c(3),f(e.exceededVolumeSize()?7:-1),c(),f(e.exceededVolumeSize()?8:-1),c(5),m("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),c(3),u("ngModel",e.optionsFields.backupRetention),c(),f(e.optionsFields.backupRetention()==="all"?17:e.optionsFields.backupRetention()==="time"?18:e.optionsFields.backupRetention()==="versions"?19:e.optionsFields.backupRetention()==="smart"?20:e.optionsFields.backupRetention()==="custom"?21:-1),c(5),u("options",e.settings),m("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",U(15,ce)),c(5),K("loader",e.isSubmitting()))},dependencies:[Q,H,j,q,Y,_e,se,le,ee,Z,te,ne],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{F as default};
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-52VBZ35Q.js";import{h as C}from"./chunk-YPAJPRDF.js";import"./chunk-ZDBKQQ47.js";import"./chunk-AL7GMUVT.js";import"./chunk-AWXWGD4T.js";import"./chunk-OYO6MNWR.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as G}from"./chunk-KCVV72VV.js";import"./chunk-G3QBP5CU.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-FFL4DKFK.js";import"./chunk-POJT4MSX.js";import{b as h}from"./chunk-WJDMMKWE.js";import"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as L}from"./chunk-TC7HZO7D.js";import{K as M,L as $,Q as I}from"./chunk-RAIB7LN4.js";import{b as N,c as O,e as B,f as b}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as D,Ac as E,Cb as d,Db as s,Dc as _,Eb as u,F as f,Fb as r,Sa as n,Sc as k,Tb as c,Ub as p,_ as l,cb as R,nc as A,pc as P,xb as T,yb as g}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),A(1),u()),a&2){let t=D();n(),P("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=k(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=R({type:a,selectors:[["app-backup"]],features:[E([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),p(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),p(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),p(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),p(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),p(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",_(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",_(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",_(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",_(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",_(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
@@ -0,0 +1 @@
1
+ import{Y as o}from"./chunk-ZBK64QS2.js";var d=new o("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});export{d as a};
@@ -0,0 +1 @@
1
+ import{a as K}from"./chunk-KCVV72VV.js";import"./chunk-G3QBP5CU.js";import"./chunk-6Q6SSTBK.js";import{a as z}from"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as J}from"./chunk-TC7HZO7D.js";import{B as U,G as x,H as V,V as j,b as E,c as A,e as R,f as b,j as y,o as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-RAIB7LN4.js";import{d as O,e as M}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Bc as N,Cb as p,Db as a,Eb as n,Fb as u,H as g,Sa as l,Tb as D,Ub as h,Vb as _,Yb as I,Zb as d,_ as s,cb as f,kc as P,pa as c,xb as C,yb as S}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),n(),u(3,"input",15),n())}var F=new v,T=class m{#t=s(L);#o=s(w);#n=s(J);#i=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return btoa(i)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#n.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#i.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),n(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),n()(),h(),n()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),n(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),n(),u(14,"input",11),n(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),n(),u(18,"input",13),n()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,B,$,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
@@ -0,0 +1 @@
1
+ import{a as le}from"./chunk-KCVV72VV.js";import"./chunk-G3QBP5CU.js";import"./chunk-6Q6SSTBK.js";import{a as ae}from"./chunk-HVB6ARTT.js";import{c as re}from"./chunk-WJDMMKWE.js";import{a as _e}from"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as oe}from"./chunk-TC7HZO7D.js";import{B as ne,D as ie,b as H,e as Q,i as Y,s as Z,u as ee,z as te}from"./chunk-RAIB7LN4.js";import{d as j,e as q}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as C,B as I,Bc as J,Cb as N,Cc as X,Db as i,Eb as o,Gc as z,H as K,Jc as V,Mb as g,Rc as M,Sa as r,Vb as c,Wb as A,Xb as L,Xc as W,Yb as F,Zb as $,_ as u,cb as y,ea as p,fa as P,kc as x,n as k,nc as E,pa as T,r as U,sc as S,tc as D,uc as h,vc as G,wc as w,xb as m,xc as v,yb as f}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function Ee(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"sh-checkbox",11),E(6," Delete local database "),i(7,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteLocalDb,e)||(a.deleteLocalDb=e),P(e)}),o()()()}if(l&2){let t=C();r(7),S("ngModel",t.deleteLocalDb)}}function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),z(5,"bytes"),o(),i(6,"sh-checkbox",11),E(7," Delete remote files "),i(8,"input",12),h("ngModelChange",function(e){p(t);let a=C();return D(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),P(e)}),o()()()}if(l&2){let t=C(),n=v(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)??0;r(5),A(t.fileCount())(t.fileCount())(V(5,4,e,!0,!0)),L(4),r(3),S("ngModel",t.deleteRemoteFiles)}}var B=class l{#t=u(oe);#n=u(te);#e=u(le);#i=u(j);id=W.required();backup=M(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(U(()=>!0),I(()=>k(!1)))});fileCount=M(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=T(!1);deleteRemoteFiles=T(!1);isDeleting=T(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(_e,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:n}).pipe(K(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=y({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let b;b=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let R;R=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let O;return O=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,b,R,O,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();G(0),i(1,"h3"),c(2,0),o(),m(3,Ee,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),E(10," Export configuration "),i(11,"sh-icon"),E(12,"caret-right"),o()()(),m(13,ue,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),$("click",function(){return p(e),P(n.deleteBackup())}),E(18,"Delete backup"),o()()}if(t&2){let e=w(n.backup()),a=n.noLocalDbResource.value();r(2),A(e==null||e.Backup==null?null:e.Backup.Name),L(2),r(),f(a?3:-1),r(6),N("routerLink",X(8,ce,n.id())),r(4),f(a?13:-1),r(2),N("routerLink",J(10,se)),r(2),x("loader",n.isDeleting())}},dependencies:[ie,ne,ee,Z,H,Q,Y,q,ae],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{B as default};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-H7ZKBS2Q.js";import{i as m}from"./chunk-OJ3H3ZRA.js";import{B as d,F as o,H as p,R as h,Rc as l,V as N,_ as r,n as c,pa as s,x as f}from"./chunk-QONLYWYC.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
1
+ import{a as u}from"./chunk-OYO6MNWR.js";import{b as m}from"./chunk-TC7HZO7D.js";import{B as d,F as o,H as p,R as h,Sc as l,V as N,_ as r,n as c,pa as s,x as f}from"./chunk-ZBK64QS2.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
@@ -1,4 +1,4 @@
1
- import{b as be}from"./chunk-Z27IQRKV.js";import{c as fe}from"./chunk-Z35OG2DV.js";import{i as xe}from"./chunk-OJ3H3ZRA.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{Ac as de,Gb as he,Hb as pe,Ib as ue,Nb as ge,Oa as ae,Sa as oe,Vb as ke,Y as le,_ as E,cb as ce,r as ie}from"./chunk-QONLYWYC.js";import{a as b,b as T}from"./chunk-EUDKD2JW.js";function j(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=j();function Re(r){R=r}var C={exec:()=>null};function u(r,e=""){let n=typeof r=="string"?r:r.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),n=n.replace(t,i),s},getRegex:()=>new RegExp(n,e)};return s}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Me=/^(?:[ \t]*(?:\n|$))+/,Ne=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,De=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Te=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ze=u(Te).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ze=u(Te).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ge=/^[^\n]+/,X=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,He=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",X).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),je=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),M="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",U=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qe=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",U).replace("tag",M).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ae=u(F).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),Fe=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ae).getRegex(),W={blockquote:Fe,code:Ne,def:He,fences:Oe,heading:De,hr:P,html:Qe,lheading:ze,list:je,newline:Me,paragraph:Ae,table:C,text:Ge},me=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),Xe=T(b({},W),{lheading:Ze,table:me,paragraph:u(F).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex()}),Ue=T(b({},W),{html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",U).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:C,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(F).replace("hr",P).replace("heading",` *#{1,6} *[^
1
+ import{b as be}from"./chunk-WJDMMKWE.js";import{b as xe}from"./chunk-TC7HZO7D.js";import{c as fe}from"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Ac as de,Gb as he,Hb as pe,Ib as ue,Nb as ge,Oa as ae,Sa as oe,Vb as ke,Y as le,_ as E,cb as ce,r as ie}from"./chunk-ZBK64QS2.js";import{a as b,b as T}from"./chunk-EUDKD2JW.js";function j(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=j();function Re(r){R=r}var C={exec:()=>null};function u(r,e=""){let n=typeof r=="string"?r:r.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),n=n.replace(t,i),s},getRegex:()=>new RegExp(n,e)};return s}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Me=/^(?:[ \t]*(?:\n|$))+/,Ne=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,De=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Te=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ze=u(Te).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ze=u(Te).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ge=/^[^\n]+/,X=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,He=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",X).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),je=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),M="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",U=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qe=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",U).replace("tag",M).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ae=u(F).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),Fe=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ae).getRegex(),W={blockquote:Fe,code:Ne,def:He,fences:Oe,heading:De,hr:P,html:Qe,lheading:ze,list:je,newline:Me,paragraph:Ae,table:C,text:Ge},me=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),Xe=T(b({},W),{lheading:Ze,table:me,paragraph:u(F).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex()}),Ue=T(b({},W),{html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",U).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:C,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(F).replace("hr",P).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",ze).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),We=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Je=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,Ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,J=/[\s\p{P}\p{S}]/u,Ce=/[^\s\p{P}\p{S}]/u,Ke=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,J).getRegex(),Pe=/(?!~)[\p{P}\p{S}]/u,Ye=/(?!~)[\s\p{P}\p{S}]/u,et=/(?:[^\s\p{P}\p{S}]|~)/u,tt=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Ee=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nt=u(Ee,"u").replace(/punct/g,N).getRegex(),rt=u(Ee,"u").replace(/punct/g,Pe).getRegex(),ve="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",st=u(ve,"gu").replace(/notPunctSpace/g,Ce).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),it=u(ve,"gu").replace(/notPunctSpace/g,et).replace(/punctSpace/g,Ye).replace(/punct/g,Pe).getRegex(),lt=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ce).replace(/punctSpace/g,J).replace(/punct/g,N).getRegex(),at=u(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),ot=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),ct=u(U).replace("(?:-->|$)","-->").getRegex(),ht=u("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),I=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,pt=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",I).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Le=u(/^!?\[(label)\]\[(ref)\]/).replace("label",I).replace("ref",X).getRegex(),Ie=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",X).getRegex(),ut=u("reflink|nolink(?!\\()","g").replace("reflink",Le).replace("nolink",Ie).getRegex(),V={_backpedal:C,anyPunctuation:at,autolink:ot,blockSkip:tt,br:_e,code:Je,del:C,emStrongLDelim:nt,emStrongRDelimAst:st,emStrongRDelimUnd:lt,escape:We,link:pt,nolink:Ie,punctuation:Ke,reflink:Le,reflinkSearch:ut,tag:ht,text:Ve,url:C},gt=T(b({},V),{link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",I).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",I).getRegex()}),Z=T(b({},V),{emStrongRDelimAst:it,emStrongLDelim:rt,url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),kt=T(b({},Z),{br:u(_e).replace("{2,}","*").getRegex(),text:u(Z.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),v={normal:W,gfm:Xe,pedantic:Ue},A={normal:V,gfm:Z,breaks:kt,pedantic:gt},dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=r=>dt[r];function w(r,e){if(e){if(x.escapeTest.test(r))return r.replace(x.escapeReplace,we)}else if(x.escapeTestNoEncode.test(r))return r.replace(x.escapeReplaceNoEncode,we);return r}function ye(r){try{r=encodeURI(r).replace(x.percentDecode,"%")}catch{return null}return r}function $e(r,e){let n=r.replace(x.findPipe,(l,i,a)=>{let o=!1,c=i;for(;--c>=0&&a[c]==="\\";)o=!o;return o?"|":" |"}),s=n.split(x.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(x.slashPipe,"|");return s}function _(r,e,n){let s=r.length;if(s===0)return"";let t=0;for(;t<s;){let l=r.charAt(s-t-1);if(l===e&&!n)t++;else if(l!==e&&n)t++;else break}return r.slice(0,s-t)}function ft(r,e){if(r.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])n++;else if(r[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Se(r,e,n,s,t){let l=e.href,i=e.title||null,a=r[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:r[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:i,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,o}function xt(r,e,n){let s=r.match(n.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
3
3
  `).map(l=>{let i=l.match(n.other.beginningSpace);if(i===null)return l;let[a]=i;return a.length>=t.length?l.slice(t.length):l}).join(`
4
4
  `)}var B=class{options;rules;lexer;constructor(r){this.options=r||R}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_(n,`
@@ -0,0 +1 @@
1
+ import{a as Ie}from"./chunk-OYO6MNWR.js";import{a as Me}from"./chunk-GNJTDWT4.js";import{a as Re}from"./chunk-KCVV72VV.js";import{a as fe}from"./chunk-G3QBP5CU.js";import{a as De}from"./chunk-FFL4DKFK.js";import{a as Pe}from"./chunk-AE7T2DAH.js";import{b as Te}from"./chunk-SVQCV5AE.js";import{b as h}from"./chunk-TC7HZO7D.js";import{B as M,D as Ee,G as me,K as Oe,L as Ne,N as Ae,O as Fe,c as ce,e as Se,i as ue,k as de,s as V,u as pe,w as Ce,z as ge}from"./chunk-RAIB7LN4.js";import{e as re}from"./chunk-XUN5TTJC.js";import{la as le}from"./chunk-NXROYR6L.js";import{$b as E,Ab as ne,Bb as ie,Bc as x,Cb as m,Db as a,Eb as _,Fb as p,Gc as H,H as $,Hc as ae,Ic as _e,Mb as f,Rc as G,Sa as r,Tb as C,Ub as g,Vb as S,Wc as w,Yb as oe,Zb as c,_ as u,cb as A,ea as O,fa as N,jc as se,kc as R,nc as I,pa as d,pc as k,qc as X,sc as b,tc as y,uc as L,xb as F,yb as P,zb as te}from"./chunk-ZBK64QS2.js";function Ge(o,t){if(o&1){let n=f();a(0,"sh-radio",10),c("click",function(){let i=O(n).$implicit,s=E();return N(s.pauseOption.set(i.value))}),I(1),_()}if(o&2){let n=t.$implicit,e=E();R("active",e.pauseOption()===n.value),r(),k(" ",n.label," ")}}var Be=[{label:$localize`5 minutes`,value:"5m"},{label:$localize`10 minutes`,value:"10m"},{label:$localize`15 minutes`,value:"15m"},{label:$localize`30 minutes`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],z=class o{#e=u(h);pauseOptions=d(Be);closed=w();isSubmitting=d(!1);pauseTransfers=d(!1);pauseOption=d(void 0);submit(){this.isSubmitting.set(!0);let t=this.pauseTransfers()||null,n=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:n,pauseTransfers:t}).pipe($(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let t;t=$localize`Pause settings`;let n;n=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let s;return s=$localize` Update settings `,[t,n,e,i,s,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header",5)(1,"h3"),S(2,0),_()(),a(3,"div",6)(4,"div",7),ne(5,Ge,2,3,"sh-radio",8,te),_(),a(7,"div",9)(8,"sh-checkbox",10),c("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),S(9,1),_(),a(10,"sh-alert",11),S(11,2),_()()(),a(12,"footer",12)(13,"button",13),c("click",function(){return e.closed.emit()}),S(14,3),_(),a(15,"button",14),c("click",function(){return e.submit()}),S(16,4),_()()),n&2&&(r(5),ie(e.pauseOptions()),r(3),R("active",e.pauseTransfers()),r(7),R("loader",e.isSubmitting()))},dependencies:[V,Ne,Ee,Ce,M],styles:["[_nghost-%COMP%]{--dialog-p: 1.5rem;display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.check-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:2rem 0 0}"],changeDetection:0})};var he=()=>["/connect/logon"],Ue=()=>["/settings"];function $e(o,t){if(o&1){let n=f();a(0,"div",7),c("click",function(){O(n);let i=E();return N(i.resetAndRetry())}),C(1,0),p(2,"div",8),g(),_()}}function ke(o,t){o&1&&(a(0,"div",6),C(1,1),p(2,"div",9),g(),_()),o&2&&m("routerLink",x(1,he))}function xe(o,t){o&1&&(a(0,"div",6),C(1,2),p(2,"div",8),g(),_()),o&2&&m("routerLink",x(1,he))}function we(o,t){if(o&1){let n=f();a(0,"div",7),c("click",function(){O(n);let i=E();return N(i.claim())}),C(1,3),p(2,"div",10),g(),_()}}function Ve(o,t){o&1&&(a(0,"div",6),C(1,4),p(2,"div",11),g(),_()),o&2&&m("routerLink",x(1,Ue))}var B=class o{#e=u(De);state=this.#e.state;ngOnInit(){this.#e.refreshRemoteControlStatus()}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank")}resetAndRetry(){this.#e.cancelRemoteRegistration(),this.#e.beginRemoteRegistration()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let n;n=$localize` Registering ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize` Click to claim ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let s;return s=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,i,s,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status",3,"click"],[1,"status"],[1,"status","warning","blinking"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&F(0,$e,3,0,"div",5)(1,ke,3,2,"div",6)(2,xe,3,2,"div",6)(3,we,3,0,"div",5)(4,Ve,3,2,"div",6),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",s=e.state()==="registeringfaulted",l=e.state()==="registering",T=e.state()==="registered",D=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";P(s?0:l?1:i?2:T?3:D?4:-1)}},dependencies:[re],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"],changeDetection:0})};var ve={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},ze=["mbps","gbps"],be=8,Z=1024,J=Z*1024,q=J*1024,Q=q*1024,ye=Q*1024,Je={B:1,KB:Z,MB:J,GB:q,TB:Q,PB:ye},Xe=1e3,j=Xe*1e3,K=j*1e3,He=[{threshold:ye,unitPrefix:"PByte"},{threshold:Q,unitPrefix:"TByte"},{threshold:q,unitPrefix:"GByte"},{threshold:J,unitPrefix:"MByte"},{threshold:Z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],U=class o{#e=u(h);closed=w();isSubmitting=d(!1);sizeOptions=d([...ze]);maxUpload=d(0);maxDownload=d(0);maxUploadUnit=d("mbps");maxDownloadUnit=d("mbps");ngOnInit(){this.init()}convertToBitsPerSecondUnits(t,n){let i=t*(Je[n.toUpperCase()]||J)*be;return i===0?{value:0,unit:"mbps"}:i>=K?{value:parseFloat((i/K).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/j).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case"gbps":e=t*K;break;case"mbps":e=t*j;break}let i=e/be;if(i===0)return{valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:s,unitPrefix:l}of He)if(i>=s)return{valueForApi:Math.round(i/s),unitPrefixForApi:l};return{valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),l=i[2],T=this.convertToBitsPerSecondUnits(s,l);this.maxUpload.set(T.value),this.maxUploadUnit.set(T.unit)}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload()}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let s=parseFloat(i[1]),l=i[2],T=this.convertToBitsPerSecondUnits(s,l);this.maxDownload.set(T.value),this.maxDownloadUnit.set(T.unit)}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload()}else this.resetDownload()},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload()}})}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps")}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps")}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e}submit(){this.isSubmitting.set(!0);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),s=this.maxDownload()??0,l=this.maxDownloadUnit();if(e>0){let{valueForApi:T,unitPrefixForApi:D}=this.convertFromBitsPerSecondUnits(e,i),v=ve[D];v?t=`${T}${v}`:console.error(`Invalid unit prefix for API submission (upload): ${D}. Defaulting to empty string.`)}if(s){let{valueForApi:T,unitPrefixForApi:D}=this.convertFromBitsPerSecondUnits(s,l),v=ve[D];v?n=`${T}${v}`:console.error(`Invalid unit prefix for API submission (download): ${D}. Defaulting to empty string.`)}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe($(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.closed.emit(!0)},error:T=>{console.error("Failed to submit throttle settings:",T)}})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let s;s=$localize`Cancel`;let l;return l=$localize` Update settings `,[t,n,e,i,s,l,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(a(0,"header")(1,"h3"),S(2,0),_(),a(3,"p"),S(4,1),_()(),a(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),S(9,2),_(),a(10,"sh-form-field")(11,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),L("ngModelChange",function(s){return y(e.maxUpload,s)||(e.maxUpload=s),s}),_()(),a(12,"sh-select",10)(13,"input",11),L("ngModelChange",function(s){return y(e.maxUploadUnit,s)||(e.maxUploadUnit=s),s}),_()()(),a(14,"div",8)(15,"label"),S(16,3),_(),a(17,"sh-form-field")(18,"input",9),c("paste",function(s){return e.cleanupInputAfterPasting(s)})("keydown",function(s){return e.blockDecimalKeys(s)}),L("ngModelChange",function(s){return y(e.maxDownload,s)||(e.maxDownload=s),s}),_()(),a(19,"sh-select",10)(20,"input",11),L("ngModelChange",function(s){return y(e.maxDownloadUnit,s)||(e.maxDownloadUnit=s),s}),_()()()()(),a(21,"footer",12)(22,"button",13),c("click",function(){return e.closed.emit(!1)}),S(23,4),_(),a(24,"button",14),c("click",function(){return e.submit()}),S(25,5),_()()),n&2&&(r(11),b("ngModel",e.maxUpload),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),b("ngModel",e.maxUploadUnit),r(5),b("ngModel",e.maxDownload),r(),m("isClearable",!1)("options",e.sizeOptions()),r(),b("ngModel",e.maxDownloadUnit),r(4),R("loader",e.isSubmitting()))},dependencies:[V,ce,de,Se,ue,me,Fe,M],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}'],changeDetection:0})};function Ye(o,t){if(o&1&&(a(0,"div"),I(1),_(),p(2,"sh-progress-bar",11)),o&2){let n=E();r(),X("",n.statusData().actionText," - ",n.statusData().statusText),r(),m("value",n.statusData().progress*100)}}function We(o,t){if(o&1&&(a(0,"div",7),I(1),a(2,"sh-icon"),I(3,"clock"),_(),I(4),H(5,"relativeTime"),H(6,"date"),_()),o&2){let n,e=E();r(),k(" ",(n=e.nextBackup().backup)==null||n.Backup==null?null:n.Backup.Name," - "),r(3),X(" ",ae(5,3,e.nextBackup().time)," at ",_e(6,5,e.nextBackup().time,"shortTime")," ")}}function Ke(o,t){o&1&&(a(0,"div",7),S(1,1),_())}function je(o,t){o&1&&(a(0,"div",8),C(1,2),p(2,"sh-spinner"),g(),_()),o&2&&(r(2),se("--spinner-size","12px")("--spinner-thickness","2px"))}function Ze(o,t){o&1&&p(0,"app-remote-connectivity-status")}function qe(o,t){if(o&1){let n=f();a(0,"button",10),c("click",function(){O(n);let i=E(2);return N(i.abort())}),C(1,3),p(2,"sh-icon"),g(),_()}}function Qe(o,t){if(o&1){let n=f();a(0,"button",10),c("click",function(){O(n);let i=E(2);return N(i.stop())}),C(1,4),p(2,"sh-icon"),g(),_()}}function et(o,t){if(o&1&&F(0,qe,3,0,"button",12)(1,Qe,3,0,"button",12),o&2){let n=E();P(n.isStopping()?0:1)}}function tt(o,t){o&1&&(C(0,0,1),p(1,"sh-icon"),g())}function nt(o,t){o&1&&(C(0,0,2),p(1,"sh-icon"),g())}var Le=new Date,ee=class o{#e=u(h);#t=u(Ie);#n=u(ge);#a=u(Re);#i=u(Te);#_=u(Pe);#o=u(fe);minsAgo=Le.setMinutes(Le.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=G(()=>this.#o.serverState()?.ActiveTask?.Item1);isStopping=G(()=>this.runningTask()==this.#s());#s=d(-1);pgState=G(()=>this.#o.serverState());isUsingRelay=this.#i.relayIsEnabled;nextBackup=G(()=>{let t=this.#a.backups();return{backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});openThrottleSettingsDialog(){this.#n.open(U,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(z,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#s.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#_.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t)}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=A({type:o,selectors:[["app-status-bar"]],decls:16,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*11:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*12:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=oe(t);let n;n=$localize`No scheduled tasks`;let e;e=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let s;return s=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,i,s,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"label","label-loading"],[1,"current-backup-actions"],["shButton","",3,"click"],[1,"raised","primary",3,"value"],["shButton",""]]},template:function(n,e){if(n&1&&(a(0,"div",5)(1,"div",6),F(2,Ye,3,3)(3,We,7,8,"div",7)(4,Ke,2,0,"div",7)(5,je,3,4,"div",8),_(),a(6,"div",9),F(7,Ze,1,0,"app-remote-connectivity-status"),F(8,et,2,1),a(9,"button",10),c("click",function(){return e.pauseResume()}),C(10,0),F(11,tt,2,0)(12,nt,2,0),g(),_(),a(13,"button",10),c("click",function(){return e.openThrottleSettingsDialog()}),a(14,"sh-icon"),I(15,"speedometer"),_()()()()),n&2){let i;r(2),P((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:(i=e.serverState())!=null&&i.ActiveTask?5:4),r(5),P(e.isUsingRelay()?-1:7),r(),P(e.runningTask()?8:-1),r(),R("loader",e.isResuming()),r(2),P(e.clientIsRunning()?11:12)}},dependencies:[B,pe,M,Ae,Oe,Me,le],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem;flex:1 0}.current-backup-progress[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{max-width:18.75rem;width:100%}.current-backup-progress[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"],changeDetection:0})};export{ee as a};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-YOP2YAQF.js")},{path:"encryption",loadComponent:()=>import("./chunk-7I3YOHEE.js")},{path:"select-files",loadComponent:()=>import("./chunk-A4RKBIZK.js")},{path:"options",loadComponent:()=>import("./chunk-ZCH336WN.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-TZQE4VY2.js")}],t=o;export{t as default};
@@ -0,0 +1 @@
1
+ import{a as _e}from"./chunk-52VBZ35Q.js";import"./chunk-OYO6MNWR.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as se}from"./chunk-KCVV72VV.js";import"./chunk-G3QBP5CU.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-FFL4DKFK.js";import{a as le,b as m}from"./chunk-WJDMMKWE.js";import{a as b}from"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as oe}from"./chunk-TC7HZO7D.js";import{B as ae,G as ie,X as ne,c as Q,e as Y,i as Z,s as x,u as ee,z as te}from"./chunk-RAIB7LN4.js";import{b as q,e as j}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Cb as d,D as G,Db as n,Eb as i,F as g,Fb as c,G as L,H as p,Rc as E,Sa as _,Sc as P,Tb as u,Ub as h,Vb as A,Wb as H,Xb as J,Zb as T,_ as C,cb as V,kc as F,mc as K,nc as D,pa as s,r as y,sc as X,tc as z,uc as W,xb as w,yb as U}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";function re(r,t){r&1&&(n(0,"sh-icon",19),D(1,"spinner"),i())}function ce(r,t){r&1&&(n(0,"sh-icon",20),D(1,"check"),i())}function de(r,t){r&1&&(n(0,"sh-icon",21),D(1,"warning"),i()),r&2&&d("shTooltip","File not found")}function ue(r,t){let a=le(r).pipe(G(t),L());return m(a,{initialValue:r()})}var N=class r{#o=C(q);#s=C(se);#e=C(oe);#a=C(te);#t=s("");backupId=m(this.#o.params.pipe(y(t=>t.id)));activeBackup=E(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=s("");lastValidatedPath=s("");isValidatedPath=E(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=E(()=>this.backupFilePath()!==this.#t());isValidatingPath=s(!1);#i=ue(this.backupFilePath,500);#n=s(!1);isWaitingForValidation=E(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=P(()=>{let t=this.#i(),a=this.activeBackup(),e=this.#n();t!==""&&(this.isValidatingPath.set(!0),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(g(1),p(()=>this.isValidatingPath.set(!1))).subscribe(()=>this.lastValidatedPath.set(t)))});isRestoring=s(!1);isRepairing=s(!1);isDeleting=s(!1);isSavingDbPath=s(!1);isSavingAndRepairing=s(!1);isMovingDb=s(!1);isCreatingBugReport=s(!1);createdReport=s(!1);activeBackupEffect=P(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t)}}):this.doDeleteDatabase(t)}doDeleteDatabase(t=null){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),p(()=>this.isDeleting.set(!1))).subscribe(()=>{this.lastValidatedPath.set(""),t?.()})}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase()}):this.doRepairDatabase()}doRepairDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t())}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(b,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t)}}):this.doSaveDatabasePath(t)}doSaveDatabasePath(t=null){this.isSavingDbPath.set(!0);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(p(()=>this.isSavingDbPath.set(!1))).subscribe(()=>{this.#t.set(a),t?.()})}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),p(()=>this.isSavingAndRepairing.set(!1))).subscribe()))}moveDatabasePath(){this.isMovingDb.set(!0);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(p(()=>this.isMovingDb.set(!1))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t)})}createErrorReport(){this.isCreatingBugReport.set(!0),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(p(()=>this.isCreatingBugReport.set(!1))).subscribe({next:()=>{this.createdReport.set(!0),window.setTimeout(()=>this.createdReport.set(!1),3e3)}})}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=V({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let o;o=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Restore (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,o,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){if(a&1&&(c(0,"app-status-bar"),n(1,"section")(2,"div",14)(3,"button",15),u(4,0),c(5,"sh-icon"),h(),i()(),n(6,"article")(7,"h1"),A(8,1),i(),n(9,"p"),A(10,2),i()(),n(11,"article")(12,"h2"),A(13,3),i(),n(14,"p"),A(15,4),i(),n(16,"div",16)(17,"button",17),T("click",function(){return e.repairDatabase()}),u(18,5),c(19,"sh-icon"),h(),i(),n(20,"button",17),T("click",function(){return e.deleteDatabase()}),u(21,6),c(22,"sh-icon"),h(),i(),n(23,"button",17),T("click",function(){return e.restoreDatabase()}),u(24,7),c(25,"sh-icon"),h(),i(),n(26,"button",17),T("click",function(){return e.createErrorReport()}),u(27,8),c(28,"sh-icon"),h(),i()()(),n(29,"article")(30,"h2"),A(31,9),i(),n(32,"sh-form-field")(33,"input",18),W("ngModelChange",function(S){return z(e.backupFilePath,S)||(e.backupFilePath=S),S}),i(),w(34,re,2,0,"sh-icon",19)(35,ce,2,0,"sh-icon",20)(36,de,2,1,"sh-icon",21),i(),n(37,"div",22)(38,"button",17),T("click",function(){return e.resetDatabasePath()}),u(39,10),c(40,"sh-icon"),h(),i(),n(41,"button",17),T("click",function(){return e.saveDatabasePath()}),u(42,11),c(43,"sh-icon"),h(),i(),n(44,"button",17),T("click",function(){return e.saveAndRepairDatabasePath()}),u(45,12),c(46,"sh-icon"),h(),i(),n(47,"button",17),T("click",function(){return e.moveDatabasePath()}),u(48,13),c(49,"sh-icon"),h(),i()()()()),a&2){let o;_(8),H((o=e.activeBackup())==null||o.Backup==null?null:o.Backup.Name),J(8),_(9),F("loader",e.isRepairing()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),F("loader",e.isDeleting()),d("disabled",!e.isValidatedPath()||e.pathHasChanged()),_(3),F("loader",e.isRestoring()),d("disabled",e.pathHasChanged()),_(3),F("loader",e.isCreatingBugReport()),d("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),_(6),K(e.isValidatedPath()?"success":"error"),_(),X("ngModel",e.backupFilePath),_(),U(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),_(4),d("disabled",!e.pathHasChanged()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),_(3),d("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation())}},dependencies:[x,Q,Y,Z,_e,ae,ie,ee,ne,j],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{N as default};
@@ -0,0 +1 @@
1
+ import{a as Y,f as _n}from"./chunk-5PANYSIG.js";import{a as an}from"./chunk-52VBZ35Q.js";import{a as on}from"./chunk-OYO6MNWR.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import{a as tn}from"./chunk-KCVV72VV.js";import"./chunk-G3QBP5CU.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-FFL4DKFK.js";import"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import{a as nn}from"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{b as en}from"./chunk-TC7HZO7D.js";import{A as Ve,B as Ue,C as Ke,E as je,F as We,J as qe,K as Qe,R as Ye,S as Ze,u as ze}from"./chunk-RAIB7LN4.js";import{e as we}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as u,Ab as w,Bb as z,Bc as q,Cb as d,Cc as D,Db as o,Eb as t,Fb as T,Gc as M,H as K,Hc as G,Ic as $,Jb as O,Kb as N,Kc as Q,Lb as f,Mb as H,Pa as j,Sa as a,Sc as Je,Tb as r,Ub as c,Vb as E,Wb as A,Xb as h,Yb as W,Zb as R,_ as v,cb as xe,ea as P,fa as I,hb as m,ib as ke,ic as V,kc as L,nc as s,pa as X,pc as S,sb as ye,sc as Be,tb as be,tc as ve,uc as Xe,xb as g,yb as p,zb as J}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var rn=()=>[import("./chunk-PKK4MIRQ.js").then(e=>e.NgTemplateOutlet),je,Ze,Ye,import("./chunk-LH6XLRJU.js").then(e=>e.DurationFormatPipe),import("./chunk-PIMTQKQK.js").then(e=>e.BytesPipe),import("./chunk-Z4MDYLVI.js").then(e=>e.RelativeTimePipe)],cn=()=>["/add-backup"],sn=()=>["/restore"],ln=e=>({$implicit:e}),un=e=>["/backup",e],Fn=e=>["/restore",e],Cn=e=>["/backup",e,"export"],Tn=e=>["/backup",e,"delete"],En=e=>["/backup",e,"database"],dn=e=>["/backup",e,"commandline"],gn=e=>["/backup",e,"log"];function pn(e,i){if(e&1){let n=H();o(0,"button",54),R("click",function(){let F=P(n).$implicit,C=u(2);return I(C.sortByColumn.set(F.value))}),E(1,15),t()}if(e&2){let n=i.$implicit,_=u(2);L("active",_.orderBy()===n.value),a(),A(n.label),h(1)}}function Sn(e,i){if(e&1&&(o(0,"sh-menu",55)(1,"button",56),r(2,14),T(3,"strong")(4,"sh-icon"),c(),t(),O(5,57),w(6,pn,2,3,"button",58,J),N(),t()),e&2){let n=u();a(4),A(n.orderBy()),h(2),a(2),z(n.sortOrderOptions())}}function On(e,i){if(e&1&&(o(0,"p")(1,"span"),E(2,21),t(),s(3),M(4,"relativeTime"),t()),e&2){let n=u().$implicit,_=u(4);a(3),S(" ",$(4,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function Nn(e,i){if(e&1&&(s(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(4);S(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function mn(e,i){e&1&&(O(0),s(1,"-"),N())}function Mn(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Pn(e,i){e&1&&(O(0),s(1,"-"),N())}function In(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function fn(e,i){e&1&&(O(0),s(1,"-"),N())}function Dn(e,i){e&1&&(o(0,"sh-chip",65),E(1,22),t())}function Rn(e,i){e&1&&f(0)}function $n(e,i){if(e&1&&(o(0,"div",61)(1,"div",48)(2,"h3"),s(3),o(4,"sh-chip"),T(5,"img",62),s(6),t()(),o(7,"p")(8,"span"),E(9,16),t(),s(10),M(11,"relativeTime"),t(),g(12,On,5,4,"p"),o(13,"p")(14,"span"),E(15,17),t(),g(16,Nn,2,4)(17,mn,2,0,"ng-container"),t(),o(18,"p")(19,"span"),E(20,18),t(),g(21,Mn,2,3)(22,Pn,2,0,"ng-container"),t(),o(23,"p")(24,"span"),E(25,19),t(),g(26,In,2,3)(27,fn,2,0,"ng-container"),t()(),o(28,"div",63)(29,"sh-chip",64),E(30,20),t(),g(31,Dn,2,0,"sh-chip",65),t(),o(32,"div",52),m(33,Rn,1,0,"ng-container",66),t()()),e&2){let n=i.$implicit,_=u(4),F=V(51);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),d("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(4),S(" ",$(11,13,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?12:-1),a(4),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?16:17),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?21:22),a(5),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?26:27);let C=_.getBackupVersionCount(n);a(4),A(C)(C),h(30),a(),p(n.Backup.ExternalID?31:-1),a(2),d("ngTemplateOutlet",F)("ngTemplateOutletContext",D(16,ln,n))}}function An(e,i){if(e&1&&w(0,$n,34,18,"div",61,J),e&2){let n=u(3);z(n.backups())}}function hn(e,i){e&1&&(O(0),E(1,23),N())}function Ln(e,i){if(e&1&&(o(0,"div",59),g(1,An,2,0)(2,hn,2,0,"ng-container"),t()),e&2){let n=u(2);a(),p(n.backups().length?1:2)}}function Hn(e,i){e&1&&(r(0,24,1),f(1),c())}function Gn(e,i){e&1&&(r(0,25,1),f(1),c())}function xn(e,i){e&1&&(r(0,26,1),f(1),c())}function kn(e,i){e&1&&(r(0,27,1),f(1),c())}function yn(e,i){e&1&&(r(0,28,1),f(1),c())}function bn(e,i){e&1&&(r(0,29,1),f(1),c())}function Bn(e,i){e&1&&(r(0,30,1),f(1),c())}function vn(e,i){if(e&1&&(s(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDate,_.timeType()==="actual")," ")}}function Xn(e,i){e&1&&(O(0),s(1,"-"),N())}function Jn(e,i){if(e&1&&(s(0),M(1,"relativeTime")),e&2){let n=u().$implicit,_=u(3);S(" ",$(1,1,n.Schedule.Time,_.timeType()==="actual")," ")}}function wn(e,i){e&1&&(O(0),s(1,"-"),N())}function zn(e,i){if(e&1&&(s(0),M(1,"durationFormat")),e&2){let n=u().$implicit,_=u(3);S(" ",$(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Vn(e,i){e&1&&(O(0),s(1,"-"),N())}function Un(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Kn(e,i){e&1&&(O(0),s(1,"-"),N())}function jn(e,i){if(e&1&&(s(0),M(1,"bytes")),e&2){let n=u().$implicit;S(" ",G(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Wn(e,i){e&1&&(O(0),s(1,"-"),N())}function qn(e,i){e&1&&f(0)}function Qn(e,i){if(e&1&&(o(0,"tr")(1,"td"),s(2),t(),o(3,"td")(4,"sh-chip",53),T(5,"img",62),s(6),t()(),o(7,"td"),g(8,vn,2,4)(9,Xn,2,0,"ng-container"),t(),o(10,"td"),g(11,Jn,2,4)(12,wn,2,0,"ng-container"),t(),o(13,"td"),g(14,zn,2,4)(15,Vn,2,0,"ng-container"),t(),o(16,"td"),g(17,Un,2,3)(18,Kn,2,0,"ng-container"),t(),o(19,"td"),g(20,jn,2,3)(21,Wn,2,0,"ng-container"),t(),o(22,"td")(23,"span"),E(24,33),t()(),o(25,"td"),m(26,qn,1,0,"ng-container",66),t()()),e&2){let n=i.$implicit,_=u(3),F=V(51);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),d("src",_.getBackendIcon(n.Backup.TargetURL),j),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDate?8:9),a(3),p(!(n==null||n.Schedule==null)&&n.Schedule.Time?11:12),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?14:15),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?17:18),a(3),p(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21);let C=_.getBackupVersionCount(n);a(4),A(C)(C),h(24),a(2),d("ngTemplateOutlet",F)("ngTemplateOutletContext",D(12,ln,n))}}function Yn(e,i){if(e&1){let n=H();o(0,"sh-table",67),Xe("sortByColumnChange",function(F){P(n);let C=u(2);return ve(C.sortByColumn,F)||(C.sortByColumn=F),I(F)}),o(1,"tr",68)(2,"th",69),r(3,24),m(4,Hn,2,0,"ng-container",70),c(),t(),o(5,"th",71),r(6,25),m(7,Gn,2,0,"ng-container",70),c(),t(),o(8,"th",72),r(9,26),m(10,xn,2,0,"ng-container",70),c(),t(),o(11,"th",73),r(12,27),m(13,kn,2,0,"ng-container",70),c(),t(),o(14,"th",74),r(15,28),m(16,yn,2,0,"ng-container",70),c(),t(),o(17,"th",75),r(18,29),m(19,bn,2,0,"ng-container",70),c(),t(),o(20,"th",76),r(21,30),m(22,Bn,2,0,"ng-container",70),c(),t(),o(23,"th"),E(24,31),t(),o(25,"th"),E(26,32),t()(),w(27,Qn,27,14,"tr",null,J),t()}if(e&2){let n=u(2),_=V(53);d("data",n.backups())("loading",n.backupsLoading()),Be("sortByColumn",n.sortByColumn),a(4),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(3),d("ngTemplateOutlet",_),a(5),z(n.backups())}}function Zn(e,i){if(e&1&&g(0,Ln,3,1,"div",59)(1,Yn,29,10,"sh-table",60),e&2){let n=u();p(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function et(e,i){e&1&&(o(0,"div",77),T(1,"sh-progress-bar",78),o(2,"div",48)(3,"h3"),E(4,34),t()()())}function nt(e,i){e&1&&E(0,35,1)}function tt(e,i){e&1&&(o(0,"sh-icon"),s(1,"check"),t())}function it(e,i){e&1&&(o(0,"sh-icon"),s(1,"dots-three-vertical"),t())}function ot(e,i){if(e&1){let n=H();o(0,"button",79),R("click",function(){let F=P(n).$implicit,C=u();return I(C.startBackup(F.Backup.ID))}),r(1,35),T(2,"sh-icon"),g(3,nt,1,0),c(),t(),o(4,"button",80)(5,"sh-icon"),s(6,"pencil-simple"),t()(),o(7,"sh-menu")(8,"button",49),g(9,tt,2,0,"sh-icon")(10,it,2,0,"sh-icon"),t(),O(11,57),o(12,"h3",81),s(13,"Operations"),t(),o(14,"button",82),r(15,36),T(16,"sh-icon"),c(),t(),o(17,"button",82),r(18,37),T(19,"sh-icon"),c(),t(),o(20,"button",82),r(21,38),T(22,"sh-icon"),c(),t(),T(23,"sh-divider"),o(24,"h3",81),E(25,39),t(),o(26,"button",82),r(27,40),T(28,"sh-icon"),c(),t(),o(29,"button",54),R("click",function(){let F=P(n).$implicit,C=u();return I(C.verifyFiles(F.Backup.ID))}),r(30,41),T(31,"sh-icon"),c(),t(),o(32,"button",54),R("click",function(){let F=P(n).$implicit,C=u();return I(C.compressBackup(F.Backup.ID))}),r(33,42),T(34,"sh-icon"),c(),t(),o(35,"button",82),r(36,43),T(37,"sh-icon"),c(),t(),T(38,"sh-divider"),o(39,"h3",81),E(40,44),t(),o(41,"button",82),r(42,45),T(43,"sh-icon"),c(),t(),N(),t()}if(e&2){let n=i.$implicit,_=u();L("loader",_.startingBackup()===n.Backup.ID),a(3),p(_.viewMode()==="list"?3:-1),a(),d("routerLink",D(15,un,n.Backup.ID)),a(4),L("loader",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),p(_.successId()===n.Backup.ID?9:10),a(5),d("routerLink",D(17,Fn,n.Backup.ID)),a(3),d("routerLink",D(19,Cn,n.Backup.ID)),a(3),d("routerLink",D(21,Tn,n.Backup.ID)),a(6),d("routerLink",D(23,En,n.Backup.ID)),a(9),d("routerLink",D(25,dn,n.Backup.ID)),a(6),d("routerLink",D(27,gn,n.Backup.ID))}}function _t(e,i){e&1&&(o(0,"sh-icon",83),s(1,"funnel-simple"),t(),o(2,"sh-icon",84),s(3,"sort-ascending"),t(),o(4,"sh-icon",85),s(5,"sort-descending"),t())}var at={file:{Display:$localize`Local`,Icon:null}},Z=class e{#n=v(en);#t=v(on);#e=v(tn);MISSING_BACKUP_NAME=$localize`Backup name missing`;sortOrderOptions=this.#e.orderByOptions;orderBy=this.#e.orderBy;backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;startingBackup=this.#e.startingBackup;deletingBackup=this.#e.deletingBackup;timeType=this.#e.timeType;viewMode=nn("viewMode","list");sortByColumn=X(this.#e.orderBy());loadingId=X(null);successId=X(null);sortEffect=Je(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}setOrderBy(i){this.#e.setOrderBy(i)}setTimeType(i){this.#e.setTimeType(i)}startBackup(i){this.#t.resumeDialogCheck(()=>this.#e.startBackup(i))}getBackendIcon(i){if(!i)return"";let n=i.split("://")[0];return Y(n).icon??"database"}getBackendType(i){if(!i)return"";let n=i.split("://")[0],_=Y(n);if(!_)return"";let F=at[_.key];if(F?.Display)return F.Display;if(_.key==="s3"){let C="http://null?"+i.split("?")[1],x=new URL(C).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[k,y]of Object.entries(_n))if(x.endsWith(k))return y}return _.displayName}getBackupVersionCount(i){return parseInt(i?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdVerify({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(i){this.loadingId.set(i),this.#n.postApiV1BackupByIdCompact({id:i}).pipe(K(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(i),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=xe({type:e,selectors:[["app-home"]],decls:54,vars:11,consts:()=>{let i;i=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Add ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restores`;let C;C=$localize`Recover your files from any backup set.`;let U;U=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let x;x=$localize`My backups`;let k;k=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let y;y=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ee;ee=$localize` Time: ${"\uFFFD#38\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ne;ne=$localize`Relative time`;let te;te=$localize`Actual time`;let ie;ie=$localize` Order by: ${"\uFFFD#3\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:arrows-down-up${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let oe;oe=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let _e;_e=$localize`Last successful backup:`;let ae;ae=$localize`Duration:`;let le;le=$localize`Source:`;let re;re=$localize`Destination:`;let b;b=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,b=W(b,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ce;ce=$localize` ${b}:ICU@@6502601490918455200: `;let se;se=$localize`Next scheduled run:`;let ue;ue=$localize`Externally managed`;let Fe;Fe=$localize`No backups founds`;let Ce;Ce=$localize` Backup ${"\uFFFD*4:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*4:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Te;Te=$localize` Type ${"\uFFFD*7:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*7:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Ee;Ee=$localize` Last backup ${"\uFFFD*10:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*10:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let de;de=$localize` Next run ${"\uFFFD*13:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*13:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let ge;ge=$localize` Duration ${"\uFFFD*16:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*16:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let pe;pe=$localize` Source ${"\uFFFD*19:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*19:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Se;Se=$localize` Destination ${"\uFFFD*22:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD/#1:1\uFFFD\uFFFD/*22:1\uFFFD"}:CLOSE_TAG_NG_CONTAINER:`;let Oe;Oe=$localize`Version`;let Ne;Ne=$localize`Actions`;let B;B=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,B=W(B,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let me;me=$localize` ${B}:ICU@@3521773141017690117: `;let Me;Me=$localize`Loading backups...`;let Pe;Pe=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Start ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:`;let Ie;Ie=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let fe;fe=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let De;De=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Re;Re=$localize`Advanced`;let $e;$e=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ae;Ae=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let he;he=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Le;Le=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let He;He=$localize`Reporting`;let Ge;return Ge=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],i,n,_,F,C,U,x,k,y,ee,ne,te,ie,oe,_e,ae,le,re,ce,se,ue,Fe,Ce,Te,Ee,de,ge,pe,Se,Oe,Ne,me,Me,Pe,Ie,fe,De,Re,$e,Ae,he,Le,He,Ge,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small"],["type","button",3,"click"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"active"],[1,"backups"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","success"],[1,"simple","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["table-header",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){if(n&1){let F=H();T(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",46),T(4,"img",47),o(5,"div",48)(6,"h3"),E(7,2),t(),o(8,"p"),E(9,3),t()(),o(10,"button",49),r(11,4),T(12,"sh-icon"),c(),t()(),o(13,"sh-card",46),T(14,"img",50),o(15,"div",48)(16,"h3"),E(17,5),t(),o(18,"p"),E(19,6),t()(),o(20,"button",49),r(21,7),T(22,"sh-icon"),c(),t()()(),o(23,"div",51)(24,"h2"),O(25),E(26,8),N(),o(27,"div",52)(28,"sh-button-group",53)(29,"button",54),R("click",function(){return P(F),I(_.viewMode.set("list"))}),r(30,9),T(31,"sh-icon"),c(),t(),o(32,"button",54),R("click",function(){return P(F),I(_.viewMode.set("details"))}),r(33,10),T(34,"sh-icon"),c(),t()(),o(35,"sh-menu",55)(36,"button",56),r(37,11),T(38,"strong")(39,"sh-icon"),c(),t(),O(40,57),o(41,"button",54),R("click",function(){return P(F),I(_.setTimeType("relative"))}),E(42,12),t(),o(43,"button",54),R("click",function(){return P(F),I(_.setTimeType("actual"))}),E(44,13),t(),N(),t(),g(45,Sn,8,1,"sh-menu",55),t()(),ke(46,Zn,2,1)(47,et,5,0),ye(48,46,rn,null,47),t()(),m(50,ot,44,29,"ng-template",null,0,Q)(52,_t,6,0,"ng-template",null,1,Q)}n&2&&(a(3),d("routerLink",q(9,cn)),a(10),d("routerLink",q(10,sn)),a(16),L("active",_.viewMode()==="list"),a(3),L("active",_.viewMode()==="details"),a(7),A(_.timeType()),h(37),a(6),p(_.viewMode()==="list"?45:-1),a(3),be(!_.backupsLoading()))},dependencies:[we,an,Ke,Ue,ze,We,qe,Qe,Ve],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{padding:0 2rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}.backup[_ngcontent-%COMP%] .tags[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:.5rem}.provider-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.sortable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.sortable[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{margin-left:.5rem;font-size:1rem;justify-self:flex-end;display:none}.sortable[_ngcontent-%COMP%]:not(.sort-asc):not(.sort-desc) sh-icon.filter[_ngcontent-%COMP%]{display:block}.sortable.sort-asc[_ngcontent-%COMP%] sh-icon.asc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.sortable.sort-desc[_ngcontent-%COMP%] sh-icon.desc[_ngcontent-%COMP%]{display:block;color:var(--base-12)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{Z as default};
@@ -0,0 +1,2 @@
1
+ import{b as N}from"./chunk-TC7HZO7D.js";import{d as b,r as L}from"./chunk-RAIB7LN4.js";import{H as E,Rc as U,V as A,_ as w,pa as k,r as S}from"./chunk-ZBK64QS2.js";import{a as s,b as D}from"./chunk-EUDKD2JW.js";var h=class{constructor(t){this.loader=t}_data=k(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(E(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var g=class e{#e=w(N);#o=new h(()=>this.getS3Config("Providers"));#n=new h(()=>this.getS3Config("Regions"));#r=new h(()=>this.getS3Config("RegionHosts"));#i=new h(()=>this.getS3Config("StorageClasses"));#s=U(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new h(()=>this.getStorjConfig("Satellites"));#l=new h(()=>this.getStorjConfig("AuthenticationMethods"));#c=new h(()=>this.getOpenstackConfig("Providers"));#p=new h(()=>this.getOpenstackConfig("Versions"));#u=new h(()=>this.getGcsConfig("Locations"));#m=new h(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#s}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#i.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(S(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(S(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(S(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(S(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}static \u0275fac=function(o){return new(o||e)};static \u0275prov=A({token:e,factory:e.\u0275fac,providedIn:"root"})};var i=new L,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},G={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>i.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return s({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},C=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>i.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return s({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"ssh",displayName:$localize`SSH`,description:$localize`Store backups with SSH.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>i.control(e??"",[b.required,b.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"amazon aws spaces cloud mycloudyplace impossible scaleway hosteurope dunkel dreamhost dincloud poli systems ibm cos storadera wasabi infomaniak infomaniak \u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 seagate lyve digitalocean backblaze b2 cloudian minio linode bunnycdn microsoft azure google storage ibm oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3AllProviders(),isMandatory:!0,formElement:e=>i.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>k([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(g).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>k([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return s({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>i.control(e??"",[b.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return F(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{server:a,path:u}=m(t);return s({destinationType:e,dynamic:s({"rclone-remote-repository":a,"rclone-remote-path":u},n)},r)}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>i.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(g).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return s({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return F(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(s({},e),{advanced:D(s({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],s({destinationType:e,custom:{path:d(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>i.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:a}=m(t);return s({destinationType:e,custom:{server:r,port:n,path:a}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>i.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>i.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,V(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),a=n.split("/")[0],u=n.split("/").slice(1).join("/");return s({destinationType:e,custom:{server:r,share:a,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:G.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>i.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>i.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>s({destinationType:e,custom:{path:d(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${v([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],s({destinationType:e},r)}}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"Enumeration",loadOptions:e=>e.get(g).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${v([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],s({destinationType:e},r)}}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>i.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>i.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(s({},e),{advanced:D(s({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],s({destinationType:e,custom:{path:d(t),bucket:n}},r)}}}],pe={".amazonaws.com":"Amazon S3",".mycloudyplace.com":"MyCloudyPlace S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3"};var z=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?([^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return F(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function F(e,t,o,r,n){let a=v(n),u=encodeURIComponent(x(t)),$=u==""?"":u+T(o),y=r??"",M=y.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,f=V($,B(y));return`${M}${f}${a}`}function j(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function V(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function B(e){return e.split("/").map(encodeURIComponent).join("/")}function d(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new z(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function x(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function T(e){return e==null||e===""?"":":"+e.toString()}function P(e){return C.find(o=>o.key===e||o.customKey===e)??C.find(o=>`${o.key}s`===e)??null??s({key:e,displayName:e},G)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.hostname),port:e.port,path:j(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=P(e);return t.searchParams.forEach((a,u)=>{n?.dynamicFields?.some(y=>y===u||y?.name===u)?r[u]=decodeURIComponent(a):o[u]=decodeURIComponent(a)}),{advanced:o,dynamic:r}}function v(e,t=!1){let o=e.map(([n,a])=>`${n}=${a?encodeURIComponent(a.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function he(e){let t=e.destinationType??"";return P(t)?.mapper.to(e)??""}function ge(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`:"http://"+o;if(!o)return null;if(o.startsWith("%")&&t==="file")return P(t).mapper.from(t,new z("http://localhost"),e);let n=P(t),a="";`${n.key}s`===t&&(a+=r.indexOf("?")===-1?"?":"&",a+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(a+=a.indexOf("?")===-1?"?":"&",a+=o.split("?")[1]??"");try{let u=new z(r+a);if(u.host==="undefined")return null;let $=o.split("?")[0].split("/")[0],y=!isNaN(Number(u.host.replaceAll(".",""))),O=$.split("."),M=O.length===4&&O.every(f=>f.length&&f.length<=3&&!isNaN(Number(f))&&parseInt(f)<=255);return y&&!M?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+a,u),null}}function I(e){return typeof e!="string"||!e.trim()?[]:e.split(`
2
+ `).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function ye(e){return I(e).map(([t,o])=>({Name:t,Value:o}))}function fe(e){return Object.fromEntries(I(e))}export{P as a,he as b,ge as c,ye as d,fe as e,pe as f};
@@ -0,0 +1,3 @@
1
+ import{a as Me}from"./chunk-VITGSIEL.js";import"./chunk-OMKP4YQX.js";import"./chunk-5PANYSIG.js";import{a as ge}from"./chunk-52VBZ35Q.js";import{h as F}from"./chunk-YPAJPRDF.js";import"./chunk-ZDBKQQ47.js";import{a as Ee}from"./chunk-AL7GMUVT.js";import"./chunk-AWXWGD4T.js";import{a as Ne}from"./chunk-OYO6MNWR.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-KCVV72VV.js";import"./chunk-G3QBP5CU.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-FFL4DKFK.js";import"./chunk-POJT4MSX.js";import{b as A}from"./chunk-WJDMMKWE.js";import"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import"./chunk-SVQCV5AE.js";import{a as pe,b as ue}from"./chunk-TC7HZO7D.js";import{B as me,F as _e,G as de,K as Ce,O as ce,c as Q,e as Y,f as Z,j as ee,n as te,o as ne,p as oe,q as ie,r as ae,s as re,t as se,u as le}from"./chunk-RAIB7LN4.js";import{b as j,d as H,e as q}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as g,Ab as B,Ac as V,Bb as G,Bc as z,Cb as u,Db as a,Eb as n,Fb as r,Jb as S,Kb as T,Mb as k,Sa as m,Sc as W,Tb as f,Ub as O,Vb as C,Wb as y,Xb as v,Zb as U,_ as p,cb as D,ea as E,fa as M,kc as x,pa as L,sc as w,tc as K,uc as J,xb as R,yb as $,zb as b,zc as X}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Se=()=>["backup"];function Te(s,t){s&1&&r(0,"sh-progress-bar",11)}function fe(s,t){if(s&1&&(a(0,"sh-form-field"),r(1,"input",30),n()),s&2){let e=t.$implicit,l=t.$index;m(),u("id",X("filter-",l))("formControl",e)}}function Oe(s,t){if(s&1){let e=k();a(0,"form",12)(1,"sh-select",13)(2,"label",14),C(3,1),n(),r(4,"input",15),n(),a(5,"sh-form-field")(6,"label",16),C(7,2),n(),r(8,"textarea",17),n(),a(9,"sh-form-field")(10,"label",18),C(11,3),n(),r(12,"textarea",19),n()(),a(13,"sh-divider"),C(14,4),n(),a(15,"form",12)(16,"sh-form-field")(17,"label",20),C(18,5),n(),r(19,"input",21),n(),a(20,"sh-form-field")(21,"label",22),C(22,6),n(),r(23,"input",23),n(),a(24,"app-toggle-card",24),S(25,25),C(26,7),T(),S(27,26),B(28,fe,2,3,"sh-form-field",null,b),T(),n()(),a(30,"app-options-list",27),J("optionsChange",function(i){E(e);let c=g();return K(c.settings,i)||(c.settings=i),M(i)}),n(),a(31,"div",28)(32,"button",29),U("click",function(){E(e);let i=g();return M(i.submit())}),f(33,8),r(34,"sh-icon"),O(),n()()}if(s&2){let e=g();u("formGroup",e.baseCmdForm),m(),u("options",e.commandOptions()??z(10,Se))("inlineSearch",!0),m(14),u("formGroup",e.standardFields),m(9),u("disallowToggle",!0),m(4),G(e.standardFields.controls.filters.controls),m(2),w("options",e.settings),u("hasFreeTextSettings",!0),m(2),x("loader",e.isSubmitting()),m(2),y(e.baseCmdForm.value.command),v(33)}}var _=new ae,P=class s{#e=p(F);#t=p(ue);#n=p(H);#o=p(j);#i=p(pe);#a=p(Ne);#r=A(this.#o.params);commandOptions=A(this.#i.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#l=W(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#s())}#s(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",l=t.arguments?.split(`
2
+ `).filter(o=>o.length>0)??[],i=this.standardFields.value,c=i.filters??[],N=[t.command,e,...l,`--backup-name=${i["backup-name"]}`,`--dbpath=${i.dbpath}`,`--backup-id=${i["backup-id"]}`,...c.filter(o=>o).map(o=>o.startsWith("-")?`--exclude=${o?.slice(1)}`:`--include=${o}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(o=>`${o.Name.startsWith("--")?"":"--"}${o.Name}=${o.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(o=>{o.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",o.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
+ `)??""})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=D({type:s,selectors:[["app-commandline"]],features:[V([F])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let l;l=$localize`TargetUrl`;let i;i=$localize`Commandline Arguments`;let c;c=$localize`Advanced options`;let N;N=$localize`Backup ID`;let o;o=$localize`Backup Name`;let I;I=$localize`Filters`;let h;return h=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,l,i,c,N,o,I,h,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,l){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",9)(3,"button",10),f(4,0),r(5,"sh-icon"),O(),n()(),R(6,Te,1,0,"sh-progress-bar",11)(7,Oe,35,11),n()),e&2&&(m(6),$(l.finishedLoading()?7:6))},dependencies:[re,ee,Q,Y,Z,ge,Me,Ee,se,te,ne,ie,oe,q,de,me,_e,ce,Ce,le],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
@@ -0,0 +1 @@
1
+ import{a as ut}from"./chunk-EUVXYJ2O.js";import{a as Nt}from"./chunk-52VBZ35Q.js";import{a as mt}from"./chunk-ISCGGOPN.js";import"./chunk-OYO6MNWR.js";import"./chunk-GNJTDWT4.js";import"./chunk-AT6BXXSP.js";import"./chunk-KCVV72VV.js";import"./chunk-G3QBP5CU.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HVB6ARTT.js";import"./chunk-35ZUPRX7.js";import{a as ie}from"./chunk-FFL4DKFK.js";import{a as X}from"./chunk-POJT4MSX.js";import"./chunk-WJDMMKWE.js";import"./chunk-QSPA3G65.js";import{a as Et}from"./chunk-AE7T2DAH.js";import"./chunk-XTFTWEJS.js";import{a as at,b as lt}from"./chunk-SVQCV5AE.js";import{b as ne}from"./chunk-TC7HZO7D.js";import{B as J,E as rt,F as dt,G as te,K as Tt,L as St,M as ct,O as Ct,V as gt,X as pt,c as j,e as K,i as Q,m as _t,s as Y,t as Z,u as k,w as ee}from"./chunk-RAIB7LN4.js";import"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as T,B as $,Bc as V,Cb as m,Db as s,Eb as o,Fb as I,H as R,Mb as f,Pa as Ye,Rc as w,Sa as l,Sc as x,Tb as F,Ub as b,Vb as _,Wb as B,Xb as H,Yb as W,Yc as st,Zb as c,_ as O,a as je,b as Ke,c as Qe,cb as D,ea as p,fa as E,gc as nt,hb as le,hc as it,ib as Ze,kc as M,n as L,nc as G,oc as q,pa as S,pc as _e,sb as et,sc as y,tb as tt,tc as v,uc as A,xb as C,yb as g,yc as ot}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var ht=["formRef"],It=()=>[import("./chunk-V7NZ5WF5.js").then(i=>i.OptionsListComponent)];function Rt(i,t){i&1&&(s(0,"sh-alert",3),_(1,1),o())}function Gt(i,t){if(i&1){let e=f();s(0,"app-options-list",5),A("optionsChange",function(a){p(e);let d=T();return v(d.settings,a)||(d.settings=a),E(a)}),o()}if(i&2){let e=T();y("options",e.settings),m("hasFreeTextSettings",!0)}}var z=class i{#e=O(X);#n=O(ne);formRef=st.required("formRef");settings=S([]);isSubmitting=S(!1);isLoadingOptions=S(!0);saved=S(!1);lastRecievedServerSettings=S({});serverSettingsEffect=x(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([n,a],d)=>{if(n.startsWith("--")){let N=n.substring(2);this.settings.update(u=>(u.some(P=>P.Name===N)||u.push({Name:N,Value:a}),u))}d===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),n=t.map(u=>u.Name),d=Object.keys(e).filter(u=>u.startsWith("--")).filter(u=>!n.includes(u.replace("--",""))),N=t.reduce((u,P)=>{let h=P.Name?.startsWith("--")?P.Name:`--${P.Name}`;return u[h]=P.Value,u},{});d.forEach(u=>{N[u]=null}),this.#n.patchApiV1Serversettings({requestBody:N}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,n){e&1&&nt(n.formRef,ht,5),e&2&&it()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,n){e&1&&(s(0,"div",2),C(1,Rt,2,0,"sh-alert",3),s(2,"button",4),c("click",function(){return n.submit()}),F(3,0),I(4,"sh-icon"),b(),o()(),Ze(5,Gt,1,2),et(6,5,It)),e&2&&(l(),g(n.saved()?1:-1),l(),M("loader",n.isSubmitting()),l(4),tt(!n.isLoadingOptions()))},dependencies:[Z,J,k,ee],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function vt(i,t){if(i&1){let e=f();s(0,"sh-form-field",12)(1,"input",13),A("ngModelChange",function(a){p(e);let d=T(2);return v(d.registerUrl,a)||(d.registerUrl=a),E(a)}),o()(),s(2,"button",14),c("click",function(){p(e);let a=T(2);return E(a.register())}),_(3,0),o()}if(i&2){let e=T(2);l(),y("ngModel",e.registerUrl)}}function At(i,t){if(i&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),G(4),o()()),i&2){let e=T(2);l(3),m("href",ot(e.claimUrl()),Ye),l(),q(e.claimUrl())}}function Lt(i,t){i&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function $t(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.cancel())}),_(1,3),o()}}function Ft(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.disable())}),_(1,4),o()}}function bt(i,t){if(i&1){let e=f();s(0,"button",14),c("click",function(){p(e);let a=T(2);return E(a.enable())}),_(1,5),o(),s(2,"button",16),c("click",function(){p(e);let a=T(2);return E(a.delete())}),_(3,6),o()}}function wt(i,t){i&1&&(F(0,7,1),I(1,"sh-icon"),b())}function Dt(i,t){i&1&&(F(0,7,2),I(1,"sh-icon"),b())}function xt(i,t){if(i&1){let e=f();s(0,"sh-chip",17),c("click",function(){p(e);let a=T(2);return E(a.copyReportingUrl())}),F(1,7),C(2,wt,2,0,"sh-icon")(3,Dt,2,0,"sh-icon"),b(),o()}if(i&2){let e=T(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function kt(i,t){if(i&1&&(s(0,"div",8),C(1,vt,4,1),C(2,At,5,3,"div",9),C(3,Lt,3,0,"div",9),C(4,$t,2,0,"button",10),C(5,Ft,2,0,"button",10),C(6,bt,4,0),C(7,xt,4,1,"sh-chip",11),o()),i&2){let e=T();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var oe=class i{#e=O(ie);#n=O(X);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=w(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=S(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let d;d=$localize`Disable console connection`;let N;N=$localize`Enable console connection`;let u;u=$localize` Delete console connection setup `;let P;return P=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,P=W(P),[t,e,n,a,d,N,u,P,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,n){e&1&&C(0,kt,8,7,"div",8),e&2&&g(n.state()!=="unknown"?0:-1)},dependencies:[Y,j,K,Q,te,J,rt,k],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function Pt(...i){let t=S(...i);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var se=()=>({standalone:!0});function Jt(i,t){i&1&&(s(0,"label"),_(1,31),o())}function Xt(i,t){i&1&&(s(0,"label"),_(1,32),o())}function Vt(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,29),o(),s(4,"p"),_(5,30),o()(),s(6,"div",50)(7,"sh-toggle",59),c("click",function(){p(e);let a=T(2);return E(a.toggleConsoleControl())}),C(8,Jt,2,0,"label")(9,Xt,2,0,"label"),o()()()}if(i&2){let e=T(2);l(7),M("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9)}}function zt(i,t){if(i&1&&(s(0,"section")(1,"div",49)(2,"h3"),_(3,28),o(),s(4,"p"),G(5),o()(),s(6,"div",50),I(7,"app-remote-control"),o()(),C(8,Vt,10,3,"section")),i&2){let e=T();l(5),q(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:-1)}}function Ut(i,t){i&1&&(s(0,"sh-icon",74),G(1,"check"),o())}function Bt(i,t){i&1&&(s(0,"sh-icon",75),G(1,"prohibit"),o())}function Ht(i,t){if(i&1){let e=f();s(0,"button",79),c("click",function(){p(e);let a=T(2);return E(a.updatePassphrase())}),_(1,36),o()}if(i&2){let e=T(2);M("loader",e.isUpdating())}}function Wt(i,t){if(i&1){let e=f();s(0,"button",80),c("click",function(){p(e);let a=T(2);return E(a.updatePassphrase())}),_(1,37),o()}if(i&2){let e=T(2);M("loader",e.isUpdating()),m("disabled",!0)}}function qt(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",70),_(2,33),o(),s(3,"input",71),A("ngModelChange",function(a){p(e);let d=T();return v(d.passphrase,a)||(d.passphrase=a),E(a)}),o()(),s(4,"sh-form-field")(5,"label",72),_(6,34),o(),s(7,"input",73),A("ngModelChange",function(a){p(e);let d=T();return v(d.repeatPassphrase,a)||(d.repeatPassphrase=a),E(a)}),o(),C(8,Ut,2,0,"sh-icon",74)(9,Bt,2,0,"sh-icon",75),o(),s(10,"div",55)(11,"button",76),c("click",function(){p(e);let a=T();return E(a.cancelPasswordChange())}),_(12,35),o(),C(13,Ht,2,2,"button",77)(14,Wt,2,3,"button",78),o()}if(i&2){let e=T();l(3),y("ngModel",e.passphrase),l(4),m("disabled",e.passphrase().length===0),y("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),M("loader",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function jt(i,t){i&1&&(s(0,"sh-icon",81),G(1,"check"),o())}function Kt(i,t){if(i&1){let e=f();s(0,"div",55)(1,"button",76),c("click",function(){p(e);let a=T();return E(a.openPassphraseForm())}),_(2,38),o(),C(3,jt,2,0,"sh-icon",81),o()}if(i&2){let e=T();l(3),g(e.passwordUpdated()?3:-1)}}function Qt(i,t){if(i&1){let e=f();s(0,"sh-form-field")(1,"label",82),_(2,39),o(),s(3,"textarea",83),A("ngModelChange",function(a){p(e);let d=T();return v(d.allowedHostnames,a)||(d.allowedHostnames=a),E(a)}),o()(),s(4,"sh-alert",84),_(5,40),o(),s(6,"button",79),c("click",function(){p(e);let a=T();return E(a.updateAllowedHostnames())}),_(7,41),o()}if(i&2){let e=T();l(3),y("ngModel",e.allowedHostnames),l(3),M("loader",e.updatingAllowedHosts())}}function Yt(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,42),o(),s(4,"p"),_(5,43),o()(),s(6,"div",50)(7,"sh-select",85)(8,"input",57),c("ngModelChange",function(a){p(e);let d=T();return E(d.updatePowerMode(a))}),o()()()()}if(i&2){let e=T();l(7),m("options",e.powerModeOptions())("isClearable",!1),l(),m("ngModel",e.powerModeCtrl())("ngModelOptions",V(4,se))}}function Zt(i,t){if(i&1&&(s(0,"p"),_(1,44),o()),i&2){let e,n=T();l(),B((e=n.sysinfo())==null?null:e.ServerVersionName),H(1)}}function en(i,t){i&1&&I(0,"sh-progress-bar",60)}function tn(i,t){if(i&1&&G(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function nn(i,t){if(i&1&&G(0),i&2){let e=t.$implicit;_e(" ",e.label," ")}}function on(i,t){if(i&1){let e=f();s(0,"section")(1,"div",49)(2,"h3"),_(3,45),o(),s(4,"p"),F(5,46),I(6,"a",86)(7,"br")(8,"br"),b(),o()(),s(9,"div",50)(10,"sh-select",87)(11,"input",57),c("ngModelChange",function(a){p(e);let d=T();return E(d.updateUsageStatistics(a))}),o(),le(12,nn,1,1,"ng-template"),o()()()}if(i&2){let e=T();l(10),m("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),m("ngModel",e.usageStatistics())("ngModelOptions",V(4,se))}}function sn(i,t,e){let n=Pt(i),a=n[je];e?.equal&&(a.equal=e.equal);let d;return n.set=N=>{clearTimeout(d),d=setTimeout(()=>Ke(a,N),t)},n.update=N=>{clearTimeout(d),d=setTimeout(()=>Qe(a,N),t)},n}var an=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Ot=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],re=class i{#e=O(ut);#n=O(Et);#t=O(ne);#i=O(X);#o=O(ie);#l=O(lt);#s=O(at);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#n.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=S("list");previousLang=this.#a;langCtrl=S(this.#a);powerModeCtrl=S("");usageStatistics=S("");updatingUsageStatistics=S(!1);remoteControlStatus=this.#o.status;remoteControlState=this.#o.state;updatingChannel=S(!1);updateChannel=S("");isUsingRelay=this.#l.relayIsEnabled;usageStatisticsDisabled=w(()=>(this.#n.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#_=x(()=>{let t=this.#n.systemInfo()?.DefaultUsageReportLevel??"",e=Ot;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.patchApiV1Serversettings({requestBody:{"update-channel":t}}).pipe(R(()=>this.updatingChannel.set(!1)),$(()=>(this.updateChannel.set(e),L(null)))).subscribe()}allowRemoteAccess=S(!1);allowedHostnames=S("");loadedAllowedHostnames=S("");updatingRemoteAccess=S(!1);updatingAllowedHosts=S(!1);updatingConsoleControl=S(!1);consoleControlDisabled=S(!1);updateRemoteAccess(){let t=this.allowRemoteAccess(),e=!t;this.allowRemoteAccess.set(e),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":e?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),$(()=>(this.allowRemoteAccess.set(t),L(null)))).subscribe()}updateAllowedHostnames(){let t=this.loadedAllowedHostnames(),e=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":e}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),$(()=>(this.allowedHostnames.set(t),L(null)))).subscribe()}toggleConsoleControl(){let t=this.consoleControlDisabled(),e=!t;this.updatingConsoleControl.set(!0),this.consoleControlDisabled.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-console-control":e?"True":"False"}}).pipe(R(()=>this.updatingConsoleControl.set(!1)),$(()=>(this.consoleControlDisabled.set(t),L(null)))).subscribe()}updatingDisableTrayIconLogin=S(!1);disableTrayIconLogin=S(!1);saveDisableTrayIconLogin(){let t=this.disableTrayIconLogin(),e=!t;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(e),this.#t.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":e?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),$(()=>(this.disableTrayIconLogin.set(t),L(null)))).subscribe()}showPassphraseForm=S(!1);isUpdating=S(!1);passphrase=S("");repeatPassphrase=S("");passwordUpdated=S(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=S(mt);powerModeOptions=w(()=>{let t=this.#n.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=S(Ot);timeTypeOptions=S(an);timeType=S("none");timeValue=sn(0,300);timeRange=w(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=x(()=>{let t=this.timeValue(),e=this.#i.serverSettings();!e||e["startup-delay"]===""&&this.timeType()==="none"||this.updateStartupDelay()});updateLocale(t){!t||t===""||t===this.previousLang||(this.#s.setItem("locale",t),window.location.reload())}updateStartupDelay(){let t=this.timeValue(),e=this.timeType(),n="";e!=="none"&&t!==0&&(n=`${t}${e}`),this.#t.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(t)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),$(()=>(this.usageStatistics.set(e),L(null)))).subscribe())}updatePowerMode(t){let e=this.powerModeCtrl();e!==t&&(t==="default"&&(t=""),this.#t.patchApiV1Serversettings({requestBody:{"power-mode-provider":t||""}}).pipe($(()=>(this.powerModeCtrl.set(e),L(null)))).subscribe())}serverSettingsEffect=x(()=>{let t=this.#i.serverSettings();if(t===void 0)return;let e=t["startup-delay"],n=e.slice(-1),a=e.slice(0,-1),d=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":d.includes(n)?n:"none"),this.timeValue.set(e==""?0:parseInt(a));let N=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(N)});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=D({type:i,selectors:[["app-settings"]],decls:113,vars:43,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let n;n=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let d;d=$localize`Passwords`;let N;N=$localize`Change server passphrase`;let u;u=$localize`Language`;let P;P=$localize`Select a language for the platform`;let h;h=$localize`Allow remote access (requires restart)`;let de;de=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Te;Te=$localize`Allow remote access`;let Se;Se=$localize`Prevent tray icon automatic log-in`;let ce;ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let Ce;Ce=$localize`Prevent tray icon automatic log-in`;let ge;ge=$localize`Update channel`;let pe;pe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ue;ue=$localize`Stable`;let Ne;Ne=$localize`Official stable release.`;let me;me=$localize`Beta`;let fe;fe=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Me;Me=$localize` Experimental `;let Pe;Pe=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let he;he=$localize`Builds for developers and testers only. Not for use with important data.`;let Ie;Ie=$localize`Pause after startup or hibernation`;let Re;Re=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ge;Ge=$localize`Advanced options`;let ye;ye=$localize`Connect to console`;let ve;ve=$localize`Disable console control`;let Ae;Ae=$localize` Disabling console control will disable remote access to this machine from the console, but will keep the registration intact and allow pushing settings from the console. `;let Le;Le=$localize`Remote control disabled`;let $e;$e=$localize`Remote control enabled`;let Fe;Fe=$localize`Enter new password`;let be;be=$localize`Repeat password`;let ae;ae=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let De;De=$localize`Repeat passphrase`;let xe;xe=$localize`Cancel`;let ke;ke=$localize` Update passphrase `;let Je;Je=$localize` Update passphrase `;let Xe;Xe=$localize`Change password`;let Ve;Ve=$localize`Allowed hostnames`;let ze;ze=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let Ue;Ue=$localize` Update allowed hostnames `;let Be;Be=$localize`Power mode provider`;let He;He=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let We;We=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Usage statistics`;let U;return U=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#6\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#6\uFFFD"}:CLOSE_LINK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK:${"[\uFFFD#7\uFFFD\uFFFD/#7\uFFFD|\uFFFD#8\uFFFD\uFFFD/#8\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,U=W(U),[t,e,n,a,d,N,u,P,h,de,Te,Se,ce,Ce,ge,pe,Ee,ue,Ne,me,fe,Me,Pe,Oe,he,Ie,Re,Ge,ye,ve,Ae,Le,$e,we,De,xe,ke,Je,Xe,Ve,ze,Ue,Be,He,We,qe,U,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Fe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loader"],["shButton","","shTooltip",ae,1,"raised","primary",3,"loader","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ae,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","#"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,n){if(e&1&&(I(0,"app-status-bar"),s(1,"div",47)(2,"header")(3,"div",48)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),C(8,zt,9,2),s(9,"section")(10,"div",49)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",50)(16,"div",51)(17,"img",52),c("click",function(){return n.setLightMode()}),o(),s(18,"img",53),c("click",function(){return n.setDarkMode()}),o()()()(),s(19,"section")(20,"div",49)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",54),C(26,qt,15,7)(27,Kt,4,1,"div",55),o()(),s(28,"section")(29,"div",49)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",50)(35,"sh-select",56)(36,"input",57),c("ngModelChange",function(d){return n.updateLocale(d)}),o()()()(),s(37,"section")(38,"div",49)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",58)(44,"sh-toggle",59),c("click",function(){return n.updateRemoteAccess()}),s(45,"label"),_(46,10),o()(),C(47,Qt,8,3),o()(),s(48,"section")(49,"div",49)(50,"h3"),_(51,11),o(),s(52,"p"),_(53,12),o()(),s(54,"div",50)(55,"sh-toggle",59),c("click",function(){return n.saveDisableTrayIconLogin()}),s(56,"label"),_(57,13),o()()()(),C(58,Yt,9,5,"section"),s(59,"section")(60,"div",49)(61,"h3"),_(62,14),o(),C(63,Zt,2,1,"p"),C(64,en,1,0,"sh-progress-bar",60),o(),s(65,"div",61)(66,"div",62),c("click",function(){return n.setNewChannel("")}),s(67,"sh-radio",63),_(68,15),o(),s(69,"p"),_(70,16),o()(),s(71,"div",62),c("click",function(){return n.setNewChannel("stable")}),s(72,"sh-radio",63),_(73,17),o(),s(74,"p"),_(75,18),o()(),s(76,"div",62),c("click",function(){return n.setNewChannel("beta")}),s(77,"sh-radio",63),_(78,19),o(),s(79,"p"),_(80,20),o()(),s(81,"div",62),c("click",function(){return n.setNewChannel("experimental")}),s(82,"sh-radio",63),_(83,21),o(),s(84,"p"),_(85,22),o()(),s(86,"div",62),c("click",function(){return n.setNewChannel("canary")}),s(87,"sh-radio",63),_(88,23),o(),s(89,"p"),_(90,24),o()()()()(),I(91,"sh-divider"),s(92,"div",47)(93,"section")(94,"div",49)(95,"h3"),_(96,25),o(),s(97,"p"),_(98,26),o()(),s(99,"div",50)(100,"div",64)(101,"sh-range-slider",65)(102,"input",66),A("ngModelChange",function(d){return v(n.timeValue,d)||(n.timeValue=d),d}),o()(),s(103,"sh-select",67)(104,"input",68),c("ngModelChange",function(d){return n.updateTimeType(d)}),o(),le(105,tn,1,1,"ng-template"),o()()()(),C(106,on,13,5,"section"),o(),s(107,"div",47)(108,"section")(109,"div",69)(110,"h3"),_(111,27),o(),I(112,"app-advanced-options-settings"),o()()()),e&2){let a,d,N;l(8),g(n.isUsingRelay()?-1:8),l(9),M("active",!n.isDarkMode()),l(),M("active",n.isDarkMode()),l(8),g(n.showPassphraseForm()?26:27),l(9),m("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),m("ngModel",n.langCtrl())("ngModelOptions",V(41,se)),l(8),M("active",n.allowRemoteAccess()),l(3),g(n.allowRemoteAccess()?47:-1),l(8),M("active",n.disableTrayIconLogin()),l(3),g(n.powerModeOptions().length>0?58:-1),l(5),g((a=n.sysinfo())!=null&&a.ServerVersion?63:-1),l(),g(n.updatingChannel()?64:-1),l(3),M("active",n.updateChannel()===""),l(),B((d=n.sysinfo())==null?null:d.DefaultUpdateChannel),H(68),l(2),B((N=n.sysinfo())==null?null:N.ServerVersionType),H(70),l(2),M("active",n.updateChannel()==="stable"),l(5),M("active",n.updateChannel()==="beta"),l(5),M("active",n.updateChannel()==="experimental"),l(5),M("active",n.updateChannel()==="canary"),l(14),m("unit",n.timeType()==="none"?"s":n.timeType()),l(),m("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),m("ngModelOptions",V(42,se)),l(),m("options",n.timeTypeOptions())("isClearable",!1),l(),m("ngModel",n.timeType()),l(2),g(n.usageStatisticsDisabled()?-1:106)}},dependencies:[Y,j,_t,K,Q,Z,Nt,oe,z,J,St,ct,Tt,gt,pt,te,k,dt,ee,Ct],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{sn as debounceSignal,re as default};
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-R6CC4KYP.js";import"./chunk-VITGSIEL.js";import"./chunk-OMKP4YQX.js";import"./chunk-5PANYSIG.js";import"./chunk-ZDBKQQ47.js";import"./chunk-AL7GMUVT.js";import"./chunk-G3QBP5CU.js";import"./chunk-HVB6ARTT.js";import"./chunk-WJDMMKWE.js";import"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-SVQCV5AE.js";import"./chunk-TC7HZO7D.js";import"./chunk-RAIB7LN4.js";import"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";export{a as createEncryptionForm,b as default};
@@ -0,0 +1 @@
1
+ import{a as Y}from"./chunk-RIX6H2ZX.js";import{a as W}from"./chunk-XTFTWEJS.js";import{d as U}from"./chunk-SVQCV5AE.js";import"./chunk-TC7HZO7D.js";import{B as j,D as B,G as Q,b as $,c as A,d as v,e as k,f as x,j as J,o as X,q as V,r as q,t as z,u as H,w as K}from"./chunk-RAIB7LN4.js";import{d as R}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{Cb as h,Db as t,Eb as i,Fb as r,H as S,Mb as E,Sa as l,Sc as D,Tb as g,Ub as d,Vb as M,Yc as y,Zb as C,_ as p,cb as T,ea as F,fa as f,gc as O,hc as P,kc as w,nc as b,oc as G,pa as a,xb as L,yb as I}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";var Z=["passwordInput"];function ee(m,o){m&1&&(t(0,"sh-alert",6),M(1,4),i())}var _=new q,N=class m{#e=p(R);#n=p(U);rememberMe=W("rememberMe",!1,!0);failedLogin=a(!1);successLogin=a(!1);isLoading=a(!1);loginForm=_.group({user:_.control(""),pass:_.control("",v.required),rememberMe:_.control(this.rememberMe())});showPassword=a(!1);passwordInput=y("passwordInput");passwordEffect=D(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(o=>this.rememberMe.set(o??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let o=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&o&&(this.isLoading.set(!0),this.#n.login(o,this.rememberMe()).pipe(S(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||m)};static \u0275cmp=T({type:m,selectors:[["app-login"]],viewQuery:function(n,e){n&1&&O(e.passwordInput,Z,5),n&2&&P()},decls:24,vars:6,consts:()=>{let o;o=$localize`Enter your password`;let n;n=$localize` Password ${"\uFFFD#10\uFFFD"}:START_LINK:${"\uFFFD#11\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#10\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let s;s=$localize` Keep me logged in ${"\uFFFD#21\uFFFD\uFFFD/#21\uFFFD"}:TAG_INPUT:`;let c;return c=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],n,e,s,c,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",o,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,e){if(n&1){let s=E();t(0,"form",5),C("submit",function(){return F(s),f(e.submit())}),L(1,ee,2,0,"sh-alert",6),t(2,"div",7),r(3,"app-logo"),i(),t(4,"div",8)(5,"div",9),r(6,"input",10),t(7,"sh-form-field")(8,"label",11),g(9,1),t(10,"a",12),r(11,"sh-icon"),i(),d(),i(),r(12,"input",13,0),t(14,"sh-icon",14),C("click",function(){return F(s),f(e.showPassword.set(!e.showPassword()))}),b(15),i()(),t(16,"button",15),g(17,2),r(18,"sh-icon"),d(),i()(),t(19,"sh-checkbox",16),g(20,3),r(21,"input",17),d(),i(),t(22,"div",18),r(23,"label",19),i()()()}n&2&&(h("formGroup",e.loginForm),l(),I(e.failedLogin()&&!e.successLogin()?1:-1),l(11),h("type",e.showPassword()?"text":"password"),l(3),G(e.showPassword()?"eye":"eye-slash"),l(),w("loader",e.isLoading()))},dependencies:[z,J,A,$,k,x,X,V,Y,Q,H,j,K,B],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:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"],changeDetection:0})};export{N as default};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",loadComponent:()=>import("./chunk-7ZE4C4XQ.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-R7B32VI4.js")},{path:"live",loadComponent:()=>import("./chunk-D2T243VR.js")}]}],t=o;export{t as default};
@@ -0,0 +1 @@
1
+ import{a as z}from"./chunk-DQAT6VCF.js";import"./chunk-TC7HZO7D.js";import{A as X,B as H,J as V,u as J}from"./chunk-RAIB7LN4.js";import{a as x,c as B,d as w,e as U,f as k}from"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import{$b as c,Cb as P,Db as i,Eb as t,Fb as _,Jb as R,Kb as M,Mb as f,Sa as C,Tb as l,Ub as s,Vb as b,Wb as v,Xb as y,Zb as a,_ as g,cb as m,ea as F,fa as T,pa as A,xb as $,yb as D}from"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";function W(u,S){if(u&1){let n=f();i(0,"sh-menu",15)(1,"button",16),b(2,2),t(),R(3,17),i(4,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Disabled"))}),l(5,3),_(6,"sh-icon"),s(),t(),i(7,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Verbose"))}),l(8,4),_(9,"sh-icon"),s(),t(),i(10,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("ExplicitOnly"))}),l(11,5),_(12,"sh-icon"),s(),t(),i(13,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Profiling"))}),l(14,6),_(15,"sh-icon"),s(),t(),i(16,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Retry"))}),l(17,7),_(18,"sh-icon"),s(),t(),i(19,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Information"))}),l(20,8),_(21,"sh-icon"),s(),t(),i(22,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("DryRun"))}),l(23,9),_(24,"sh-icon"),s(),t(),i(25,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Warning"))}),l(26,10),_(27,"sh-icon"),s(),t(),i(28,"button",18),a("click",function(){F(n);let e=c();return T(e.updateLogLevel("Error"))}),l(29,11),_(30,"sh-icon"),s(),t(),M(),t()}if(u&2){let n=c();P("openIndicator",!0),C(2),v(n.logLevelByLabel()),y(2)}}var O=class u{#n=g(w);#e=g(z);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=A(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof x&&this.currentUrl.set(S.urlAfterRedirects)})}updateLogLevel(S){this.#e.isPolling.set(!0),this.#e.updateLogLevel(S)}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=m({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let p;return p=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,p,[1,"filters"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(i(0,"div",12)(1,"sh-button-group")(2,"button",13),l(3,0),_(4,"sh-icon"),s(),t(),i(5,"button",14),l(6,1),_(7,"sh-icon"),s(),t()(),$(8,W,31,2,"sh-menu",15),t(),_(9,"router-outlet")),n&2&&(C(8),D(o.currentUrl().startsWith("/about/logs/live")?8:-1))},dependencies:[H,X,J,V,B,k,U],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"],changeDetection:0})};export{O as default};
@@ -0,0 +1 @@
1
+ import{e as a,f as b}from"./chunk-R6CC4KYP.js";import"./chunk-VITGSIEL.js";import"./chunk-OMKP4YQX.js";import"./chunk-5PANYSIG.js";import"./chunk-ZDBKQQ47.js";import"./chunk-AL7GMUVT.js";import"./chunk-G3QBP5CU.js";import"./chunk-HVB6ARTT.js";import"./chunk-WJDMMKWE.js";import"./chunk-QSPA3G65.js";import"./chunk-AE7T2DAH.js";import"./chunk-SVQCV5AE.js";import"./chunk-TC7HZO7D.js";import"./chunk-RAIB7LN4.js";import"./chunk-XUN5TTJC.js";import"./chunk-VCLWADQK.js";import"./chunk-ATGKEH5N.js";import"./chunk-NXROYR6L.js";import"./chunk-FPPZ4BUR.js";import"./chunk-ZBK64QS2.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreSelectFilesForm,b as default};