@duplicati/ngclient 0.0.233 → 0.0.234

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 (104) hide show
  1. package/{chunk-h6n5A491.js → chunk-0lYdrxte.js} +1 -1
  2. package/{chunk-bt6lhYfG.js → chunk-1-oPQ4n-.js} +1 -1
  3. package/{chunk-Dz5guW4b.js → chunk-5EFCeqK3.js} +1 -1
  4. package/{chunk-CS2J-6VZ.js → chunk-5kQsbzck.js} +1 -1
  5. package/{chunk-D2G7_0hG.js → chunk-AHhgJqe4.js} +1 -1
  6. package/{chunk-mA4J4_nC.js → chunk-B-T54LAJ.js} +1 -1
  7. package/{chunk-C9OqpwwE.js → chunk-B-c3Zv6R.js} +1 -1
  8. package/{chunk-C9ecLR93.js → chunk-B0ETfgeR.js} +1 -1
  9. package/{chunk-B_cIFQAl.js → chunk-B1dNb-QT.js} +1 -1
  10. package/{chunk-mflQLMHH.js → chunk-B8PnvglY.js} +1 -1
  11. package/{chunk-CgJAbgNN.js → chunk-BAmgFjXY.js} +1 -1
  12. package/{chunk-B6c2NXNy.js → chunk-BDhLEYas.js} +1 -1
  13. package/{chunk-L8hQtTzU.js → chunk-BFVhQEGw.js} +1 -1
  14. package/{chunk-BmmYJhOf.js → chunk-BFquKzMb.js} +1 -1
  15. package/{chunk-Dk-Wgx3e.js → chunk-BGcVKmjp.js} +1 -1
  16. package/{chunk-jy8x4GhV.js → chunk-BHrABvoK.js} +1 -1
  17. package/chunk-BNG7N21y.js +1 -0
  18. package/{chunk-CsIAXoYP.js → chunk-BQapkAzp.js} +1 -1
  19. package/chunk-BRqx-u9-.js +2 -0
  20. package/{chunk-lymL5FDY.js → chunk-BaNH2nfC.js} +1 -1
  21. package/{chunk-AuCOjHXM.js → chunk-BaR3Dslz.js} +1 -1
  22. package/{chunk-D1pDZLJ9.js → chunk-BaknLOqq.js} +1 -1
  23. package/{chunk-D3PhthfU.js → chunk-Bg98dUtr.js} +1 -1
  24. package/{chunk-BsNCg00z.js → chunk-BiSIt2zb.js} +1 -1
  25. package/chunk-BkLND74M.js +1 -0
  26. package/{chunk-DDWDcSq2.js → chunk-BnFO-7ok.js} +1 -1
  27. package/{chunk-DcdpG1YG.js → chunk-BqbJuWHd.js} +1 -1
  28. package/chunk-C4zj812G.js +1 -0
  29. package/{chunk-CIw_h8oP.js → chunk-C5G4RPpS.js} +1 -1
  30. package/{chunk-DM11Gu0H.js → chunk-CA-0mTsq.js} +1 -1
  31. package/chunk-CAEYxmzQ.js +1 -0
  32. package/chunk-CGnsbLNG.js +1 -0
  33. package/chunk-CPjYiawK.js +1 -0
  34. package/chunk-CQHKuUqk.js +2 -0
  35. package/{chunk-Bgw6E0Xu.js → chunk-CSYDDxaa.js} +1 -1
  36. package/{chunk-B1c7h-_w.js → chunk-CTH9uShX.js} +1 -1
  37. package/{chunk-DWiO0A6h.js → chunk-CUNe6D-d.js} +1 -1
  38. package/{chunk-CGsQCBkP.js → chunk-CUaDFQyH.js} +1 -1
  39. package/chunk-CnyuuWJ3.js +1 -0
  40. package/{chunk-CuJ_uEdr.js → chunk-CsgB8OpN.js} +1 -1
  41. package/chunk-CspKioFm.js +4 -0
  42. package/{chunk-DidJB9ig.js → chunk-Cv4o9u3S.js} +1 -1
  43. package/chunk-CxOam2tf.js +1 -0
  44. package/{chunk-DD_wKpGc.js → chunk-CxUx2RFx.js} +1 -1
  45. package/{chunk-Bj7EyCHb.js → chunk-D0qGkLVr.js} +1 -1
  46. package/{chunk-Z81HNfgo.js → chunk-D4S_1RMU.js} +1 -1
  47. package/{chunk-C3gUxHQM.js → chunk-D5zSyubd.js} +1 -1
  48. package/{chunk-nuwlP4Wz.js → chunk-D6WUhpxO.js} +5 -5
  49. package/{chunk-CvSsZZty.js → chunk-D7C8xyJI.js} +1 -1
  50. package/{chunk-Ca1aaA1h.js → chunk-D9dEfxn4.js} +1 -1
  51. package/{chunk-ByL8ndec.js → chunk-DB1KeglF.js} +1 -1
  52. package/{chunk-DGvC49aU.js → chunk-DCsYP4vf.js} +1 -1
  53. package/chunk-DGO0_pkA.js +2 -0
  54. package/chunk-DKOaWS_j.js +2 -0
  55. package/{chunk-FTZ5atHM.js → chunk-DP2sLJDC.js} +1 -1
  56. package/chunk-DXh9g32e.js +1 -0
  57. package/{chunk-CfxBiw7I.js → chunk-DYfv4gJW.js} +1 -1
  58. package/chunk-DZMTCfoN.js +1 -0
  59. package/chunk-DcU0yXkQ.js +1 -0
  60. package/chunk-Dg-uYwbp.js +2 -0
  61. package/{chunk-C7AeY2HY.js → chunk-DmwtL4h3.js} +1 -1
  62. package/chunk-DnTA-m4k.js +2 -0
  63. package/{chunk-DhiIZLrA.js → chunk-DqoYKCmi.js} +1 -1
  64. package/{chunk-CIe9Bupz.js → chunk-Du0Hd0t6.js} +1 -1
  65. package/{chunk-DXEgz1tV.js → chunk-Dyq6iPbF.js} +1 -1
  66. package/chunk-DzYR8wiz.js +2 -0
  67. package/{chunk-aCJqF9DH.js → chunk-FZcbbWYC.js} +1 -1
  68. package/{chunk-CyqqlRjO.js → chunk-GKdOPH_4.js} +1 -1
  69. package/{chunk-CX3Axjpk.js → chunk-KNmRQWOM.js} +1 -1
  70. package/{chunk-BxpXVeOr.js → chunk-OIDsf_Aq.js} +1 -1
  71. package/{chunk-aYCYzU5Q.js → chunk-S-sgDIKw.js} +1 -1
  72. package/{chunk-B5Y6lgE8.js → chunk-UCY_7-Of.js} +1 -1
  73. package/{chunk-MDqH8T3Z.js → chunk-UUMQmD5I.js} +1 -1
  74. package/{chunk-DGxk44Me.js → chunk-X3dwwJIr.js} +1 -1
  75. package/chunk-_J1lTnCH.js +1 -0
  76. package/{chunk-K2iai6rC.js → chunk-i6kMmbhY.js} +1 -1
  77. package/chunk-oobMnyEm.js +3 -0
  78. package/{chunk-BstaUtD_.js → chunk-pxcB56N0.js} +1 -1
  79. package/{chunk-CWgXi-7W.js → chunk-sgM_r5NM.js} +1 -1
  80. package/{chunk-eiyaQxBt.js → chunk-umUQn7LQ.js} +1 -1
  81. package/{chunk-8Y8ReLEn.js → chunk-xwdrpTfz.js} +1 -1
  82. package/index.html +1 -1
  83. package/{main-3NL5M6JB.js → main-XKLDSNLY.js} +1 -1
  84. package/package.json +1 -1
  85. package/chunk-B1wZ4poV.js +0 -1
  86. package/chunk-BZgAzrl9.js +0 -2
  87. package/chunk-BaSm1lsB.js +0 -2
  88. package/chunk-BrtdRb9j.js +0 -1
  89. package/chunk-BzJX1fKw.js +0 -1
  90. package/chunk-C7gG_Yh_.js +0 -2
  91. package/chunk-CP6xnjgo.js +0 -3
  92. package/chunk-ChUm8bnG.js +0 -1
  93. package/chunk-CkRbgemk.js +0 -2
  94. package/chunk-ClRItSzt.js +0 -1
  95. package/chunk-D55uWC7G.js +0 -1
  96. package/chunk-DV8bRznt.js +0 -2
  97. package/chunk-DbbyVAGl.js +0 -1
  98. package/chunk-DuYKanVS.js +0 -1
  99. package/chunk-DwmssGG9.js +0 -2
  100. package/chunk-DxFBzFom.js +0 -1
  101. package/chunk-I5dxaHZ4.js +0 -2
  102. package/chunk-Y-xXBGKy.js +0 -1
  103. package/chunk-ksSA-rDF.js +0 -1
  104. package/chunk-uGh0bVbu.js +0 -4
