@duplicati/ngclient 0.0.221 → 0.0.225

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 (140) hide show
  1. package/chunk-2EX5HS5X.js +1 -0
  2. package/{chunk-IQL3REGJ.js → chunk-2KD757N6.js} +1 -1
  3. package/{chunk-OPHQNXYO.js → chunk-2YUSBRXY.js} +1 -1
  4. package/{chunk-F2ZC26DC.js → chunk-35FMFK4I.js} +1 -1
  5. package/{chunk-IG7XUEED.js → chunk-3DHD6GQL.js} +1 -1
  6. package/{chunk-IRT2UBDI.js → chunk-3HYQMG65.js} +1 -1
  7. package/{chunk-3L3SRTPU.js → chunk-3PARK7B7.js} +1 -1
  8. package/chunk-3V25RAVK.js +1 -0
  9. package/{chunk-ELCA5MKF.js → chunk-4ISFDBI3.js} +1 -1
  10. package/chunk-5FQ7HESA.js +1 -0
  11. package/chunk-5QGFYH2A.js +3 -0
  12. package/chunk-5UJN5SN4.js +2 -0
  13. package/{chunk-BLSV7CNZ.js → chunk-6DX35WDO.js} +1 -1
  14. package/{chunk-77IXQ4GU.js → chunk-6WX2UOAN.js} +1 -1
  15. package/{chunk-N2GI5QYJ.js → chunk-7VQ67PEZ.js} +1 -1
  16. package/{chunk-XBAZKJ47.js → chunk-A23UTI46.js} +1 -1
  17. package/chunk-AR5SEBWX.js +1 -0
  18. package/{chunk-EKVZKEQJ.js → chunk-B4QFOJXL.js} +1 -1
  19. package/{chunk-TCXCC5BM.js → chunk-BPHX6VXP.js} +1 -1
  20. package/{chunk-VKQQDCUN.js → chunk-CJKZ27FM.js} +1 -1
  21. package/{chunk-YCJYEQF7.js → chunk-COEGVUM3.js} +1 -1
  22. package/chunk-CQJRBQ6I.js +1 -0
  23. package/{chunk-736PM4LG.js → chunk-E4CYVUYG.js} +1 -1
  24. package/chunk-EBKOJDCT.js +1 -0
  25. package/chunk-EVEI25GQ.js +2 -0
  26. package/{chunk-TVFRVP7K.js → chunk-EXAZ4QZR.js} +1 -1
  27. package/chunk-G7TNRWOU.js +1 -0
  28. package/{chunk-23SRH7FI.js → chunk-GA3CAVSK.js} +1 -1
  29. package/chunk-GKAMSAN5.js +1 -0
  30. package/{chunk-JPCUISZG.js → chunk-GNKCBZMS.js} +1 -1
  31. package/{chunk-N2AU7VKX.js → chunk-HDDAGHHE.js} +1 -1
  32. package/chunk-HLHUPBCV.js +1 -0
  33. package/chunk-HPXIWKIK.js +1 -0
  34. package/chunk-HS3UDQIJ.js +1 -0
  35. package/chunk-HWOUAWOE.js +1 -0
  36. package/chunk-IDJ52K34.js +1 -0
  37. package/chunk-ITN4L52Q.js +1 -0
  38. package/chunk-J7GH3G72.js +1 -0
  39. package/chunk-JBX7YYME.js +1 -0
  40. package/chunk-JCXT6U5P.js +1 -0
  41. package/{chunk-JP2Z2HMH.js → chunk-JNZJE3GC.js} +1 -1
  42. package/chunk-K5XGRFWJ.js +4 -0
  43. package/chunk-KGK4RY3J.js +1 -0
  44. package/{chunk-DSYNIXJF.js → chunk-KNSQLQC6.js} +1 -1
  45. package/chunk-KUNX5APQ.js +1 -0
  46. package/chunk-KX3UP3HV.js +1 -0
  47. package/chunk-KZYRTI62.js +1 -0
  48. package/chunk-LXTSZI4K.js +1 -0
  49. package/chunk-MKI54WTC.js +1 -0
  50. package/chunk-MSIH2OJ5.js +1 -0
  51. package/{chunk-FDYBIC4O.js → chunk-N5XYG3QW.js} +1 -1
  52. package/{chunk-LE24LKH7.js → chunk-NE255HQN.js} +1 -1
  53. package/chunk-NQAD2FBX.js +1 -0
  54. package/chunk-NUV5LHQV.js +1 -0
  55. package/{chunk-RGFJ5UMA.js → chunk-O2HQIEE4.js} +1 -1
  56. package/chunk-O2L2FRYE.js +11 -0
  57. package/chunk-OP7MDR2B.js +1 -0
  58. package/chunk-OSGHJCUU.js +1 -0
  59. package/chunk-OYU6OBKA.js +1 -0
  60. package/{chunk-5KJPC3V5.js → chunk-P2EIEVFT.js} +1 -1
  61. package/{chunk-6JS7B4FW.js → chunk-PDZNQW6F.js} +1 -1
  62. package/{chunk-IMQUTGIK.js → chunk-PEOYNJJM.js} +1 -1
  63. package/chunk-PMF4FTBF.js +1 -0
  64. package/{chunk-CAQ3XMFP.js → chunk-PNQ5BDQN.js} +1 -1
  65. package/{chunk-ACTJSKQZ.js → chunk-PNRFCYAE.js} +1 -1
  66. package/{chunk-GW34KK5A.js → chunk-POVWDK74.js} +1 -1
  67. package/chunk-QW23XWNE.js +1 -0
  68. package/{chunk-PIGMTUUT.js → chunk-SKLSR5GH.js} +1 -1
  69. package/chunk-T7RMSUHE.js +1 -0
  70. package/chunk-TSVSMVY4.js +1 -0
  71. package/chunk-TV7OB7Y4.js +1 -0
  72. package/{chunk-QDDVZ4CR.js → chunk-TWWAK5M6.js} +1 -1
  73. package/{chunk-BKEJZADV.js → chunk-TXCVGOPN.js} +1 -1
  74. package/{chunk-F3JYPWPK.js → chunk-UIVZWXBK.js} +1 -1
  75. package/chunk-UNQKMTFM.js +1 -0
  76. package/{chunk-KZTFESBJ.js → chunk-V2M5YF4E.js} +1 -1
  77. package/{chunk-O2SMJYPC.js → chunk-V2UO7ES2.js} +1 -1
  78. package/{chunk-OLWLWDXZ.js → chunk-VOXTAZLZ.js} +1 -1
  79. package/{chunk-FD5CKX3J.js → chunk-VQLI7RDY.js} +1 -1
  80. package/chunk-VTOEFKZG.js +1 -0
  81. package/chunk-VZNLMGYP.js +2 -0
  82. package/chunk-XUCXLLB4.js +1 -0
  83. package/{chunk-GKGMP6VF.js → chunk-XWML36YQ.js} +1 -1
  84. package/chunk-Y47NRSCA.js +1 -0
  85. package/{chunk-ZC23RK4J.js → chunk-YF6JHIN5.js} +1 -1
  86. package/{chunk-ANSV4G2K.js → chunk-YS4B2B5N.js} +1 -1
  87. package/{chunk-FBU3EBFO.js → chunk-ZGQ2WCM2.js} +1 -1
  88. package/chunk-ZSAEIKEB.js +1 -0
  89. package/chunk-ZXBKGNJU.js +1 -0
  90. package/index.html +1 -1
  91. package/main-S64CL44W.js +1 -0
  92. package/package.json +1 -1
  93. package/chunk-43WATFQS.js +0 -11
  94. package/chunk-4E7D5F6K.js +0 -1
  95. package/chunk-4J6L5OV3.js +0 -1
  96. package/chunk-5JGSXUKD.js +0 -1
  97. package/chunk-5YE4H57F.js +0 -1
  98. package/chunk-5ZRRLJA4.js +0 -1
  99. package/chunk-6NVCDJR6.js +0 -1
  100. package/chunk-ACTATISC.js +0 -1
  101. package/chunk-APSPCDGV.js +0 -1
  102. package/chunk-AXQQEOTT.js +0 -1
  103. package/chunk-BMACDVWX.js +0 -1
  104. package/chunk-COI6UMB5.js +0 -1
  105. package/chunk-CZVTBPNE.js +0 -1
  106. package/chunk-DE4JIJWO.js +0 -1
  107. package/chunk-DHFLXFWF.js +0 -1
  108. package/chunk-E4NQOMJX.js +0 -1
  109. package/chunk-ESLC5LVP.js +0 -1
  110. package/chunk-F3ETZKLK.js +0 -1
  111. package/chunk-FR5RTIOE.js +0 -1
  112. package/chunk-G2BDKU26.js +0 -2
  113. package/chunk-I5DD3Q6J.js +0 -1
  114. package/chunk-JPMKWWZP.js +0 -1
  115. package/chunk-JSZIISFS.js +0 -1
  116. package/chunk-MTL3FBSM.js +0 -1
  117. package/chunk-NPFPMA4P.js +0 -1
  118. package/chunk-O56QUSSI.js +0 -2
  119. package/chunk-OCUE5GMT.js +0 -1
  120. package/chunk-OJVUCHRP.js +0 -1
  121. package/chunk-OL7ADIFI.js +0 -1
  122. package/chunk-PPSQGUOL.js +0 -3
  123. package/chunk-QQWV3FEH.js +0 -1
  124. package/chunk-RDLRXAJU.js +0 -1
  125. package/chunk-SACQFUJE.js +0 -1
  126. package/chunk-TISQKN7N.js +0 -1
  127. package/chunk-TQTOIWBK.js +0 -4
  128. package/chunk-TWAHUXIN.js +0 -1
  129. package/chunk-TZ7MW3NZ.js +0 -2
  130. package/chunk-UTXZPAY6.js +0 -1
  131. package/chunk-UZ4POLDC.js +0 -1
  132. package/chunk-WJBMMY2Y.js +0 -1
  133. package/chunk-XPVATEBM.js +0 -1
  134. package/chunk-XWTB7XRI.js +0 -1
  135. package/chunk-YMFI2Q2X.js +0 -1
  136. package/chunk-YPNN5FBK.js +0 -1
  137. package/chunk-YWBZLU6M.js +0 -1
  138. package/chunk-YYD2JU6T.js +0 -1
  139. package/chunk-ZNYN6ES6.js +0 -1
  140. package/main-IUT3IXX4.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as Se}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import{a as Ce,b as pe,c as me,m as k,r as Te}from"./chunk-O2L2FRYE.js";import"./chunk-PNQ5BDQN.js";import"./chunk-2EX5HS5X.js";import{b as de,c as ue,d as ge}from"./chunk-EVEI25GQ.js";import"./chunk-UIVZWXBK.js";import{a as ce}from"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import{a as $}from"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as se,C as ae,G as le,H as re,L as _e,c as Z,e as ee,i as te,s as ne,v as ie,z as oe}from"./chunk-CJKZ27FM.js";import"./chunk-KNSQLQC6.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as O,Bb as J,Cb as X,Db as E,Eb as a,Fb as _,Gb as x,Nb as T,Rc as b,Ta as c,Ub as y,Vb as B,Wb as d,Xb as K,Yb as W,Yc as Y,Zb as j,_b as m,ac as r,ea as u,fa as g,hb as V,hc as Q,ic as q,lc as H,oc as D,pc as P,qa as f,sa as G,tc as A,uc as N,vc as M,xb as C,yb as p,zb as z}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";function De(i,t){i&1&&(a(0,"div",13),x(1,"sh-progress-bar",14),a(2,"div",15)(3,"h3"),d(4,2),_()()())}function fe(i,t){i&1&&(a(0,"sh-divider"),d(1,5),_())}function Ee(i,t){if(i&1&&(a(0,"p",20),D(1),_()),i&2){let e=r().$implicit;c(),P(e.Description)}}function Fe(i,t){if(i&1&&(a(0,"p",20),D(1),_()),i&2){let e=r().$implicit,o=r(3);c(),P(o.getSimplePath(e.BaseUrl))}}function Ie(i,t){if(i&1){let e=T();a(0,"button",25),m("click",function(n){u(e);let s=r().$implicit,l=r(3);return g(l.updateBackupsSync(s,n))}),D(1," Update backups "),_()}if(i&2){let e=r(4);E("disabled",e.isSaving())}}function Ne(i,t){if(i&1){let e=T();a(0,"app-destination-list-item",18),m("click",function(){let n=u(e).$implicit,s=r(3);return g(s.selectDestination(n))}),a(1,"h3",19),D(2),_(),C(3,Ee,2,1,"p",20)(4,Fe,2,1,"p",20),a(5,"div",21),C(6,Ie,2,1,"button",22),a(7,"button",23),m("click",function(n){let s=u(e).$implicit,l=r(3);return g(l.deleteDestination(s.ID,n))}),a(8,"sh-icon"),D(9,"trash"),_()(),a(10,"button",24),y(11,6),x(12,"sh-icon"),B(),_()()()}if(i&2){let e=t.$implicit,o=r(3);E("targetUrl",e.BaseUrl),c(2),P(e.Name||e.BaseUrl),c(),p(e.Description?3:4),c(3),p(o.isOutOfSync(e)?6:-1)}}function he(i,t){if(i&1){let e=T();a(0,"sh-card",16),m("click",function(){u(e);let n=r(2);return g(n.selectDestination("new"))})("keydown.enter",function(n){return n.target.click()})("keydown.space",function(n){return n.target.click()}),a(1,"sh-icon"),D(2,"plus-circle"),_(),a(3,"div",15)(4,"h3"),d(5,3),_(),a(6,"p"),d(7,4),_()()(),C(8,fe,2,0,"sh-divider"),J(9,Ne,13,4,"app-destination-list-item",17,z)}if(i&2){let e=r(2);c(8),p(e.destinations().length>0?8:-1),c(),X(e.destinations())}}function Oe(i,t){if(i&1&&(a(0,"h2"),d(1,1),_(),C(2,De,5,0,"div",13)(3,he,11,1)),i&2){let e=r();c(2),p(e.isLoading()?2:3)}}function xe(i,t){i&1&&d(0,10,1)}function ye(i,t){i&1&&d(0,10,2)}function Be(i,t){i&1&&d(0,10,3)}function Pe(i,t){if(i&1){let e=T();a(0,"button",37),m("click",function(){u(e);let n=r(2);return g(n.testDestination())}),y(1,10),C(2,xe,1,0)(3,ye,1,0)(4,Be,1,0),B(),_()}if(i&2){let e,o=r(2);E("disabled",o.testSignal()=="testing"),c(2),p(o.testSignal()=="testing"?2:((e=o.testResponse())==null?null:e.action)==="success"?3:4)}}function Ae(i,t){if(i&1){let e=T();a(0,"div",32)(1,"sh-form-field")(2,"label"),d(3,11),_(),a(4,"input",38),M("ngModelChange",function(n){u(e);let s=r(2);return N(s.editName,n)||(s.editName=n),g(n)}),_()()()}if(i&2){let e=r(2);c(4),A("ngModel",e.editName)}}function Me(i,t){if(i&1){let e=T();a(0,"app-test-url",39,0),M("targetUrlChange",function(n){u(e);let s=r(2);return N(s.editBaseUrl,n)||(s.editBaseUrl=n),g(n)})("testSignalChange",function(n){u(e);let s=r(2);return N(s.testSignal,n)||(s.testSignal=n),g(n)}),_()}if(i&2){let e=r(2);A("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),E("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!0)("askToCreate",!0)("testExpectation","any")("readOnlyTest",!1)("moduleType","Backend")}}function be(i,t){if(i&1){let e=T();a(0,"app-destination-list-item",40)(1,"button",41),m("click",function(){u(e);let n=r(2);return g(n.removeDestination())}),d(2,12),_()(),a(3,"app-single-destination",42),M("targetUrlChange",function(n){u(e);let s=r(2);return N(s.editBaseUrl,n)||(s.editBaseUrl=n),g(n)}),_()}if(i&2){let e=r(2);E("targetUrl",e.editBaseUrl()),c(3),A("targetUrl",e.editBaseUrl)}}function $e(i,t){if(i&1){let e=T();a(0,"app-destination-list",43),m("setDestination",function(n){u(e);let s=r(2);return g(s.setDestination(n))}),_()}}function ke(i,t){i&1&&d(0,9,1)}function Re(i,t){i&1&&d(0,9,2)}function Le(i,t){i&1&&d(0,9,3)}function we(i,t){i&1&&d(0,9,4)}function Ue(i,t){if(i&1){let e=T();a(0,"header",26)(1,"button",23),m("click",function(){u(e);let n=r();return g(n.cancelEdit())}),a(2,"sh-icon"),D(3,"arrow-left"),_()()(),a(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),d(8,7),_(),a(9,"div",30),C(10,Pe,5,2,"button",31),_()(),C(11,Ae,5,1,"div",32),C(12,Me,2,10,"app-test-url",33),C(13,be,4,2)(14,$e,1,0,"app-destination-list"),_(),a(15,"div",34)(16,"button",35),m("click",function(){u(e);let n=r();return g(n.cancelEdit())}),d(17,8),_(),a(18,"button",36),m("click",function(){let n;u(e);let s=r();return g(((n=s.testResponse())==null?null:n.action)==="success"||((n=s.testResponse())==null?null:n.action)==="missing-folder"||!s.isUrlChanged()?s.save():s.testDestination())}),y(19,9),C(20,ke,1,0)(21,Re,1,0)(22,Le,1,0)(23,we,1,0),B(),_()()()}if(i&2){let e,o,n,s,l=r();c(8),K(l.selectedDestination()==="new"?"New Destination":"Edit Destination"),W(8),c(2),p(l.editBaseUrl()?10:-1),c(),p(l.selectedDestination()!=="new"?11:-1),c(),p(l.editBaseUrl()?12:-1),c(),p(l.editBaseUrl()?13:14),c(5),H("primary",((e=l.testResponse())==null?null:e.action)==="success"||!l.isUrlChanged())("warn",l.isUrlChanged()&&l.testSignal()===null||l.testSignal()==="testing"||((o=l.testResponse())==null?null:o.action)==="missing-folder")("error",l.testResponse()&&((n=l.testResponse())==null?null:n.action)!=="success"&&((n=l.testResponse())==null?null:n.action)!=="missing-folder"),E("disabled",!l.editBaseUrl()||l.isSaving()||l.testSignal()==="testing"),c(2),p(l.isSaving()?20:l.testSignal()==="testing"?21:((s=l.testResponse())==null?null:s.action)==="success"||((s=l.testResponse())==null?null:s.action)==="missing-folder"||!l.isUrlChanged()?22:23)}}var R=class i{#e=O(Ce);#t=O(ce);#n=O(oe);getSimplePath=de;backups=this.#t.backups;constructor(){this.#t.getBackups()}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=Y(k);selectedDestination=f(null);selectedDestinationId=b(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=f(null);editDescription=f(null);editBaseUrl=f(null);initialBaseUrl=f(null);isUrlChanged=b(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?!0:t!==e});testSignal=f(null);testResponse=b(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return[];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let n=e.get(o.ID);return n&&n.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=G(()=>{this.editBaseUrl(),this.testSignal.set(null)});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null))}))}cancelEdit(){this.selectedDestination.set(null)}setDestination(t){let e=ge(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`)}}removeDestination(){this.editBaseUrl.set(null)}async testDestination(){(await this.testUrl()?.testDestination(!1))?.action==="missing-folder"&&this.promptCreateFolder()}promptCreateFolder(){this.#n.open($,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder()}})}save(){let t=this.selectedDestination();t&&this.performSave(t)}performSave(t){let e=this.editName(),o=this.editDescription(),n=this.editBaseUrl();if(t==="new"){let I=ue(n??"")?.displayName??"Destination",h=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${h+1}`,o=null}let s={Name:e,Description:o,BaseUrl:n};this.#e.save(t,s).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(!0)})}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open($,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(!0)})}})}deleteDestination(t,e){e.stopPropagation(),this.#n.open($,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload()})}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&Q(o.testUrl,k,5),e&2&&q()},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let n;n=$localize`Configure a new storage location.`;let s;s=$localize`Or manage your saved destinations`;let l;l=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let h;h=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=j(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,n,s,l,I,h,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(x(0,"app-status-bar"),a(1,"section"),C(2,Oe,4,1)(3,Ue,24,13),_()),e&2&&(c(2),p(o.selectedDestination()===null?2:3))},dependencies:[pe,me,Te,Se,_e,se,ie,ae,re,le,k,ne,Z,ee,te],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0})};export{R as default};
@@ -0,0 +1 @@
1
+ import{b as f}from"./chunk-2KD757N6.js";import{a as d,b as E}from"./chunk-OP7MDR2B.js";import{a as v}from"./chunk-NUV5LHQV.js";import{d as p}from"./chunk-KNSQLQC6.js";import{$ as i,B as g,Rc as n,W as h,qa as l,sa as u}from"./chunk-K5XGRFWJ.js";import{a}from"./chunk-7CGTOI24.js";var _="shown-welcome-page-v1",m="hide-console-connection-status",A="use-out-of-process-controller",R="disable-console-control",b="disable-tray-icon-login",c="server-listen-interface",T="allowed-hostnames",D="server-passphrase",N="update-channel",w="startup-delay",y="usage-reporter-level",P="power-mode-provider",I="autogenerated-passphrase",C="has-asked-for-password-change",O=class o{#s=i(p);#r=i(d);#n=i(E);#i=i(v);#o=f(this.#s.getApiV1Serversettings());#e=l(void 0);#t(e,t){if(!t)return!1;let s=t[e];if((s??"").trim().length==0)return!1;let r=s.trim().toLowerCase();return r==="true"||r==="1"||r==="yes"||r==="on"}serverSettings=n(()=>this.#e()||this.#o());askForInitialPasswordConfig=n(()=>{let e=(this.#i.systemInfo()?.StartedBy??"").trim().toLowerCase();if(e==="tray icon"||e=="trayicon")return!1;let t=this.#e(),s=this.#t(I,t),r=this.#t(C,t);return s&&!r});showWelcomePage=n(()=>{let e=this.#e();if(!e)return!1;let t=this.#t(C,e),s=this.#t(_,e);return!(t||s)});#c=u(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e)});constructor(){this.#r.subscribe("serversettings")}isConsoleConnectionStatusHidden=n(()=>this.#t(m,this.serverSettings()));isControllerIpcEnabled=n(()=>this.#t(A,this.serverSettings()));refreshServerSettings(){this.#n.getConnectionMethod()!=="websocket"&&this.#s.getApiV1Serversettings().subscribe({next:e=>{this.#e.set(e)}})}#a(e,t){var s=a({},e);for(let[r,S]of Object.entries(t))S===null?delete s[r]:s[r]=S;return s}patchServerSettings(e){let t=a({},this.serverSettings());return this.#e.set(this.#a(this.serverSettings()??{},e)),this.#s.patchApiV1Serversettings({requestBody:e}).pipe(g(s=>{throw this.#e.set(t),s}))}patchServerSetting(e,t){let s={};return s[e]=t,this.patchServerSettings(s)}setShownWelcomePage(){return this.patchServerSetting(_,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(m,e?"True":"False")}setControllerIpcState(e){return this.patchServerSetting(A,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(b,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(R,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(c,e)}setRemoteAccessAllowedHostnames(e){var t={[T]:e};return this.serverSettings()?.[c]==="loopback"&&(t[c]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(D,e)}setUpdateChannel(e){return this.patchServerSetting(N,e)}setStartupDelay(e){return this.patchServerSetting(w,e)}setUsageReporterLevel(e){return this.patchServerSetting(y,e)}setPowerModeProvider(e){return this.patchServerSetting(P,e)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=h({token:o,factory:o.\u0275fac,providedIn:"root"})};export{O as a};
@@ -0,0 +1 @@
1
+ import{a as Sn}from"./chunk-EXAZ4QZR.js";import{a as gn}from"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import{c as re,l as pn}from"./chunk-EVEI25GQ.js";import{b as dn}from"./chunk-UIVZWXBK.js";import{a as Tn}from"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import{a as Cn}from"./chunk-YS4B2B5N.js";import{b as En}from"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import{b as Fn}from"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{A as tn,B as le,C as on,E as _n,G as an,K as ln,L as rn,S as cn,T as sn,v as ae,z as nn}from"./chunk-CJKZ27FM.js";import{d as un}from"./chunk-KNSQLQC6.js";import{e as _e}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as L,Bb as V,Bc as j,Cb as U,Cc as R,Db as E,Eb as o,Fb as i,G as Q,Gb as C,Gc as D,Hc as b,Ic as x,Kb as N,Kc as oe,Lb as M,Mb as $,Nb as h,Qa as J,Rc as q,Ta as a,Ub as u,Vb as F,Wb as d,Xb as k,Yb as H,Zb as K,_b as I,ac as l,ea as m,fa as O,hb as Qe,jc as W,lc as A,mb as P,nb as Ye,oc as T,qa as G,qc as S,sa as qe,tc as Y,ub as Ze,uc as Z,vb as en,vc as ee,wc as ne,xb as p,xc as te,yb as g,yc as ie,zb as z}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var On=()=>[_e,import("./chunk-V2M5YF4E.js").then(e=>e.NgTemplateOutlet),le,ae,_n,sn,cn,import("./chunk-5FQ7HESA.js").then(e=>e.BackupProgressComponent),import("./chunk-HPXIWKIK.js").then(e=>e.DurationFormatPipe),import("./chunk-HLHUPBCV.js").then(e=>e.BytesPipe),import("./chunk-HWOUAWOE.js").then(e=>e.RelativeTimePipe)],Nn=()=>["/add-backup"],Mn=()=>["/restore"],mn=e=>({$implicit:e}),In=()=>["/backup/new"],Pn=e=>["/backup",e],Dn=e=>["/restore",e],fn=e=>["/backup",e,"export"],$n=e=>["/backup",e,"delete"],Rn=e=>["/backup",e,"database"],hn=e=>["/backup",e,"commandline"],An=e=>["/backup",e,"log"];function Ln(e,t){e&1&&d(0,11,1)}function xn(e,t){e&1&&d(0,11,2)}function yn(e,t){if(e&1&&d(0,11,3),e&2){let n=l(2);k(n.timeType()),H(0)}}function kn(e,t){if(e&1){let n=h();o(0,"button",64),I("click",function(){let c=m(n).$implicit,s=l(3);return O(s.sortByColumn.set(c.value))}),d(1,15),i()}if(e&2){let n=t.$implicit,_=l(3);A("active",_.orderBy()===n.value),a(),k(n.label),H(1)}}function Hn(e,t){if(e&1&&(o(0,"sh-menu",61)(1,"button",62),u(2,14),C(3,"strong")(4,"sh-icon"),F(),i(),N(5,63),V(6,kn,2,3,"button",65,z),M(),i()),e&2){let n=l(2);a(4),k(n.orderBy()),H(2),a(2),U(n.sortOrderOptions())}}function Gn(e,t){if(e&1){let n=h();o(0,"div",57)(1,"sh-button-group",58),ee("valueChange",function(c){m(n);let s=l();return Z(s.viewMode,c)||(s.viewMode=c),O(c)}),o(2,"button",59),u(3,9),C(4,"sh-icon"),F(),i(),o(5,"button",60),u(6,10),C(7,"sh-icon"),F(),i()(),o(8,"sh-menu",61)(9,"button",62),u(10,11),o(11,"strong"),p(12,Ln,1,0)(13,xn,1,0)(14,yn,1,1),i(),C(15,"sh-icon"),F(),i(),N(16,63),o(17,"button",64),I("click",function(){m(n);let c=l();return O(c.setTimeType("relative"))}),d(18,12),i(),o(19,"button",64),I("click",function(){m(n);let c=l();return O(c.setTimeType("actual"))}),d(20,13),i(),M(),i(),p(21,Hn,8,1,"sh-menu",61),i()}if(e&2){let n=l();a(),Y("value",n.viewMode),a(11),g(n.timeType()=="relative"?12:n.timeType()=="actual"?13:14),a(9),g(n.viewMode()==="list"?21:-1)}}function bn(e,t){if(e&1){let n=h();o(0,"div",70)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()()(),o(7,"div",73)(8,"sh-chip",74),d(9,16),i()(),o(10,"div",57)(11,"button",75),I("click",function(){m(n);let c=l().$implicit,s=l(4);return O(s.openInConsole(c))}),u(12,17),C(13,"sh-icon"),F(),i()(),C(14,"app-backup-progress",76),i()}if(e&2){let n=l().$implicit,_=l(4);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(8),E("backupId",n.Backup.ID)}}function Bn(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,23),i(),T(3),D(4,"relativeTime"),i()),e&2){l();let n=ie(5),_=l(6);a(3),S(" ",x(4,1,n,_.timeType()==="actual")," ")}}function vn(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l(3).$implicit,_=l(4);S(" ",x(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function wn(e,t){e&1&&(N(0),T(1,"-"),M())}function Xn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",b(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function Jn(e,t){e&1&&(N(0),T(1,"-"),M())}function zn(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l(3).$implicit;S(" ",b(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function Vn(e,t){e&1&&(N(0),T(1,"-"),M())}function Un(e,t){if(e&1&&(o(0,"p")(1,"span"),d(2,19),i(),T(3),D(4,"relativeTime"),i(),ne(5),p(6,Bn,5,4,"p"),o(7,"p")(8,"span"),d(9,20),i(),p(10,vn,2,4)(11,wn,2,0,"ng-container"),i(),o(12,"p")(13,"span"),d(14,21),i(),p(15,Xn,2,3)(16,Jn,2,0,"ng-container"),i(),o(17,"p")(18,"span"),d(19,22),i(),p(20,zn,2,3)(21,Vn,2,0,"ng-container"),i()),e&2){let n=l(2).$implicit,_=l(4);a(3),S(" ",x(4,5,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," "),a(2);let c=te(_.scheduledTimes()[n.Backup.ID??""]);a(),g(c?6:-1),a(4),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?10:11),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?15:16),a(5),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?20:21)}}function Kn(e,t){if(e&1&&C(0,"app-backup-progress",76),e&2){let n=l(2).$implicit;E("backupId",n.Backup.ID)}}function Wn(e,t){e&1&&(o(0,"sh-chip",74),d(1,24),i())}function jn(e,t){e&1&&$(0)}function qn(e,t){if(e&1&&(o(0,"div",71)(1,"div",53)(2,"h3"),T(3),o(4,"sh-chip"),C(5,"img",72),T(6),i()(),p(7,Un,22,9)(8,Kn,1,1,"app-backup-progress",76),i(),o(9,"div",73)(10,"sh-chip",77),d(11,18),i(),p(12,Wn,2,0,"sh-chip",74),i(),o(13,"div",57),P(14,jn,1,0,"ng-container",78),i()()),e&2){let n=l().$implicit,_=l(4),c=W(33);a(3),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(2),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(),g(_.runningBackupId()!==n.Backup.ID?7:8);let s=_.getBackupVersionCount(n);a(4),k(s)(s),H(11),a(),g(n.Backup.ExternalID?12:-1),a(2),E("ngTemplateOutlet",c)("ngTemplateOutletContext",R(9,mn,n))}}function Qn(e,t){if(e&1&&p(0,bn,15,4,"div",70)(1,qn,15,11,"div",71),e&2){let n=t.$implicit;g(n.Backup.ExternalID?0:1)}}function Yn(e,t){if(e&1&&V(0,Qn,2,1,null,null,z),e&2){let n=l(3);U(n.backups())}}function Zn(e,t){e&1&&(o(0,"div",69),u(1,25),o(2,"button",79),C(3,"sh-icon"),i(),F(),i()),e&2&&(a(2),E("routerLink",j(1,In)))}function et(e,t){if(e&1&&(o(0,"div",68),p(1,Yn,2,0)(2,Zn,4,2,"div",69),i()),e&2){let n=l(2);A("fallback",n.backups().length===0),a(),g(n.backups().length?1:2)}}function nt(e,t){e&1&&(u(0,26,1),$(1),F())}function tt(e,t){e&1&&(u(0,27,1),$(1),F())}function it(e,t){e&1&&(u(0,28,1),$(1),F())}function ot(e,t){e&1&&(u(0,29,1),$(1),F())}function _t(e,t){e&1&&(u(0,30,1),$(1),F())}function at(e,t){e&1&&(u(0,31,1),$(1),F())}function lt(e,t){e&1&&(u(0,32,1),$(1),F())}function rt(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){let n=l().$implicit,_=l(3);S(" ",x(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupFinished,_.timeType()==="actual")," ")}}function ct(e,t){e&1&&(N(0),T(1,"-"),M())}function st(e,t){if(e&1&&(T(0),D(1,"relativeTime")),e&2){l();let n=ie(11),_=l(3);S(" ",x(1,1,n,_.timeType()==="actual")," ")}}function ut(e,t){e&1&&(N(0),T(1,"-"),M())}function Ft(e,t){if(e&1&&(T(0),D(1,"durationFormat")),e&2){let n=l().$implicit,_=l(3);S(" ",x(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration,_.timeType()==="actual")," ")}}function Ct(e,t){e&1&&(N(0),T(1,"-"),M())}function Tt(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",b(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.SourceFilesSize)," ")}}function dt(e,t){e&1&&(N(0),T(1,"-"),M())}function Et(e,t){if(e&1&&(T(0),D(1,"bytes")),e&2){let n=l().$implicit;S(" ",b(1,1,n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFilesSize)," ")}}function pt(e,t){e&1&&(N(0),T(1,"-"),M())}function gt(e,t){e&1&&$(0)}function St(e,t){if(e&1&&(o(0,"tr")(1,"td"),T(2),i(),o(3,"td")(4,"sh-chip",90),C(5,"img",72),T(6),i()(),o(7,"td"),p(8,rt,2,4)(9,ct,2,0,"ng-container"),i(),o(10,"td"),ne(11),p(12,st,2,4)(13,ut,2,0,"ng-container"),i(),o(14,"td"),p(15,Ft,2,4)(16,Ct,2,0,"ng-container"),i(),o(17,"td"),p(18,Tt,2,3)(19,dt,2,0,"ng-container"),i(),o(20,"td"),p(21,Et,2,3)(22,pt,2,0,"ng-container"),i(),o(23,"td")(24,"span"),d(25,35),i()(),o(26,"td"),P(27,gt,1,0,"ng-container",78),i()()),e&2){let n=t.$implicit,_=l(3),c=W(33);a(2),S(" ",n.Backup.Name??_.MISSING_BACKUP_NAME," "),a(3),E("src",_.getBackendIcon(n.Backup.TargetURL),J),a(),S(" ",_.getBackendType(n.Backup.TargetURL)," "),a(2),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupFinished?8:9),a(3);let s=te(_.scheduledTimes()[n.Backup.ID??""]);a(),g(s?12:13),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.LastBackupDuration?15:16),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.SourceFilesSize?18:19),a(3),g(n.Backup.Metadata!=null&&n.Backup.Metadata.TargetFilesSize?21:22);let f=_.getBackupVersionCount(n);a(4),k(f)(f),H(25),a(2),E("ngTemplateOutlet",c)("ngTemplateOutletContext",R(13,mn,n))}}function mt(e,t){if(e&1){let n=h();o(0,"sh-table",80),ee("sortByColumnChange",function(c){m(n);let s=l(2);return Z(s.sortByColumn,c)||(s.sortByColumn=c),O(c)}),o(1,"tr",81)(2,"th",82),u(3,26),P(4,nt,2,0,"ng-container",83),F(),i(),o(5,"th",84),u(6,27),P(7,tt,2,0,"ng-container",83),F(),i(),o(8,"th",85),u(9,28),P(10,it,2,0,"ng-container",83),F(),i(),o(11,"th",86),u(12,29),P(13,ot,2,0,"ng-container",83),F(),i(),o(14,"th",87),u(15,30),P(16,_t,2,0,"ng-container",83),F(),i(),o(17,"th",88),u(18,31),P(19,at,2,0,"ng-container",83),F(),i(),o(20,"th",89),u(21,32),P(22,lt,2,0,"ng-container",83),F(),i(),o(23,"th"),d(24,33),i(),o(25,"th"),d(26,34),i()(),V(27,St,28,15,"tr",null,z),i()}if(e&2){let n=l(2),_=W(35);E("data",n.backups())("loading",n.backupsLoading()),Y("sortByColumn",n.sortByColumn),a(4),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(3),E("ngTemplateOutlet",_),a(5),U(n.backups())}}function Ot(e,t){if(e&1&&p(0,et,3,3,"div",66)(1,mt,29,10,"sh-table",67),e&2){let n=l();g(n.viewMode()==="list"?0:n.viewMode()==="details"?1:-1)}}function Nt(e,t){e&1&&(o(0,"div",91),C(1,"sh-progress-bar",92),o(2,"div",53)(3,"h3"),d(4,36),i()()())}function Mt(e,t){if(e&1){let n=h();o(0,"button",94),I("click",function(){m(n);let c=l(3);return O(c.abort())}),u(1,38),C(2,"sh-icon"),F(),i()}if(e&2){let n=l(3);A("small",n.viewMode()==="details")}}function It(e,t){if(e&1){let n=h();o(0,"button",94),I("click",function(){m(n);let c=l(3);return O(c.stop())}),u(1,39),C(2,"sh-icon"),F(),i()}if(e&2){let n=l(3);A("small",n.viewMode()==="details")}}function Pt(e,t){e&1&&(u(0,37,1),C(1,"sh-icon"),F())}function Dt(e,t){e&1&&(u(0,37,2),C(1,"sh-icon"),F())}function ft(e,t){if(e&1){let n=h();p(0,Mt,3,2,"button",93)(1,It,3,2,"button",93),o(2,"button",94),I("click",function(){m(n);let c=l(2);return O(c.pauseResume())}),u(3,37),p(4,Pt,2,0)(5,Dt,2,0),F(),i()}if(e&2){let n=l(2);g(n.isStopping()?0:1),a(2),A("small",n.viewMode()==="details")("loading",n.isResuming()),a(2),g(n.clientIsRunning()?4:5)}}function $t(e,t){e&1&&d(0,40,1)}function Rt(e,t){e&1&&(o(0,"sh-icon"),T(1,"check"),i())}function ht(e,t){e&1&&(o(0,"sh-icon"),T(1,"dots-three-vertical"),i())}function At(e,t){if(e&1){let n=h();o(0,"button",94),I("click",function(){m(n);let c=l().$implicit,s=l();return O(s.startBackup(c.Backup.ID))}),u(1,40),C(2,"sh-icon"),p(3,$t,1,0),F(),i(),o(4,"button",95)(5,"sh-icon"),T(6,"pencil-simple"),i()(),o(7,"sh-menu")(8,"button",96),p(9,Rt,2,0,"sh-icon")(10,ht,2,0,"sh-icon"),i(),N(11,63),o(12,"h3",97),T(13,"Operations"),i(),o(14,"button",98),u(15,41),C(16,"sh-icon"),F(),i(),o(17,"button",98),u(18,42),C(19,"sh-icon"),F(),i(),o(20,"button",98),u(21,43),C(22,"sh-icon"),F(),i(),C(23,"sh-divider"),o(24,"h3",97),d(25,44),i(),o(26,"button",98),u(27,45),C(28,"sh-icon"),F(),i(),o(29,"button",64),I("click",function(){m(n);let c=l().$implicit,s=l();return O(s.verifyFiles(c.Backup.ID))}),u(30,46),C(31,"sh-icon"),F(),i(),o(32,"button",64),I("click",function(){m(n);let c=l().$implicit,s=l();return O(s.compressBackup(c.Backup.ID))}),u(33,47),C(34,"sh-icon"),F(),i(),o(35,"button",98),u(36,48),C(37,"sh-icon"),F(),i(),C(38,"sh-divider"),o(39,"h3",97),d(40,49),i(),o(41,"button",98),u(42,50),C(43,"sh-icon"),F(),i(),M(),i()}if(e&2){let n=l().$implicit,_=l();A("loading",_.startingBackup()===n.Backup.ID),a(3),g(_.viewMode()==="list"?3:-1),a(),E("routerLink",R(15,Pn,n.Backup.ID)),a(4),A("loading",_.loadingId()===n.Backup.ID)("success",_.successId()===n.Backup.ID),a(),g(_.successId()===n.Backup.ID?9:10),a(5),E("routerLink",R(17,Dn,n.Backup.ID)),a(3),E("routerLink",R(19,fn,n.Backup.ID)),a(3),E("routerLink",R(21,$n,n.Backup.ID)),a(6),E("routerLink",R(23,Rn,n.Backup.ID)),a(9),E("routerLink",R(25,hn,n.Backup.ID)),a(6),E("routerLink",R(27,An,n.Backup.ID))}}function Lt(e,t){if(e&1&&p(0,ft,6,6)(1,At,44,29),e&2){let n=t.$implicit,_=l();g(_.runningBackupId()===n.Backup.ID?0:1)}}function xt(e,t){e&1&&(o(0,"sh-icon",99),T(1,"funnel-simple"),i(),o(2,"sh-icon",100),T(3,"sort-ascending"),i(),o(4,"sh-icon",101),T(5,"sort-descending"),i())}var yt={file:{Display:$localize`Local`,Icon:null}},ce=class e{#t=L(un);#n=L(dn);#e=L(Tn);#o=L(En);#_=L(Fn);#a=L(nn);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;runningBackupId=this.#n.runningBackupId;timeType=this.#e.timeType;clientIsRunning=this.#n.clientIsRunning;isResuming=this.#n.isResuming;runningTask=q(()=>this.#n.serverState()?.ActiveTask?.Item1);isStopping=q(()=>this.runningTask()==this.#i());scheduledTimes=q(()=>{let t=this.#_.serverState()?.ProposedSchedule??[],n=this.#e.backups(),_={};return n.forEach(c=>{let s=c.Backup?.ID;if(s){var f=t.find(y=>y.Item1==s);f?.Item2?_[s]=f.Item2:c.Schedule?.Time&&(_[s]=c.Schedule.Time)}}),_});#i=G(-1);viewMode=Cn("viewMode","list");sortByColumn=G(this.#e.orderBy());loadingId=G(null);successId=G(null);sortEffect=qe(()=>this.#e.setOrderBy(this.sortByColumn()));ngOnInit(){this.#e.getBackups(!0)}openInConsole(t){let n=t.Backup.ExternalID?.split(":")[1];if(!n){console.error("Backup does not have an external ID");return}this.#o.openConsole("/app/machines/configurations/"+n)}setOrderBy(t){this.#e.setOrderBy(t)}setTimeType(t){this.#e.setTimeType(t)}startBackup(t){this.#n.resumeDialogCheck(()=>this.#e.startBackup(t))}openPauseDialog(){this.#a.open(gn,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#n.pauseResume().subscribe()}stop(){let t=this.runningTask();t&&(this.#i.set(t),this.#t.postApiV1TaskByTaskidStop({taskid:t}).subscribe())}abort(){let t=this.runningTask();t&&this.#t.postApiV1TaskByTaskidAbort({taskid:t}).subscribe()}getBackendIcon(t){return t?re(t).icon??"database":""}getBackendType(t){if(!t)return"";let n=re(t);if(!n)return"";let _=yt[n.key];if(_?.Display)return _.Display;if(n.key==="s3"){let c="http://null?"+t.split("?")[1],f=new URL(c).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[y,B]of Object.entries(pn))if(f.endsWith(y))return B}return n.displayName}getBackupVersionCount(t){return parseInt(t?.Backup?.Metadata?.BackupListCount??"",10)||0}verifyFiles(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdVerify({id:t}).pipe(Q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}compressBackup(t){this.loadingId.set(t),this.#t.postApiV1BackupByIdCompact({id:t}).pipe(Q(()=>this.loadingId.set(null))).subscribe({next:()=>{this.successId.set(t),setTimeout(()=>this.successId.set(null),2e3)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Qe({type:e,selectors:[["app-home"]],decls:36,vars:6,consts:()=>{let t;t=$localize`Backups`;let n;n=$localize`Keep your data safe at your chosen destination.`;let _;_=$localize` Create ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let c;c=$localize`Restores`;let s;s=$localize`Recover your files from any backup set.`;let f;f=$localize` Start ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`My backups`;let B;B=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:rows${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: List `;let se;se=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:list${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Details `;let ue;ue=$localize` Time: ${"\uFFFD#11\uFFFD"}:START_TAG_STRONG:${"\uFFFD*12:1\uFFFD"}:START_BLOCK_IF: Relative ${"\uFFFD/*12:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*13:2\uFFFD"}:START_BLOCK_ELSE_IF: Actual ${"\uFFFD/*13:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*14:3\uFFFD"}:START_BLOCK_ELSE: ${"\uFFFD0:3\uFFFD"}:INTERPOLATION: ${"\uFFFD/*14:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Fe;Fe=$localize`Relative time`;let Ce;Ce=$localize`Actual time`;let Te;Te=$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 de;de=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let Ee;Ee=$localize`Externally managed`;let pe;pe=$localize` Edit in console ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-up-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let v;v=$localize`{VAR_PLURAL, plural, =0 {No version yet} =1 {1 Version} other {{INTERPOLATION} Versions}}`,v=K(v,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ge;ge=$localize` ${v}:ICU@@6502601490918455200: `;let Se;Se=$localize`Last successful backup:`;let me;me=$localize`Duration:`;let Oe;Oe=$localize`Source:`;let Ne;Ne=$localize`Destination:`;let Me;Me=$localize`Next scheduled run:`;let Ie;Ie=$localize`Externally managed`;let Pe;Pe=$localize` No backups found ${"\uFFFD#2\uFFFD"}:START_TAG_BUTTON: Click to create one now ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_BUTTON:`;let De;De=$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 fe;fe=$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 $e;$e=$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 Re;Re=$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 he;he=$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 Ae;Ae=$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 Le;Le=$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 xe;xe=$localize`Version`;let ye;ye=$localize`Actions`;let w;w=$localize`{VAR_PLURAL, plural, =0 {No versions} =1 {1 Version} other {{INTERPOLATION} Versions}}`,w=K(w,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ke;ke=$localize` ${w}:ICU@@3521773141017690117: `;let He;He=$localize`Loading backups...`;let X;X=$localize`${"\uFFFD*4: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/*4:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*5: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/*5:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,X=K(X);let Ge;Ge=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let be;be=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `;let Be;Be=$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 ve;ve=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Restore `;let we;we=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let Xe;Xe=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let Je;Je=$localize`Advanced`;let ze;ze=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:database${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Database `;let Ve;Ve=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:check-square-offset${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Verify files `;let Ue;Ue=$localize`${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#34\uFFFD"}:CLOSE_TAG_SH_ICON: Compress now `;let Ke;Ke=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Commandline `;let We;We=$localize`Reporting`;let je;return je=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:notepad${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Log `,[["actions",""],["sortIcons",""],t,n,_,c,s,f,y,B,se,ue,Fe,Ce,Te,de,Ee,pe,ge,Se,me,Oe,Ne,Me,Ie,Pe,De,fe,$e,Re,he,Ae,Le,xe,ye,ke,He,X,Ge,be,Be,ve,we,Xe,Je,ze,Ve,Ue,Ke,We,je,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["type","button","tabindex","-1","shButton",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"actions"],[1,"small","type-b",3,"valueChange","value"],["value","list"],["value","details"],[1,"table-overview"],["type","button","shButton","",1,"small"],["menu",""],["type","button",3,"click"],["type","button",3,"active"],[1,"backups",3,"fallback"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"backups"],[1,"no-backups"],[1,"backup","externaly-managed"],[1,"backup"],["alt","",1,"provider-icon",3,"src"],[1,"tags"],[1,"simple","primary"],["type","button","shButton","",3,"click"],[3,"backupId"],[1,"simple","success"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","",1,"primary","raised",3,"routerLink"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],["shSort","name"],[4,"ngTemplateOutlet"],["shSort","type"],["shSort","lastrun"],["shSort","nextrun"],["shSort","duration"],["shSort","sourcesize"],["shSort","destinationsize"],[1,"small"],[1,"loading-list"],[1,"indeterminate","primary"],["shButton","",3,"small"],["shButton","",3,"click"],["type","button","shButton","",3,"routerLink"],["type","button","shButton",""],["title",""],["type","button",3,"routerLink"],[1,"filter"],[1,"asc"],[1,"desc"]]},template:function(n,_){n&1&&(C(0,"app-status-bar"),o(1,"section")(2,"header")(3,"sh-card",51),I("keydown.enter",function(s){return s.target.click()})("keydown.space",function(s){return s.target.click()}),C(4,"img",52),o(5,"div",53)(6,"h3"),d(7,2),i(),o(8,"p"),d(9,3),i()(),o(10,"button",54),u(11,4),C(12,"sh-icon"),F(),i()(),o(13,"sh-card",51),I("keydown.enter",function(s){return s.target.click()})("keydown.space",function(s){return s.target.click()}),C(14,"img",55),o(15,"div",53)(16,"h3"),d(17,5),i(),o(18,"p"),d(19,6),i()(),o(20,"button",54),u(21,7),C(22,"sh-icon"),F(),i()()(),o(23,"div",56)(24,"h2"),N(25),d(26,8),M(),p(27,Gn,22,3,"div",57),i(),Ye(28,Ot,2,1)(29,Nt,5,0),Ze(30,28,On,null,29),i()(),P(32,Lt,2,1,"ng-template",null,0,oe)(34,xt,6,0,"ng-template",null,1,oe)),n&2&&(a(3),E("routerLink",j(4,Nn)),a(10),E("routerLink",j(5,Mn)),a(14),g(_.backups().length>0?27:-1),a(3),en(!_.backupsLoading()))},dependencies:[_e,Sn,on,le,ae,an,ln,rn,tn],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}@media only screen and (max-width:768px){header[_ngcontent-%COMP%]{grid-template-columns:1fr}}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}@media only screen and (max-width:768px){.content[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}}sh-menu[_ngcontent-%COMP%]{color:red}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:.5rem}.backups.fallback[_ngcontent-%COMP%]{justify-content:center;align-items:center;padding:4rem;border:1px solid var(--base-4);background:var(--base-2);border-radius:var(--shape-2);width:calc(100% - 4rem);margin:0 auto}.no-backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center}.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)}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}@media only screen and (max-width:768px){.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{max-width:initial}}.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{ce as default};
@@ -1 +1 @@
1
- import{B as U,D as $,M as y,s as b,w as D}from"./chunk-VKQQDCUN.js";import{d as v}from"./chunk-DSYNIXJF.js";import{$b as p,Ab as m,Bb as A,Cb as g,Db as o,Eb as _,F as d,Mb as N,Sa as u,Vb as s,Vc as G,Zb as S,_ as C,da as E,ea as T,gb as O,kc as f,nc as M,pa as r,pc as h,sc as R,tc as I,uc as L,yb as P}from"./chunk-TQTOIWBK.js";function z(l,t){if(l&1){let e=N();o(0,"sh-radio",10),S("checkedChange",function(){let a=E(e).$implicit,i=p();return T(i.pauseOption.set(a.value))}),M(1),_()}if(l&2){let e=t.$implicit,n=p();g("checked",n.pauseOption()===e.value),u(),h(" ",e.label," ")}}var B=[{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}],k=class l{#e=C(v);pauseOptions=r(B);closed=G();isSubmitting=r(!1);pauseTransfers=r(!1);pauseOption=r(void 0);submit(){this.isSubmitting.set(!0);let t=this.pauseTransfers()||null,e=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:e,pauseTransfers:t}).pipe(d(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.closed.emit()}})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=O({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:3,consts:()=>{let t;t=$localize`Pause settings`;let e;e=$localize`Also pause transfers`;let n;n=$localize`If you pause transfers they could time out and cause retries or failures.`;let a;a=$localize`Cancel`;let i;return i=$localize` Update settings `,[t,e,n,a,i,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"checked"],[1,"check-wrap"],[1,"primary","raised",3,"checkedChange","checked"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(o(0,"header",5)(1,"h3"),s(2,0),_()(),o(3,"div",6)(4,"div",7),m(5,z,2,2,"sh-radio",8,P),_(),o(7,"div",9)(8,"sh-checkbox",10),L("checkedChange",function(i){return I(n.pauseTransfers,i)||(n.pauseTransfers=i),i}),s(9,1),_(),o(10,"sh-alert",11),s(11,2),_()()(),o(12,"footer",12)(13,"button",13),S("click",function(){return n.closed.emit()}),s(14,3),_(),o(15,"button",14),S("click",function(){return n.submit()}),s(16,4),_()()),e&2&&(u(5),A(n.pauseOptions()),u(3),R("checked",n.pauseTransfers),u(7),f("loading",n.isSubmitting()))},dependencies:[b,y,$,D,U],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})};export{k as a};
1
+ import{B as U,D as $,M as y,s as b,w as D}from"./chunk-CJKZ27FM.js";import{d as v}from"./chunk-KNSQLQC6.js";import{$ as C,Bb as m,Cb as A,Db as g,Eb as o,Fb as _,G as d,Nb as N,Ta as u,Wb as s,Wc as G,_b as S,ac as p,ea as E,fa as T,hb as O,lc as f,oc as M,qa as r,qc as h,tc as R,uc as I,vc as L,zb as P}from"./chunk-K5XGRFWJ.js";function z(l,t){if(l&1){let e=N();o(0,"sh-radio",10),S("checkedChange",function(){let a=E(e).$implicit,i=p();return T(i.pauseOption.set(a.value))}),M(1),_()}if(l&2){let e=t.$implicit,n=p();g("checked",n.pauseOption()===e.value),u(),h(" ",e.label," ")}}var B=[{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}],k=class l{#e=C(v);pauseOptions=r(B);closed=G();isSubmitting=r(!1);pauseTransfers=r(!1);pauseOption=r(void 0);submit(){this.isSubmitting.set(!0);let t=this.pauseTransfers()||null,e=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:e,pauseTransfers:t}).pipe(d(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{this.closed.emit()}})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=O({type:l,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:3,consts:()=>{let t;t=$localize`Pause settings`;let e;e=$localize`Also pause transfers`;let n;n=$localize`If you pause transfers they could time out and cause retries or failures.`;let a;a=$localize`Cancel`;let i;return i=$localize` Update settings `,[t,e,n,a,i,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"checked"],[1,"check-wrap"],[1,"primary","raised",3,"checkedChange","checked"],["type","warning"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(e,n){e&1&&(o(0,"header",5)(1,"h3"),s(2,0),_()(),o(3,"div",6)(4,"div",7),m(5,z,2,2,"sh-radio",8,P),_(),o(7,"div",9)(8,"sh-checkbox",10),L("checkedChange",function(i){return I(n.pauseTransfers,i)||(n.pauseTransfers=i),i}),s(9,1),_(),o(10,"sh-alert",11),s(11,2),_()()(),o(12,"footer",12)(13,"button",13),S("click",function(){return n.closed.emit()}),s(14,3),_(),o(15,"button",14),S("click",function(){return n.submit()}),s(16,4),_()()),e&2&&(u(5),A(n.pauseOptions()),u(3),R("checked",n.pauseTransfers),u(7),f("loading",n.isSubmitting()))},dependencies:[b,y,$,D,U],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})};export{k as a};
@@ -1,2 +1,2 @@
1
- import{d as x}from"./chunk-DSYNIXJF.js";import"./chunk-N2AU7VKX.js";import"./chunk-OPHQNXYO.js";import{$b as L,Ab as _,Bb as v,F as p,Gb as o,Hb as i,Qc as M,Sa as s,V as h,_ as r,gb as u,jc as y,nc as a,oc as E,pa as c,wb as f,xb as C,yb as b}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(x);isLoaded=c(!1);crashLog=c(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(p(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function O(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function S(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),E(n)}}function D(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),_(3,w,2,1,"li",null,b),i()()()),e&2){let n=L();y("grid-column","1 / -1")("height","auto"),s(3),v(n.breakIntoLines(n.crashLog()))}}var m=class e{#e=r(l);logsLoading=M(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
1
+ import{d as x}from"./chunk-KNSQLQC6.js";import"./chunk-HDDAGHHE.js";import"./chunk-2YUSBRXY.js";import{$ as r,Bb as _,Cb as v,G as p,Hb as o,Ib as i,Rc as M,Ta as s,W as h,ac as L,hb as u,kc as y,oc as a,pc as E,qa as c,xb as f,yb as C,zb as b}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var l=class e{#e=r(x);isLoaded=c(!1);crashLog=c(null);load(){this.isLoaded()||this.#e.getApiV1LogdataCrashlog().pipe(p(()=>this.isLoaded.set(!0))).subscribe({next:t=>{this.crashLog.set(t.Logdata??null)}})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"})};function O(e,t){e&1&&(o(0,"div",0),a(1,"Loading ..."),i())}function S(e,t){e&1&&(o(0,"div",0),a(1,"No crash log found"),i())}function w(e,t){if(e&1&&(o(0,"li"),a(1),i()),e&2){let n=t.$implicit;s(),E(n)}}function D(e,t){if(e&1&&(o(0,"div",2)(1,"code")(2,"ol",3),_(3,w,2,1,"li",null,b),i()()()),e&2){let n=L();y("grid-column","1 / -1")("height","auto"),s(3),v(n.breakIntoLines(n.crashLog()))}}var m=class e{#e=r(l);logsLoading=M(()=>!this.#e.isLoaded());crashLog=this.#e.crashLog;ngOnInit(){this.#e.load()}breakIntoLines(t){return t?t.split(`
2
2
  `):[]}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=u({type:e,selectors:[["app-crashlogs"]],decls:5,vars:1,consts:[[1,"loading"],[2,"white-space","pre-wrap",3,"grid-column","height"],[2,"white-space","pre-wrap"],[1,"line-numbers-ol"]],template:function(n,d){if(n&1&&(o(0,"h3"),a(1,"Crash log"),i(),f(2,O,2,0,"div",0)(3,S,2,0,"div",0)(4,D,5,4,"div",1)),n&2){let g;s(2),C(d.logsLoading()?2:d.crashLog()==null||((g=d.crashLog())==null?null:g.length)===0?3:4)}},styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-table[_ngcontent-%COMP%]{--table-columns: auto auto 1fr auto}sh-table[_ngcontent-%COMP%] td.id[_ngcontent-%COMP%]{justify-content:center}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code){padding:1rem .75rem;overflow:hidden}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-736PM4LG.js";import{a as _}from"./chunk-YCJYEQF7.js";import{a as C}from"./chunk-IMQUTGIK.js";import{b as B}from"./chunk-E4NQOMJX.js";import{a as R}from"./chunk-YYD2JU6T.js";import{z}from"./chunk-VKQQDCUN.js";import{d as $}from"./chunk-DSYNIXJF.js";import{F as f,L as S,Qc as c,V as P,_ as a,l as h,pa as g,q as k,ra as d}from"./chunk-TQTOIWBK.js";import{a as n,b as r}from"./chunk-7CGTOI24.js";var m={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Lock:$localize`Locking remote data …`,Backup_Complete:$localize`Backup complete!`,Backup_RemoteSynchronization:$localize`Synchronizing secondary destination(s) …`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_Download:$localize`Downloading files …`,Restore_PatchWithRemoteFiles:$localize`Patching files with remote data …`,Restore_VerifyRestoredFiles:$localize`Verifying restored files …`,Restore_Finaluze:$localize`Finalizing restore …`,Restore_Complete:$localize`Restore complete!`,Recreate_Begin:$localize`Starting database recreate …`,Recreate_Delete:$localize`Deleting old database …`,Recreate_Create:$localize`Creating new database …`,Recreate_Download:$localize`Downloading files …`,Recreate_Process:$localize`Processing files …`,Recreate_Complete:$localize`Database recreate complete!`,Verify_Begin:$localize`Starting verification …`,Verify_Download:$localize`Downloading files …`,Verify_Process:$localize`Processing files …`,Verify_Complete:$localize`Verification complete!`,BugReport_Begin:$localize`Starting bug report …`,BugReport_Gathering:$localize`Gathering information …`,BugReport_Complete:$localize`Bug report complete!`,List_Begin:$localize`Starting list …`,List_Download:$localize`Downloading files …`,List_Process:$localize`Processing files …`,List_Complete:$localize`List complete!`,Delete_Begin:$localize`Starting delete …`,Delete_Download:$localize`Downloading files …`,Delete_Process:$localize`Processing files …`,Delete_Complete:$localize`Delete complete!`,Compact_Begin:$localize`Starting compact …`,Compact_Download:$localize`Downloading files …`,Compact_Process:$localize`Processing files …`,Compact_Complete:$localize`Compact complete!`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,ReadLockInfo_Running:$localize`Reading lock info …`,Error:$localize`Error!`};var b=class p{#i=a(_);#t=a($);#o=a(F);#e=a(B);#c=a(z);#g=a(R);#l=g(!1);#s=g(null);statusData=this.#s.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(n({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");runningBackupId=c(()=>{let e=this.statusData();return!!(this.serverState()?.ActiveTask&&e?.task?.Status&&e?.task?.Status!=="Completed")?e?.BackupID??null:null});isResuming=g(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#m=d(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#h=d(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#r(r(n({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#n()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#n()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(f(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(C,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#n(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(S(e=>{let i=e.TaskID??null;return i===null?h(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(k(t=>r(n({},e),{task:t??null})))}),f(()=>this.#l.set(!1))).subscribe({next:e=>{this.#r(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#r(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#s.set(r(n({},e),{progress:this.#p(e),statusText:this.#d(e),fileStatusText:this.#u(e),fileCountProgressText:this.#f(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.Phase==="Backup_RemoteSynchronization"?i=e.OverallProgress>0?e.OverallProgress:0:e.OverallProgress>0&&(i=e.OverallProgress);return i}#a(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileProgress:e.CurrentFileoffset)??0,t=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileSize:e.CurrentFilesize)??0;if(!e.CurrentFilename)return"";let o=e.CurrentFilename.length>42?"..."+e.CurrentFilename.slice(-42):e.CurrentFilename,l=(i/t*100).toFixed(1);return $localize`${o} | File processed: ${this.#i.transform(i)}/${this.#i.transform(t)} - ${l}%`}#f(e){return $localize`Files processed ${e.ProcessedFileCount}/${e.TotalFileCount}`}#d(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?m[e.Phase]??e.Phase:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,u=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",s=this.#a(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${s}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${s}`:i=`${u}${o} files (${this.#i.transform(l)}) to go ${s}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#a(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}else if(e.Phase==="Backup_RemoteSynchronization"){let t=e.RemoteSyncDestinationCount??0,o=e.RemoteSyncDestinationIndex??0,l=t>1?` (${o}/${t})`:"";if(e.TotalFileCount>0){let u=e.TotalFileCount-e.ProcessedFileCount,s=e.TotalFileSize-e.ProcessedFileSize,D=this.#a(e);i=`Synchronizing secondary destination${l}: ${u} files (${this.#i.transform(s)}) to go ${D}`}else l&&(i=`${m[e.Phase]}`.replace("\u2026",`${l} \u2026`))}}return i}static \u0275fac=function(i){return new(i||p)};static \u0275prov=P({token:p,factory:p.\u0275fac,providedIn:"root"})};export{m as a,b};
1
+ import{a as F}from"./chunk-E4CYVUYG.js";import{a as _}from"./chunk-COEGVUM3.js";import{b as B}from"./chunk-OP7MDR2B.js";import{a as C}from"./chunk-PEOYNJJM.js";import{a as R}from"./chunk-NUV5LHQV.js";import{z}from"./chunk-CJKZ27FM.js";import{d as $}from"./chunk-KNSQLQC6.js";import{$ as a,G as f,M as S,Rc as c,W as P,l as h,q as k,qa as g,sa as d}from"./chunk-K5XGRFWJ.js";import{a as n,b as r}from"./chunk-7CGTOI24.js";var m={Starting_Operation:$localize`Starting operation …`,Backup_Begin:$localize`Starting backup …`,Backup_PreBackupVerify:$localize`Verifying backend data …`,Backup_PostBackupTest:$localize`Verifying remote data …`,Backup_PreviousBackupFinalize:$localize`Completing previous backup …`,Backup_ProcessingFiles:$localize`Processing files to backup …`,Backup_Finalize:$localize`Completing backup …`,Backup_WaitForUpload:$localize`Waiting for upload to finish …`,Backup_Delete:$localize`Deleting unwanted files …`,Backup_Compact:$localize`Compacting remote data …`,Backup_VerificationUpload:$localize`Uploading verification file …`,Backup_PostBackupVerify:$localize`Verifying backend data …`,Backup_Lock:$localize`Locking remote data …`,Backup_Complete:$localize`Backup complete!`,Backup_RemoteSynchronization:$localize`Synchronizing secondary destination(s) …`,Restore_Begin:$localize`Starting restore …`,Restore_RecreateDatabase:$localize`Rebuilding local database …`,Restore_PreRestoreVerify:$localize`Verifying remote data …`,Restore_CreateFileList:$localize`Building list of files to restore …`,Restore_CreateTargetFolders:$localize`Creating target folders …`,Restore_ScanForExistingFiles:$localize`Scanning existing files …`,Restore_ScanForLocalBlocks:$localize`Scanning for local blocks …`,Restore_PatchWithLocalBlocks:$localize`Patching files with local blocks …`,Restore_Download:$localize`Downloading files …`,Restore_PatchWithRemoteFiles:$localize`Patching files with remote data …`,Restore_VerifyRestoredFiles:$localize`Verifying restored files …`,Restore_Finaluze:$localize`Finalizing restore …`,Restore_Complete:$localize`Restore complete!`,Recreate_Begin:$localize`Starting database recreate …`,Recreate_Delete:$localize`Deleting old database …`,Recreate_Create:$localize`Creating new database …`,Recreate_Download:$localize`Downloading files …`,Recreate_Process:$localize`Processing files …`,Recreate_Complete:$localize`Database recreate complete!`,Verify_Begin:$localize`Starting verification …`,Verify_Download:$localize`Downloading files …`,Verify_Process:$localize`Processing files …`,Verify_Complete:$localize`Verification complete!`,BugReport_Begin:$localize`Starting bug report …`,BugReport_Gathering:$localize`Gathering information …`,BugReport_Complete:$localize`Bug report complete!`,List_Begin:$localize`Starting list …`,List_Download:$localize`Downloading files …`,List_Process:$localize`Processing files …`,List_Complete:$localize`List complete!`,Delete_Begin:$localize`Starting delete …`,Delete_Download:$localize`Downloading files …`,Delete_Process:$localize`Processing files …`,Delete_Complete:$localize`Delete complete!`,Compact_Begin:$localize`Starting compact …`,Compact_Download:$localize`Downloading files …`,Compact_Process:$localize`Processing files …`,Compact_Complete:$localize`Compact complete!`,Restore_DownloadingRemoteFiles:$localize`Downloading files …`,Restore_PostRestoreVerify:$localize`Verifying restored files …`,Recreate_Running:$localize`Recreating database …`,Vacuum_Running:$localize`Vacuuming database …`,Repair_Running:$localize`Repairing database …`,Verify_Running:$localize`Verifying files …`,BugReport_Running:$localize`Creating bug report …`,Delete_Listing:$localize`Listing remote files …`,Delete_Deleting:$localize`Deleting remote files …`,PurgeFiles_Begin:$localize`Listing remote files for purge …`,PurgeFiles_Process:$localize`Purging files …`,PurgeFiles_Compact:$localize`Compacting remote data …`,PurgeFiles_Complete:$localize`Purging files complete!`,ReadLockInfo_Running:$localize`Reading lock info …`,Error:$localize`Error!`};var b=class p{#i=a(_);#t=a($);#o=a(F);#e=a(B);#c=a(z);#g=a(R);#l=g(!1);#s=g(null);statusData=this.#s.asReadonly();lastState=null;serverState=c(()=>{let e=this.#e.serverState();return e?(e.ProposedSchedule=e.ProposedSchedule?.map(i=>r(n({},i),{backup:i.Item1?this.#o.getBackupById(i.Item1):null}))??null,this.lastState=e,e):this.lastState});hasProgressOnWebsocket=c(()=>this.#g.hasProgressSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");clientIsRunning=c(()=>this.serverState()?.ProgramState==="Running");runningBackupId=c(()=>{let e=this.statusData();return!!(this.serverState()?.ActiveTask&&e?.task?.Status&&e?.task?.Status!=="Completed")?e?.BackupID??null:null});isResuming=g(!1);isFetching=this.#l.asReadonly();connectionStatus=this.#e.connectionStatus;pollingInterval;#m=d(()=>{let e=this.#e.serverState();e?.ActiveTask||this.#o.getBackups(!0),this.hasProgressOnWebsocket()&&(this.#e.subscribe("progress"),this.#e.subscribe("taskqueue")),e?.ActiveTask&&this.pollingInterval===void 0?this.startPollingProgress():e?.ActiveTask||this.stopPollingProgress()});#h=d(()=>{let e=this.#e.progressState(),i=this.#e.taskQueueState();if(e){let t=i?.find(o=>o.ID===e.TaskID)??null;this.#r(r(n({},e),{task:t}))}});setConnectionMethod(e){this.#e.setConnectionMethod(e)}startPollingProgress(){this.hasProgressOnWebsocket()?this.#e.subscribe("progress"):this.pollingInterval=setInterval(()=>{this.#n()},1e3)}stopPollingProgress(){clearInterval(this.pollingInterval)}fetchProgressState(){this.#n()}pauseResume(){return this.isResuming.set(!0),this.#t.postApiV1ServerstateResume().pipe(f(()=>this.isResuming.set(!1)))}resumeDialogCheck(e){if(!this.clientIsRunning()){this.#c.open(C,{data:{title:$localize`Server paused`,message:$localize`Server is currently paused. Do you want to resume now?`,confirmText:$localize`Resume`,cancelText:$localize`No, I'll resume later`},closed:i=>{i&&this.pauseResume().subscribe({next:()=>{e()}})}});return}e()}#n(){this.#l.set(!0),this.#t.getApiV1Progressstate().pipe(S(e=>{let i=e.TaskID??null;return i===null?h(e):this.#t.getApiV1TaskByTaskid({taskid:i}).pipe(k(t=>r(n({},e),{task:t??null})))}),f(()=>this.#l.set(!1))).subscribe({next:e=>{this.#r(e),this.serverState()?.ActiveTask==null&&this.stopPollingProgress()},error:e=>{e.status===404&&this.stopPollingProgress()}})}#r(e){let i=e.TaskID??null,t=e.BackupID??null;i!==null&&t!==null&&(e.backup=this.#o.getBackupById(t)),this.#s.set(r(n({},e),{progress:this.#p(e),statusText:this.#d(e),fileStatusText:this.#u(e),fileCountProgressText:this.#f(e),actionText:e.backup?.Backup?.Name??$localize`Running task`}))}#p(e){let i=-1;if(e.task&&e)if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=0;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t;i=(e.ProcessedFileSize+t)/e.TotalFileSize,e.ProcessedFileCount===0?i=0:i>=.9&&(i=.9)}else e.Phase==="Backup_Finalize"||e.Phase==="Backup_WaitForUpload"?i=.9:e.Phase==="Backup_Delete"||e.Phase==="Backup_Compact"?i=.95:e.Phase==="Backup_VerificationUpload"||e.Phase==="Backup_PostBackupVerify"?i=.98:e.Phase==="Backup_Complete"?i=1:e.Phase==="Backup_RemoteSynchronization"?i=e.OverallProgress>0?e.OverallProgress:0:e.OverallProgress>0&&(i=e.OverallProgress);return i}#a(e){let i=(e.ActiveTransfers??[]).map(o=>o.BackendSpeed).reduce((o,l)=>(o??0)+(l??0),0)??-1,t=i<=0?e.BackendSpeed:i;return(t??-1)<0?"":` at ${this.#i.transform(t)}/s`}#u(e){let i=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileProgress:e.CurrentFileoffset)??0,t=(["Backup_WaitForUpload","Backup_ProcessingFiles"].includes(e.Phase)?e?.BackendFileSize:e.CurrentFilesize)??0;if(!e.CurrentFilename)return"";let o=e.CurrentFilename.length>42?"..."+e.CurrentFilename.slice(-42):e.CurrentFilename,l=(i/t*100).toFixed(1);return $localize`${o} | File processed: ${this.#i.transform(i)}/${this.#i.transform(t)} - ${l}%`}#f(e){return $localize`Files processed ${e.ProcessedFileCount}/${e.TotalFileCount}`}#d(e){let i="Running \u2026";if(e.task&&e){if(i=e.Phase?m[e.Phase]??e.Phase:"Running \u2026",e.TotalFileCount===0)return i;if(e.Phase==="Backup_ProcessingFiles"||e.Phase==="Restore_DownloadingRemoteFiles")if(e.StillCounting)i=`Counting (${e.TotalFileCount} files found, ${this.#i.transform(e.TotalFileSize)})`;else{let t=e.CurrentFilecomplete?0:e.CurrentFileoffset,o=e.TotalFileCount-e.ProcessedFileCount,l=e.TotalFileSize-e.ProcessedFileSize-t,u=e.Phase==="Restore_DownloadingRemoteFiles"?"Restoring: ":"",s=this.#a(e);e.Phase==="Backup_ProcessingFiles"&&o===0?i=`Completing upload ${s}`:e.BackendIsBlocking??!1?i=`Waiting for transfers ${s}`:i=`${u}${o} files (${this.#i.transform(l)}) to go ${s}`}else if(e.Phase==="Backup_WaitForUpload"){let t=this.#a(e);t!==""&&(i=`Waiting for upload to finish ${t}`)}else if(e.Phase==="Backup_RemoteSynchronization"){let t=e.RemoteSyncDestinationCount??0,o=e.RemoteSyncDestinationIndex??0,l=t>1?` (${o}/${t})`:"";if(e.TotalFileCount>0){let u=e.TotalFileCount-e.ProcessedFileCount,s=e.TotalFileSize-e.ProcessedFileSize,D=this.#a(e);i=`Synchronizing secondary destination${l}: ${u} files (${this.#i.transform(s)}) to go ${D}`}else l&&(i=`${m[e.Phase]}`.replace("\u2026",`${l} \u2026`))}}return i}static \u0275fac=function(i){return new(i||p)};static \u0275prov=P({token:p,factory:p.\u0275fac,providedIn:"root"})};export{m as a,b};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",loadComponent:()=>import("./chunk-P2EIEVFT.js"),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import("./chunk-4ISFDBI3.js")},{path:"live",loadComponent:()=>import("./chunk-G7TNRWOU.js")}]}],t=o;export{t as default};
@@ -1 +1 @@
1
- import{$ as ha,A as I,Aa as Ka,B as J,Ba as La,C as K,Ca as Ma,D as L,Da as Na,E as M,Ea as Oa,F as N,Fa as Pa,G as O,Ga as Qa,H as P,Ha as Ra,I as Q,Ia as Sa,J as R,Ja as Ta,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a as i,aa as ia,b as j,ba as ja,c as k,ca as ka,d as l,da as la,e as m,ea as ma,f as n,fa as na,g as o,ga as oa,h as p,ha as pa,i as q,ia as qa,j as r,ja as ra,k as s,ka as sa,l as t,la as ta,m as u,ma as ua,n as v,na as va,o as w,oa as wa,p as x,pa as xa,q as y,qa as ya,r as z,ra as za,s as A,sa as Aa,t as B,ta as Da,u as C,ua as Ea,v as D,va as Fa,w as E,wa as Ga,x as F,xa as Ha,y as G,ya as Ia,z as H,za as Ja}from"./chunk-ZC23RK4J.js";import{a as c,b as d,c as e,d as f,e as g,f as h,g as Ba,h as Ca}from"./chunk-OPHQNXYO.js";import{Ca as b,ia as a}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";export{k as APP_BASE_HREF,ja as AsyncPipe,h as BrowserPlatformLocation,ya as CommonModule,wa as CurrencyPipe,oa as DATE_PIPE_DEFAULT_OPTIONS,na as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,pa as DatePipe,ua as DecimalPipe,s as FormStyle,u as FormatWidth,p as HashLocationStrategy,qa as I18nPluralPipe,ra as I18nSelectPipe,b as IMAGE_CONFIG,Ma as IMAGE_LOADER,sa as JsonPipe,ta as KeyValuePipe,g as LOCATION_INITIALIZED,o as Location,j as LocationStrategy,ka as LowerCasePipe,Y as NgClass,Z as NgComponentOutlet,$ as NgFor,$ as NgForOf,_ as NgForOfContext,aa as NgIf,ba as NgIfContext,X as NgLocaleLocalization,W as NgLocalization,Ta as NgOptimizedImage,fa as NgPlural,ga as NgPluralCase,ha as NgStyle,ca as NgSwitch,da as NgSwitchCase,ea as NgSwitchDefault,ia as NgTemplateOutlet,m as NoTrailingSlashPathLocationStrategy,q as NumberFormatStyle,v as NumberSymbol,Sa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,va as PercentPipe,f as PlatformLocation,Aa as PlatformNavigation,r as Plural,xa as SlicePipe,la as TitleCasePipe,n as TrailingSlashPathLocationStrategy,t as TranslationWidth,ma as UpperCasePipe,Ja as VERSION,Ka as ViewportScroller,w as WeekDay,Ca as XhrFactory,T as formatCurrency,S as formatDate,V as formatNumber,U as formatPercent,Q as getCurrencySymbol,L as getLocaleCurrencyCode,K as getLocaleCurrencyName,J as getLocaleCurrencySymbol,E as getLocaleDateFormat,G as getLocaleDateTimeFormat,z as getLocaleDayNames,y as getLocaleDayPeriods,P as getLocaleDirection,B as getLocaleEraNames,N as getLocaleExtraDayPeriodRules,O as getLocaleExtraDayPeriods,C as getLocaleFirstDayOfWeek,x as getLocaleId,A as getLocaleMonthNames,I as getLocaleNumberFormat,H as getLocaleNumberSymbol,M as getLocalePluralCase,F as getLocaleTimeFormat,D as getLocaleWeekEndRange,R as getNumberOfCurrencyDigits,Ha as isPlatformBrowser,Ia as isPlatformServer,Na as provideCloudflareLoader,Oa as provideCloudinaryLoader,Pa as provideImageKitLoader,Qa as provideImgixLoader,Ra as provideNetlifyLoader,Ea as registerLocaleData,e as \u0275DomAdapter,Da as \u0275NavigationAdapterForLocation,La as \u0275NullViewportScroller,Fa as \u0275PLATFORM_BROWSER_ID,Ga as \u0275PLATFORM_SERVER_ID,za as \u0275PRECOMMIT_HANDLER_SUPPORTED,c as \u0275getDOM,i as \u0275normalizeQueryParams,Ba as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
1
+ import{$ as ha,A as I,Aa as Ka,B as J,Ba as La,C as K,Ca as Ma,D as L,Da as Na,E as M,Ea as Oa,F as N,Fa as Pa,G as O,Ga as Qa,H as P,Ha as Ra,I as Q,Ia as Sa,J as R,Ja as Ta,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a as i,aa as ia,b as j,ba as ja,c as k,ca as ka,d as l,da as la,e as m,ea as ma,f as n,fa as na,g as o,ga as oa,h as p,ha as pa,i as q,ia as qa,j as r,ja as ra,k as s,ka as sa,l as t,la as ta,m as u,ma as ua,n as v,na as va,o as w,oa as wa,p as x,pa as xa,q as y,qa as ya,r as z,ra as za,s as A,sa as Aa,t as B,ta as Da,u as C,ua as Ea,v as D,va as Fa,w as E,wa as Ga,x as F,xa as Ha,y as G,ya as Ia,z as H,za as Ja}from"./chunk-YF6JHIN5.js";import{a as c,b as d,c as e,d as f,e as g,f as h,g as Ba,h as Ca}from"./chunk-2YUSBRXY.js";import{Da as b,ja as a}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";export{k as APP_BASE_HREF,ja as AsyncPipe,h as BrowserPlatformLocation,ya as CommonModule,wa as CurrencyPipe,oa as DATE_PIPE_DEFAULT_OPTIONS,na as DATE_PIPE_DEFAULT_TIMEZONE,a as DOCUMENT,pa as DatePipe,ua as DecimalPipe,s as FormStyle,u as FormatWidth,p as HashLocationStrategy,qa as I18nPluralPipe,ra as I18nSelectPipe,b as IMAGE_CONFIG,Ma as IMAGE_LOADER,sa as JsonPipe,ta as KeyValuePipe,g as LOCATION_INITIALIZED,o as Location,j as LocationStrategy,ka as LowerCasePipe,Y as NgClass,Z as NgComponentOutlet,$ as NgFor,$ as NgForOf,_ as NgForOfContext,aa as NgIf,ba as NgIfContext,X as NgLocaleLocalization,W as NgLocalization,Ta as NgOptimizedImage,fa as NgPlural,ga as NgPluralCase,ha as NgStyle,ca as NgSwitch,da as NgSwitchCase,ea as NgSwitchDefault,ia as NgTemplateOutlet,m as NoTrailingSlashPathLocationStrategy,q as NumberFormatStyle,v as NumberSymbol,Sa as PRECONNECT_CHECK_BLOCKLIST,l as PathLocationStrategy,va as PercentPipe,f as PlatformLocation,Aa as PlatformNavigation,r as Plural,xa as SlicePipe,la as TitleCasePipe,n as TrailingSlashPathLocationStrategy,t as TranslationWidth,ma as UpperCasePipe,Ja as VERSION,Ka as ViewportScroller,w as WeekDay,Ca as XhrFactory,T as formatCurrency,S as formatDate,V as formatNumber,U as formatPercent,Q as getCurrencySymbol,L as getLocaleCurrencyCode,K as getLocaleCurrencyName,J as getLocaleCurrencySymbol,E as getLocaleDateFormat,G as getLocaleDateTimeFormat,z as getLocaleDayNames,y as getLocaleDayPeriods,P as getLocaleDirection,B as getLocaleEraNames,N as getLocaleExtraDayPeriodRules,O as getLocaleExtraDayPeriods,C as getLocaleFirstDayOfWeek,x as getLocaleId,A as getLocaleMonthNames,I as getLocaleNumberFormat,H as getLocaleNumberSymbol,M as getLocalePluralCase,F as getLocaleTimeFormat,D as getLocaleWeekEndRange,R as getNumberOfCurrencyDigits,Ha as isPlatformBrowser,Ia as isPlatformServer,Na as provideCloudflareLoader,Oa as provideCloudinaryLoader,Pa as provideImageKitLoader,Qa as provideImgixLoader,Ra as provideNetlifyLoader,Ea as registerLocaleData,e as \u0275DomAdapter,Da as \u0275NavigationAdapterForLocation,La as \u0275NullViewportScroller,Fa as \u0275PLATFORM_BROWSER_ID,Ga as \u0275PLATFORM_SERVER_ID,za as \u0275PRECOMMIT_HANDLER_SUPPORTED,c as \u0275getDOM,i as \u0275normalizeQueryParams,Ba as \u0275parseCookieValue,d as \u0275setRootDomAdapter};
@@ -1 +1 @@
1
- import{va as de}from"./chunk-ZC23RK4J.js";import{a as M,b as ie,c as ae,g as ce,h as le}from"./chunk-OPHQNXYO.js";import{Aa as j,Da as A,Ea as y,Fa as E,Ga as K,Ha as X,Ia as W,Ja as q,Ka as Q,La as ee,Ma as te,Na as g,S as m,Ta as w,Ua as ne,V as u,Va as re,Y as S,Z as a,Za as oe,aa as Y,cd as se,ia as f,ma as P,na as k,wa as Z,xa as U,ya as J,za as C}from"./chunk-TQTOIWBK.js";import{a as H}from"./chunk-7CGTOI24.js";var _=class{_doc;constructor(n){this._doc=n}manager},b=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),N=new S(""),V=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(i=>{i.manager=this});let o=e.filter(i=>!(i instanceof b));this._plugins=o.slice().reverse();let s=e.find(i=>i instanceof b);s&&this._plugins.push(s)}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new m(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(a(N),a(P))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),x="ng-app-id";function ue(r){for(let n of r)n.remove()}function fe(r,n){let e=n.createElement("style");return e.textContent=r,e}function Ee(r,n,e,t){let o=r.head?.querySelectorAll(`style[${x}="${n}"],link[${x}="${n}"]`);if(o)for(let s of o)s.removeAttribute(x),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function F(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var z=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,Ee(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,fe);t?.forEach(o=>this.addUsage(o,this.external,F))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ue(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ue(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,fe(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,F(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(a(f),a(U),a(j,8),a(C))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),B={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},G=/%COMP%/g;var me="%COMP%",Se=`_nghost-${me}`,we=`_ngcontent-${me}`,Me=!0,_e=new S("",{factory:()=>Me});function Te(r){return we.replace(G,r)}function De(r){return Se.replace(G,r)}function ge(r,n){return n.map(e=>e.replace(G,r))}var $=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,o,s,i,c,d=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.ngZone=c,this.nonce=d,this.tracingService=l,this.defaultRenderer=new T(e,i,c,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof D&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,d=this.eventManager,l=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.tracingService;switch(t.encapsulation){case A.Emulated:s=new O(d,l,t,this.appId,p,i,c,h);break;case A.ShadowDom:return new I(d,e,t,i,c,this.nonce,h,l);case A.ExperimentalIsolatedShadowDom:return new I(d,e,t,i,c,this.nonce,h);default:s=new D(d,l,t,p,i,c,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(a(V),a(z),a(U),a(_e),a(f),a(P),a(j),a(re,8))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),T=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.tracingService=o}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(B[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new m(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=B[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=B[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(w.DashCase|w.Important)?n.style.setProperty(e,t,o&w.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&w.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=M().getGlobalEventTarget(this.doc,n),!n))throw new m(5102,!1);let s=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var I=class extends T{hostEl;sharedStylesHost;shadowRoot;constructor(n,e,t,o,s,i,c,d){super(n,o,s,c),this.hostEl=e,this.sharedStylesHost=d,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=t.styles;l=ge(t.id,l);for(let h of l){let v=document.createElement("style");i&&v.setAttribute("nonce",i),v.textContent=h,this.shadowRoot.appendChild(v)}let p=t.getExternalStyles?.();if(p)for(let h of p){let v=F(h,o);i&&v.setAttribute("nonce",i),this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},D=class extends T{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,c,d){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=d?ge(d,l):l,this.styleUrls=t.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ne.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends D{contentAttr;hostAttr;constructor(n,e,t,o,s,i,c,d){let l=o+"-"+t.id;super(n,e,t,s,i,c,d,l),this.contentAttr=Te(l),this.hostAttr=De(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}};var L=class r extends ae{supportsDOMEvents=!0;static makeCurrent(){ie(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=be();return e==null?null:Ie(e)}resetBaseElement(){R=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ce(document.cookie,n)}},R=null;function be(){return R=R||document.head.querySelector("base"),R?R.getAttribute("href"):null}function Ie(r){return new URL(r,document.baseURI).pathname}var Oe=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),ve=["alt","control","meta","shift"],Ne={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},ye=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>M().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ve.forEach(l=>{let p=t.indexOf(l);p>-1&&(t.splice(p,1),i+=l+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ne[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ve.forEach(i=>{if(i!==o){let c=Le[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})();async function He(r,n,e){let t=H({rootComponent:r},Pe(n,e));return se(t)}function Pe(r,n){return{platformRef:n?.platformRef,appProviders:[...Be,...r?.providers??[]],platformProviders:xe}}function ke(){L.makeCurrent()}function Ue(){return new k}function je(){return Z(document),document}var xe=[{provide:C,useValue:de},{provide:J,useValue:ke,multi:!0},{provide:f,useFactory:je}];var Be=[{provide:Y,useValue:"root"},{provide:k,useFactory:Ue},{provide:N,useClass:b,multi:!0},{provide:N,useClass:ye,multi:!0},$,z,V,{provide:oe,useExisting:$},{provide:le,useClass:Oe},[]];var Ft=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Ve=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(ze),o},providedIn:"root"})}return r})(),ze=(()=>{class r extends Ve{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return E(t,"HTML")?y(t):te(this._doc,String(t)).toString();case g.STYLE:return E(t,"Style")?y(t):t;case g.SCRIPT:if(E(t,"Script"))return y(t);throw new m(5200,!1);case g.URL:return E(t,"URL")?y(t):ee(String(t));case g.RESOURCE_URL:if(E(t,"ResourceURL"))return y(t);throw new m(5201,!1);default:throw new m(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return X(e)}bypassSecurityTrustScript(e){return W(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return Q(e)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{He as a,Ft as b,Ve as c};
1
+ import{va as de}from"./chunk-YF6JHIN5.js";import{a as M,b as ie,c as ae,g as ce,h as le}from"./chunk-2YUSBRXY.js";import{Aa as C,Ba as j,Ea as A,Fa as y,Ga as E,Ha as K,Ia as X,Ja as W,Ka as q,La as Q,Ma as ee,Na as te,Oa as g,T as m,Ua as w,Va as ne,W as u,Wa as re,Z as S,_ as a,_a as oe,ba as Y,dd as se,ja as f,na as P,oa as k,xa as Z,ya as U,za as J}from"./chunk-K5XGRFWJ.js";import{a as H}from"./chunk-7CGTOI24.js";var _=class{_doc;constructor(n){this._doc=n}manager},b=(()=>{class r extends _{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o,s){return e.addEventListener(t,o,s),()=>this.removeEventListener(e,t,o,s)}removeEventListener(e,t,o,s){return e.removeEventListener(t,o,s)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),N=new S(""),V=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,t){this._zone=t,e.forEach(i=>{i.manager=this});let o=e.filter(i=>!(i instanceof b));this._plugins=o.slice().reverse();let s=e.find(i=>i instanceof b);s&&this._plugins.push(s)}addEventListener(e,t,o,s){return this._findPluginFor(t).addEventListener(e,t,o,s)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new m(5101,!1);return this._eventNameToPlugin.set(e,t),t}static \u0275fac=function(t){return new(t||r)(a(N),a(P))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),x="ng-app-id";function ue(r){for(let n of r)n.remove()}function fe(r,n){let e=n.createElement("style");return e.textContent=r,e}function Ee(r,n,e,t){let o=r.head?.querySelectorAll(`style[${x}="${n}"],link[${x}="${n}"]`);if(o)for(let s of o)s.removeAttribute(x),s instanceof HTMLLinkElement?t.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function F(r,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var z=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,Ee(e,t,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,t){for(let o of e)this.addUsage(o,this.inline,fe);t?.forEach(o=>this.addUsage(o,this.external,F))}removeStyles(e,t){for(let o of e)this.removeUsage(o,this.inline);t?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,t,o){let s=t.get(e);s?s.usage++:t.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,t){let o=t.get(e);o&&(o.usage--,o.usage<=0&&(ue(o.elements),t.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ue(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[t,{elements:o}]of this.inline)o.push(this.addElement(e,fe(t,this.doc)));for(let[t,{elements:o}]of this.external)o.push(this.addElement(e,F(t,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,t){return this.nonce&&t.setAttribute("nonce",this.nonce),e.appendChild(t)}static \u0275fac=function(t){return new(t||r)(a(f),a(U),a(j,8),a(C))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),B={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},G=/%COMP%/g;var me="%COMP%",Se=`_nghost-${me}`,we=`_ngcontent-${me}`,Me=!0,_e=new S("",{factory:()=>Me});function Te(r){return we.replace(G,r)}function De(r){return Se.replace(G,r)}function ge(r,n){return n.map(e=>e.replace(G,r))}var $=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,t,o,s,i,c,d=null,l=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.ngZone=c,this.nonce=d,this.tracingService=l,this.defaultRenderer=new T(e,i,c,this.tracingService)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,t);return o instanceof O?o.applyToHost(e):o instanceof D&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,d=this.eventManager,l=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.tracingService;switch(t.encapsulation){case A.Emulated:s=new O(d,l,t,this.appId,p,i,c,h);break;case A.ShadowDom:return new I(d,e,t,i,c,this.nonce,h,l);case A.ExperimentalIsolatedShadowDom:return new I(d,e,t,i,c,this.nonce,h);default:s=new D(d,l,t,p,i,c,h);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(t){return new(t||r)(a(V),a(z),a(U),a(_e),a(f),a(P),a(j),a(re,8))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),T=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.tracingService=o}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(B[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(pe(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(pe(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new m(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=B[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=B[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(w.DashCase|w.Important)?n.style.setProperty(e,t,o&w.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&w.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t,o){if(typeof n=="string"&&(n=M().getGlobalEventTarget(this.doc,n),!n))throw new m(5102,!1);let s=this.decoratePreventDefault(t);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(n,e,s)),this.eventManager.addEventListener(n,e,s,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function pe(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var I=class extends T{hostEl;sharedStylesHost;shadowRoot;constructor(n,e,t,o,s,i,c,d){super(n,o,s,c),this.hostEl=e,this.sharedStylesHost=d,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=t.styles;l=ge(t.id,l);for(let h of l){let v=document.createElement("style");i&&v.setAttribute("nonce",i),v.textContent=h,this.shadowRoot.appendChild(v)}let p=t.getExternalStyles?.();if(p)for(let h of p){let v=F(h,o);i&&v.setAttribute("nonce",i),this.shadowRoot.appendChild(v)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},D=class extends T{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,t,o,s,i,c,d){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=t.styles;this.styles=d?ge(d,l):l,this.styleUrls=t.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ne.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},O=class extends D{contentAttr;hostAttr;constructor(n,e,t,o,s,i,c,d){let l=o+"-"+t.id;super(n,e,t,s,i,c,d,l),this.contentAttr=Te(l),this.hostAttr=De(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}};var L=class r extends ae{supportsDOMEvents=!0;static makeCurrent(){ie(new r)}onAndCancel(n,e,t,o){return n.addEventListener(e,t,o),()=>{n.removeEventListener(e,t,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=be();return e==null?null:Ie(e)}resetBaseElement(){R=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return ce(document.cookie,n)}},R=null;function be(){return R=R||document.head.querySelector("base"),R?R.getAttribute("href"):null}function Ie(r){return new URL(r,document.baseURI).pathname}var Oe=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})(),ve=["alt","control","meta","shift"],Ne={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Le={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},ye=(()=>{class r extends _{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o,s){let i=r.parseEventName(t),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>M().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ve.forEach(l=>{let p=t.indexOf(l);p>-1&&(t.splice(p,1),i+=l+".")}),i+=s,t.length!=0||s.length===0)return null;let d={};return d.domEventName=o,d.fullKey=i,d}static matchEventFullKeyCode(e,t){let o=Ne[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ve.forEach(i=>{if(i!==o){let c=Le[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac})}return r})();async function He(r,n,e){let t=H({rootComponent:r},Pe(n,e));return se(t)}function Pe(r,n){return{platformRef:n?.platformRef,appProviders:[...Be,...r?.providers??[]],platformProviders:xe}}function ke(){L.makeCurrent()}function Ue(){return new k}function je(){return Z(document),document}var xe=[{provide:C,useValue:de},{provide:J,useValue:ke,multi:!0},{provide:f,useFactory:je}];var Be=[{provide:Y,useValue:"root"},{provide:k,useFactory:Ue},{provide:N,useClass:b,multi:!0},{provide:N,useClass:ye,multi:!0},$,z,V,{provide:oe,useExisting:$},{provide:le,useClass:Oe},[]];var Ft=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Ve=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275prov=u({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(ze),o},providedIn:"root"})}return r})(),ze=(()=>{class r extends Ve{_doc;constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case g.NONE:return t;case g.HTML:return E(t,"HTML")?y(t):te(this._doc,String(t)).toString();case g.STYLE:return E(t,"Style")?y(t):t;case g.SCRIPT:if(E(t,"Script"))return y(t);throw new m(5200,!1);case g.URL:return E(t,"URL")?y(t):ee(String(t));case g.RESOURCE_URL:if(E(t,"ResourceURL"))return y(t);throw new m(5201,!1);default:throw new m(5202,!1)}}bypassSecurityTrustHtml(e){return K(e)}bypassSecurityTrustStyle(e){return X(e)}bypassSecurityTrustScript(e){return W(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return Q(e)}static \u0275fac=function(t){return new(t||r)(a(f))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{He as a,Ft as b,Ve as c};
@@ -1 +1 @@
1
- import{b as w}from"./chunk-IQL3REGJ.js";import{b as x}from"./chunk-E4NQOMJX.js";import{a as $}from"./chunk-YYD2JU6T.js";import"./chunk-6JS7B4FW.js";import{B as y,L as k,v as b}from"./chunk-VKQQDCUN.js";import{d as U}from"./chunk-DSYNIXJF.js";import"./chunk-NPFPMA4P.js";import"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{$b as c,Cb as L,Db as a,Eb as r,F as m,Fb as d,Mb as E,Pa as O,Qc as I,Sa as l,Tb as M,Ub as R,Vb as T,Wb as f,Xb as F,Zb as N,_ as p,da as g,ea as C,gb as P,kc as v,nc as u,oc as D,pa as S,q as G,wb as s,xb as _}from"./chunk-TQTOIWBK.js";import"./chunk-7CGTOI24.js";function V(t,o){t&1&&d(0,"sh-progress-bar",3)}function B(t,o){if(t&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),t&2){let e,n,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((n=i.serverState())==null?null:n.UpdatedVersion),F(1)}}function J(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(t&2){let e,n=c();v("loading",n.checkingForUpdates()),l(2),_((e=n.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(t,o){t&1&&d(0,"sh-progress-bar",3)}var h=class t{#e=p(U);#n=p(x);#t=p($);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#n.serverState;duplicatiVersion=I(()=>this.#t.systemInfo()?.ServerVersionName??"Unknown");generalInfo=w(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),m(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(m(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let n;return n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,n,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,n){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(n.isLoading()?0:-1),l(5),f(n.duplicatiVersion()),F(5),l(2),_(((i=n.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=n.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=n.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(n.generalInfo())}},dependencies:[k,y,b],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
1
+ import{b as w}from"./chunk-2KD757N6.js";import{b as x}from"./chunk-OP7MDR2B.js";import{a as $}from"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as y,L as k,v as b}from"./chunk-CJKZ27FM.js";import{d as U}from"./chunk-KNSQLQC6.js";import"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as p,Db as L,Eb as a,Fb as r,G as m,Gb as d,Nb as E,Qa as O,Rc as I,Ta as l,Ub as M,Vb as R,Wb as T,Xb as f,Yb as F,_b as N,ac as c,ea as g,fa as C,hb as P,lc as v,oc as u,pc as D,q as G,qa as S,xb as s,yb as _}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";function V(t,o){t&1&&d(0,"sh-progress-bar",3)}function B(t,o){if(t&1&&(a(0,"a",7),M(1,2),d(2,"sh-icon"),R(),r()),t&2){let e,n,i=c(2);L("href",(e=i.serverState())==null?null:e.UpdateDownloadLink,O),l(2),f((n=i.serverState())==null?null:n.UpdatedVersion),F(1)}}function J(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Check for updates"),r(),s(2,B,3,2,"a",7)}if(t&2){let e,n=c();v("loading",n.checkingForUpdates()),l(2),_((e=n.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function X(t,o){if(t&1){let e=E();a(0,"button",6),N("click",function(){g(e);let i=c();return C(i.checkForUpdates())}),u(1,"Checking for updates \u2026"),r()}}function z(t,o){t&1&&d(0,"sh-progress-bar",3)}var h=class t{#e=p(U);#n=p(x);#t=p($);isLoading=S(!0);checkingForUpdates=S(!1);serverState=this.#n.serverState;duplicatiVersion=I(()=>this.#t.systemInfo()?.ServerVersionName??"Unknown");generalInfo=w(this.#e.getApiV1Acknowledgements().pipe(G(o=>o.Acknowledgements),m(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(m(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=P({type:t,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let o;o=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let n;return n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[o,e,n,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,n){if(e&1&&(s(0,V,1,0,"sh-progress-bar",3),a(1,"section")(2,"h3"),T(3,0),r(),a(4,"p"),T(5,1),r(),a(6,"div",4),s(7,J,3,3)(8,X,2,0,"button",5),s(9,z,1,0,"sh-progress-bar",3),r(),a(10,"div"),u(11),r()()),e&2){let i,A;_(n.isLoading()?0:-1),l(5),f(n.duplicatiVersion()),F(5),l(2),_(((i=n.serverState())==null?null:i.UpdaterState)==="Waiting"?7:((i=n.serverState())==null?null:i.UpdaterState)==="Checking"?8:-1),l(2),_(((A=n.serverState())==null?null:A.UpdaterState)==="Downloading"?9:-1),l(2),D(n.generalInfo())}},dependencies:[k,y,b],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
@@ -1,4 +1,4 @@
1
- import{b as be}from"./chunk-IQL3REGJ.js";import{d as xe}from"./chunk-DSYNIXJF.js";import{c as fe}from"./chunk-O2SMJYPC.js";import"./chunk-N2AU7VKX.js";import"./chunk-ZC23RK4J.js";import"./chunk-OPHQNXYO.js";import{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 v,gb as ce,q as ie,zc as de}from"./chunk-TQTOIWBK.js";import{a as b,b as T}from"./chunk-7CGTOI24.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 Te(n){R=n}var P={exec:()=>null};function p(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),r=r.replace(t,i),s},getRegex:()=>new RegExp(r,e)};return s}var Ne=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),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:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Oe=/^(?:[ \t]*(?:\n|$))+/,Ze=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,De=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,ze=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ae=p(ze).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(),He=p(ze).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]+)*)/,je=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Qe=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fe=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),q="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",X=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ue=p("^ {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",X).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e=p(F).replace("hr",E).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",q).getRegex(),Xe=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_e).getRegex(),W={blockquote:Xe,code:Ze,def:Qe,fences:De,heading:Ge,hr:E,html:Ue,lheading:Ae,list:Fe,newline:Oe,paragraph:_e,table:P,text:je},me=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",E).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",q).getRegex(),We=T(b({},W),{lheading:He,table:me,paragraph:p(F).replace("hr",E).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",q).getRegex()}),Ve=T(b({},W),{html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",X).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:P,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(F).replace("hr",E).replace("heading",` *#{1,6} *[^
1
+ import{b as be}from"./chunk-2KD757N6.js";import{d as xe}from"./chunk-KNSQLQC6.js";import{c as fe}from"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as v,Ac as de,Hb as he,Ib as pe,Jb as ue,Ob as ge,Pa as ae,Ta as oe,Wb as ke,Z as le,hb as ce,q as ie}from"./chunk-K5XGRFWJ.js";import{a as b,b as T}from"./chunk-7CGTOI24.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 Te(n){R=n}var P={exec:()=>null};function p(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),r=r.replace(t,i),s},getRegex:()=>new RegExp(r,e)};return s}var Ne=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),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:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Oe=/^(?:[ \t]*(?:\n|$))+/,Ze=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,De=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,ze=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ae=p(ze).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(),He=p(ze).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]+)*)/,je=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Qe=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fe=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),q="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",X=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ue=p("^ {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",X).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e=p(F).replace("hr",E).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",q).getRegex(),Xe=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_e).getRegex(),W={blockquote:Xe,code:Ze,def:Qe,fences:De,heading:Ge,hr:E,html:Ue,lheading:Ae,list:Fe,newline:Oe,paragraph:_e,table:P,text:je},me=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",E).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",q).getRegex(),We=T(b({},W),{lheading:He,table:me,paragraph:p(F).replace("hr",E).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",q).getRegex()}),Ve=T(b({},W),{html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",X).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:P,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(F).replace("hr",E).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Je=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ke=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ce=/^( {2,}|\\)\n(?!\s*$)/,Ye=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,V=/[\s\p{P}\p{S}]/u,Pe=/[^\s\p{P}\p{S}]/u,et=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,V).getRegex(),Ee=/(?!~)[\p{P}\p{S}]/u,tt=/(?!~)[\s\p{P}\p{S}]/u,rt=/(?:[^\s\p{P}\p{S}]|~)/u,nt=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ne?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ve=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,st=p(ve,"u").replace(/punct/g,N).getRegex(),it=p(ve,"u").replace(/punct/g,Ee).getRegex(),Ie="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lt=p(Ie,"gu").replace(/notPunctSpace/g,Pe).replace(/punctSpace/g,V).replace(/punct/g,N).getRegex(),at=p(Ie,"gu").replace(/notPunctSpace/g,rt).replace(/punctSpace/g,tt).replace(/punct/g,Ee).getRegex(),ot=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pe).replace(/punctSpace/g,V).replace(/punct/g,N).getRegex(),ct=p(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),ht=p(/^<(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(),pt=p(X).replace("(?:-->|$)","-->").getRegex(),ut=p("^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",pt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),L=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gt=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",L).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Le=p(/^!?\[(label)\]\[(ref)\]/).replace("label",L).replace("ref",U).getRegex(),Be=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),kt=p("reflink|nolink(?!\\()","g").replace("reflink",Le).replace("nolink",Be).getRegex(),we=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:P,anyPunctuation:ct,autolink:ht,blockSkip:nt,br:Ce,code:Ke,del:P,emStrongLDelim:st,emStrongRDelimAst:lt,emStrongRDelimUnd:ot,escape:Je,link:gt,nolink:Be,punctuation:et,reflink:Le,reflinkSearch:kt,tag:ut,text:Ye,url:P},dt=T(b({},J),{link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",L).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L).getRegex()}),D=T(b({},J),{emStrongRDelimAst:at,emStrongLDelim:it,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",we).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:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",we).getRegex()}),ft=T(b({},D),{br:p(Ce).replace("{2,}","*").getRegex(),text:p(D.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),I={normal:W,gfm:We,pedantic:Ve},A={normal:J,gfm:D,breaks:ft,pedantic:dt},xt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ye=n=>xt[n];function S(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ye)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ye);return n}function Se(n){try{n=encodeURI(n).replace(x.percentDecode,"%")}catch{return null}return n}function $e(n,e){let r=n.replace(x.findPipe,(l,i,o)=>{let a=!1,h=i;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),s=r.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 _(n,e,r){let s=n.length;if(s===0)return"";let t=0;for(;t<s;){let l=n.charAt(s-t-1);if(l===e&&!r)t++;else if(l!==e&&r)t++;else break}return n.slice(0,s-t)}function bt(n,e){if(n.indexOf(e[1])===-1)return-1;let r=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])r++;else if(n[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function Re(n,e,r,s,t){let l=e.href,i=e.title||null,o=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}function mt(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
3
3
  `).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[o]=i;return o.length>=t.length?l.slice(t.length):l}).join(`
4
4
  `)}var B=class{options;rules;lexer;constructor(n){this.options=n||R}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:_(r,`
@@ -0,0 +1 @@
1
+ import{a as $e,c as ye,d as v}from"./chunk-PNQ5BDQN.js";import{a as xe}from"./chunk-E4CYVUYG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-YS4B2B5N.js";import{b as Ae}from"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import{a as De}from"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{A as Oe,B as he,H as Ne,L as fe,W as Re,Y as we,b as ce,c as pe,d as g,e as Fe,f as de,j as ue,p as Te,q as Ce,r as Ee,t as Pe,v as Se,w as me,z as ge}from"./chunk-CJKZ27FM.js";import{a as B,d as Ie}from"./chunk-KNSQLQC6.js";import{b as ae,d as le,e as _e}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import{a as re,d as se}from"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as C,Bc as ie,Db as S,Eb as s,Fb as r,G as $,Gb as _,M as Q,Nb as M,Rc as A,Ta as a,Ub as c,Vb as p,Wb as m,Xb as L,Yb as X,Zb as b,_b as N,ac as u,ea as I,fa as x,hb as Y,lc as G,oc as D,pc as Z,qa as P,rc as ee,sa as y,tc as oe,uc as te,vc as ne,xb as F,yb as d}from"./chunk-K5XGRFWJ.js";import{a as W}from"./chunk-7CGTOI24.js";var Me=()=>["/"];function Le(t,o){t&1&&(s(0,"sh-toggle",25),c(1,5),_(2,"input",28),p(),r())}function Xe(t,o){t&1&&(s(0,"span",31),m(1,9),r())}function be(t,o){if(t&1&&(s(0,"span",31),m(1,10),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),X(1)}}function Ge(t,o){if(t&1&&_(0,"sh-progress-bar",38),t&2){let e=u(2);G("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),S("value",e.calculatePasswordStrength()*(100/5))}}function Be(t,o){t&1&&(s(0,"span",31),m(1,11),r())}function ve(t,o){t&1&&(s(0,"span",31),m(1,12),r())}function ke(t,o){if(t&1&&(s(0,"span",31),m(1,13),r()),t&2){let e=u(2);a(),L(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),X(1)}}function Ue(t,o){t&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Ke(t,o){t&1&&(c(0,7,2),_(1,"sh-icon"),p())}function Je(t,o){t&1&&(c(0,14,1),_(1,"sh-icon",40),p())}function He(t,o){t&1&&(c(0,14,2),_(1,"sh-icon"),p())}function ze(t,o){if(t&1){let e=M();s(0,"button",39),N("click",function(){I(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,Je,2,0)(3,He,2,0),p(),r()}if(t&2){let e=u(2);a(2),d(e.copiedPassword()?2:3)}}function Ve(t,o){t&1&&(s(0,"sh-alert",37),m(1,15),r())}function qe(t,o){if(t&1){let e=M();s(0,"div",26)(1,"sh-form-field")(2,"label",29),c(3,6),_(4,"sup"),p(),r(),_(5,"input",30),F(6,Xe,2,0,"span",31)(7,be,2,1,"span",31),r(),F(8,Ge,1,9,"sh-progress-bar",32),s(9,"sh-form-field"),_(10,"input",33),F(11,Be,2,0,"span",31)(12,ve,2,0,"span",31)(13,ke,2,1,"span",31),r(),s(14,"div",34)(15,"button",35),N("click",function(){I(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Ue,2,0)(18,Ke,2,0),p(),r(),s(19,"button",35),N("click",function(){I(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,ze,4,1,"button",36),r(),F(23,Ve,2,0,"sh-alert",37),r()}if(t&2){let e=u();a(5),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),a(2),d(e.exportForm.value.password?8:-1),a(2),S("type",e.showPassword()?"text":"password"),a(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),a(6),d(e.showPassword()?17:18),a(5),d(e.showCopyPassword()?22:-1),a(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function je(t,o){if(t&1&&(s(0,"div",27)(1,"code"),D(2),r()()),t&2){let e=u();a(2),Z(e.exportedCmd())}}var f=new Ee,k=class t{#o=C($e);#n=C(ge);#t=C(Ie);#e=C(ae);#i=C(le);#r=C(se);#s=C(xe);isExporting=P(!1);exportType=P("file");exportedCmd=P(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,ye()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=Ae(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#s.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=P(!1);copiedPassword=P(!1);showCopyPassword=P(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){if(this.exportType()==="file"&&this.exportFormSignal()?.exportPasswords===!0&&!this.exportFormSignal()?.encryption){this.#n.open(De,{data:{title:$localize`Export without encryption?`,message:$localize`Are you sure you want to export your backup without encryption?`,confirmText:$localize`Yes, write plain-text passwords`,cancelText:$localize`Cancel`},closed:o=>{o&&this.submitApproved()}});return}this.submitApproved()}submitApproved(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(Q(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([h,E])=>E!=null).map(([h,E])=>`${encodeURIComponent(h)}=${encodeURIComponent(E)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=B.BASE||"";return this.#r.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new re(W({},B.HEADERS??{}))})}),$(()=>this.isExporting.set(!1))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${i}`),this.#i.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe($(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let n=window.URL.createObjectURL(o),i=document.createElement("a");i.href=n,i.download=e,i.click(),window.URL.revokeObjectURL(n)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#a(o??""),this.copiedPassword.set(!0)}async#a(o){try{await navigator.clipboard.writeText(o)}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=Y({type:t,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let h;h=$localize`Password`;let E;E=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let R;R=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,R=b(R);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=b(w);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,i,T,O,U,R,K,J,H,z,V,q,w,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",E,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1&&(s(0,"header")(1,"h3"),D(2," Export backup configuration "),s(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),s(7,"button",18),N("click",function(){return n.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),s(10,"p"),D(11),r()(),s(12,"form",19)(13,"sh-button-group",20),ne("valueChange",function(T){return te(n.exportType,T)||(n.exportType=T),T}),s(14,"button",21),c(15,2),_(16,"sh-icon"),p(),r(),s(17,"button",22),c(18,3),_(19,"sh-icon"),p(),r()(),s(20,"sh-toggle",23),c(21,4),_(22,"input",24),p(),r(),F(23,Le,3,0,"sh-toggle",25),F(24,qe,24,8,"div",26),F(25,je,3,1,"div",27),r()),e&2){let i;a(4),S("routerLink",ie(12,Me)),a(3),G("loading",n.isExporting()),S("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),a(4),ee("#",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=n.activeBackup())==null||i.Backup==null?null:i.Backup.Name),a(),S("formGroup",n.exportForm),a(),oe("value",n.exportType),a(10),d(n.exportType()==="file"?23:-1),a(),d(n.encryptionFieldSignal()?24:-1),a(),d(n.exportedCmd()?25:-1)}},dependencies:[Pe,ue,pe,ce,Fe,de,Ce,Te,_e,Oe,Re,Se,Ne,he,me,fe,we],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}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
@@ -0,0 +1,2 @@
1
+ import{a as ge,c as Te,d as fe}from"./chunk-2EX5HS5X.js";import{h as Ce}from"./chunk-EVEI25GQ.js";import{a as ue}from"./chunk-NUV5LHQV.js";import{B as le,H as _e,K as se,P as pe,V as me,W as ce,Y as de,b as ee,c as te,e as ne,i as ie,k as oe,s as ae,v as re}from"./chunk-CJKZ27FM.js";import{aa as Z}from"./chunk-YF6JHIN5.js";import{$ as j,$c as Y,Bb as G,Bc as W,Cb as k,Cc as x,Db as p,Eb as l,Fb as s,Gb as V,Kb as B,Kc as A,Lb as P,Mb as T,Nb as f,Rc as K,Ta as _,Ub as E,Vb as v,Wb as Q,Xc as H,_b as C,ac as r,ea as d,fa as u,hb as q,jc as g,lc as z,mb as S,oc as c,pc as J,qa as M,qc as N,wc as U,xb as F,xc as $,yb as h,yc as O,zb as R}from"./chunk-K5XGRFWJ.js";import{a as I,b as D}from"./chunk-7CGTOI24.js";var xe=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var Fe=()=>({updateOn:"blur"}),w=t=>({formView:t}),L=t=>({$implicit:t});function he(t,i){if(t&1){let e=f();l(0,"button",15),C("click",function(){d(e);let n=r();return u(n.showTextArea.set(!1))}),E(1,6),V(2,"sh-icon"),v(),s()}}function ye(t,i){if(t&1){let e=f();l(0,"button",19,1),C("click",function(){let n=d(e).$implicit,a=r(3);return u(a.addSetting(n))}),l(2,"div",20),c(3),l(4,"p"),c(5),s()()()}if(t&2){let e=i.$implicit;z("deprecated",e.deprecatedDescription),_(3),N(" ",e.shortDescription," "),_(2),J(e.name)}}function we(t,i){if(t&1&&(l(0,"h3",11),c(1),s(),G(2,ye,6,4,"button",18,R)),t&2){let e=i.$implicit;_(),J(e.displayName),_(),k(e.options)}}function Le(t,i){if(t&1){let e=f();l(0,"sh-menu")(1,"button",21)(2,"sh-icon"),c(3,"dots-three-vertical"),s()(),B(4,17),l(5,"button",15),C("click",function(){d(e);let n=r(2);return u(n.addFreeTextSetting())}),E(6,8),V(7,"sh-icon"),v(),s(),l(8,"button",22),C("click",function(){d(e);let n=r(2);return u(n.showTextArea.set(!0))}),l(9,"sh-icon"),c(10,"link"),s(),c(11," Edit contents as text "),s(),l(12,"button",15),C("click",function(){d(e);let n=r(2);return u(n.showOptionNames.set(!n.showOptionNames()))}),E(13,9),V(14,"sh-icon"),v(),s(),P(),s()}}function Ie(t,i){if(t&1&&(l(0,"sh-menu",16)(1,"button",13),E(2,7),V(3,"sh-icon"),v(),s(),B(4,17),G(5,we,4,1,null,null,R),P(),s(),F(7,Le,15,0,"sh-menu")),t&2){let e=r();p("searchable",!0),_(5),k(e.nonSelectedOptionsGrouped()),_(2),h(e.hasFreeTextSettings()?7:-1)}}function Ve(t,i){if(t&1){let e=f();l(0,"textarea",23),C("ngModelChange",function(n){d(e);let a=r();return u(a.updateSettingsFromText(n))}),s()}if(t&2){let e=r();p("ngModel",e.settingsAsText())("ngModelOptions",W(2,Fe))}}function Ne(t,i){t&1&&(l(0,"div",24),c(1,"Add a setting above to get started."),s())}function be(t,i){t&1&&(l(0,"sh-icon",32),c(1," warning-octagon "),s())}function Me(t,i){if(t&1&&(l(0,"span",33),c(1),s()),t&2){let e=r(2).$implicit;_(),N("--",e.FormView.name)}}function Pe(t,i){if(t&1&&c(0),t&2){let e=r(2).$implicit;N(" ",e.FormView.shortDescription," ")}}function Ee(t,i){if(t&1&&(l(0,"sh-icon",34),c(1,"archive"),s()),t&2){let e=r(2).$implicit;p("shTooltip",e.FormView.deprecatedDescription)}}function ve(t,i){if(t&1&&(l(0,"sh-icon",35),c(1,"question"),s()),t&2){let e=r(2).$implicit;p("shTooltip",e.FormView.longDescription)}}function $e(t,i){if(t&1&&(F(0,be,2,0,"sh-icon",32),l(1,"span"),F(2,Me,2,1,"span",33)(3,Pe,1,1),s(),F(4,Ee,2,1,"sh-icon",34)(5,ve,2,1,"sh-icon",35)),t&2){let e=r().$implicit,o=O(1),n=r(2);h(o?0:-1),_(),z("deprecated",e.FormView.deprecatedDescription),_(),h(n.showOptionNames()?2:3),_(2),h(e.FormView.deprecatedDescription?4:e.FormView.longDescription?5:-1)}}function Ae(t,i){t&1&&T(0)}function De(t,i){if(t&1){let e=f();l(0,"div",26)(1,"label"),S(2,Ae,1,0,"ng-container",36),s(),l(3,"div")(4,"sh-form-field")(5,"input",37),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateFreeTextSettingName(a,n))}),s(),l(6,"sh-icon",38),c(7,"rectangle-dashed"),s()()(),l(8,"div")(9,"sh-form-field")(10,"input",37),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s(),l(11,"sh-icon",38),c(12,"textbox"),s()()()()}if(t&2){let e=r().$implicit,o=g(3);_(2),p("ngTemplateOutlet",o),_(3),p("ngModel",e.Name),_(5),p("ngModel",e.Value())}}function Re(t,i){t&1&&T(0)}function Ge(t,i){if(t&1){let e=f();l(0,"app-file-tree",27)(1,"label",39),S(2,Re,1,0,"ng-container",36),s(),l(3,"input",40),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);p("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0)("resolvePaths",!0),_(),p("for",n),_(),p("ngTemplateOutlet",o),_(),p("id",n)("ngModel",e.Value())}}function ke(t,i){if(t&1){let e=f();l(0,"app-file-tree",28),V(1,"label",39),l(2,"input",40),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s()()}if(t&2){let e=r().$implicit,o=O(0);p("startingPath",e.Value())("resolvePaths",!0),_(),p("for",o),_(),p("id",o)("ngModel",e.Value())}}function Be(t,i){t&1&&T(0)}function ze(t,i){t&1&&T(0)}function Ue(t,i){t&1&&(l(0,"sh-icon",38),c(1,"link"),s())}function Ke(t,i){t&1&&(l(0,"sh-icon",38),c(1,"hard-drives"),s())}function He(t,i){t&1&&(l(0,"sh-icon",38),c(1,"jar"),s())}function Je(t,i){t&1&&(l(0,"sh-icon",38),c(1,"envelope"),s())}function Xe(t,i){t&1&&(l(0,"sh-icon",38),c(1,"textbox"),s())}function je(t,i){if(t&1){let e=f();l(0,"sh-form-field")(1,"label",39),S(2,Be,1,0,"ng-container",36)(3,ze,1,0,"ng-container",41),s(),l(4,"input",42),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s(),F(5,Ue,2,0,"sh-icon",38)(6,Ke,2,0,"sh-icon",38)(7,He,2,0,"sh-icon",38)(8,Je,2,0,"sh-icon",38)(9,Xe,2,0,"sh-icon",38),s()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);_(),p("for",n),_(),p("ngTemplateOutlet",o),_(),p("ngTemplateOutlet",a)("ngTemplateOutletContext",x(10,L,x(8,w,e.FormView))),_(),p("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),_(),h(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9)}}function qe(t,i){t&1&&T(0)}function Qe(t,i){t&1&&T(0)}function We(t,i){if(t&1){let e=f();l(0,"sh-icon",45),C("click",function(){d(e);let n=r(2).$implicit;return u(n.showPassword=!n.showPassword)}),c(1," eye "),s()}}function Ye(t,i){if(t&1){let e=f();l(0,"sh-icon",45),C("click",function(){d(e);let n=r(2).$implicit;return u(n.showPassword=!n.showPassword)}),c(1," eye-slash "),s()}}function Ze(t,i){if(t&1){let e=f();l(0,"sh-form-field")(1,"label",39),S(2,qe,1,0,"ng-container",36)(3,Qe,1,0,"ng-container",41),s(),l(4,"input",43),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s(),l(5,"sh-icon",38),c(6,"password"),s(),F(7,We,2,0,"sh-icon",44)(8,Ye,2,0,"sh-icon",44),s()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);_(),p("for",n),_(),p("ngTemplateOutlet",o),_(),p("ngTemplateOutlet",a)("ngTemplateOutletContext",x(10,L,x(8,w,e.FormView))),_(),p("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),_(3),h(e.showPassword?7:8)}}function et(t,i){t&1&&T(0)}function tt(t,i){t&1&&T(0)}function nt(t,i){if(t&1&&c(0),t&2){let e=i.$implicit;N(" ",e," ")}}function it(t,i){if(t&1){let e=f();l(0,"sh-select",46)(1,"label",39),S(2,et,1,0,"ng-container",36)(3,tt,1,0,"ng-container",41),s(),l(4,"input",40),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s()(),S(5,nt,1,1,"ng-template",null,3,A)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let m=g(10);p("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),_(),p("for",a),_(),p("ngTemplateOutlet",n),_(),p("ngTemplateOutlet",m)("ngTemplateOutletContext",x(11,L,x(9,w,o.FormView))),_(),p("id",a)("ngModel",o.Value())}}function ot(t,i){t&1&&T(0)}function at(t,i){t&1&&T(0)}function rt(t,i){if(t&1){let e=f();l(0,"app-size",47),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),l(1,"label",39),S(2,ot,1,0,"ng-container",36)(3,at,1,0,"ng-container",41),s()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);p("inputType",e.Name)("ngModel",e.Value())("customId",n),_(),p("for",n),_(),p("ngTemplateOutlet",o),_(),p("ngTemplateOutlet",a)("ngTemplateOutletContext",x(9,L,x(7,w,e.FormView)))}}function lt(t,i){t&1&&T(0)}function _t(t,i){t&1&&T(0)}function st(t,i){if(t&1){let e=f();l(0,"sh-form-field")(1,"label",39),S(2,lt,1,0,"ng-container",36)(3,_t,1,0,"ng-container",41),s(),l(4,"input",48),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s(),l(5,"sh-icon",38),c(6,"numpad"),s()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);_(),p("for",n),_(),p("ngTemplateOutlet",o),_(),p("ngTemplateOutlet",a)("ngTemplateOutletContext",x(8,L,x(6,w,e.FormView))),_(),p("id",n)("ngModel",e.Value())}}function pt(t,i){t&1&&T(0)}function mt(t,i){t&1&&T(0)}function ct(t,i){if(t&1){let e=f();l(0,"sh-toggle",30)(1,"label",39),S(2,pt,1,0,"ng-container",36)(3,mt,1,0,"ng-container",41),s(),l(4,"input",49),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);_(),p("for",n),_(),p("ngTemplateOutlet",o),_(),p("ngTemplateOutlet",a)("ngTemplateOutletContext",x(8,L,x(6,w,e.FormView))),_(),p("id",n)("ngModel",e.Value())}}function dt(t,i){t&1&&T(0)}function ut(t,i){t&1&&T(0)}function Ct(t,i){if(t&1&&c(0),t&2){let e=i.$implicit;N(" ",e," ")}}function gt(t,i){if(t&1){let e=f();l(0,"sh-select",50)(1,"label",39),S(2,dt,1,0,"ng-container",36)(3,ut,1,0,"ng-container",41),s(),l(4,"input",51),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),s()(),S(5,Ct,1,1,"ng-template",null,4,A)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let m=g(10);p("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),_(),p("for",a),_(),p("ngTemplateOutlet",n),_(),p("ngTemplateOutlet",m)("ngTemplateOutletContext",x(10,L,x(8,w,o.FormView))),_(),p("ngModel",o.Value())}}function Tt(t,i){t&1&&T(0)}function ft(t,i){t&1&&T(0)}function xt(t,i){if(t&1){let e=f();l(0,"app-timespan",47),C("ngModelChange",function(n){d(e);let a=r().$implicit,m=r(2);return u(m.updateSettingValue(a,n))}),l(1,"label",39),S(2,Tt,1,0,"ng-container",36)(3,ft,1,0,"ng-container",41),s()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);p("inputType",e.Name)("ngModel",e.Value())("customId",n),_(),p("for",n),_(),p("ngTemplateOutlet",o),_(),p("ngTemplateOutlet",a)("ngTemplateOutletContext",x(9,L,x(7,w,e.FormView)))}}function St(t,i){if(t&1){let e=f();U(0)(1),S(2,$e,6,5,"ng-template",null,2,A),l(4,"div",25),F(5,De,13,3,"div",26)(6,Ge,4,10,"app-file-tree",27)(7,ke,3,5,"app-file-tree",28)(8,je,10,12,"sh-form-field")(9,Ze,9,12,"sh-form-field")(10,it,7,13)(11,rt,4,11,"app-size",29)(12,st,7,10,"sh-form-field")(13,ct,5,10,"sh-toggle",30)(14,gt,7,12)(15,xt,4,11,"app-timespan",29),l(16,"button",31),C("click",function(){let n=d(e).$implicit,a=r(2);return u(a.removeSetting(n))}),l(17,"sh-icon"),c(18,"x-bold"),s()()()}if(t&2){let e=i.$implicit,o=i.$index,n=r(2);$("destination-"+e.Name+o),_(),$(n.inAppOptions(e.Name)),_(3),z("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),_(),h(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function Ot(t,i){if(t&1&&(F(0,Ne,2,0,"div",24),G(1,St,19,5,null,null,R)),t&2){let e=r();h(e.selectedSettings().length===0?0:-1),_(),k(e.selectedSettings())}}function Ft(t,i){if(t&1&&(l(0,"sh-icon",52),c(1,"x-circle"),s()),t&2){r();let e=O(0);p("shTooltip",(e==null?null:e.message)??"Invalid value")}}function ht(t,i){if(t&1&&(l(0,"sh-icon",34),c(1,"warning"),s()),t&2){r();let e=O(0);p("shTooltip",(e==null?null:e.message)??"Invalid value")}}function yt(t,i){if(t&1&&(U(0),F(1,Ft,2,1,"sh-icon",52)(2,ht,2,1,"sh-icon",34)),t&2){r();let e=O(0),o=r().$implicit,n=$(o.formView.validate(e));_(),h((n==null?null:n.type)==="error"?1:(n==null?null:n.type)==="warning"?2:-1)}}function wt(t,i){if(t&1&&(U(0),F(1,yt,3,2)),t&2){let e=r().$implicit,n=($(e.Value())??"").toString().trim()==="";_(),h(!n&&e.formView.validate?1:-1)}}function Lt(t,i){if(t&1&&F(0,wt,2,2),t&2){let e=i.$implicit;h(e.Value?0:-1)}}var Se=class t{#e=j(ue);options=Y.required();hiddenOptions=H([]);hasFreeTextSettings=H(!1);applicationOptions=H();showTextArea=M(!1);showOptionNames=M(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=K(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(y=>y.name===n.Name?.replace("--","")),m=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(m=this.isTrue(m)),a.type==="Integer"&&(m=parseInt(m)||0),a.type==="Enumeration"&&a.options){let b=m?.trim().toLowerCase(),X=a.options.find(Oe=>(Oe??"").trim().toLocaleLowerCase()===b);X&&(m=X)}let y=xe.find(b=>b.name===a?.name);return y&&(a=I(I({},a),y)),D(I({},n),{Value:M(m),FormView:a})}else if(this.hasFreeTextSettings())return D(I({},n),{Value:M(m),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=K(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>D(I({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=K(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
+ `));updateSettingsFromText(i){if(typeof i!="string")return;let e=Ce(i);this.options.update(()=>e)}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}])}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]})}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(m=>m.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let m=e?.trim().toLowerCase()??"",y=i.FormView.options.find(b=>(b??"").trim().toLocaleLowerCase()===m);if(y)return n[a].Value=y,n}return n[a].Value=e,n})}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(m=>m.Name===i.Name);return n[a].Name=e,n})}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=q({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;a=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Toggle option names `;let m;return m=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,a,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles","resolvePaths"],[3,"startingPath","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",m,1,"error"],[1,"optionname"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(l(0,"sh-toggle-card",10),B(1,11)(2),Q(3,5),P(),l(4,"div",12),F(5,he,3,0,"button",13)(6,Ie,8,2),s(),P(),F(7,Ve,1,3,"textarea",14)(8,Ot,3,1),s(),S(9,Lt,1,1,"ng-template",null,0,A)),e&2&&(p("disableToggle",!0)("isActive",!0),_(5),h(o.showTextArea()?5:6),_(2),h(o.showTextArea()?7:8))},dependencies:[ae,te,oe,ee,ne,ie,ge,Te,fe,Z,me,_e,le,se,de,re,pe,ce],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.optionname[_ngcontent-%COMP%]{font-family:monospace}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{Se as a};
@@ -0,0 +1 @@
1
+ import{a as q}from"./chunk-EXAZ4QZR.js";import"./chunk-TWWAK5M6.js";import"./chunk-6DX35WDO.js";import"./chunk-35FMFK4I.js";import"./chunk-UIVZWXBK.js";import{a as W}from"./chunk-E4CYVUYG.js";import"./chunk-BPHX6VXP.js";import"./chunk-XWML36YQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-COEGVUM3.js";import"./chunk-YS4B2B5N.js";import"./chunk-KZYRTI62.js";import"./chunk-TSVSMVY4.js";import"./chunk-2KD757N6.js";import"./chunk-OP7MDR2B.js";import"./chunk-PEOYNJJM.js";import"./chunk-NUV5LHQV.js";import"./chunk-PDZNQW6F.js";import{B as P,C as F,G as z,L as H,v as f}from"./chunk-CJKZ27FM.js";import{d as j}from"./chunk-KNSQLQC6.js";import{e as N}from"./chunk-CQJRBQ6I.js";import"./chunk-V2UO7ES2.js";import"./chunk-HDDAGHHE.js";import"./chunk-YF6JHIN5.js";import"./chunk-2YUSBRXY.js";import{$ as p,Bb as x,Bc as O,Cb as w,Cc as X,Db as S,Eb as t,Fb as o,Gb as s,Ta as l,Ub as T,Vb as d,Wb as c,Xb as v,Yb as B,_b as u,ac as g,hb as L,nb as A,oc as m,rc as J,ub as D,vb as G,xb as R,yb as C,zb as b}from"./chunk-K5XGRFWJ.js";import"./chunk-7CGTOI24.js";var V=()=>[F,P,f,N],K=()=>["/restore-from-files"],Q=()=>["/restore/from-config"],U=n=>["/restore",n];function Y(n,i){if(n&1&&(t(0,"sh-card",10),u("keydown.enter",function(r){return r.target.click()})("keydown.space",function(r){return r.target.click()}),s(1,"img",16),t(2,"div",12)(3,"h3"),c(4,7),o(),t(5,"p"),m(6),o()(),t(7,"button",13),T(8,8),s(9,"sh-icon"),d(),o()()),n&2){let e=i.$implicit;S("routerLink",X(4,U,e.Backup.ID)),l(4),v(e.Backup.Name??"Backup name missing"),B(4),l(2),J(" ",(e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," ")}}function Z(n,i){if(n&1&&x(0,Y,10,6,"sh-card",15,b),n&2){let e=g(2);w(e.backups())}}function ee(n,i){if(n&1&&R(0,Z,2,0),n&2){let e=g();C(e.backups().length?0:-1)}}function ne(n,i){n&1&&(t(0,"div",17),s(1,"sh-progress-bar",18),t(2,"div",12)(3,"h3"),c(4,9),o()()())}function te(n,i){n&1&&(t(0,"sh-divider"),m(1,"Or without a local configuration"),o())}var M=class n{#e=p(W);#n=p(j);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(i){this.#n.postApiV1BackupByIdRestore({id:i.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=L({type:n,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let i;i=$localize`Where do you want to restore from?`;let e;e=$localize`Direct restore from backup files`;let r;r=$localize`Point to your backup files and restore from there.`;let E;E=$localize` Start ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let _;_=$localize`Restore from configuration`;let h;h=$localize`Load destination from an exported job`;let I;I=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let y;y=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $;$=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let k;return k=$localize`Loading backups...`,[i,e,r,E,_,h,I,y,$,k,[1,"type-a","actionable",3,"keydown.enter","keydown.space","routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["shButton","","tabindex","-1"],["src","assets/images/restore.png","alt","","width","48px"],[1,"type-a","actionable",3,"routerLink"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,r){e&1&&(s(0,"app-status-bar"),t(1,"section")(2,"h2"),c(3,0),o(),A(4,ee,1,1)(5,ne,5,0),D(6,4,V,null,5),R(8,te,2,0,"sh-divider"),t(9,"sh-card",10),u("keydown.enter",function(_){return _.target.click()})("keydown.space",function(_){return _.target.click()}),s(10,"img",11),t(11,"div",12)(12,"h3"),c(13,1),o(),t(14,"p"),c(15,2),o()(),t(16,"button",13),T(17,3),s(18,"sh-icon"),d(),o()(),t(19,"sh-card",10),u("keydown.enter",function(_){return _.target.click()})("keydown.space",function(_){return _.target.click()}),s(20,"img",14),t(21,"div",12)(22,"h3"),c(23,4),o(),t(24,"p"),c(25,5),o()(),t(26,"button",13),T(27,6),s(28,"sh-icon"),d(),o()()()),e&2&&(l(6),G(!r.backupsLoading()),l(2),C(r.backups().length?8:-1),l(),S("routerLink",O(4,K)),l(10),S("routerLink",O(5,Q)))},dependencies:[q,F,P,z,f,H,N],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}sh-divider[_ngcontent-%COMP%]{color:var(--base-8)}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{M as default};