@@ -1 +1 @@
1
- import {T,ad as Mr,br as uv,B as A,G as Ge,N as Nt,z as za,bs as Rr,aZ as ee}from'./main-3NL5M6JB.js';import {S}from'./chunk-mflQLMHH.js';var m=class i{#i=T(S);#t=T(Mr);#o=T(uv);#e=A("darkTheme",null,true);#s=Ge(this.#i.innerWidth);isMobile=Nt(()=>this.#s()<1024);sidenavType=Ge(this.isMobile()?"overlay":"");isNavOpen=Ge(false);isDarkMode=this.#e.asReadonly();darkModeEffect=za(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"));});isMobileEffect=za(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"");});constructor(){Rr(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth);});}toggleNav(){this.isNavOpen.set(!this.isNavOpen());}toggleBodyClass(){this.#e.set(!this.isDarkMode());}setDarkMode(){this.#e.set(true);}setLightMode(){this.#e.set(false);}static \u0275fac=function(h){return new(h||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m};
1
+ import {T,ad as Mr,br as uv,B as A,G as Ge,N as Nt,z as za,bs as Rr,aZ as ee}from'./main-XKLDSNLY.js';import {S}from'./chunk-B8PnvglY.js';var m=class i{#i=T(S);#t=T(Mr);#o=T(uv);#e=A("darkTheme",null,true);#s=Ge(this.#i.innerWidth);isMobile=Nt(()=>this.#s()<1024);sidenavType=Ge(this.isMobile()?"overlay":"");isNavOpen=Ge(false);isDarkMode=this.#e.asReadonly();darkModeEffect=za(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"));});isMobileEffect=za(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"");});constructor(){Rr(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth);});}toggleNav(){this.isNavOpen.set(!this.isNavOpen());}toggleBodyClass(){this.#e.set(!this.isDarkMode());}setDarkMode(){this.#e.set(true);}setLightMode(){this.#e.set(false);}static \u0275fac=function(h){return new(h||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m};
@@ -1 +1 @@
1
- import {T,A as v$1,h as hw,v as v$2,_ as _t,Q as Qi,d as aT,$ as $l,C as CE,g as cT,S as aC,V as Ul,W as Eg,s as jC,X as Wl,Y as cC,n as nC}from'./main-3NL5M6JB.js';var S=["*",[["","footer",""]]],L=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-custom-card"]],ngContentSelectors:L,decls:11,vars:0,consts:[[1,"card"],["src","assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(aC(S),Ul(0,"div",0),Eg(1,"img",1),Ul(2,"header")(3,"div",2),Eg(4,"img",3),jC(5," Duplicati "),Wl()(),Ul(6,"main"),cC(7),Ul(8,"footer"),cC(9,1),Wl()()(),Eg(10,"div",4));},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}']})};function v(t,n){t&1&&(Qi(0,"h3"),nC(1,0),$l());}function N(t,n){t&1&&(Qi(0,"h3"),nC(1,1),$l(),Qi(2,"button",3),nC(3,2),$l());}var p=class t{#e=T(v$1);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(Qi(0,"app-custom-card"),aT(1,v,2,0,"h3")(2,N,4,0),$l()),e&2&&(CE(),cT(o.isLoggingOut()?1:2));},dependencies:[s,v$2,_t],styles:["[_nghost-%COMP%]{display:block}"]})};export{p as default};
1
+ import {T,A as v$1,h as hw,v as v$2,_ as _t,Q as Qi,d as aT,$ as $l,C as CE,g as cT,S as aC,V as Ul,W as Eg,s as jC,X as Wl,Y as cC,n as nC}from'./main-XKLDSNLY.js';var S=["*",[["","footer",""]]],L=["*","[footer]"],s=class t{static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-custom-card"]],ngContentSelectors:L,decls:11,vars:0,consts:[[1,"card"],["src","assets/noise/auth-noise.svg",1,"noise"],[1,"header-title"],["src","assets/duplicati/duplicati.svg","alt",""],[1,"bg"]],template:function(e,o){e&1&&(aC(S),Ul(0,"div",0),Eg(1,"img",1),Ul(2,"header")(3,"div",2),Eg(4,"img",3),jC(5," Duplicati "),Wl()(),Ul(6,"main"),cC(7),Ul(8,"footer"),cC(9,1),Wl()()(),Eg(10,"div",4));},styles:['[_nghost-%COMP%]{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center;background-color:var(--base-2)}body.dark [_nghost-%COMP%] .card[_ngcontent-%COMP%]:before{background:radial-gradient(rgba(var(--primary-rgb-900),1),#0000 60%)}.card[_ngcontent-%COMP%]{max-width:30rem;width:100%;position:relative;z-index:100;background-color:var(--base-1);border-radius:var(--shape-5);box-shadow:var(--box-shadow-40);border:1px solid var(--base-3);overflow:hidden}.card[_ngcontent-%COMP%]:before{content:"";position:absolute;height:30rem;transform:translateY(-17.8125rem);left:0;right:0;z-index:-2;background:radial-gradient(rgb(from var(--primary-1) r g b/1),#0000 60%)}.card[_ngcontent-%COMP%] img.noise[_ngcontent-%COMP%]{position:absolute;height:30rem;width:100%;transform:translateY(-17.8125rem);left:0;right:0;z-index:-1;-webkit-mask-image:radial-gradient(#000,#0000 60%);mask-image:radial-gradient(#000,#0000 60%)}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 0;gap:.75rem;position:relative;z-index:10}.header-title[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;gap:.625rem}.header-title[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:1.75rem;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}main[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:2rem;gap:2.5rem;position:relative;z-index:10}main[_ngcontent-%COMP%] footer[_ngcontent-%COMP%]{font:var(--paragraph-40);color:var(--base-9);text-align:center;text-wrap:balance}.bg[_ngcontent-%COMP%]{position:fixed;inset:0;width:100vw;height:100vh;background-image:url(assets/backgrounds/base-bg.svg);background-size:cover;background-position:center;background-repeat:no-repeat}body.dark[_ngcontent-%COMP%] .bg[_ngcontent-%COMP%]{opacity:1}footer[_ngcontent-%COMP%]:empty{display:none}']})};function v(t,n){t&1&&(Qi(0,"h3"),nC(1,0),$l());}function N(t,n){t&1&&(Qi(0,"h3"),nC(1,1),$l(),Qi(2,"button",3),nC(3,2),$l());}var p=class t{#e=T(v$1);isLoggingOut=this.#e.isLoggingOut;ngOnInit(){this.#e.logout();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-logout"]],decls:3,vars:1,consts:()=>{let n;n=$localize`Logging out...`;let e;e=$localize`You have successfully logged out your being redirected to login page.`;let o;return o=$localize`Go to login page`,[n,e,o,["shButton","","routerLink","/",1,"raised","primary"]]},template:function(e,o){e&1&&(Qi(0,"app-custom-card"),aT(1,v,2,0,"h3")(2,N,4,0),$l()),e&2&&(CE(),cT(o.isLoggingOut()?1:2));},dependencies:[s,v$2,_t],styles:["[_nghost-%COMP%]{display:block}"]})};export{p as default};
@@ -1 +1 @@
1
- import {e as ee}from'./chunk-K2iai6rC.js';import'./chunk-CIe9Bupz.js';import'./chunk-BmmYJhOf.js';import'./chunk-CvSsZZty.js';import'./chunk-CyqqlRjO.js';import'./chunk-CX3Axjpk.js';import'./chunk-C3gUxHQM.js';import'./chunk-DidJB9ig.js';import {T,aw as W,a5 as g,ab as C,a6 as be,G as Ge,aG as pt,N as Nt,z as za,aE as jo,J as zu,at as h,h as hw,v,c as N$1,_ as _t,i as Ig,Q as Qi,F as Fg,j as jg,$ as $l,n as nC,H as Hg,p as lm,r as CD,d as aT,C as CE,au as Vg,av as rC,L as Kg,y as vg,f as NC,w as cm,x as _D,g as cT,U as UC,aU as sy,aV as ay,s as jC}from'./main-3NL5M6JB.js';import'./chunk-DDWDcSq2.js';import {F as Fe}from'./chunk-DhiIZLrA.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-B6c2NXNy.js';import {a as at}from'./chunk-MDqH8T3Z.js';import'./chunk-mflQLMHH.js';import'./chunk-CuJ_uEdr.js';import {L,F}from'./chunk-DGvC49aU.js';import'./chunk-D1pDZLJ9.js';function ue(_,t){_&1&&(Qi(0,"sh-icon",20),jC(1,"spinner"),$l());}function pe(_,t){_&1&&(Qi(0,"sh-icon",21),jC(1,"check"),$l());}function he(_,t){_&1&&(Qi(0,"sh-icon",22),jC(1,"warning"),$l()),_&2&&vg("shTooltip","File not found");}function Te(_,t){let a=F(_).pipe(sy(t),ay());return L(a,{initialValue:_()})}var N=class _{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Te(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=za(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(jo(1),zu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=za(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),zu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(jo(1),zu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(jo(1),zu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(zu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),zu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(zu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(zu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),this.#e.postApiV1BackupByIdCompact({id:this.backupId()}).pipe(zu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=hw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let O;O=$localize`Placement`;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,S,f,I,M,R,B,O,$,v,k,y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(Ig(0,"app-status-bar"),Qi(1,"section")(2,"div",15)(3,"button",16),Fg(4,0),Ig(5,"sh-icon"),jg(),$l()(),Qi(6,"article")(7,"h1"),nC(8,1),$l(),Qi(9,"p"),nC(10,2),$l()(),Qi(11,"article")(12,"h2"),nC(13,3),$l(),Qi(14,"p"),nC(15,4),$l(),Qi(16,"div",17)(17,"button",18),Hg("click",function(){return e.repairDatabase()}),Fg(18,5),Ig(19,"sh-icon"),jg(),$l(),Qi(20,"button",18),Hg("click",function(){return e.deleteDatabase()}),Fg(21,6),Ig(22,"sh-icon"),jg(),$l(),Qi(23,"button",18),Hg("click",function(){return e.restoreDatabase()}),Fg(24,7),Ig(25,"sh-icon"),jg(),$l(),Qi(26,"button",18),Hg("click",function(){return e.createErrorReport()}),Fg(27,8),Ig(28,"sh-icon"),jg(),$l(),Qi(29,"button",18),Hg("click",function(){return e.compactDatabase()}),Fg(30,9),Ig(31,"sh-icon"),jg(),$l()()(),Qi(32,"article")(33,"h2"),nC(34,10),$l(),Qi(35,"sh-form-field")(36,"input",19),lm("ngModelChange",function(S){return UC(e.backupFilePath,S)||(e.backupFilePath=S),S}),$l(),CD(),aT(37,ue,2,0,"sh-icon",20)(38,pe,2,0,"sh-icon",21)(39,he,2,1,"sh-icon",22),$l(),Qi(40,"div",23)(41,"button",18),Hg("click",function(){return e.resetDatabasePath()}),Fg(42,11),Ig(43,"sh-icon"),jg(),$l(),Qi(44,"button",18),Hg("click",function(){return e.saveDatabasePath()}),Fg(45,12),Ig(46,"sh-icon"),jg(),$l(),Qi(47,"button",18),Hg("click",function(){return e.saveAndRepairDatabasePath()}),Fg(48,13),Ig(49,"sh-icon"),jg(),$l(),Qi(50,"button",18),Hg("click",function(){return e.moveDatabasePath()}),Fg(51,14),Ig(52,"sh-icon"),jg(),$l()()()()),a&2&&(CE(8),Vg(e.activeBackup()?.Backup?.Name),rC(8),CE(9),Kg("loading",e.isRepairing()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Kg("loading",e.isDeleting()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Kg("loading",e.isRestoring()),vg("disabled",e.pathHasChanged()),CE(3),Kg("loading",e.isCreatingBugReport()),vg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),CE(3),Kg("loading",e.isCompacting()),vg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),CE(6),NC(e.isValidatedPath()?"success":"error"),CE(),cm("ngModel",e.backupFilePath),_D(),CE(),cT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),CE(4),vg("disabled",!e.pathHasChanged()),CE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),vg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};
1
+ import {e as ee}from'./chunk-i6kMmbhY.js';import'./chunk-Du0Hd0t6.js';import'./chunk-BFquKzMb.js';import'./chunk-D7C8xyJI.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,aw as W,a5 as g,ab as C,a6 as be,G as Ge,aG as pt,N as Nt,z as za,aE as jo,J as zu,at as h,h as hw,v,c as N$1,_ as _t,i as Ig,Q as Qi,F as Fg,j as jg,$ as $l,n as nC,H as Hg,p as lm,r as CD,d as aT,C as CE,au as Vg,av as rC,L as Kg,y as vg,f as NC,w as cm,x as _D,g as cT,U as UC,aU as sy,aV as ay,s as jC}from'./main-XKLDSNLY.js';import'./chunk-BnFO-7ok.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BDhLEYas.js';import {a as at}from'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import {L,F}from'./chunk-DCsYP4vf.js';import'./chunk-BaknLOqq.js';function ue(_,t){_&1&&(Qi(0,"sh-icon",20),jC(1,"spinner"),$l());}function pe(_,t){_&1&&(Qi(0,"sh-icon",21),jC(1,"check"),$l());}function he(_,t){_&1&&(Qi(0,"sh-icon",22),jC(1,"warning"),$l()),_&2&&vg("shTooltip","File not found");}function Te(_,t){let a=F(_).pipe(sy(t),ay());return L(a,{initialValue:_()})}var N=class _{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ge("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ge("");lastValidatedPath=Ge("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ge(false);#i=Te(this.backupFilePath,500);#n=Ge(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=za(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(jo(1),zu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ge(false);isRepairing=Ge(false);isDeleting=Ge(false);isSavingDbPath=Ge(false);isSavingAndRepairing=Ge(false);isMovingDb=Ge(false);isCreatingBugReport=Ge(false);createdReport=Ge(false);isCompacting=Ge(false);activeBackupEffect=za(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),zu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(jo(1),zu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(jo(1),zu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(zu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(jo(1),zu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(zu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(zu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),this.#e.postApiV1BackupByIdCompact({id:this.backupId()}).pipe(zu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=hw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let O;O=$localize`Placement`;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,S,f,I,M,R,B,O,$,v,k,y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(Ig(0,"app-status-bar"),Qi(1,"section")(2,"div",15)(3,"button",16),Fg(4,0),Ig(5,"sh-icon"),jg(),$l()(),Qi(6,"article")(7,"h1"),nC(8,1),$l(),Qi(9,"p"),nC(10,2),$l()(),Qi(11,"article")(12,"h2"),nC(13,3),$l(),Qi(14,"p"),nC(15,4),$l(),Qi(16,"div",17)(17,"button",18),Hg("click",function(){return e.repairDatabase()}),Fg(18,5),Ig(19,"sh-icon"),jg(),$l(),Qi(20,"button",18),Hg("click",function(){return e.deleteDatabase()}),Fg(21,6),Ig(22,"sh-icon"),jg(),$l(),Qi(23,"button",18),Hg("click",function(){return e.restoreDatabase()}),Fg(24,7),Ig(25,"sh-icon"),jg(),$l(),Qi(26,"button",18),Hg("click",function(){return e.createErrorReport()}),Fg(27,8),Ig(28,"sh-icon"),jg(),$l(),Qi(29,"button",18),Hg("click",function(){return e.compactDatabase()}),Fg(30,9),Ig(31,"sh-icon"),jg(),$l()()(),Qi(32,"article")(33,"h2"),nC(34,10),$l(),Qi(35,"sh-form-field")(36,"input",19),lm("ngModelChange",function(S){return UC(e.backupFilePath,S)||(e.backupFilePath=S),S}),$l(),CD(),aT(37,ue,2,0,"sh-icon",20)(38,pe,2,0,"sh-icon",21)(39,he,2,1,"sh-icon",22),$l(),Qi(40,"div",23)(41,"button",18),Hg("click",function(){return e.resetDatabasePath()}),Fg(42,11),Ig(43,"sh-icon"),jg(),$l(),Qi(44,"button",18),Hg("click",function(){return e.saveDatabasePath()}),Fg(45,12),Ig(46,"sh-icon"),jg(),$l(),Qi(47,"button",18),Hg("click",function(){return e.saveAndRepairDatabasePath()}),Fg(48,13),Ig(49,"sh-icon"),jg(),$l(),Qi(50,"button",18),Hg("click",function(){return e.moveDatabasePath()}),Fg(51,14),Ig(52,"sh-icon"),jg(),$l()()()()),a&2&&(CE(8),Vg(e.activeBackup()?.Backup?.Name),rC(8),CE(9),Kg("loading",e.isRepairing()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Kg("loading",e.isDeleting()),vg("disabled",!e.isValidatedPath()||e.pathHasChanged()),CE(3),Kg("loading",e.isRestoring()),vg("disabled",e.pathHasChanged()),CE(3),Kg("loading",e.isCreatingBugReport()),vg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),CE(3),Kg("loading",e.isCompacting()),vg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),CE(6),NC(e.isValidatedPath()?"success":"error"),CE(),cm("ngModel",e.backupFilePath),_D(),CE(),cT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),CE(4),vg("disabled",!e.pathHasChanged()),CE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),vg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),CE(3),vg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};
@@ -1 +1 @@
1
- import {q as qe,T,G as Ge,bP as D,N as Nt,aK as mb,ai as m,bR as Qd,bS as ys,aj as l,bF as ve,bT as ir,z as za,b as me}from'./main-3NL5M6JB.js';function F(s,e){let n=T(ve),o=new ir(1),i=za(()=>{let t;try{t=s();}catch(u){me(()=>o.error(u));return}me(()=>o.next(t));},{injector:n,manualCleanup:true});return n.get(qe).onDestroy(()=>{i.destroy(),o.complete();}),o.asObservable()}function L(s,e){let o=!e?.manualCleanup?e?.injector?.get(qe)??T(qe):null,i=O(e?.equal),t;e?.requireSync?t=Ge({kind:0},{equal:i}):t=Ge({kind:1,value:e?.initialValue},{equal:i});let u,c=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.();},complete:()=>{u?.();}});if(e?.requireSync&&t().kind===0)throw new D(601,false);return u=o?.onDestroy(c.unsubscribe.bind(c)),Nt(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new D(601,false)}},{equal:e?.equal})}function O(s=Object.is){return (e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}function $(s){return mb(m(l({},s),{loader:void 0,stream:e=>{let n,o=false,i=Ge({value:void 0}),{resolve:t,promise:u}=Qd(),c=false;function r(){c||(c=true,t(i));}let l=()=>{o=true,n?.unsubscribe(),e.abortSignal.removeEventListener("abort",l),r();};e.abortSignal.addEventListener("abort",l);function f(a){i.set(a),r();}let m=s.stream;if(m===void 0)throw new D(990,false);return n=m(e).subscribe({next:a=>f({value:a}),error:a=>{f({error:ys(a)}),e.abortSignal.removeEventListener("abort",l);},complete:()=>{c||f({error:new D(991,false)}),e.abortSignal.removeEventListener("abort",l);}}),o&&n.unsubscribe(),c?i:u}}))}export{$,F,L};
1
+ import {q as qe,T,G as Ge,bP as D,N as Nt,aK as mb,ai as m,bR as Qd,bS as ys,aj as l,bF as ve,bT as ir,z as za,b as me}from'./main-XKLDSNLY.js';function F(s,e){let n=T(ve),o=new ir(1),i=za(()=>{let t;try{t=s();}catch(u){me(()=>o.error(u));return}me(()=>o.next(t));},{injector:n,manualCleanup:true});return n.get(qe).onDestroy(()=>{i.destroy(),o.complete();}),o.asObservable()}function L(s,e){let o=!e?.manualCleanup?e?.injector?.get(qe)??T(qe):null,i=O(e?.equal),t;e?.requireSync?t=Ge({kind:0},{equal:i}):t=Ge({kind:1,value:e?.initialValue},{equal:i});let u,c=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{t.set({kind:2,error:r}),u?.();},complete:()=>{u?.();}});if(e?.requireSync&&t().kind===0)throw new D(601,false);return u=o?.onDestroy(c.unsubscribe.bind(c)),Nt(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new D(601,false)}},{equal:e?.equal})}function O(s=Object.is){return (e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}function $(s){return mb(m(l({},s),{loader:void 0,stream:e=>{let n,o=false,i=Ge({value:void 0}),{resolve:t,promise:u}=Qd(),c=false;function r(){c||(c=true,t(i));}let l=()=>{o=true,n?.unsubscribe(),e.abortSignal.removeEventListener("abort",l),r();};e.abortSignal.addEventListener("abort",l);function f(a){i.set(a),r();}let m=s.stream;if(m===void 0)throw new D(990,false);return n=m(e).subscribe({next:a=>f({value:a}),error:a=>{f({error:ys(a)}),e.abortSignal.removeEventListener("abort",l);},complete:()=>{c||f({error:new D(991,false)}),e.abortSignal.removeEventListener("abort",l);}}),o&&n.unsubscribe(),c?i:u}}))}export{$,F,L};
@@ -0,0 +1,2 @@
1
+ import {S as Se$1,C as Ct$1,M as Mt}from'./chunk-DzYR8wiz.js';import {I as I$1}from'./chunk-0lYdrxte.js';import {J}from'./chunk-FZcbbWYC.js';import {j as je$1}from'./chunk-5EFCeqK3.js';import {N as Nt$1}from'./chunk-GKdOPH_4.js';import {v as ve$1}from'./chunk-KNmRQWOM.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {B as Bn,Z as Ze$1,e as en,y as yt$1,R as Rn,J as Jt}from'./chunk-BDhLEYas.js';import {a as at$1}from'./chunk-UUMQmD5I.js';import {T,m,af as D1,E as E1,G as Ge$1,N as Nt,aj as l,ai as m$1,h as hw,bZ as ei,v,c as N,Q as Qi,aP as ql,n as nC,aQ as Gl,d as aT,$ as $l,bi as cg,y as vg,C as CE,g as cT,l as vT,H as Hg,O as Od,k as iC,P as Pd,F as Fg,i as Ig,j as jg,a1 as dT,ap as lT,a2 as fT,r as CD,a3 as KC,x as _D,s as jC,K as im,ak as dm,al as WC,L as Kg,aa as Ql,ao as qC,c3 as pC,a$ as JC,b_ as wg,c5 as lb}from'./main-XKLDSNLY.js';import'./chunk-DXh9g32e.js';import'./chunk-Dyq6iPbF.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import'./chunk-BnFO-7ok.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var Se=[{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 he=()=>({updateOn:"blur"}),I=t=>({formView:t}),V=t=>({$implicit:t});function we(t,i){if(t&1){let e=vT();Qi(0,"button",15),Hg("click",function(){Od(e);let n=iC();return Pd(n.showTextArea.set(false))}),Fg(1,6),Ig(2,"sh-icon"),jg(),$l();}}function Le(t,i){if(t&1){let e=vT();Qi(0,"button",19,1),Hg("click",function(){let n=Od(e).$implicit,a=iC(3);return Pd(a.addSetting(n))}),Qi(2,"div",20),jC(3),Qi(4,"p"),jC(5),$l()()();}if(t&2){let e=i.$implicit;Kg("deprecated",e.deprecatedDescription),CE(3),Ql(" ",e.shortDescription," "),CE(2),im(e.name);}}function Ie(t,i){if(t&1&&(Qi(0,"h3",11),jC(1),$l(),dT(2,Le,6,4,"button",18,lT)),t&2){let e=i.$implicit;CE(),im(e.displayName),CE(),fT(e.options);}}function Ve(t,i){if(t&1){let e=vT();Qi(0,"sh-menu")(1,"button",21)(2,"sh-icon"),jC(3,"dots-three-vertical"),$l()(),ql(4,17),Qi(5,"button",15),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.addFreeTextSetting())}),Fg(6,8),Ig(7,"sh-icon"),jg(),$l(),Qi(8,"button",22),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.showTextArea.set(true))}),Qi(9,"sh-icon"),jC(10,"link"),$l(),jC(11," Edit contents as text "),$l(),Qi(12,"button",15),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.showOptionNames.set(!n.showOptionNames()))}),Fg(13,9),Ig(14,"sh-icon"),jg(),$l(),Gl(),$l();}}function Ne(t,i){if(t&1&&(Qi(0,"sh-menu",16)(1,"button",13),Fg(2,7),Ig(3,"sh-icon"),jg(),$l(),ql(4,17),dT(5,Ie,4,1,null,null,lT),Gl(),$l(),aT(7,Ve,15,0,"sh-menu")),t&2){let e=iC();vg("searchable",true),CE(5),fT(e.nonSelectedOptionsGrouped()),CE(2),cT(e.hasFreeTextSettings()?7:-1);}}function be(t,i){if(t&1){let e=vT();Qi(0,"textarea",23),Hg("ngModelChange",function(n){Od(e);let a=iC();return Pd(a.updateSettingsFromText(n))}),$l(),CD();}if(t&2){let e=iC();vg("ngModel",e.settingsAsText())("ngModelOptions",KC(2,he)),_D();}}function Ee(t,i){t&1&&(Qi(0,"div",24),jC(1,"Add a setting above to get started."),$l());}function Me(t,i){t&1&&(Qi(0,"sh-icon",32),jC(1," warning-octagon "),$l());}function Pe(t,i){if(t&1&&(Qi(0,"span",33),jC(1),$l()),t&2){let e=iC(2).$implicit;CE(),Ql("--",e.FormView.name);}}function ve(t,i){if(t&1&&jC(0),t&2){let e=iC(2).$implicit;Ql(" ",e.FormView.shortDescription," ");}}function $e(t,i){if(t&1&&(Qi(0,"sh-icon",34),jC(1,"archive"),$l()),t&2){let e=iC(2).$implicit;vg("shTooltip",e.FormView.deprecatedDescription);}}function Ae(t,i){if(t&1&&(Qi(0,"sh-icon",35),jC(1,"question"),$l()),t&2){let e=iC(2).$implicit;vg("shTooltip",e.FormView.longDescription);}}function De(t,i){if(t&1&&(aT(0,Me,2,0,"sh-icon",32),Qi(1,"span"),aT(2,Pe,2,1,"span",33)(3,ve,1,1),$l(),aT(4,$e,2,1,"sh-icon",34)(5,Ae,2,1,"sh-icon",35)),t&2){let e=iC().$implicit,o=qC(1),n=iC(2);cT(o?0:-1),CE(),Kg("deprecated",e.FormView.deprecatedDescription),CE(),cT(n.showOptionNames()?2:3),CE(2),cT(e.FormView.deprecatedDescription?4:e.FormView.longDescription?5:-1);}}function Re(t,i){t&1&&wg(0);}function Ge(t,i){if(t&1){let e=vT();Qi(0,"div",26)(1,"label"),cg(2,Re,1,0,"ng-container",36),$l(),Qi(3,"div")(4,"sh-form-field")(5,"input",37),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateFreeTextSettingName(a,n))}),$l(),CD(),Qi(6,"sh-icon",38),jC(7,"rectangle-dashed"),$l()()(),Qi(8,"div")(9,"sh-form-field")(10,"input",37),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),Qi(11,"sh-icon",38),jC(12,"textbox"),$l()()()();}if(t&2){let e=iC().$implicit,o=pC(3);CE(2),vg("ngTemplateOutlet",o),CE(3),vg("ngModel",e.Name),_D(),CE(5),vg("ngModel",e.Value()),_D();}}function ke(t,i){t&1&&wg(0);}function Be(t,i){if(t&1){let e=vT();Qi(0,"app-file-tree",27)(1,"label",39),cg(2,ke,1,0,"ng-container",36),$l(),Qi(3,"input",40),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);vg("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",true)("showHiddenNodes",true)("selectFiles",true)("hideShortcuts",false)("resolvePaths",true),CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("id",n)("ngModel",e.Value()),_D();}}function ze(t,i){if(t&1){let e=vT();Qi(0,"app-file-tree",28),Ig(1,"label",39),Qi(2,"input",40),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=qC(0);vg("startingPath",e.Value())("hideShortcuts",false)("resolvePaths",true),CE(),vg("for",o),CE(),vg("id",o)("ngModel",e.Value()),_D();}}function Ue(t,i){t&1&&wg(0);}function Ke(t,i){t&1&&wg(0);}function He(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"link"),$l());}function Je(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"hard-drives"),$l());}function Xe(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"jar"),$l());}function je(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"envelope"),$l());}function qe(t,i){t&1&&(Qi(0,"sh-icon",38),jC(1,"textbox"),$l());}function Qe(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),cg(2,Ue,1,0,"ng-container",36)(3,Ke,1,0,"ng-container",41),$l(),Qi(4,"input",42),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),aT(5,He,2,0,"sh-icon",38)(6,Je,2,0,"sh-icon",38)(7,Xe,2,0,"sh-icon",38)(8,je,2,0,"sh-icon",38)(9,qe,2,0,"sh-icon",38),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(10,V,JC(8,I,e.FormView))),CE(),vg("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),_D(),CE(),cT(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9);}}function We(t,i){t&1&&wg(0);}function Ye(t,i){t&1&&wg(0);}function Ze(t,i){if(t&1){let e=vT();Qi(0,"sh-icon",45),Hg("click",function(){Od(e);let n=iC(2).$implicit;return Pd(n.showPassword=!n.showPassword)}),jC(1," eye "),$l();}}function et(t,i){if(t&1){let e=vT();Qi(0,"sh-icon",45),Hg("click",function(){Od(e);let n=iC(2).$implicit;return Pd(n.showPassword=!n.showPassword)}),jC(1," eye-slash "),$l();}}function tt(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),cg(2,We,1,0,"ng-container",36)(3,Ye,1,0,"ng-container",41),$l(),Qi(4,"input",43),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),Qi(5,"sh-icon",38),jC(6,"password"),$l(),aT(7,Ze,2,0,"sh-icon",44)(8,et,2,0,"sh-icon",44),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(10,V,JC(8,I,e.FormView))),CE(),vg("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),_D(),CE(3),cT(e.showPassword?7:8);}}function nt(t,i){t&1&&wg(0);}function it(t,i){t&1&&wg(0);}function ot(t,i){if(t&1&&jC(0),t&2){let e=i.$implicit;Ql(" ",e," ");}}function at(t,i){if(t&1){let e=vT();Qi(0,"sh-select",46)(1,"label",39),cg(2,nt,1,0,"ng-container",36)(3,it,1,0,"ng-container",41),$l(),Qi(4,"input",40),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l(),cg(5,ot,1,1,"ng-template",null,3,lb);}if(t&2){let e=pC(6),o=iC().$implicit,n=pC(3),a=qC(0);iC(2);let c=pC(10);vg("options",o.FormView.options)("isClearable",false)("optionTemplate",e),CE(),vg("for",a),CE(),vg("ngTemplateOutlet",n),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(11,V,JC(9,I,o.FormView))),CE(),vg("id",a)("ngModel",o.Value()),_D();}}function rt(t,i){t&1&&wg(0);}function lt(t,i){t&1&&wg(0);}function _t(t,i){if(t&1){let e=vT();Qi(0,"app-size",47),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),Qi(1,"label",39),cg(2,rt,1,0,"ng-container",36)(3,lt,1,0,"ng-container",41),$l()(),CD();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),_D(),CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(9,V,JC(7,I,e.FormView)));}}function st(t,i){t&1&&wg(0);}function pt(t,i){t&1&&wg(0);}function ct(t,i){if(t&1){let e=vT();Qi(0,"sh-form-field")(1,"label",39),cg(2,st,1,0,"ng-container",36)(3,pt,1,0,"ng-container",41),$l(),Qi(4,"input",48),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),Qi(5,"sh-icon",38),jC(6,"numpad"),$l()();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(8,V,JC(6,I,e.FormView))),CE(),vg("id",n)("ngModel",e.Value()),_D();}}function mt(t,i){t&1&&wg(0);}function dt(t,i){t&1&&wg(0);}function ut(t,i){if(t&1){let e=vT();Qi(0,"sh-toggle",30)(1,"label",39),cg(2,mt,1,0,"ng-container",36)(3,dt,1,0,"ng-container",41),$l(),Qi(4,"input",49),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(8,V,JC(6,I,e.FormView))),CE(),vg("id",n)("ngModel",e.Value()),_D();}}function Ct(t,i){t&1&&wg(0);}function gt(t,i){t&1&&wg(0);}function ft(t,i){if(t&1&&jC(0),t&2){let e=i.$implicit;Ql(" ",e," ");}}function yt(t,i){if(t&1){let e=vT();Qi(0,"sh-select",50)(1,"label",39),cg(2,Ct,1,0,"ng-container",36)(3,gt,1,0,"ng-container",41),$l(),Qi(4,"input",51),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),$l(),CD(),$l(),cg(5,ft,1,1,"ng-template",null,4,lb);}if(t&2){let e=pC(6),o=iC().$implicit,n=pC(3),a=qC(0);iC(2);let c=pC(10);vg("options",o.FormView.options)("selectMultiple",true)("optionTemplate",e),CE(),vg("for",a),CE(),vg("ngTemplateOutlet",n),CE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",JC(10,V,JC(8,I,o.FormView))),CE(),vg("ngModel",o.Value()),_D();}}function Tt(t,i){t&1&&wg(0);}function xt(t,i){t&1&&wg(0);}function St(t,i){if(t&1){let e=vT();Qi(0,"app-timespan",47),Hg("ngModelChange",function(n){Od(e);let a=iC().$implicit,c=iC(2);return Pd(c.updateSettingValue(a,n))}),Qi(1,"label",39),cg(2,Tt,1,0,"ng-container",36)(3,xt,1,0,"ng-container",41),$l()(),CD();}if(t&2){let e=iC().$implicit,o=pC(3),n=qC(0);iC(2);let a=pC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),_D(),CE(),vg("for",n),CE(),vg("ngTemplateOutlet",o),CE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",JC(9,V,JC(7,I,e.FormView)));}}function Ot(t,i){if(t&1){let e=vT();dm(0)(1),cg(2,De,6,5,"ng-template",null,2,lb),Qi(4,"div",25),aT(5,Ge,13,3,"div",26)(6,Be,4,11,"app-file-tree",27)(7,ze,3,6,"app-file-tree",28)(8,Qe,10,12,"sh-form-field")(9,tt,9,12,"sh-form-field")(10,at,7,13)(11,_t,4,11,"app-size",29)(12,ct,7,10,"sh-form-field")(13,ut,5,10,"sh-toggle",30)(14,yt,7,12)(15,St,4,11,"app-timespan",29),Qi(16,"button",31),Hg("click",function(){let n=Od(e).$implicit,a=iC(2);return Pd(a.removeSetting(n))}),Qi(17,"sh-icon"),jC(18,"x-bold"),$l()()();}if(t&2){let e=i.$implicit,o=i.$index,n=iC(2);WC("destination-"+e.Name+o),CE(),WC(n.inAppOptions(e.Name)),CE(3),Kg("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),CE(),cT(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 Ft(t,i){if(t&1&&(aT(0,Ee,2,0,"div",24),dT(1,Ot,19,5,null,null,lT)),t&2){let e=iC();cT(e.selectedSettings().length===0?0:-1),CE(),fT(e.selectedSettings());}}function ht(t,i){if(t&1&&(Qi(0,"sh-icon",52),jC(1,"x-circle"),$l()),t&2){iC();let e=qC(0);vg("shTooltip",e?.message??"Invalid value");}}function wt(t,i){if(t&1&&(Qi(0,"sh-icon",34),jC(1,"warning"),$l()),t&2){iC();let e=qC(0);vg("shTooltip",e?.message??"Invalid value");}}function Lt(t,i){if(t&1&&(dm(0),aT(1,ht,2,1,"sh-icon",52)(2,wt,2,1,"sh-icon",34)),t&2){iC();let e=qC(0),o=iC().$implicit,n=WC(o.formView.validate(e));CE(),cT(n?.type==="error"?1:n?.type==="warning"?2:-1);}}function It(t,i){if(t&1&&(dm(0),aT(1,Lt,3,2)),t&2){let e=iC().$implicit,n=(WC(e.Value())??"").toString().trim()==="";CE(),cT(!n&&e.formView.validate?1:-1);}}function Vt(t,i){if(t&1&&aT(0,It,2,2),t&2){let e=i.$implicit;cT(e.Value?0:-1);}}var Oe=class t{#e=T(m);options=D1.required();hiddenOptions=E1([]);hasFreeTextSettings=E1(false);applicationOptions=E1();showTextArea=Ge$1(false);showOptionNames=Ge$1(false);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=Nt(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(L=>L.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let M=c?.trim().toLowerCase(),q=a.options.find(Fe=>(Fe??"").trim().toLocaleLowerCase()===M);q&&(c=q);}let L=Se.find(M=>M.name===a?.name);return L&&(a=l(l({},a),L)),m$1(l({},n),{Value:Ge$1(c),FormView:a})}else if(this.hasFreeTextSettings())return m$1(l({},n),{Value:Ge$1(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=Nt(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>m$1(l({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=Nt(()=>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=je$1(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 false}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?false: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(c=>c.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 c=e?.trim().toLowerCase()??"",L=i.FormView.options.find(M=>(M??"").trim().toLocaleLowerCase()===c);if(L)return n[a].Value=L,n}return n[a].Value=e,n});}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.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=hw({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 c;return c=$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","hideShortcuts","resolvePaths"],[3,"startingPath","hideShortcuts","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",c,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&&(Qi(0,"sh-toggle-card",10),ql(1,11)(2),nC(3,5),Gl(),Qi(4,"div",12),aT(5,we,3,0,"button",13)(6,Ne,8,2),$l(),Gl(),aT(7,be,1,3,"textarea",14)(8,Ft,3,1),$l(),cg(9,Vt,1,1,"ng-template",null,0,lb)),e&2&&(vg("disableToggle",true)("isActive",true),CE(5),cT(o.showTextArea()?5:6),CE(2),cT(o.showTextArea()?7:8));},dependencies:[Bn,Ze$1,en,yt$1,Rn,Jt,Se$1,Ct$1,Mt,ei,I$1,Fe,v,ve$1,at$1,N,Nt$1,J],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}"]})};export{Oe as OptionsListComponent};
@@ -0,0 +1,2 @@
1
+ import {d}from'./chunk-BNG7N21y.js';import'./chunk-DGO0_pkA.js';import {s as sn,o as on,p as pt,_ as _n,V as Ve}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import {V,G}from'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import {v as ve$1}from'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,e as ee,aw as W,a6 as be,bF as ve,D as w1,G as Ge,N as Nt,at as h,h as hw,v,c as N,a0 as de,u as ue,l as vT,ak as dm,Q as Qi,H as Hg,n as nC,$ as $l,d as aT,p as lm,O as Od,U as UC,P as Pd,F as Fg,i as Ig,j as jg,al as WC,C as CE,g as cT,w as cm,y as vg,o as oC,aD as YC,M as qg,R as fC,k as iC,s as jC,aP as ql,aQ as Gl,ao as qC,r as CD,a3 as KC,x as _D}from'./main-XKLDSNLY.js';import'./chunk-CTH9uShX.js';import'./chunk-BnFO-7ok.js';import {F as Fe$1}from'./chunk-DqoYKCmi.js';import {B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt,a as Zt}from'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var Fe=["formRef"],De=["testUrl"],Ee=()=>({maxWidth:"700px",width:"100%"});function Oe(o,i){if(o&1){let e=vT();Qi(0,"button",24),Hg("click",function(){Od(e);let t=iC();return Pd(t.openTargetUrlDialog())}),Fg(1,5),Ig(2,"sh-icon"),jg(),$l();}}function fe(o,i){if(o&1){let e=vT();Qi(0,"button",24),Hg("click",function(){Od(e);let t=iC(2);return Pd(t.copyTargetUrl())}),Fg(1,7),Ig(2,"sh-icon"),jg(),$l();}}function he(o,i){if(o&1){let e=vT();Qi(0,"sh-menu")(1,"button",15)(2,"sh-icon"),jC(3,"dots-three-vertical"),$l()(),ql(4,25),Qi(5,"button",24),Hg("click",function(){Od(e);let t=iC();return Pd(t.openTargetUrlDialog())}),Fg(6,6),Ig(7,"sh-icon"),jg(),$l(),aT(8,fe,3,0,"button",15),Gl(),$l();}if(o&2){iC();let e=qC(0);CE(8),cT(e?8:-1);}}function Pe(o,i){if(o&1){let e=vT();Qi(0,"app-destination-list-item",17)(1,"button",20),Hg("click",function(){Od(e);let t=iC();return Pd(t.removeDestination())}),nC(2,8),$l()();}if(o&2){iC();let e=qC(12);vg("destination",e);}}function ye(o,i){if(o&1){let e=vT();Qi(0,"app-destination-list",26),Hg("setDestination",function(t){Od(e);let l=iC();return Pd(l.setDestination(t))}),$l();}}function Ae(o,i){if(o&1){let e=vT();Qi(0,"app-single-destination",27),lm("targetUrlChange",function(t){Od(e);let l=iC();return UC(l.targetUrlModel,t)||(l.targetUrlModel=t),Pd(t)}),$l();}if(o&2){let e=iC();cm("targetUrl",e.targetUrlModel);}}function Me(o,i){o&1&&(Fg(0,4,1),Ig(1,"sh-icon",22),jg());}function Re(o,i){o&1&&(Fg(0,4,2),Ig(1,"sh-icon"),jg());}function Ue(o,i){if(o&1){let e=vT();Qi(0,"sh-dialog",28),lm("isOpenChange",function(t){Od(e);let l=iC();return UC(l.targetUrlDialogOpen,t)||(l.targetUrlDialogOpen=t),Pd(t)}),Qi(1,"header",29)(2,"div",30)(3,"h2"),nC(4,9),$l(),Qi(5,"sh-alert",31),nC(6,10),$l()()(),Qi(7,"div",32)(8,"sh-form-field")(9,"textarea",33),lm("ngModelChange",function(t){Od(e);let l=iC();return UC(l.targetUrlCtrl,t)||(l.targetUrlCtrl=t),Pd(t)}),$l(),CD(),$l()(),Qi(10,"footer",34)(11,"button",20),Hg("click",function(){Od(e);let t=iC();return Pd(t.closeTargetUrlDialog(false))}),jC(12,"Cancel"),$l(),Qi(13,"button",35),Hg("click",function(){Od(e);let t=iC();return Pd(t.closeTargetUrlDialog(true))}),Fg(14,11),Ig(15,"sh-icon"),jg(),$l()()();}if(o&2){let e=iC();cm("isOpen",e.targetUrlDialogOpen),vg("options",KC(3,Ee)),CE(9),cm("ngModel",e.targetUrlCtrl),_D();}}var w=class o{#i=T(ee);#o=T(W);#n=T(be);injector=T(ve);#e=T(d);formRef=w1.required("formRef");testUrlComponent=w1.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);targetUrlDialogOpen=Ge(false);toggleNewDestination=Ge(true);selectedDestinationType=Nt(()=>{let i=this.#e.destinationTargetUrl();return i?V(i):null});selectedDestinationTypeOption=Nt(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,sourceDescription:i.sourceDescription??null,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"");}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(i=false){this.targetUrlDialogOpen.set(false);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e);}setDestination(i){let e=G(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`);}}removeDestination(){this.#e.updateTargetUrl(null);}goBack(){this.#i.navigate(["/"]);}next(){let i=this.testSignal();if(i===null){this.#n.open(h,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(false)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(h,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}});}):this.#t();}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(h,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t();}});return}this.#t();}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-import-destination-destination"]],viewQuery:function(e,n){e&1&&qg(n.formRef,Fe,5)(n.testUrlComponent,De,5),e&2&&fC(2);},features:[YC([Ve])],decls:25,vars:18,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=oC(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let l;l=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let L;L=$localize`Change`;let b;b=$localize`Edit target URL`;let B;B=$localize`Be careful, this will overwrite everything you have in your destination.`;let G;return G=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,l,g,L,b,B,G,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,n){if(e&1){let t=vT();dm(0),Qi(1,"form",12,0),Hg("submit",function(){return n.next()}),Qi(3,"header")(4,"h3",13)(5,"span"),nC(6,2),$l(),Qi(7,"div",14),aT(8,Oe,3,0,"button",15)(9,he,9,1,"sh-menu"),$l()(),Qi(10,"app-test-url",16,1),lm("targetUrlChange",function(g){return Od(t),UC(n.targetUrlModel,g)||(n.targetUrlModel=g),Pd(g)})("testSignalChange",function(g){return Od(t),UC(n.testSignal,g)||(n.testSignal=g),Pd(g)}),$l(),dm(12),aT(13,Pe,3,1,"app-destination-list-item",17),$l(),aT(14,ye,1,0,"app-destination-list"),aT(15,Ae,1,1,"app-single-destination",18),Qi(16,"div",19)(17,"button",20),Hg("click",function(){return n.goBack()}),Fg(18,3),Ig(19,"sh-icon"),jg(),$l(),Qi(20,"button",21),Fg(21,4),aT(22,Me,2,0,"sh-icon",22)(23,Re,2,0,"sh-icon"),jg(),$l()()(),aT(24,Ue,16,4,"sh-dialog",23);}if(e&2){let t=WC(!!n.targetUrlModel());CE(8),cT(t?9:8),CE(2),cm("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),vg("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",false)("testExpectation","containsBackup")("readOnlyTest",true)("moduleType","Backend"),CE(2);let l=WC(n.selectedDestinationTypeOption());CE(),cT(l?13:-1),CE(),cT(t?-1:14),CE(),cT(t?15:-1),CE(5),vg("disabled",n.testSignal()=="testing"||!t),CE(2),cT(n.testSignal()=="testing"?22:23),CE(2),cT(n.targetUrlDialogOpen()?24:-1);}},dependencies:[sn,on,pt,Bn,Tn,Ze,Rn,Pn,Jt,Zt,v,Fe$1,ve$1,N,de,ue,_n],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"]})};
2
+ export{w as default};
@@ -1 +1 @@
1
- import {w}from'./chunk-BstaUtD_.js';import {e as ee}from'./chunk-K2iai6rC.js';import'./chunk-CIe9Bupz.js';import'./chunk-BmmYJhOf.js';import'./chunk-CvSsZZty.js';import'./chunk-CyqqlRjO.js';import'./chunk-CX3Axjpk.js';import'./chunk-C3gUxHQM.js';import'./chunk-DidJB9ig.js';import {h as hw,Z as lr,_ as _t,a8 as To,i as Ig,Q as Qi,n as nC,$ as $l}from'./main-3NL5M6JB.js';import'./chunk-DDWDcSq2.js';import'./chunk-DhiIZLrA.js';import'./chunk-B6c2NXNy.js';import'./chunk-MDqH8T3Z.js';import'./chunk-mflQLMHH.js';import'./chunk-CuJ_uEdr.js';import'./chunk-D1pDZLJ9.js';import'./chunk-DGvC49aU.js';var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=hw({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(Ig(0,"app-status-bar"),Qi(1,"div",7)(2,"sh-tabs",8)(3,"button",9),nC(4,0),$l(),Qi(5,"button",10),nC(6,1),$l(),Qi(7,"button",11),nC(8,2),$l(),Qi(9,"button",12),nC(10,3),$l(),Qi(11,"button",13),nC(12,4),$l(),Qi(13,"button",14),nC(14,5),$l(),Qi(15,"button",15),nC(16,6),$l()(),Qi(17,"section"),Ig(18,"router-outlet"),$l()());},dependencies:[ee,w,lr,_t,To],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"]})};export{l as default};
1
+ import {w}from'./chunk-pxcB56N0.js';import {e as ee}from'./chunk-i6kMmbhY.js';import'./chunk-Du0Hd0t6.js';import'./chunk-BFquKzMb.js';import'./chunk-D7C8xyJI.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {h as hw,Z as lr,_ as _t,a8 as To,i as Ig,Q as Qi,n as nC,$ as $l}from'./main-XKLDSNLY.js';import'./chunk-BnFO-7ok.js';import'./chunk-DqoYKCmi.js';import'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=hw({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(Ig(0,"app-status-bar"),Qi(1,"div",7)(2,"sh-tabs",8)(3,"button",9),nC(4,0),$l(),Qi(5,"button",10),nC(6,1),$l(),Qi(7,"button",11),nC(8,2),$l(),Qi(9,"button",12),nC(10,3),$l(),Qi(11,"button",13),nC(12,4),$l(),Qi(13,"button",14),nC(14,5),$l(),Qi(15,"button",15),nC(16,6),$l()(),Qi(17,"section"),Ig(18,"router-outlet"),$l()());},dependencies:[ee,w,lr,_t,To],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"]})};export{l as default};
@@ -0,0 +1 @@
1
+ import {B as A,aZ as ee}from'./main-XKLDSNLY.js';var a="fileTreeFoldersFirst",n="fileTreeCaseSensitiveSort",r=class t{#e=A(a,true);#t=A(n,false);foldersFirst=this.#e.asReadonly();caseSensitiveSort=this.#t.asReadonly();setFoldersFirst(e){this.#e.set(e);}setCaseSensitiveSort(e){this.#t.set(e);}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ee({token:t,factory:t.\u0275fac,providedIn:"root"})};export{r};
@@ -1 +1 @@
1
- import {O}from'./chunk-CuJ_uEdr.js';import {T,h as hw,aL as hi,V as Ul,n as nC,X as Wl,s as jC,aM as ob,C as CE,K as im,aR as sb}from'./main-3NL5M6JB.js';import'./chunk-DGvC49aU.js';var i=class o{#e=T(O);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`Server settings`,[t]},template:function(e,E){e&1&&(Ul(0,"h3"),nC(1,0),Wl(),Ul(2,"code")(3,"pre"),jC(4),ob(5,"json"),Wl()()),e&2&&(CE(4),im(sb(5,1,E.serverSettings())));},dependencies:[hi],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{i as default};
1
+ import {O}from'./chunk-CsgB8OpN.js';import {T,h as hw,aL as hi,V as Ul,n as nC,X as Wl,s as jC,aM as ob,C as CE,K as im,aR as sb}from'./main-XKLDSNLY.js';import'./chunk-DCsYP4vf.js';var i=class o{#e=T(O);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||o)};static \u0275cmp=hw({type:o,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`Server settings`,[t]},template:function(e,E){e&1&&(Ul(0,"h3"),nC(1,0),Wl(),Ul(2,"code")(3,"pre"),jC(4),ob(5,"json"),Wl()()),e&2&&(CE(4),im(sb(5,1,E.serverSettings())));},dependencies:[hi],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{i as default};
@@ -0,0 +1 @@
1
+ import {G}from'./chunk-DnTA-m4k.js';import v from'./chunk-DmwtL4h3.js';import'./chunk-D0qGkLVr.js';import'./chunk-DGO0_pkA.js';import {i as ie$1}from'./chunk-AHhgJqe4.js';import'./chunk-xwdrpTfz.js';import'./chunk-BFquKzMb.js';import'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import'./chunk-5EFCeqK3.js';import {m}from'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,ab as C,bj as Q$1,aX as y,aw as W,G as Ge,N as Nt,h as hw,c as N,aH as m$1,bh as pi,Q as Qi,d as aT,n as nC,$ as $l,i as Ig,C as CE,g as cT,y as vg,aP as ql,aQ as Gl,k as iC,F as Fg,j as jg,au as Vg,av as rC,as as qd,bk as Gd,s as jC,aM as ob,aB as sm,aR as sb}from'./main-XKLDSNLY.js';import {f as f$1}from'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import'./chunk-DqoYKCmi.js';import'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';function Q(n,t){n&1&&(Qi(0,"div",17),qd(),Qi(1,"svg",19),Ig(2,"circle",20),$l(),Gd(),Qi(3,"sh-icon",21),nC(4,3),$l()());}function U(n,t){n&1&&(Qi(0,"div",18),qd(),Qi(1,"svg",19),Ig(2,"circle",20),$l(),Gd(),Qi(3,"sh-icon",22),nC(4,4),$l()());}function Y(n,t){if(n&1&&(Qi(0,"sh-card",10),ql(1,16),nC(2,2),Gl(),aT(3,Q,5,0,"div",17)(4,U,5,0,"div",18),$l()),n&2){let e=iC();CE(3),cT(e.restoreResult()=="success"?3:4);}}function ee(n,t){if(n&1&&(jC(0),ob(1,"number"),ob(2,"number")),n&2){let e=iC(2);sm(" ",sb(1,2,e.statusData()?.ProcessedFileCount)," of ",sb(2,4,e.statusData()?.TotalFileCount)," ");}}function te(n,t){n&1&&(ql(0),nC(1,8),Gl());}function ne(n,t){if(n&1&&(jC(0),ob(1,"bytes"),ob(2,"bytes")),n&2){let e=iC(2);sm(" ",sb(1,2,e.statusData()?.ProcessedFileSize)," of ",sb(2,4,e.statusData()?.TotalFileSize)," ");}}function oe(n,t){n&1&&(ql(0),nC(1,9),Gl());}function ie(n,t){if(n&1&&(Qi(0,"sh-card",10)(1,"h3"),Fg(2,5),Ig(3,"sh-spinner",23),jg(),$l(),Qi(4,"div",24),Ig(5,"sh-progress-bar",25),Qi(6,"p")(7,"span"),nC(8,6),$l(),aT(9,ee,3,6)(10,te,2,0,"ng-container"),$l(),Qi(11,"p")(12,"span"),nC(13,7),$l(),aT(14,ne,3,6)(15,oe,2,0,"ng-container"),$l()()()),n&2){let e=iC();CE(3),Vg(e.statusData()?.statusText),rC(2),CE(2),vg("value",e.statusData()?.OverallProgress),CE(4),cT(e.statusData()?.ProcessedFileCount?9:10),CE(5),cT(e.statusData()?.ProcessedFileSize?14:15);}}var f=class n{#i=T(C);#r=T(Q$1);#t=T(y);#n=T(G);#s=T(W);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=Ge("");#e=null;lastRestoreStarted=Nt(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return {predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??false}};ngOnInit(){let t=this.#s.snapshot.params.taskid?.toString()??"";this.#i.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#o(e);},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.");}});}#_(t){this.#r.waitForTaskToComplete(t).subscribe(e=>{this.#o(e);});}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error");}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-restore-progress"]],decls:12,vars:5,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let a;a=$localize`Restore completed`;let M;M=$localize`check-bold`;let N;N=$localize`warning-octagon`;let G;G=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let y;return y=$localize`N/A`,[t,e,a,M,N,G,h,F,L,y,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,a){e&1&&(Qi(0,"section"),aT(1,Y,5,1,"sh-card",10)(2,ie,16,4,"sh-card",10),Qi(3,"sh-card",11)(4,"h3"),nC(5,0),$l(),Qi(6,"div",12),Ig(7,"app-notifications",13),$l()(),Qi(8,"sh-card",14)(9,"h3"),nC(10,1),$l(),Ig(11,"app-logs-live",15),$l()()),e&2&&(CE(),cT(a.restoreResult()!=""?1:2),CE(6),vg("notificationFilterPredicate",a.notificationFilterPredicate()),CE(4),vg("polling",a.restoreResult()=="")("whenFilter",a.lastRestoreStarted()?.getTime())("backupIdFilter",a.backupId()));},dependencies:[v,d,m,N,f$1,ie$1,m$1,pi],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}']})};export{f as default};
@@ -0,0 +1 @@
1
+ import {w}from'./chunk-B-c3Zv6R.js';import {d}from'./chunk-BNG7N21y.js';import'./chunk-DGO0_pkA.js';import {e as ee}from'./chunk-i6kMmbhY.js';import'./chunk-Du0Hd0t6.js';import'./chunk-BFquKzMb.js';import'./chunk-D7C8xyJI.js';import {V as Ve}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import'./chunk-0lYdrxte.js';import'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {h as hw,Z as lr,_ as _t,a8 as To,i as Ig,Q as Qi,n as nC,$ as $l,C as CE,y as vg,a3 as KC,aD as YC}from'./main-XKLDSNLY.js';import'./chunk-CTH9uShX.js';import'./chunk-BnFO-7ok.js';import'./chunk-DqoYKCmi.js';import'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var S=()=>["/backup/import-destination/destination"],M=()=>["/backup/import-destination/encryption"],g=()=>["/backup/import-destination/select-config"],p=class T{static \u0275fac=function(e){return new(e||T)};static \u0275cmp=hw({type:T,selectors:[["app-import-destination"]],features:[YC([d,Ve])],decls:10,vars:6,consts:()=>{let i;i=$localize` Destination `;let e;e=$localize` Encryption `;let s;return s=$localize` Select configurations `,[i,e,s,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],["tabindex","-1","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,s){e&1&&(Ig(0,"app-status-bar"),Qi(1,"sh-stepper",3)(2,"div",4),nC(3,0),$l(),Qi(4,"div",4),nC(5,1),$l(),Qi(6,"div",5),nC(7,2),$l()(),Qi(8,"section"),Ig(9,"router-outlet"),$l()),e&2&&(CE(2),vg("routerLink",KC(3,S)),CE(2),vg("routerLink",KC(4,M)),CE(2),vg("routerLink",KC(5,g)));},dependencies:[w,ee,lr,_t,To],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"]})};export{p as default};
@@ -0,0 +1,2 @@
1
+ import {V as Ve$1,u as ut,s as sn,o as on,p as pt,_ as _n}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import {I}from'./chunk-0lYdrxte.js';import {J}from'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import {V,h,G}from'./chunk-5EFCeqK3.js';import'./chunk-GKdOPH_4.js';import {v as ve$1}from'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import {c}from'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,e as ee$1,aw as W,bF as ve,c8 as T1,G as Ge,N as Nt,z as za,h as hw,v,c as N,a0 as de$1,u as ue,ak as dm,Q as Qi,H as Hg,i as Ig,$ as $l,d as aT,F as Fg,j as jg,al as WC,C as CE,g as cT,L as Kg,y as vg,M as qg,R as fC,a1 as dT,k as iC,ao as qC,a2 as fT,l as vT,O as Od,P as Pd,s as jC,p as lm,U as UC,n as nC,r as CD,w as cm,a3 as KC,x as _D,ap as lT,aP as ql,aQ as Gl,K as im}from'./main-XKLDSNLY.js';import {f}from'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {j as jn,B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt$1,a as Zt$1}from'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import'./chunk-DCsYP4vf.js';var kt=["testUrl"],Bt=()=>({maxWidth:"700px",width:"100%"}),Vt=(o,e)=>e.uiKey;function Kt(o,e){if(o&1){let t=vT();Qi(0,"sh-card",30)(1,"div",32)(2,"h3"),nC(3,4),$l(),Qi(4,"button",33),Hg("click",function(){Od(t);let i=iC(3);return Pd(i.closeCustomList())}),jC(5," Cancel "),Qi(6,"sh-icon"),jC(7,"x-bold"),$l()()(),Qi(8,"app-destination-list",34),Hg("setDestination",function(i){Od(t);let _=iC(3);return Pd(_.setDestination(i))}),$l()();}}function Jt(o,e){if(o&1){let t=vT();Qi(0,"div",40)(1,"sh-toggle",43),lm("checkedChange",function(i){Od(t);let _=iC(2).$implicit;return UC(_.save,i)||(_.save=i),Pd(i)}),Qi(2,"span",44),nC(3,8),$l()()();}if(o&2){let t=iC(2).$implicit;CE(),vg("color","primary")("variant","raised"),cm("checked",t.save);}}function Xt(o,e){if(o&1){let t=vT();Qi(0,"sh-toggle-card",31),ql(1,35),Qi(2,"app-destination-list-item",36)(3,"button",33),Hg("click",function(){Od(t);let i=iC().$index,_=iC(2);return Pd(_.changeDestination(i))}),jC(4,"Change"),$l(),Qi(5,"sh-menu",37),Hg("click",function(i){return i.stopPropagation()}),Qi(6,"button",38)(7,"sh-icon"),jC(8,"dots-three-vertical"),$l()(),ql(9,39),Qi(10,"button",33),Hg("click",function(){Od(t);let i=iC().$index,_=iC(2);return Pd(_.openTargetUrlDialog(i))}),Fg(11,5),Ig(12,"sh-icon"),jg(),$l(),Qi(13,"button",33),Hg("click",function(){Od(t);let i=iC().$index,_=iC(2);return Pd(_.copyTargetUrl(i))}),Fg(14,6),Ig(15,"sh-icon"),jg(),$l(),Qi(16,"button",33),Hg("click",function(){Od(t);let i=iC().$index,_=iC(2);return Pd(_.removeDestination(i))}),Fg(17,7),Ig(18,"sh-icon"),jg(),$l(),Gl(),$l()(),Gl(),aT(19,Jt,4,3,"div",40),Qi(20,"app-test-url",41,1),Hg("targetUrlChange",function(i){Od(t);let _=iC().$index,T=iC(2);return Pd(T.updateTargetUrl(_,i))})("testSignalChange",function(i){Od(t);let _=iC().$index,T=iC(2);return Pd(T.updateTestState(_,i))}),$l(),Qi(22,"app-single-destination",42),Hg("targetUrlChange",function(i){Od(t);let _=iC().$index,T=iC(2);return Pd(T.updateTargetUrl(_,i))}),$l()();}if(o&2){let t=iC(),n=t.$implicit,i=t.$index,_=iC(2);vg("disableToggle",true)("isActive",true),CE(2),vg("targetUrl",n.url)("connectionStringId",n.connectionStringId),CE(17),cT(n.connectionStringId?-1:19),CE(),vg("targetUrl",n.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",n.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",true)("readOnlyTest",false)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),CE(2),vg("targetUrl",n.url)("useBackupState",true);}}function zt(o,e){if(o&1&&aT(0,Kt,9,0,"sh-card",30)(1,Xt,23,17,"sh-toggle-card",31),o&2){let t=e.$index,n=iC(2);cT(n.showCustomList()&&n.currentEditingIndex()===t?0:1);}}function Ht(o,e){if(o&1&&dT(0,zt,2,1,null,null,Vt),o&2){iC();let t=qC(0);fT(t);}}function Wt(o,e){o&1&&(Qi(0,"div",45),Ig(1,"sh-progress-bar",46),Qi(2,"div",47)(3,"h3"),nC(4,9),$l()()());}function jt(o,e){o&1&&(Qi(0,"sh-divider"),nC(1,12),$l());}function Qt(o,e){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit;CE(),im(t.Description);}}function qt(o,e){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit,n=iC(4);CE(),im(n.getSimplePath(t.BaseUrl));}}function Yt(o,e){if(o&1){let t=vT();Qi(0,"app-destination-list-item",50),Hg("click",function(){let i=Od(t).$implicit,_=iC(4);return Pd(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"h3",51),jC(2),$l(),aT(3,Qt,2,1,"p",52)(4,qt,2,1,"p",52),$l();}if(o&2){let t=e.$implicit;vg("targetUrl",t.BaseUrl),CE(2),im(t.Name||t.BaseUrl),CE(),cT(t.Description?3:4);}}function Zt(o,e){if(o&1){let t=vT();Qi(0,"sh-card",48),Hg("click",function(){Od(t);let i=iC(3);return Pd(i.toggleCustomList())})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),jC(2,"plus-circle"),$l(),Qi(3,"div",47)(4,"h3"),nC(5,10),$l(),Qi(6,"p"),nC(7,11),$l()()(),aT(8,jt,2,0,"sh-divider"),dT(9,Yt,5,3,"app-destination-list-item",49,lT);}if(o&2){let t=iC(3);CE(8),cT(t.destinations().length>0?8:-1),CE(),fT(t.destinations());}}function te(o,e){if(o&1&&aT(0,Wt,5,0,"div",45)(1,Zt,11,1),o&2){let t=iC(2);cT(t.isLoadingDestinations()?0:1);}}function ee(o,e){o&1&&(Qi(0,"sh-divider"),nC(1,15),$l());}function ne(o,e){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit;CE(),im(t.Description);}}function ie(o,e){if(o&1&&(Qi(0,"p",52),jC(1),$l()),o&2){let t=iC().$implicit,n=iC(3);CE(),im(n.getSimplePath(t.BaseUrl));}}function oe(o,e){if(o&1){let t=vT();Qi(0,"app-destination-list-item",57),Hg("click",function(){let i=Od(t).$implicit,_=iC(3);return Pd(_.selectSavedDestination(i))}),Qi(1,"h3",51),jC(2),$l(),aT(3,ne,2,1,"p",52)(4,ie,2,1,"p",52),$l();}if(o&2){let t=e.$implicit;vg("targetUrl",t.BaseUrl),CE(2),im(t.Name||t.BaseUrl),CE(),cT(t.Description?3:4);}}function ae(o,e){if(o&1){let t=vT();Qi(0,"div",53)(1,"button",54),Hg("click",function(){Od(t);let i=iC(2);return Pd(i.closeCustomList())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l(),jC(4," Back "),$l()(),Qi(5,"sh-card",55),Hg("click",function(){Od(t);let i=iC(2);return Pd(i.toggleCustomList())}),Qi(6,"sh-icon"),jC(7,"plus-circle"),$l(),Qi(8,"div",47)(9,"h3"),nC(10,13),$l(),Qi(11,"p"),nC(12,14),$l()()(),aT(13,ee,2,0,"sh-divider"),dT(14,oe,5,3,"app-destination-list-item",56,lT);}if(o&2){let t=iC(2);CE(13),cT(t.destinations().length>0?13:-1),CE(),fT(t.destinations());}}function re(o,e){if(o&1){let t=vT();Qi(0,"div",53)(1,"button",54),Hg("click",function(){Od(t);let i=iC(3);return Pd(i.closeCustomList())}),Qi(2,"sh-icon"),jC(3,"arrow-left"),$l()(),Qi(4,"h3"),nC(5,16),$l()();}}function se(o,e){if(o&1){let t=vT();aT(0,re,6,0,"div",53),Qi(1,"app-destination-list",34),Hg("setDestination",function(i){Od(t);let _=iC(2);return Pd(_.setDestination(i))}),$l();}if(o&2){let t=iC(2),n=qC(0);cT(t.destinations().length>0||n.length>0?0:-1);}}function _e(o,e){if(o&1&&aT(0,te,2,1)(1,ae,16,1)(2,se,2,1),o&2){let t=iC(),n=qC(1);cT(!t.showCustomList()&&!n&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2);}}function le(o,e){if(o&1){let t=vT();Qi(0,"div",25)(1,"button",58),Hg("click",function(){Od(t);let i=iC();return Pd(i.startAddingNew())}),Qi(2,"sh-icon"),jC(3,"plus"),$l(),jC(4," Add another destination "),$l()();}}function ce(o,e){o&1&&(Qi(0,"h2"),nC(1,19),$l());}function de(o,e){o&1&&(Qi(0,"h2"),nC(1,20),$l());}function Ce(o,e){if(o&1){let t=vT();Qi(0,"sh-dialog",59),lm("isOpenChange",function(i){Od(t);let _=iC();return UC(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),Pd(i)}),Qi(1,"header",60)(2,"div",61),aT(3,ce,2,0,"h2")(4,de,2,0,"h2"),Qi(5,"sh-alert",62),nC(6,17),$l()()(),Qi(7,"div",63)(8,"sh-form-field")(9,"textarea",64),lm("ngModelChange",function(i){Od(t);let _=iC();return UC(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),Pd(i)}),$l(),CD(),$l()(),Qi(10,"footer",65)(11,"button",27),Hg("click",function(){Od(t);let i=iC();return Pd(i.closeTargetUrlDialog(false))}),jC(12,"Cancel"),$l(),Qi(13,"button",66),Hg("click",function(){Od(t);let i=iC();return Pd(i.closeTargetUrlDialog(true))}),Fg(14,18),Ig(15,"sh-icon"),jg(),$l()()();}if(o&2){let t=iC(),n=qC(1);cm("isOpen",t.targetUrlDialogOpen),vg("options",KC(4,Bt)),CE(3),cT(n?4:3),CE(6),cm("ngModel",t.targetUrlCtrl),_D();}}var $=new jn,Be=(o={destinations:[]})=>$.group({destinations:$.array(o.destinations)}),Ve=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>$.group({destinationType:$.control(o),custom:e,dynamic:t,advanced:n}),B=class o{#n=T(ee$1);#i=T(W);#t=T(Ve$1);#e=T(ut);injector=T(ve);testUrlComponents=T1();testStates=Ge([]);targetUrls=this.#t.targetUrls;targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=Ge(null);targetUrlInitial=Ge(null);currentEditingIndex=Ge(null);targetUrlDialogOpen=Ge(false);showCustomList=Ge(false);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=Nt(()=>{let e=this.targetUrlModel();return e?V(e)??null:null});isLoadingDestinationEffect=za(()=>{let e=this.isLoadingDestinations(),t=this.destinations(),n=this.targetUrls();!e&&t.length==0&&n.length==0&&this.toggleCustomList();});selectedDestinationTypeOption=Nt(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,sourceDescription:e.sourceDescription??null,icon:e.icon}:null});getConnectionString(e){let t=this.#e.destinations().find(n=>n.ID===e);return console.log("connection",t),t}getSimplePath(e){return e?h(e):""}copyTargetUrl(e=0){let t=this.targetUrls()[e]?.url;t&&navigator.clipboard.writeText(t);}openTargetUrlDialog(e=0){let t=this.targetUrls()[e]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(e),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(e=false){this.targetUrlDialogOpen.set(false);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();if(!e||t===n||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,T=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,T);}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null);}setDestination(e){let t=G(e??"");if(!t)return;let n=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${e}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),n,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(false);return}this.showCustomList()?(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(false),this.isAddingNew.set(false)):(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(false),this.isAddingNew.set(false));}targetUrlsEffect=za(()=>{let e=this.targetUrls();this.testStates.update(t=>{if(t.length===e.length)return t;let n=[...t];if(n.length<e.length)for(let i=n.length;i<e.length;i++)n.push(null);else n.length=e.length;return n});});selectSavedDestination(e){e.BaseUrl&&e.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(e.BaseUrl,true,e.ID,null):(this.#t.addTargetUrl(e.BaseUrl,e.ID,null),this.showCustomList.set(false),this.isAddingNew.set(false)));}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(true);}isAddingNew=Ge(false);startAddingNew(){this.isAddingNew.set(true),this.destinations().length===0&&this.showCustomList.set(true);}changeDestination(e){this.currentEditingIndex.set(e),this.showCustomList.set(true);}closeCustomList(){this.showCustomList.set(false),this.currentEditingIndex.set(null),this.isAddingNew.set(false);}removeDestination(e){this.testStates.update(t=>t.filter((n,i)=>i!==e)),this.#t.removeTargetUrl(e);}updateTargetUrl(e,t){if(!t)return;let n=this.targetUrls()[e]?.connectionStringId??null,i=this.targetUrls()[e]?.urlKey??null;this.#t.updateTargetUrl(e,t,n,i),this.updateTestState(e,null);}updateTestState(e,t){this.testStates.update(n=>{let i=[...n];return i[e]=t,i});}toggleSave(e){this.#t.toggleSaveConnectionString(e);}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent});}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents();this.testStates();for(let i=0;i<t.length;i++){let _=t[i],T=this.testStates()[i];if(T&&typeof T!="string"&&T.action==="success")continue;if((await _.testDestination(false))?.action!=="success")return}this.#o();}#o(){this.#t.shouldAutoSave()&&this.#t.submit(true),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=hw({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&qg(n.testUrlComponents,kt,5),t&2&&fC();},decls:19,vars:9,consts:()=>{let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let T;T=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let b;b=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],e,t,n,i,_,T,b,V,K,J,X,z,H,W,j,Q,q,Y,Z,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","readOnlyTest","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[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","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1&&(dm(0)(1),Qi(2,"form",21,0),Hg("submit",function(){return n.next()}),Qi(4,"div",22),Ig(5,"input",23)(6,"input",24),$l(),Qi(7,"header"),aT(8,Ht,2,0),$l(),aT(9,_e,3,1),aT(10,le,5,0,"div",25),Qi(11,"div",26)(12,"button",27),Hg("click",function(){return n.goBack()}),Fg(13,2),Ig(14,"sh-icon"),jg(),$l(),Qi(15,"button",28),Fg(16,3),Ig(17,"sh-icon"),jg(),$l()()(),aT(18,Ce,16,5,"sh-dialog",29)),t&2){let i=WC(n.targetUrls());CE();let _=WC(i.length>0);CE(7),cT(n.currentEditingIndex()!==null||!n.showCustomList()&&!n.isAddingNew()?8:-1),CE(),cT((!_||n.showCustomList()||n.isAddingNew())&&n.currentEditingIndex()===null?9:-1),CE(),cT(_&&!n.showCustomList()&&!n.isAddingNew()?10:-1),CE(5),Kg("loading",n.isNew()&&n.testStates().length>0&&n.testStates()[0]==="testing"),vg("disabled",!_),CE(3),cT(n.targetUrlDialogOpen()?18:-1);}},dependencies:[sn,on,pt,_n,Bn,Tn,Ze,Rn,Pn,Jt$1,Zt$1,v,Fe,ve$1,N,de$1,ue,f,c,d,I,J],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.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}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};
2
+ export{Be as createDestinationForm,Ve as createDestinationFormGroup,B as default};
@@ -1,2 +1,2 @@
1
- import {v as v$1}from'./chunk-Bj7EyCHb.js';import {ShipTable as ot}from'./chunk-8Y8ReLEn.js';import {c}from'./chunk-DXEgz1tV.js';import {T,E as E1,z as za,G as Ge,h as hw,c as N,v as v$2,aJ as ci,d as aT,g as cT,L as Kg,Q as Qi,n as nC,$ as $l,i as Ig,a1 as dT,k as iC,ag as Yg,y as vg,C as CE,a2 as fT,l as vT,H as Hg,O as Od,P as Pd,s as jC,aM as ob,K as im,aN as ab,aa as Ql,ap as lT}from'./main-3NL5M6JB.js';import'./chunk-DidJB9ig.js';import'./chunk-DDWDcSq2.js';var B=(t,n)=>n.ID;function J(t,n){t&1&&(Qi(0,"div",4),nC(1,0),$l());}function U(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),im(e);}}function X(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Exception"),$l(),Qi(2,"ol",15),dT(3,U,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Exception));}}function j(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),im(e);}}function z(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Message"),$l(),Qi(2,"ol",15),dT(3,j,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Message));}}function W(t,n){if(t&1&&(Qi(0,"code"),aT(1,X,5,0),aT(2,z,5,0),$l()),t&2){let e=iC(2).$implicit;CE(),cT(e.Exception?1:-1),CE(),cT(e.Message?2:-1);}}function H(t,n){if(t&1&&(Qi(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),jC(4),$l(),Qi(5,"div",14),jC(6),$l(),Qi(7,"div",14),jC(8),$l(),Qi(9,"div",14),jC(10),$l(),Qi(11,"div",14),jC(12),$l()(),aT(13,W,3,2,"code"),$l()()),t&2){let e=iC().$implicit;CE(4),Ql("ID: ",e.ID),CE(2),Ql("Type: ",e.Type),CE(2),Ql("Tag: ",e.Tag),CE(2),Ql("TaskID: ",e.TaskID),CE(2),Ql("MessageID: ",e.MessageID),CE(),cT(e.Exception||e.Message?13:-1);}}function q(t,n){if(t&1){let e=vT();Qi(0,"tr",10),Hg("click",function(){let u=Od(e).$implicit,g=iC(2);return Pd(g.toggleRow(u.ID))}),Qi(1,"td"),jC(2),ob(3,"date"),$l(),Qi(4,"td"),jC(5),$l(),Qi(6,"td",8)(7,"button",11)(8,"sh-icon"),jC(9,"caret-down"),$l()()()(),aT(10,H,14,6,"tr");}if(t&2){let e=n.$implicit,a=iC(2);CE(2),im(ab(3,5,e.When,"medium")),CE(3),im(a.subStringMessage(e.Message)),CE(2),Kg("rotated-icon",e.ID===a.openRowId()),CE(3),cT(e.ID===a.openRowId()?10:-1);}}function K(t,n){if(t&1&&(Qi(0,"sh-table",6)(1,"tr",7)(2,"th"),nC(3,1),$l(),Qi(4,"th"),nC(5,2),$l(),Ig(6,"th",8),$l(),dT(7,q,11,8,null,null,B),Qi(9,"div",9),nC(10,3),$l()()),t&2){let e=iC();Yg("grid-template-columns","auto 1fr auto"),Kg("type-b",true),vg("data",e.logs())("loading",e.logsLoading()),CE(7),fT(e.logs());}}var v=class t{#e=T(v$1);whenFilter=E1();backupIdFilter=E1();polling=E1();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=za(()=>{let n=this.polling()??false;this.#e.isPolling.set(n);});openRowId=Ge(null);whenEffect=za(()=>{let n=this.whenFilter()??null;this.#e.setWhenFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});backupIdEffect=za(()=>{let n=this.backupIdFilter()??null;this.#e.setBackupIdFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});toggleRow(n){n!=null&&this.openRowId.set(n===this.openRowId()?null:n);}breakIntoLines(n){return n?n.split(`
1
+ import {v as v$1}from'./chunk-D0qGkLVr.js';import {ShipTable as ot}from'./chunk-xwdrpTfz.js';import {c}from'./chunk-Dyq6iPbF.js';import {T,E as E1,z as za,G as Ge,h as hw,c as N,v as v$2,aJ as ci,d as aT,g as cT,L as Kg,Q as Qi,n as nC,$ as $l,i as Ig,a1 as dT,k as iC,ag as Yg,y as vg,C as CE,a2 as fT,l as vT,H as Hg,O as Od,P as Pd,s as jC,aM as ob,K as im,aN as ab,aa as Ql,ap as lT}from'./main-XKLDSNLY.js';import'./chunk-Cv4o9u3S.js';import'./chunk-BnFO-7ok.js';var B=(t,n)=>n.ID;function J(t,n){t&1&&(Qi(0,"div",4),nC(1,0),$l());}function U(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),im(e);}}function X(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Exception"),$l(),Qi(2,"ol",15),dT(3,U,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Exception));}}function j(t,n){if(t&1&&(Qi(0,"li"),jC(1),$l()),t&2){let e=n.$implicit;CE(),im(e);}}function z(t,n){if(t&1&&(Qi(0,"strong"),jC(1,"# Message"),$l(),Qi(2,"ol",15),dT(3,j,2,1,"li",null,lT),$l()),t&2){let e=iC(3).$implicit,a=iC(2);CE(3),fT(a.breakIntoLines(e.Message));}}function W(t,n){if(t&1&&(Qi(0,"code"),aT(1,X,5,0),aT(2,z,5,0),$l()),t&2){let e=iC(2).$implicit;CE(),cT(e.Exception?1:-1),CE(),cT(e.Message?2:-1);}}function H(t,n){if(t&1&&(Qi(0,"tr")(1,"td",12)(2,"sh-list",13)(3,"div",14),jC(4),$l(),Qi(5,"div",14),jC(6),$l(),Qi(7,"div",14),jC(8),$l(),Qi(9,"div",14),jC(10),$l(),Qi(11,"div",14),jC(12),$l()(),aT(13,W,3,2,"code"),$l()()),t&2){let e=iC().$implicit;CE(4),Ql("ID: ",e.ID),CE(2),Ql("Type: ",e.Type),CE(2),Ql("Tag: ",e.Tag),CE(2),Ql("TaskID: ",e.TaskID),CE(2),Ql("MessageID: ",e.MessageID),CE(),cT(e.Exception||e.Message?13:-1);}}function q(t,n){if(t&1){let e=vT();Qi(0,"tr",10),Hg("click",function(){let u=Od(e).$implicit,g=iC(2);return Pd(g.toggleRow(u.ID))}),Qi(1,"td"),jC(2),ob(3,"date"),$l(),Qi(4,"td"),jC(5),$l(),Qi(6,"td",8)(7,"button",11)(8,"sh-icon"),jC(9,"caret-down"),$l()()()(),aT(10,H,14,6,"tr");}if(t&2){let e=n.$implicit,a=iC(2);CE(2),im(ab(3,5,e.When,"medium")),CE(3),im(a.subStringMessage(e.Message)),CE(2),Kg("rotated-icon",e.ID===a.openRowId()),CE(3),cT(e.ID===a.openRowId()?10:-1);}}function K(t,n){if(t&1&&(Qi(0,"sh-table",6)(1,"tr",7)(2,"th"),nC(3,1),$l(),Qi(4,"th"),nC(5,2),$l(),Ig(6,"th",8),$l(),dT(7,q,11,8,null,null,B),Qi(9,"div",9),nC(10,3),$l()()),t&2){let e=iC();Yg("grid-template-columns","auto 1fr auto"),Kg("type-b",true),vg("data",e.logs())("loading",e.logsLoading()),CE(7),fT(e.logs());}}var v=class t{#e=T(v$1);whenFilter=E1();backupIdFilter=E1();polling=E1();logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;logs=this.#e.logs;logsLoading=this.#e.logsLoading;pollingEffect=za(()=>{let n=this.polling()??false;this.#e.isPolling.set(n);});openRowId=Ge(null);whenEffect=za(()=>{let n=this.whenFilter()??null;this.#e.setWhenFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});backupIdEffect=za(()=>{let n=this.backupIdFilter()??null;this.#e.setBackupIdFilter(n),this.#e.logLevel.set(n?"Verbose":"Disabled");});toggleRow(n){n!=null&&this.openRowId.set(n===this.openRowId()?null:n);}breakIntoLines(n){return n?n.split(`
2
2
  `):[]}subStringMessage(n){return n?n.substring(0,80)+"...":""}ngOnDestroy(){this.#e.destroy();}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=hw({type:t,selectors:[["app-logs-live"]],hostVars:2,hostBindings:function(e,a){e&2&&Kg("is-disabled",a.logLevel()==="Disabled");},inputs:{whenFilter:[1,"whenFilter"],backupIdFilter:[1,"backupIdFilter"],polling:[1,"polling"]},decls:2,vars:1,consts:()=>{let n;n=$localize`Live logs are disabled`;let e;e=$localize`When`;let a;a=$localize`Message`;let u;return u=$localize`No data available`,[n,e,a,u,[1,"live-view-disabled"],[3,"type-b","data","loading","grid-template-columns"],[3,"data","loading"],["thead",""],[1,"sticky-end"],["table-no-rows",""],[3,"click"],["shButton","","type","button",1,"outlined","small"],[1,"expanded-cell"],[1,"primary"],["item",""],[1,"line-numbers-ol"]]},template:function(e,a){e&1&&aT(0,J,2,0,"div",4)(1,K,11,6,"sh-table",5),e&2&&cT(a.logLevel()==="Disabled"?0:1);},dependencies:[ot,N,c,v$2,ci],styles:["[_nghost-%COMP%]{display:block}.is-disabled[_nghost-%COMP%]{padding:0 2rem}.live-view-disabled[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:18.75rem;width:100%;background-color:var(--base-2);border:1px solid var(--base-3);border-radius:var(--shape-2);font:var(--paragraph-20)}.expanded-cell[_ngcontent-%COMP%]{height:auto;grid-column:1/-1;white-space:pre-wrap;display:flex;flex-direction:column;background:var(--base-2)}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:1.5rem;border-radius:var(--shape-2);overflow:auto;white-space:pre;max-width:100%;width:100%}sh-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:has(code) code[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0}code[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-block;margin-bottom:.25rem}code[_ngcontent-%COMP%] ol.line-numbers-ol[_ngcontent-%COMP%] + strong[_ngcontent-%COMP%]{margin-top:1.25rem}"]})};export{v as default};
@@ -0,0 +1,2 @@
1
+ import {OptionsListComponent as Oe$1}from'./chunk-DGO0_pkA.js';import {O}from'./chunk-BFquKzMb.js';import {N as Nt$3,a as ot}from'./chunk-D6WUhpxO.js';import'./chunk-1-oPQ4n-.js';import {S as Se}from'./chunk-DzYR8wiz.js';import'./chunk-DXh9g32e.js';import {I}from'./chunk-0lYdrxte.js';import {J}from'./chunk-FZcbbWYC.js';import'./chunk-Dyq6iPbF.js';import'./chunk-5EFCeqK3.js';import {N as Nt$2}from'./chunk-GKdOPH_4.js';import'./chunk-KNmRQWOM.js';import'./chunk-B-T54LAJ.js';import'./chunk-D5zSyubd.js';import'./chunk-Cv4o9u3S.js';import {T,ab as C,e as ee,aw as W,G as Ge,N as Nt$1,J as zu,h as hw,c as N,v,Q as Qi,H as Hg,d as aT,aP as ql,n as nC,aQ as Gl,p as lm,$ as $l,F as Fg,i as Ig,j as jg,y as vg,C as CE,g as cT,w as cm,bj as Q,m,aJ as ci,z as za,cn as Zu,aE as jo,bJ as fe,aH as m$1,au as Vg,av as rC,aD as YC,a6 as be,at as h,L as Kg,b0 as Hs,co as ly,c4 as $s,ay as Qu,bK as wy,cp as Sy,aZ as ee$1,U as UC,r as CD,x as _D,l as vT,O as Od,k as iC,P as Pd,bi as cg,a3 as KC,s as jC,aM as ob,aB as sm,aN as ab,aa as Ql,aR as sb,K as im}from'./main-XKLDSNLY.js';import'./chunk-CTH9uShX.js';import {d}from'./chunk-BnFO-7ok.js';import {F as Fe}from'./chunk-DqoYKCmi.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn,B as Bn,J as Jt$1,y as yt$1,r as rn}from'./chunk-BDhLEYas.js';import'./chunk-UUMQmD5I.js';import'./chunk-B8PnvglY.js';import {O as O$1}from'./chunk-CsgB8OpN.js';import'./chunk-BaknLOqq.js';import {L}from'./chunk-DCsYP4vf.js';var _e={handleExisting:"saveTimestamp",permissions:false,includeMetadata:true},Ft=new Set(["true","1","yes","on"]),Ce=i=>(i??"").trim().replace(/^--/,"").toLowerCase(),_t=i=>Ft.has((i??"").trim().toLowerCase()),ct=(i,t,e,n)=>{let o=Ce(i),r=t.find(c=>Ce(c.Name)===o);if(r)return _t(r.Value);let _=Object.keys(e).find(c=>Ce(c)===o);return _?_t(e[_]):n},ut=(i,t)=>{let e=i??[],n=ct("restore-permissions",e,t,_e.permissions),o=ct("skip-metadata",e,t,false);return {permissions:n,includeMetadata:!o}};function Ct(i,t){i&1&&(Qi(0,"p"),nC(1,3),$l());}function Ot(i,t){i&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),Ig(3,"input",12),CD(),$l()),i&2&&(CE(3),_D());}var dt=new jn,St=()=>dt.group({passphrase:dt.control("")}),Oe=class i{#e=T(C);#t=T(G);#i=T(ee);#n=T(W);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt$1(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?true:t?.containsEncryptedBackupFiles??true});showEncryptionField=Ge(false);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let e=this.encryptionForm.value?.passphrase??null,n=[];e?n.push({Name:"--passphrase",Value:e}):n.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let r=o.Name?.trim();r&&r!=="--"&&(r.startsWith("--")||(r=`--${r}`),n.push({Name:r,Value:o.Value??""}));}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:n}},temporary:true}).pipe(zu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:o=>{let r=o.ID;this.#i.navigate([`/restore-draft/${r}`]);},error:o=>{console.error(o);}});}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;n=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`The backup does not contain encrypted files.`;let r;r=$localize`Enter backup passphrase if defined.`;let _;return _=$localize`Password`,[t,e,n,o,_,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",r,"formControlName","passphrase"]]},template:function(e,n){e&1&&(Qi(0,"form",5),Hg("submit",function(){return n.next()}),aT(1,Ct,2,0,"p"),aT(2,Ot,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),lm("optionsChange",function(r){return UC(n.settings,r)||(n.settings=r),r}),$l()(),Qi(7,"div",8)(8,"button",9),Hg("click",function(){return n.back()}),Fg(9,1),Ig(10,"sh-icon"),jg(),$l(),Qi(11,"button",10),Fg(12,2),Ig(13,"sh-icon"),jg(),$l()()()),e&2&&(vg("formGroup",n.encryptionForm),CE(),cT(n.hasEncryptedBackup()?-1:1),CE(),cT(n.hasEncryptedBackup()||n.showEncryptionField()?2:-1),CE(4),cm("options",n.settings),vg("hasFreeTextSettings",true));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe$1],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var Et=()=>({standalone:true});function ft(i,t){i&1&&Ig(0,"sh-progress-bar",13);}function Nt(i,t){if(i&1&&(jC(0),ob(1,"bytes")),i&2){let e=iC().$implicit;Ql(" (",sb(1,1,e.FileSizes),") ");}}function ht(i,t){i&1&&(Qi(0,"span",20),nC(1,4),$l());}function Rt(i,t){if(i&1&&(Ig(0,"br"),Qi(1,"span",21),jC(2),$l()),i&2){let e=iC().$implicit;CE(2),im(e.Label);}}function Pt(i,t){if(i&1&&(Qi(0,"div",19),jC(1),ob(2,"date"),aT(3,Nt,2,3),aT(4,ht,2,0,"span",20),aT(5,Rt,3,1),$l()),i&2){let e=t.$implicit;CE(),sm(" ",e.Version,": ",ab(2,5,e.Time,"medium")," "),CE(2),cT(e.FileSizes?3:-1),CE(),cT(e.IsFullBackup===false?4:-1),CE(),cT(e.Label?5:-1);}}function It(i,t){i&1&&Ig(0,"sh-progress-bar",13);}function Mt(i,t){i&1&&(Qi(0,"sh-icon",29),jC(1,"spinner"),$l());}function Lt(i,t){i&1&&(Qi(0,"sh-icon"),jC(1,"magnifying-glass"),$l());}function yt(i,t){if(i&1){let e=vT();Qi(0,"button",32),Hg("click",function(){Od(e);let o=iC(4);return Pd(o.clearSearch())}),Qi(1,"sh-icon"),jC(2,"x-circle"),$l(),Qi(3,"span"),nC(4,8),$l()();}}function Dt(i,t){i&1&&(Qi(0,"span"),nC(1,9),$l());}function bt(i,t){if(i&1&&(Qi(0,"span"),nC(1,10),$l()),i&2){let e=iC(5);CE(),Vg(e.searchResults().length),rC(1);}}function $t(i,t){if(i&1&&(Qi(0,"div",31),aT(1,Dt,2,0,"span")(2,bt,2,1,"span"),$l()),i&2){let e=iC(4);CE(),cT(e.searchResults().length===0?1:2);}}function vt(i,t){if(i&1){let e=vT();Qi(0,"div",25)(1,"sh-form-field")(2,"label",26),nC(3,6),$l(),Qi(4,"input",27),lm("ngModelChange",function(o){Od(e);let r=iC(3);return UC(r.searchQuery,o)||(r.searchQuery=o),Pd(o)}),Hg("keydown.enter",function(o){Od(e);let r=iC(3);return o.preventDefault(),Pd(r.performSearch())}),$l(),CD(),$l(),Qi(5,"button",28),Hg("click",function(){Od(e);let o=iC(3);return Pd(o.performSearch())}),aT(6,Mt,2,0,"sh-icon",29)(7,Lt,2,0,"sh-icon"),Qi(8,"span"),nC(9,7),$l()(),aT(10,yt,5,0,"button",30),$l(),aT(11,$t,3,1,"div",31);}if(i&2){let e=iC(3);CE(4),cm("ngModel",e.searchQuery),vg("ngModelOptions",KC(6,Et)),_D(),CE(),vg("disabled",e.isSearching()||!e.searchQuery().trim()),CE(),cT(e.isSearching()?6:7),CE(4),cT(e.isSearchMode()?10:-1),CE(),cT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function At(i,t){if(i&1){let e=vT();aT(0,vt,12,7),Qi(1,"app-file-tree",22),Hg("hasExtendedData",function(o){Od(e);let r=iC(2);return Pd(r.extendedDataType.set(o))}),Qi(2,"label",23),nC(3,5),$l(),Ig(4,"input",24),CD(),$l();}if(i&2){let e=iC(2);cT(e.canSearch()?0:-1),CE(),vg("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("loadExtendedData",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),CE(3),_D();}}function xt(i,t){if(i&1){let e=vT();Qi(0,"sh-select",17),Hg("cleared",function(){Od(e);let o=iC();return Pd(o.abortLoading())}),Qi(1,"input",18),lm("ngModelChange",function(o){Od(e);let r=iC();return UC(r.selectOption,o)||(r.selectOption=o),Pd(o)}),$l(),CD(),cg(2,Pt,6,8,"ng-template"),$l(),aT(3,It,1,0,"sh-progress-bar",13),aT(4,At,5,9);}if(i&2){let e=iC();vg("options",e.versionOptions())("isClearable",false),CE(),cm("ngModel",e.selectOption),vg("ngModelOptions",KC(6,Et)),_D(),CE(2),cT(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),CE(),cT(e.showFileTree()?4:-1);}}var Ne=new jn,Tt=()=>Ne.group({filesToRestore:Ne.control(""),passphrase:Ne.control(null)}),he=class i{#e=T(C);#t=T(G);#i=T(Q);#n=T(m);#o=T(ee);#a=T(W);#l=T(ci);#_=null;#r=null;#s=Ge([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=Nt$1(()=>this.#t.backup()?.Backup?.IsTemporary??true);showFileTree=Ge(false);backupSettings=Ge(null);rootPaths=Ge([]);initialNodes=Ge([]);loadingRootPath=Ge(false);isRepairing=Nt$1(()=>this.#s().length>0);loadedVersions=Ge({});canSearch=Nt$1(()=>this.#n.hasV2ListOperations());searchQuery=Ge("");isSearching=Ge(false);searchResults=Ge([]);hasSearched=Ge(false);isSearchMode=Nt$1(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=za(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let n=e[0].Version;this.selectOption.set(n.toString());}});backupSettingsEffect=za(()=>{let t=this.backupId(),e=this.selectOption(),n=this.isRepairing(),o=this.loadedVersions();if(!e||!t)return;let _=this.versionOptions()?.find(w=>w.Version===parseInt(e))?.Time??null;if(!_)return;let c=`${t}+${_}`,I=o[c];if(this.needsDatabaseRepair()&&(!I||n))return;let b={id:t+"",time:_};this.backupSettings.set(b),this.getRootPath(b);});repairEffect=za(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let n=e.find(_=>_.Version===parseInt(t));if(n===void 0)return;let o=this.backupId(),r=`${o}+${n.Time}`;if(this.#r===r||(this.#r=r,this.#s().includes(r)))return;this.#s.update(_=>[..._,r]),this.#e.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:true,time:n.Time}}).pipe(Zu(this.abortLoading$),zu(()=>{this.#r=null;})).subscribe(_=>{let c=_.ID;this.#i.waitForTaskToComplete(c).pipe(jo(1)).subscribe(()=>{this.#s.update(I=>I.filter(b=>b!==r)),this.loadedVersions.update(I=>(I[r]=true,I));});});}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:true,folderContents:false},n=t.id+"";this.isRepairing()||this.#_===n||(this.#_=n,this.loadingRootPath.set(true),this.showFileTree.set(false),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}}).pipe(Zu(this.abortLoading$),zu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false),this.#_=null;})).subscribe({next:o=>{let r=(o.Data??[]).find(c=>c.Metadata&&c.Metadata.ExtType&&c.Metadata.ExtType.length>0);r&&this.extendedDataType.set(r.Metadata.ExtType);let _=(o.Data??[]).map(c=>c.Path??"");_.length>0?(this.initialNodes.set([]),this.rootPaths.set(_)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}):this.#e.getApiV1BackupByIdFiles(e).pipe(Zu(this.abortLoading$),zu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false);})).subscribe({next:o=>{let r=o.Files.map(_=>_.Path??"");r.length>0?(this.initialNodes.set([]),this.rootPaths.set(r)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}));}abortLoading$=new fe;abortLoading(){this.showFileTree.set(false),this.loadingRootPath.set(false),this.abortLoading$.next(true);}displayFn(){let t=this.versionOptions();return e=>{if(!e)return "";let n=t?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return n?`${n.Version}: ${this.#l.transform(n.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#a.parent});}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#a.parent}):this.#t.exit();}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings(),n=(this.#t.extendedDataType()??"").length>0;if(!t||!e)return;let r=this.versionOptions()?.find(_=>_.Version===parseInt(this.selectOption()??""))?.Version;r!=null&&(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[r],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:n,SearchMetadata:n}}).pipe(Zu(this.abortLoading$),zu(()=>this.isSearching.set(false))).subscribe({next:_=>{this.searchResults.set(_.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-select-files"]],features:[YC([ci])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let n;n=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let r;r=$localize`(partial)`;let _;_=$localize`Path`;let c;c=$localize`Enter search term...`;let I;I=$localize`Search files`;let b;b=$localize`Search`;let w;w=$localize`Clear`;let oe;oe=$localize`0 results found`;let ne;return ne=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,n,r,_,I,b,w,oe,ne,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",o,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[1,"label"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",c,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,n){e&1&&(Qi(0,"form",11,0),Hg("submit",function(){return n.next()}),Qi(2,"h3",12),nC(3,1),$l(),aT(4,ft,1,0,"sh-progress-bar",13)(5,xt,5,7),Qi(6,"div",14)(7,"button",15),Hg("click",function(){return n.back()}),Fg(8,2),Ig(9,"sh-icon"),jg(),$l(),Qi(10,"button",16),Fg(11,3),Ig(12,"sh-icon"),jg(),$l()()()),e&2&&(vg("formGroup",n.selectFilesForm),CE(4),cT(n.versionOptionsLoading()?4:5),CE(5),Vg(n.isFileRestore()?"Back":"Exit"),rC(8));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt$1,Gn,gn,hn,Se,v,Fe,N,Nt$2,d,ci,m$1],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.label[_ngcontent-%COMP%]{color:var(--base-9)}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"]})};var G=class i{#e=T(ee);#t=T(W);#i=T(m);#n=T(be);#o=T(C);#a=T(O$1);#l=null;backupId=Ge(null);backup=Ge(null);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);selectFilesForm=Tt();optionsForm=gt();encryptionForm=St();optionsFormSignal=L(this.optionsForm.valueChanges);selectFilesFormSignal=L(this.selectFilesForm.valueChanges);selectOption=Ge(null);versionOptionsLoading=Ge(false);versionOptions=Ge([]);isSubmitting=Ge(false);isFileRestore=Ge(false);isFullWidthPage=Ge(false);extendedDataType=Ge(null);alternateRestorePath=Ge(null);alternateRestorePathSourcePrefix=Ge(null);#_=za(()=>{let t=this.backupId(),e=this.backup()?.Backup,n=this.#a.serverSettings();!t||!e||n===void 0||e.ID!==null&&e.ID!==t||this.#l!==t&&(this.#l=t,this.optionsForm.patchValue(ut(e.Settings,n)));});init(t,e=false){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup();}updateTargetUrl(t){this.destinationTargetUrl.set(t);}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e);}submit(){this.isSubmitting.set(true);let t=this.backupId();this.backup()?.Backup?.IsTemporary??false?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:n=>{this.#r(n.ID??"");},error:n=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${n.message}`)}):this.#r(t??"");}showErrorDialog(t){this.#n.open(h,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}});}#r(t){let e=this.optionsForm.value,n=this.selectFilesForm.value,o=this.selectOption(),r=this.versionOptions()?.find(_=>_.Version===(o&&parseInt(o)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:n.filesToRestore?.split("\0").map(_=>_.endsWith("/")||_.endsWith("\\")?`${_}*`:_)??[],passphrase:n.passphrase??null,time:r?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(zu(()=>this.isSubmitting.set(false))).subscribe({next:_=>{this.#e.navigate([`./${_.ID}`,"progress"],{relativeTo:this.#t});},error:_=>{console.error("restore error",_);}});}exit(){this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#s(),this.#e.navigate(["/"]));}});}getVersionOptions(){this.versionOptions();}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Hs(n=>{let o=n?.error?.body?.StatusCode??n?.error?.requestBody?.StatusCode;return o==="EncryptedStorageNoPassphrase"||o==="FolderMissing"||o==="EmptyRemoteFolder"||e===0?ly(()=>n):$s(1e3).pipe(Qu(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(true),this.#i.hasV2ListOperations()?wy([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(jo(1),zu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,n])=>{if(n.Error)throw new Error(n.Error);if(!(e.Backup?.IsTemporary??true)&&e?.Backup?.DBPathExists===false){this.#n.open(h,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:r=>{this.#e.navigate(["/backup",t,"database"]);}});return}this.versionOptions.set((n.Data??[]).map(r=>({Version:r.Version??-1,IsFullBackup:r.IsFullBackup??void 0,Time:r.Time??"<missing>",FileCount:r.FileCount??void 0,FileSizes:r.FileSizes??void 0,Label:r.Label??void 0}))),this.backup.set(e);},error:e=>{let n=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,o=n==="EncryptedStorageNoPassphrase",r=n==="FolderMissing",_=n==="EmptyRemoteFolder",c=$localize`An error occurred while loading the backup filesets: ${e.message}`;o&&(c=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),r&&(c=$localize`The backup storage folder was not found.`),_&&(c=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(h,{data:{title:$localize`Failed to load backup filesets`,message:c,confirmText:$localize`OK`,cancelText:void 0},closed:I=>{this.#e.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"]);}});}}):wy([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Sy(3))]).pipe(jo(1),zu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,n])=>{this.versionOptions.set(n.map(o=>({Version:o.Version??-1,IsFullBackup:(o.IsFullBackup??1)==1,Time:o.Time??"<missing>",FileCount:o.FileCount??void 0,FileSizes:o.FileSizes??void 0,Label:o.Label??void 0}))),this.backup.set(e);}});}#s(){this.selectFilesForm.reset(),this.optionsForm.reset();}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function kt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Fg(1,6),Ig(2,"input",32),CD(),jg(),$l(),Qi(3,"sh-radio",28),Fg(4,7),Qi(5,"input",33),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.chooseCustomRemoteDestination())}),$l(),CD(),jg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function Gt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Fg(1,8),Ig(2,"input",32),CD(),jg(),$l(),Qi(3,"sh-radio",28),Fg(4,9),Qi(5,"input",33),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.chooseCustomRemoteDestination())}),$l(),CD(),jg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function wt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",28),Fg(1,10),Qi(2,"input",34),Hg("click",function(){Od(e);let o=iC(2);return Pd(o.chooseDiskDestination())}),$l(),CD(),jg(),$l();}i&2&&(CE(2),_D());}function Wt(i,t){if(i&1&&(Qi(0,"app-file-tree",30)(1,"label",35),jC(2,"Path"),$l(),Ig(3,"input",36),CD(),$l()),i&2){let e=iC(2);vg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Vt(i,t){if(i&1&&(Qi(0,"app-file-tree",31)(1,"label",35),jC(2,"Path"),$l(),Ig(3,"input",36),CD(),$l()),i&2){let e=iC(2);vg("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl()),CE(3),_D();}}function Bt(i,t){if(i&1&&(aT(0,kt,6,0)(1,Gt,6,0)(2,wt,3,0,"sh-radio",28),Qi(3,"sh-radio",28),Fg(4,5),Ig(5,"input",29),CD(),jg(),$l(),aT(6,Wt,4,3,"app-file-tree",30),aT(7,Vt,4,4,"app-file-tree",31)),i&2){let e=iC();cT(e.extendedDataType()==="o365"?0:e.extendedDataType()==="gsuite"?1:e.extendedDataType()==="diskimage"?2:-1),CE(5),_D(),CE(),cT(e.optionsFormSignal()?.restoreFrom==="pickLocation"?6:-1),CE(),cT(e.showCustomRemoteRestoreTree()?7:-1);}}function zt(i,t){if(i&1&&(Qi(0,"sh-radio",28),Fg(1,11),Ig(2,"input",37),CD(),jg(),$l(),Qi(3,"sh-radio",28),Fg(4,12),Ig(5,"input",29),CD(),jg(),$l(),Qi(6,"app-file-tree",30)(7,"label",35),jC(8,"Path"),$l(),Ig(9,"input",36),CD(),$l()),i&2){let e=iC();CE(2),_D(),CE(3),_D(),CE(),vg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Jt(i,t){i&1&&(Qi(0,"app-toggle-card",23),ql(1,24),nC(2,13),Gl(),Qi(3,"sh-toggle",28),Fg(4,14),Ig(5,"input",38),CD(),jg(),$l()()),i&2&&(vg("disableToggle",true),CE(5),_D());}function Xt(i,t){i&1&&(Qi(0,"app-toggle-card",23),ql(1,24),nC(2,15),Gl(),Qi(3,"sh-radio",28),Fg(4,16),Ig(5,"input",39),CD(),jg(),$l(),Qi(6,"sh-radio",28),Fg(7,17),Ig(8,"input",40),CD(),jg(),$l()(),Qi(9,"app-toggle-card"),ql(10,24),nC(11,18),Gl(),Qi(12,"sh-toggle",41),Fg(13,19),Ig(14,"input",42),CD(),jg(),$l(),Qi(15,"sh-toggle",41),Fg(16,20),Ig(17,"input",43),CD(),jg(),$l()()),i&2&&(vg("disableToggle",true),CE(5),_D(),CE(3),_D(),CE(6),_D(),CE(3),_D());}var B=new jn,gt=()=>B.group({restoreFrom:B.control("original"),restoreFromPath:B.control(""),handleExisting:B.control(_e.handleExisting),permissions:B.control(_e.permissions),includeMetadata:B.control(_e.includeMetadata),customRemoteIgnoreExisting:B.control(false)}),Re=class i{#e=T(G);#t=T(ee);#i=T(W);#n=T(m);#o=T(be);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=Ge(null);backupId=Nt$1(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=Nt$1(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":t==="diskimage"?"diskimage":null});remoteCustomSourceEntry=Nt$1(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():t==="diskimage"?"diskimage://":null});showCustomRemoteRestoreTree=Nt$1(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()||this.optionsFormSignal()?.restoreFrom==="diskimage"));isCustomRemoteRestore=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(Nt$3,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:true,expectedResult:"any",suppressErrorDialogs:true,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(n=>{n&&(this.remoteCustomTargetUrl.set(n),this.optionsForm.controls.restoreFrom.setValue("other-custom"));}),false}chooseDiskDestination(){return true}#a=za(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"));});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent});}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(h,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:r=>{r&&this.#e.submit();}});return}let e=this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom",n=this.optionsFormSignal()?.restoreFrom==="diskimage";if(e){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let r=this.optionsFormSignal()?.customRemoteIgnoreExisting,_=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),c=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${_}&google-ignore-existing=${r?"true":"false"}`:`@office365://${encodeURIComponent(o)}${_}&office365-ignore-existing=${r?"true":"false"}`;this.#e.setAlternateRestorePath(c,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else if(n){let o=this.optionsFormSignal()?.restoreFromPath;if(!o||o.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:$localize`Please choose a target disk to restore to.`,confirmText:$localize`OK`,cancelText:void 0}});return}o.startsWith("@diskimage://")||(o=`@diskimage://${o}`),this.#e.setAlternateRestorePath(o,null),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else this.#e.setAlternateRestorePath(null,null);this.#e.submit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let n;n=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let r;r=$localize` Local file system ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let _;_=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let c;c=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Target disk ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let P;P=$localize`Restore settings`;let Pe;Pe=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Ie;Ie=$localize`How do you want to handle existing files?`;let Me;Me=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Le;Le=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let ye;ye=$localize`Metadata settings`;let De;De=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let be;return be=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,n,o,r,_,c,I,b,w,oe,ne,P,Pe,Ie,Me,Le,ye,De,be,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["type","radio","name","restoreFrom","value","diskimage","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,n){e&1&&(Qi(0,"form",21,0),Hg("submit",function(){return n.submit()}),Qi(2,"h3",22),nC(3,1),$l(),Qi(4,"app-toggle-card",23),ql(5,24),nC(6,2),Gl(),aT(7,Bt,8,3)(8,zt,10,3),$l(),aT(9,Jt,6,1,"app-toggle-card",23)(10,Xt,18,1),Qi(11,"div",25)(12,"button",26),Hg("click",function(){return n.goBack()}),Fg(13,3),Ig(14,"sh-icon"),jg(),$l(),Qi(15,"button",27),Fg(16,4),Ig(17,"sh-icon"),jg(),$l()()()),e&2&&(vg("formGroup",n.optionsForm),CE(4),vg("disableToggle",true),CE(3),cT(n.extendedDataType()!==null?7:8),CE(2),cT(n.isCustomRemoteRestore()&&n.optionsFormSignal()?.restoreFrom!=="diskimage"?9:n.optionsFormSignal()?.restoreFrom!=="diskimage"?10:-1),CE(6),Kg("loading",n.isSubmitting()));},dependencies:[Gn,Tn,Ze,yt$1,rn,Rn,Pn,gn,hn,ot,Se,J,O,v,N],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};
2
+ var chunkGI7HMRYZ=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:St,default:Oe});var chunkHOJUGVH4=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreSelectFilesForm:Tt,default:he});var chunkH5BFH3FS=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreOptionsForm:gt,default:Re});export{G,chunkHOJUGVH4 as a,chunkH5BFH3FS as b,chunkGI7HMRYZ as c};
@@ -1,4 +1,4 @@
1
- import {T,ae as eo,E as E1,bb as ce$1,bt as rE,h as hw,S as aC,Y as cC,V as Ul,X as Wl,H as Hg,f as NC,ad as Mr,bu as N,af as D1,ac as I1,N as Nt,aj as l,D as w1,G as Ge,bv as le$1,z as za,an as Bg,W as Eg,d as aT,aC as yg,C as CE,ag as Yg,g as cT,L as Kg,M as qg,R as fC,Q as Qi,p as lm,U as UC,$ as $l,i as Ig,w as cm,y as vg,a3 as KC,l as vT,O as Od,k as iC,P as Pd,bw as _C}from'./main-3NL5M6JB.js';var pe=["triggerRef"],se=["popoverRef"],ne=["popoverContentRef"],fe=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],ae=["[trigger]","button","[shButton]","*"];function le(s,xe){if(s&1){let i=vT();Ul(0,"div",6,1)(2,"div",7),Bg("click",function(r){Od(i);let n=iC();return Pd(n.eventClose(r))}),Wl(),Ul(3,"div",8,2),cC(5,3),Wl()();}if(s&2){let i=iC();yg("id",i.id()+"hello"),CE(3),_C(i.menuStyle()),Yg("position-anchor",i.id());}}var h=4,he=["scroll","auto"],de={width:void 0,height:void 0,closeOnButton:true,closeOnEsc:true},oe=(()=>{class s{constructor(){this.#e=T(Mr),this.#r=T(N),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=E1(false),this.asSheetOnMobile=E1(false),this.disableOpenByClick=E1(false),this.isOpen=D1(false),this.options=E1(),this.closed=I1(),this.defaultOptionMerge=Nt(()=>l(l({},de),this.options())),this.triggerRef=w1.required("triggerRef"),this.popoverRef=w1("popoverRef"),this.popoverContentRef=w1("popoverContentRef"),this.id=Ge("--"+le$1()),this.menuStyle=Ge(null),this.openAbort=null,this.#i=null,this.openEffect=za(()=>{let i=this.isOpen(),e=this.popoverRef()?.nativeElement;queueMicrotask(()=>{if(!e){this.openAbort?.abort(),this.openAbort=null;return}if(i){if(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,this.#e.addEventListener("keydown",o=>{this.#r.matches(o,"popover.close")&&(this.defaultOptionMerge().closeOnEsc?this.isOpen.set(false):o.preventDefault());},{signal:this.openAbort?.signal}),!e.isConnected)return;e.showPopover();let r=this.#r.getShortcut("popover.close");r&&e.setAttribute("aria-keyshortcuts",this.#r.getDisplayShortcut("popover.close")||r);let n=this.asSheetOnMobile()&&window.innerWidth<=768;n&&(this.#i=this.#e.body.style.overflow,this.#e.body.style.overflow="hidden",this.menuStyle.set(null)),!this.SUPPORTS_ANCHOR&&!n&&setTimeout(()=>{this.#u(e).addEventListener("scroll",()=>this.#o(),{signal:this.openAbort?.signal}),window?.addEventListener("resize",()=>this.#o(),{signal:this.openAbort?.signal}),this.#o();});}else this.closed.emit(),e.hidePopover(),this.openAbort?.abort(),this.openAbort=null,this.asSheetOnMobile()&&this.#i!==null&&(this.#e.body.style.overflow=this.#i,this.#i=null);});});}#e;#r;#i;toggleIsOpen(i){this.disableOpenByClick()||(i.preventDefault(),i.stopPropagation(),this.isOpen.set(!this.isOpen()));}eventClose(i){this.isOpen()&&this.isOpen.set(false);}#u(i){let e=i.parentElement;for(;e;){if(he.indexOf(window?.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement;}return this.#e.documentElement}#t(i,e){return {left:i.left,top:i.bottom+h}}#p(i,e){return {left:i.left,top:i.top-e.height-h}}#s(i,e){return {left:i.right-e.width,top:i.bottom+h}}#n(i,e){return {left:i.right-e.width,top:i.top-e.height-h}}#f(i,e){return {left:i.right+h,top:i.top}}#a(i,e){return {left:i.left-e.width-h,top:i.top}}#l(i,e){return {left:i.right+h,top:i.top+i.height/2-e.height/2}}#h(i,e){return {left:i.left-e.width-h,top:i.top+i.height/2-e.height/2}}#d(i,e){return {left:i.right+h,top:i.bottom-e.height}}#m(i,e){return {left:i.left-e.width-h,top:i.bottom-e.height}}#c(i,e){return i.left>=0&&i.top>=0&&i.left+e.width<=window.innerWidth&&i.top+e.height<=window.innerHeight}#v(i,e){return {left:Math.max(0,Math.min(i.left,window.innerWidth-e.width)),top:Math.max(0,Math.min(i.top,window.innerHeight-e.height))}}#o(){let i=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverContentRef()?.nativeElement.getBoundingClientRect();if(!i||!e)return;let r=[this.#t,this.#p,this.#s,this.#n,this.#f,this.#a,this.#l,this.#h,this.#d,this.#m],n=[this.#f,this.#d,this.#a,this.#m,this.#l,this.#h,this.#t,this.#p,this.#s,this.#n],o=this.asMultiLayer()?n:r;for(let p of o){let y=p.call(this,i,e);if(this.#c(y,e)){this.menuStyle.set({left:y.left+"px",top:y.top+"px"});return}}let d=this.#v(o[0].call(this,i,e),e);this.menuStyle.set({left:d.left+"px",top:d.top+"px"});}ngOnDestroy(){this.openAbort?.abort(),this.openAbort=null;}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=hw({type:s,selectors:[["sh-popover"]],viewQuery:function(e,r){e&1&&qg(r.triggerRef,pe,5)(r.popoverRef,se,5)(r.popoverContentRef,ne,5),e&2&&fC(3);},hostVars:4,hostBindings:function(e,r){e&2&&Kg("multi-layer",r.asMultiLayer())("as-sheet",r.asSheetOnMobile());},inputs:{asMultiLayer:[1,"asMultiLayer"],asSheetOnMobile:[1,"asSheetOnMobile"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ae,decls:8,vars:4,consts:[["triggerRef",""],["popoverRef",""],["popoverContentRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","manual",1,"popover"],[1,"overlay",3,"click"],[1,"popover-content"]],template:function(e,r){e&1&&(aC(fe),Ul(0,"div",3,0),Bg("click",function(o){return r.toggleIsOpen(o)}),Ul(2,"div",4),cC(3),cC(4,1),cC(5,2),Wl(),Eg(6,"div",5),Wl(),aT(7,le,6,5,"div",6)),e&2&&(yg("popovertarget",r.id()+"hello"),CE(6),Yg("anchor-name",r.id()),CE(),cT(r.isOpen()?7:-1));},styles:[`sh-popover{--po-d: block;display:var(--po-d)}sh-popover.multi-layer .popover-content{position-area:right span-y-end}sh-popover.multi-layer .trigger .trigger-anchor{right:-.25rem;left:-.25rem;top:0;bottom:0}sh-popover .trigger{cursor:pointer;display:var(--po-d);position:relative}sh-popover .trigger .trigger-wrapper{display:var(--po-d)}sh-popover .trigger .trigger-wrapper:empty+*{display:inherit}sh-popover .trigger .trigger-anchor{position:absolute;inset:0;z-index:-1}sh-popover .popover{position:fixed;inset:0;width:100%;height:100%;border:0;opacity:1;background-color:transparent;z-index:-1}sh-popover .popover .overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent}sh-popover [popover]::backdrop{display:none}sh-popover .popover-content{position:fixed;margin:0;min-width:11.25rem;max-width:calc(100vw - .5rem);max-height:calc(100vh - .5rem);overflow:auto;z-index:0;background-color:var(--base-1);border:var(--border-10);border-radius:var(--shape-2);font:var(--paragraph-30);color:var(--base-8);padding:0}@supports (anchor-name: --anchor){sh-popover .popover-content{inset:auto;top:.25rem;position:fixed;position-area:bottom span-right;max-width:unset;max-height:unset;overflow:visible;position-try-fallbacks:--top-span-right,--bottom-span-left,--top-span-left,--right-span-bottom,--left-span-bottom,--right-center,--left-center,--right-span-top,--left-span-top}}@media only screen and (max-width:768px){sh-popover.as-sheet .popover{z-index:9999}sh-popover.as-sheet .popover .overlay{background-color:var(--overlay, rgba(0, 0, 0, .5))}@supports (anchor-name: --anchor){sh-popover.as-sheet .popover-content{position-area:none;position-try-fallbacks:none;inset:auto}}sh-popover.as-sheet .popover-content{position:fixed;top:auto;bottom:0;left:.5rem;right:.5rem;width:calc(100% - 1rem);max-width:unset;height:auto;max-height:calc(100vh - 5rem);border-bottom-left-radius:0;border-bottom-right-radius:0;margin:0;transform:translateY(0);display:flex;align-items:center;padding:1rem;justify-content:center}}.full-popover sh-popover .popover-content,sh-popover.full .popover-content{width:auto}@supports (anchor-name: --anchor){.full-popover sh-popover .popover-content,sh-popover.full .popover-content{left:anchor(left);right:anchor(right)}}@position-try --bottom-span-right{position-area:bottom span-right;inset:auto;top:.25rem}@position-try --bottom-span-left{position-area:bottom span-left;inset:auto;top:.25rem}@position-try --top-span-right{position-area:top span-right;inset:auto;bottom:.25rem}@position-try --top-span-left{position-area:top span-left;inset:auto;bottom:.25rem}@position-try --right-span-top{position-area:right span-top;inset:auto;left:.25rem}@position-try --left-span-top{position-area:left span-top;inset:auto;right:.25rem}@position-try --right-center{position-area:right center;inset:auto;left:.25rem}@position-try --left-center{position-area:left center;inset:auto;right:.25rem}@position-try --right-span-bottom{position-area:right span-bottom;inset:auto;left:.25rem}@position-try --left-span-bottom{position-area:left span-bottom;inset:auto;right:.25rem}
1
+ import {T,ae as eo,E as E1,bb as ce$1,bt as rE,h as hw,S as aC,Y as cC,V as Ul,X as Wl,H as Hg,f as NC,ad as Mr,bu as N,af as D1,ac as I1,N as Nt,aj as l,D as w1,G as Ge,bv as le$1,z as za,an as Bg,W as Eg,d as aT,aC as yg,C as CE,ag as Yg,g as cT,L as Kg,M as qg,R as fC,Q as Qi,p as lm,U as UC,$ as $l,i as Ig,w as cm,y as vg,a3 as KC,l as vT,O as Od,k as iC,P as Pd,bw as _C}from'./main-XKLDSNLY.js';var pe=["triggerRef"],se=["popoverRef"],ne=["popoverContentRef"],fe=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],ae=["[trigger]","button","[shButton]","*"];function le(s,xe){if(s&1){let i=vT();Ul(0,"div",6,1)(2,"div",7),Bg("click",function(r){Od(i);let n=iC();return Pd(n.eventClose(r))}),Wl(),Ul(3,"div",8,2),cC(5,3),Wl()();}if(s&2){let i=iC();yg("id",i.id()+"hello"),CE(3),_C(i.menuStyle()),Yg("position-anchor",i.id());}}var h=4,he=["scroll","auto"],de={width:void 0,height:void 0,closeOnButton:true,closeOnEsc:true},oe=(()=>{class s{constructor(){this.#e=T(Mr),this.#r=T(N),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=E1(false),this.asSheetOnMobile=E1(false),this.disableOpenByClick=E1(false),this.isOpen=D1(false),this.options=E1(),this.closed=I1(),this.defaultOptionMerge=Nt(()=>l(l({},de),this.options())),this.triggerRef=w1.required("triggerRef"),this.popoverRef=w1("popoverRef"),this.popoverContentRef=w1("popoverContentRef"),this.id=Ge("--"+le$1()),this.menuStyle=Ge(null),this.openAbort=null,this.#i=null,this.openEffect=za(()=>{let i=this.isOpen(),e=this.popoverRef()?.nativeElement;queueMicrotask(()=>{if(!e){this.openAbort?.abort(),this.openAbort=null;return}if(i){if(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,this.#e.addEventListener("keydown",o=>{this.#r.matches(o,"popover.close")&&(this.defaultOptionMerge().closeOnEsc?this.isOpen.set(false):o.preventDefault());},{signal:this.openAbort?.signal}),!e.isConnected)return;e.showPopover();let r=this.#r.getShortcut("popover.close");r&&e.setAttribute("aria-keyshortcuts",this.#r.getDisplayShortcut("popover.close")||r);let n=this.asSheetOnMobile()&&window.innerWidth<=768;n&&(this.#i=this.#e.body.style.overflow,this.#e.body.style.overflow="hidden",this.menuStyle.set(null)),!this.SUPPORTS_ANCHOR&&!n&&setTimeout(()=>{this.#u(e).addEventListener("scroll",()=>this.#o(),{signal:this.openAbort?.signal}),window?.addEventListener("resize",()=>this.#o(),{signal:this.openAbort?.signal}),this.#o();});}else this.closed.emit(),e.hidePopover(),this.openAbort?.abort(),this.openAbort=null,this.asSheetOnMobile()&&this.#i!==null&&(this.#e.body.style.overflow=this.#i,this.#i=null);});});}#e;#r;#i;toggleIsOpen(i){this.disableOpenByClick()||(i.preventDefault(),i.stopPropagation(),this.isOpen.set(!this.isOpen()));}eventClose(i){this.isOpen()&&this.isOpen.set(false);}#u(i){let e=i.parentElement;for(;e;){if(he.indexOf(window?.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement;}return this.#e.documentElement}#t(i,e){return {left:i.left,top:i.bottom+h}}#p(i,e){return {left:i.left,top:i.top-e.height-h}}#s(i,e){return {left:i.right-e.width,top:i.bottom+h}}#n(i,e){return {left:i.right-e.width,top:i.top-e.height-h}}#f(i,e){return {left:i.right+h,top:i.top}}#a(i,e){return {left:i.left-e.width-h,top:i.top}}#l(i,e){return {left:i.right+h,top:i.top+i.height/2-e.height/2}}#h(i,e){return {left:i.left-e.width-h,top:i.top+i.height/2-e.height/2}}#d(i,e){return {left:i.right+h,top:i.bottom-e.height}}#m(i,e){return {left:i.left-e.width-h,top:i.bottom-e.height}}#c(i,e){return i.left>=0&&i.top>=0&&i.left+e.width<=window.innerWidth&&i.top+e.height<=window.innerHeight}#v(i,e){return {left:Math.max(0,Math.min(i.left,window.innerWidth-e.width)),top:Math.max(0,Math.min(i.top,window.innerHeight-e.height))}}#o(){let i=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverContentRef()?.nativeElement.getBoundingClientRect();if(!i||!e)return;let r=[this.#t,this.#p,this.#s,this.#n,this.#f,this.#a,this.#l,this.#h,this.#d,this.#m],n=[this.#f,this.#d,this.#a,this.#m,this.#l,this.#h,this.#t,this.#p,this.#s,this.#n],o=this.asMultiLayer()?n:r;for(let p of o){let y=p.call(this,i,e);if(this.#c(y,e)){this.menuStyle.set({left:y.left+"px",top:y.top+"px"});return}}let d=this.#v(o[0].call(this,i,e),e);this.menuStyle.set({left:d.left+"px",top:d.top+"px"});}ngOnDestroy(){this.openAbort?.abort(),this.openAbort=null;}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=hw({type:s,selectors:[["sh-popover"]],viewQuery:function(e,r){e&1&&qg(r.triggerRef,pe,5)(r.popoverRef,se,5)(r.popoverContentRef,ne,5),e&2&&fC(3);},hostVars:4,hostBindings:function(e,r){e&2&&Kg("multi-layer",r.asMultiLayer())("as-sheet",r.asSheetOnMobile());},inputs:{asMultiLayer:[1,"asMultiLayer"],asSheetOnMobile:[1,"asSheetOnMobile"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ae,decls:8,vars:4,consts:[["triggerRef",""],["popoverRef",""],["popoverContentRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","manual",1,"popover"],[1,"overlay",3,"click"],[1,"popover-content"]],template:function(e,r){e&1&&(aC(fe),Ul(0,"div",3,0),Bg("click",function(o){return r.toggleIsOpen(o)}),Ul(2,"div",4),cC(3),cC(4,1),cC(5,2),Wl(),Eg(6,"div",5),Wl(),aT(7,le,6,5,"div",6)),e&2&&(yg("popovertarget",r.id()+"hello"),CE(6),Yg("anchor-name",r.id()),CE(),cT(r.isOpen()?7:-1));},styles:[`sh-popover{--po-d: block;display:var(--po-d)}sh-popover.multi-layer .popover-content{position-area:right span-y-end}sh-popover.multi-layer .trigger .trigger-anchor{right:-.25rem;left:-.25rem;top:0;bottom:0}sh-popover .trigger{cursor:pointer;display:var(--po-d);position:relative}sh-popover .trigger .trigger-wrapper{display:var(--po-d)}sh-popover .trigger .trigger-wrapper:empty+*{display:inherit}sh-popover .trigger .trigger-anchor{position:absolute;inset:0;z-index:-1}sh-popover .popover{position:fixed;inset:0;width:100%;height:100%;border:0;opacity:1;background-color:transparent;z-index:-1}sh-popover .popover .overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent}sh-popover [popover]::backdrop{display:none}sh-popover .popover-content{position:fixed;margin:0;min-width:11.25rem;max-width:calc(100vw - .5rem);max-height:calc(100vh - .5rem);overflow:auto;z-index:0;background-color:var(--base-1);border:var(--border-10);border-radius:var(--shape-2);font:var(--paragraph-30);color:var(--base-8);padding:0}@supports (anchor-name: --anchor){sh-popover .popover-content{inset:auto;top:.25rem;position:fixed;position-area:bottom span-right;max-width:unset;max-height:unset;overflow:visible;position-try-fallbacks:--top-span-right,--bottom-span-left,--top-span-left,--right-span-bottom,--left-span-bottom,--right-center,--left-center,--right-span-top,--left-span-top}}@media only screen and (max-width:768px){sh-popover.as-sheet .popover{z-index:9999}sh-popover.as-sheet .popover .overlay{background-color:var(--overlay, rgba(0, 0, 0, .5))}@supports (anchor-name: --anchor){sh-popover.as-sheet .popover-content{position-area:none;position-try-fallbacks:none;inset:auto}}sh-popover.as-sheet .popover-content{position:fixed;top:auto;bottom:0;left:.5rem;right:.5rem;width:calc(100% - 1rem);max-width:unset;height:auto;max-height:calc(100vh - 5rem);border-bottom-left-radius:0;border-bottom-right-radius:0;margin:0;transform:translateY(0);display:flex;align-items:center;padding:1rem;justify-content:center}}.full-popover sh-popover .popover-content,sh-popover.full .popover-content{width:auto}@supports (anchor-name: --anchor){.full-popover sh-popover .popover-content,sh-popover.full .popover-content{left:anchor(left);right:anchor(right)}}@position-try --bottom-span-right{position-area:bottom span-right;inset:auto;top:.25rem}@position-try --bottom-span-left{position-area:bottom span-left;inset:auto;top:.25rem}@position-try --top-span-right{position-area:top span-right;inset:auto;bottom:.25rem}@position-try --top-span-left{position-area:top span-left;inset:auto;bottom:.25rem}@position-try --right-span-top{position-area:right span-top;inset:auto;left:.25rem}@position-try --left-span-top{position-area:left span-top;inset:auto;right:.25rem}@position-try --right-center{position-area:right center;inset:auto;left:.25rem}@position-try --left-center{position-area:left center;inset:auto;right:.25rem}@position-try --right-span-bottom{position-area:right span-bottom;inset:auto;left:.25rem}@position-try --left-span-bottom{position-area:left span-bottom;inset:auto;right:.25rem}
2
2
  `],encapsulation:2});}}return s})();var me=[[["label"]],[["","boxPrefix",""]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","boxSuffix",""]],[["","error",""]],[["","hint",""]]],ue=["label","[boxPrefix]","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[boxSuffix]","[error]","[hint]"],ce=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","popoverContent",""]],[["","error",""]],[["","hint",""]]],ve=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[popoverContent]","[error]","[hint]"],ge=()=>({closeOnButton:false,closeOnEsc:true}),be=`sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}
3
3
  `,Fe=(()=>{class s{#e;onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus();}constructor(){this.#e=T(eo),this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.readonly=E1(false),this.hostClasses=ce$1("formField",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),rE(()=>{let i=this.#e.nativeElement,e=i.querySelector("input")||i.querySelector("textarea"),r=i.querySelector("label"),n=i.querySelector("[error]"),o=i.querySelector("[hint]");if(e){e.id||(e.id=`sh-input-${Math.random().toString(36).substring(2,9)}`),r&&!r.getAttribute("for")&&r.setAttribute("for",e.id);let m=[];n&&(n.id||(n.id=`sh-error-${Math.random().toString(36).substring(2,9)}`),m.push(n.id)),o&&(o.id||(o.id=`sh-hint-${Math.random().toString(36).substring(2,9)}`),m.push(o.id)),m.length>0&&!e.hasAttribute("aria-describedby")&&e.setAttribute("aria-describedby",m.join(" "));}let d=typeof CSS<"u"&&CSS.supports("field-sizing","content"),p=this.#e.nativeElement.querySelector("textarea");if(!d&&p!==null){let m=function(){p.style.height="auto",p.style.height=p.scrollHeight+"px";},g=function(){setTimeout(m,0);};p.addEventListener("change",m),p.addEventListener("cut",g),p.addEventListener("paste",g),p.addEventListener("drop",g),p.addEventListener("keydown",g),p.focus(),p.select(),m();}});}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=hw({type:s,selectors:[["sh-form-field"]],hostVars:2,hostBindings:function(e,r){e&1&&Hg("click",function(){return r.onClick()}),e&2&&NC(r.hostClasses());},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},ngContentSelectors:ue,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(e,r){e&1&&(aC(me),cC(0),Ul(1,"div",0)(2,"div",1),cC(3,1),cC(4,2),cC(5,3),Wl(),cC(6,4),cC(7,5),Ul(8,"div",2),cC(9,6),cC(10,7),cC(11,8),Wl()(),Ul(12,"div",3)(13,"div",4),cC(14,9),Wl(),Ul(15,"div",5),cC(16,10),Wl()());},styles:[`sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}
4
4
  `],encapsulation:2});}}return s})(),Ae=(()=>{class s{constructor(){this.#e=T(eo),this.isOpen=D1(false),this.closed=I1(),this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.readonly=E1(false),this.hostClasses=ce$1("formField",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly});}#e;onClick(i){i.target.closest(".input-wrap")&&(this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus());}close(){this.closed.emit();}ngOnInit(){let i=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!i&&e!==null){let d=function(){o.style.height="auto",o.style.height=o.scrollHeight+"px";},p=function(){setTimeout(d,0);};let o=this.#e.nativeElement.querySelector("textarea");o&&(o.addEventListener("change",d),o.addEventListener("cut",p),o.addEventListener("paste",p),o.addEventListener("drop",p),o.addEventListener("keydown",p),o.focus(),o.select(),d());}}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=hw({type:s,selectors:[["sh-form-field-popover"]],hostVars:2,hostBindings:function(e,r){e&1&&Hg("click",function(o){return r.onClick(o)}),e&2&&NC(r.hostClasses());},inputs:{isOpen:[1,"isOpen"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ve,decls:18,vars:6,consts:[[3,"isOpenChange","closed","isOpen","asSheetOnMobile","options"],["trigger","",1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(e,r){e&1&&(aC(ce),cC(0),Qi(1,"sh-popover",0),lm("isOpenChange",function(o){return UC(r.isOpen,o)||(r.isOpen=o),o}),Hg("closed",function(){return r.close()}),Qi(2,"div",1)(3,"div",2),cC(4,1),cC(5,2),$l(),Ig(6,"div",3),cC(7,3),cC(8,4),cC(9,5),Ig(10,"div",4),cC(11,6),$l(),cC(12,7),$l(),Qi(13,"div",5)(14,"div",6),cC(15,8),$l(),Qi(16,"div",7),cC(17,9),$l()()),e&2&&(CE(),cm("isOpen",r.isOpen),vg("asSheetOnMobile",true)("options",KC(5,ge)),CE(),Kg("is-open",r.isOpen()));},dependencies:[oe],styles:[be],encapsulation:2});}}return s})();export{Ae as A,Fe as F,oe as o};