@duplicati/ngclient 0.0.143 → 0.0.145

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 (141) hide show
  1. package/assets/dest-icons/aliyun.png +0 -0
  2. package/assets/dest-icons/aws.png +0 -0
  3. package/assets/dest-icons/azure.png +0 -0
  4. package/assets/dest-icons/backblaze.png +0 -0
  5. package/assets/dest-icons/box-com.png +0 -0
  6. package/assets/dest-icons/dropbox.png +0 -0
  7. package/assets/dest-icons/external-harddrive.png +0 -0
  8. package/assets/dest-icons/file-jump.png +0 -0
  9. package/assets/dest-icons/file-system.png +0 -0
  10. package/assets/dest-icons/filen.png +0 -0
  11. package/assets/dest-icons/ftp.png +0 -0
  12. package/assets/dest-icons/google-cloud.png +0 -0
  13. package/assets/dest-icons/google-drive.png +0 -0
  14. package/assets/dest-icons/idrive-e2.png +0 -0
  15. package/assets/dest-icons/jottacloud.png +0 -0
  16. package/assets/dest-icons/mega-nz.png +0 -0
  17. package/assets/dest-icons/nas.png +0 -0
  18. package/assets/dest-icons/office-365.png +0 -0
  19. package/assets/dest-icons/one-drive.png +0 -0
  20. package/assets/dest-icons/open-stack.png +0 -0
  21. package/assets/dest-icons/pcloud.png +0 -0
  22. package/assets/dest-icons/rackspace.png +0 -0
  23. package/assets/dest-icons/rclone.png +0 -0
  24. package/assets/dest-icons/sftp.png +0 -0
  25. package/assets/dest-icons/sharepoint.png +0 -0
  26. package/assets/dest-icons/sia-cloud.png +0 -0
  27. package/assets/dest-icons/sia_logo_dark.92db63f5.svg +6 -0
  28. package/assets/dest-icons/smb.png +0 -0
  29. package/assets/dest-icons/ssh.png +0 -0
  30. package/assets/dest-icons/storj.png +0 -0
  31. package/assets/dest-icons/tahoelafs.png +0 -0
  32. package/assets/dest-icons/tencent-cloud.png +0 -0
  33. package/assets/dest-icons/webdav.png +0 -0
  34. package/{chunk-X3IA226Q.js → chunk-2F6NVETW.js} +1 -1
  35. package/{chunk-VC72SWC4.js → chunk-2QJC4PGQ.js} +1 -1
  36. package/{chunk-PT7UQJD4.js → chunk-2UCO57JQ.js} +1 -1
  37. package/chunk-2UGURIOT.js +1 -0
  38. package/{chunk-4YL5DZVH.js → chunk-43JMN2ZY.js} +1 -1
  39. package/{chunk-LZUM5XKC.js → chunk-4TDUWDRL.js} +1 -1
  40. package/{chunk-SCOG2I64.js → chunk-62QANGOE.js} +1 -1
  41. package/{chunk-XNVRJH42.js → chunk-6LTGTS6B.js} +1 -1
  42. package/{chunk-73RDJP55.js → chunk-6OPAGPKF.js} +1 -1
  43. package/{chunk-KUPXKQHP.js → chunk-7B43LCPI.js} +1 -1
  44. package/chunk-7EBTJOD7.js +1 -0
  45. package/{chunk-6GC5VKTI.js → chunk-7IQY6U5W.js} +1 -1
  46. package/chunk-A6VGO6B5.js +1 -0
  47. package/{chunk-GHFYBZHQ.js → chunk-AJTK6HBC.js} +1 -1
  48. package/chunk-B2D4QGDJ.js +1 -0
  49. package/chunk-BPJCKQYP.js +1 -0
  50. package/{chunk-UACX27D3.js → chunk-DDWLL7XA.js} +1 -1
  51. package/{chunk-GUH5TMOS.js → chunk-DELLEGXW.js} +1 -1
  52. package/{chunk-IHNX6WZQ.js → chunk-DFMGS3IN.js} +1 -1
  53. package/chunk-DFMPWF6R.js +1 -0
  54. package/chunk-DKTUN7FF.js +1 -0
  55. package/{chunk-KGJAK6OP.js → chunk-DLMKZACT.js} +1 -1
  56. package/{chunk-FFY3NRCC.js → chunk-DNDTLTUM.js} +1 -1
  57. package/{chunk-3UN32GIC.js → chunk-DVDTYV66.js} +1 -1
  58. package/{chunk-IGOZJJE3.js → chunk-E66CBA5F.js} +1 -1
  59. package/{chunk-JA7OQSO3.js → chunk-EBIM5FBM.js} +1 -1
  60. package/{chunk-GO22DJ44.js → chunk-ESUPNSKH.js} +1 -1
  61. package/{chunk-OTMW34HV.js → chunk-FCRM5DER.js} +1 -1
  62. package/chunk-FDCY62KM.js +1 -0
  63. package/chunk-FFEDQIYN.js +1 -0
  64. package/{chunk-XQ4CAUD4.js → chunk-FUOS2UGQ.js} +1 -1
  65. package/{chunk-BIETD4DI.js → chunk-FZHTJSDJ.js} +1 -1
  66. package/{chunk-BXRW2LGW.js → chunk-GB3UMYUD.js} +1 -1
  67. package/chunk-H7K35UUX.js +1 -0
  68. package/chunk-HI4XLHO3.js +1 -0
  69. package/{chunk-QDFCX6XE.js → chunk-HNWRQABR.js} +3 -3
  70. package/{chunk-J2MHNGNQ.js → chunk-IFW3O4YJ.js} +1 -1
  71. package/{chunk-CTEFMU6N.js → chunk-J3ONM4TQ.js} +1 -1
  72. package/chunk-KDYD6LMI.js +1 -0
  73. package/{chunk-GDWLKG6V.js → chunk-KGKIF5H4.js} +1 -1
  74. package/chunk-KLW6HEOS.js +1 -0
  75. package/{chunk-K3ZQ67VT.js → chunk-L6CWVBZ6.js} +1 -1
  76. package/chunk-LVP2TPMO.js +1 -0
  77. package/{chunk-5PSLWJTF.js → chunk-M6WWZKV7.js} +1 -1
  78. package/chunk-MAQO5X5Q.js +1 -0
  79. package/{chunk-36RDZAZ4.js → chunk-MSLKIHQQ.js} +1 -1
  80. package/{chunk-UT6XGEMV.js → chunk-MVNLSG6Z.js} +1 -1
  81. package/{chunk-USU2EHJV.js → chunk-N5SC4SKW.js} +1 -1
  82. package/{chunk-QY6E755W.js → chunk-N6ABN43N.js} +1 -1
  83. package/{chunk-WWFNG47J.js → chunk-NJEX2N4Q.js} +1 -1
  84. package/{chunk-JIHMT35A.js → chunk-NJZSEKTD.js} +1 -1
  85. package/{chunk-J3BBLPAD.js → chunk-NOPMCS2Z.js} +1 -1
  86. package/{chunk-ACH476VA.js → chunk-NQ27E6KP.js} +1 -1
  87. package/{chunk-QGFC5ZUR.js → chunk-O64ZZGQZ.js} +1 -1
  88. package/{chunk-CZLLEVMJ.js → chunk-OMMUXRXE.js} +1 -1
  89. package/{chunk-AO4O42CM.js → chunk-OWDKOVPL.js} +1 -1
  90. package/{chunk-TJOWPBPB.js → chunk-PN3U7MRX.js} +1 -1
  91. package/{chunk-CFNP4FBG.js → chunk-POMLWQHO.js} +1 -1
  92. package/{chunk-BGUKMOKY.js → chunk-QDFDQHU3.js} +1 -1
  93. package/{chunk-7AMBMWZP.js → chunk-QHC3CY43.js} +1 -1
  94. package/{chunk-ARXKB7WH.js → chunk-QITXA3NT.js} +1 -1
  95. package/chunk-QYI4IMJE.js +8 -0
  96. package/{chunk-J5PSMGKZ.js → chunk-R5RIFWZO.js} +1 -1
  97. package/chunk-RPU4AJBK.js +1 -0
  98. package/chunk-RUFE3SMI.js +1 -0
  99. package/{chunk-WJPLJKPQ.js → chunk-RUXCS4ZK.js} +1 -1
  100. package/{chunk-7X7K5IXS.js → chunk-SFSB73YO.js} +1 -1
  101. package/{chunk-B5FUQFEQ.js → chunk-TDKBGGNK.js} +1 -1
  102. package/{chunk-6XBSQDXR.js → chunk-TIWH4NKT.js} +1 -1
  103. package/{chunk-XHUUCB2W.js → chunk-TKO3OH2C.js} +1 -1
  104. package/chunk-U5C62E46.js +1 -0
  105. package/chunk-UIIHBXLB.js +1 -0
  106. package/{chunk-OXOOR7I4.js → chunk-UIJYCGKA.js} +1 -1
  107. package/{chunk-ETCRT3EV.js → chunk-UKQFDBNO.js} +1 -1
  108. package/{chunk-CWBEE627.js → chunk-UP5EOICU.js} +1 -1
  109. package/{chunk-6WWCFRZ5.js → chunk-VHE3K2F5.js} +1 -1
  110. package/{chunk-66BSPEOQ.js → chunk-VTSUHAP5.js} +1 -1
  111. package/chunk-W6DRPPZU.js +1 -0
  112. package/{chunk-UW4GBMEP.js → chunk-WS76KLII.js} +1 -1
  113. package/{chunk-WZ23D2R7.js → chunk-XJZ5GM36.js} +1 -1
  114. package/{chunk-ZGAC2JKG.js → chunk-Z3EPZZGY.js} +1 -1
  115. package/{chunk-5AENPWCF.js → chunk-ZNWZFRFW.js} +1 -1
  116. package/index.html +2 -2
  117. package/{main-SFGPSKNZ.js → main-Z5T5HH5Q.js} +1 -1
  118. package/package.json +1 -1
  119. package/styles-LRXGHWCZ.css +1 -0
  120. package/chunk-2NU5Y4V7.js +0 -1
  121. package/chunk-2RB5RKNM.js +0 -1
  122. package/chunk-6BCYG4Y6.js +0 -1
  123. package/chunk-7WD3AN66.js +0 -1
  124. package/chunk-AB2L3URR.js +0 -1
  125. package/chunk-BSP6AKSZ.js +0 -1
  126. package/chunk-HBTRQAXQ.js +0 -1
  127. package/chunk-HDQRG3ZZ.js +0 -1
  128. package/chunk-HKZX6OB5.js +0 -1
  129. package/chunk-L2EO4M4B.js +0 -1
  130. package/chunk-LSVMEMXJ.js +0 -1
  131. package/chunk-M2RYJ73O.js +0 -1
  132. package/chunk-MBBEXLIJ.js +0 -1
  133. package/chunk-NTA2CULM.js +0 -1
  134. package/chunk-ODVCGM2O.js +0 -1
  135. package/chunk-QFU6VJXV.js +0 -1
  136. package/chunk-QNOIURSX.js +0 -1
  137. package/chunk-UUODEERG.js +0 -1
  138. package/chunk-WRNQOX5R.js +0 -1
  139. package/chunk-XLE2TW65.js +0 -1
  140. package/chunk-YHNIGBHB.js +0 -8
  141. package/styles-EZGVWHZF.css +0 -1
@@ -1 +1 @@
1
- import{h as d}from"./chunk-J3BBLPAD.js";import{H as r,Oc as s,Pc as g,V as n,_ as o,oa as l}from"./chunk-QDFCX6XE.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=o(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(r(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
1
+ import{h as d}from"./chunk-NOPMCS2Z.js";import{H as r,Oc as s,Pc as g,V as n,_ as o,oa as l}from"./chunk-HNWRQABR.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=o(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.logLevel()==="Disabled"?this.timerInterval=void 0:this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):(this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0)});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(r(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let t=e.reverse(),i=this.#t(t);i>0&&this.id.set(i),this.#e.set([...t,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e)}#t(e){return e.reduce((t,i)=>Math.max(t,i.ID),0)}destroy(){this.logLevel.set("Disabled"),this.timerInterval&&clearInterval(this.timerInterval)}static \u0275fac=function(t){return new(t||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-7AMBMWZP.js";import{b as A,c as G,d as T,e as R,f as V,j as q,o as $,q as B,r as Q,t as j}from"./chunk-USU2EHJV.js";import{a as k}from"./chunk-ZGAC2JKG.js";import{d as D}from"./chunk-ETCRT3EV.js";import{d as x}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as E,b as O,g as P,i as I,l as F}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as t,Bb as o,Cb as s,H as u,Jb as _,Pc as S,Ra as c,Vc as N,Wb as w,_ as p,bb as h,ea as g,ec as v,fa as f,fc as L,ic as y,lc as r,oa as m,ub as b,vb as C,zb as M}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var H=["passwordInput"];function K(a,e){a&1&&(t(0,"sh-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),o())}var l=new Q,d=class a{#e=p(x);#t=p(D);rememberMe=k("rememberMe",!1,!0);failedLogin=m(!1);successLogin=m(!1);isLoading=m(!1);loginForm=l.group({user:l.control(""),pass:l.control("",T.required),rememberMe:l.control(this.rememberMe())});passwordInput=N("passwordInput");passwordEffect=S(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(e=>this.rememberMe.set(e??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&e&&(this.isLoading.set(!0),this.#t.login(e,this.rememberMe()).pipe(u(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=h({type:a,selectors:[["app-login"]],viewQuery:function(n,i){n&1&&v(i.passwordInput,H,5),n&2&&L()},decls:24,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,i){if(n&1){let X=_();t(0,"form",1),w("submit",function(){return g(X),f(i.submit())}),b(1,K,2,0,"sh-alert",2),t(2,"div",3),s(3,"app-logo"),o(),t(4,"div",4)(5,"div",5),s(6,"input",6),t(7,"sh-form-field")(8,"label",7),r(9," Password "),t(10,"a",8)(11,"sh-icon"),r(12,"question"),o()()(),s(13,"input",9,0),o(),t(15,"button",10),r(16," Login "),t(17,"sh-icon"),r(18,"arrow-right"),o()()(),t(19,"sh-checkbox",11),r(20," Keep me logged in "),s(21,"input",12),o(),t(22,"div",13),s(23,"label",14),o()()()}n&2&&(M("formGroup",i.loginForm),c(),C(i.failedLogin()&&!i.successLogin()?1:-1),c(14),y("loader",i.isLoading()))},dependencies:[j,q,G,A,R,V,$,B,z,F,E,P,O,I],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
1
+ import{a as z}from"./chunk-QHC3CY43.js";import{b as A,c as G,d as T,e as R,f as V,j as q,o as $,q as B,r as Q,t as j}from"./chunk-N5SC4SKW.js";import{a as k}from"./chunk-Z3EPZZGY.js";import{d as D}from"./chunk-UKQFDBNO.js";import{d as x}from"./chunk-LVP2TPMO.js";import"./chunk-43JMN2ZY.js";import{a as E,b as O,g as P,i as I,l as F}from"./chunk-H7K35UUX.js";import"./chunk-NOPMCS2Z.js";import"./chunk-RUXCS4ZK.js";import"./chunk-FPPZ4BUR.js";import{Ab as t,Bb as o,Cb as s,H as u,Jb as _,Pc as S,Ra as c,Vc as N,Wb as w,_ as p,bb as h,ea as g,ec as v,fa as f,fc as L,ic as y,lc as r,oa as m,ub as b,vb as C,zb as M}from"./chunk-HNWRQABR.js";import"./chunk-EUDKD2JW.js";var H=["passwordInput"];function K(a,e){a&1&&(t(0,"sh-alert",2),r(1," Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. "),o())}var l=new Q,d=class a{#e=p(x);#t=p(D);rememberMe=k("rememberMe",!1,!0);failedLogin=m(!1);successLogin=m(!1);isLoading=m(!1);loginForm=l.group({user:l.control(""),pass:l.control("",T.required),rememberMe:l.control(this.rememberMe())});passwordInput=N("passwordInput");passwordEffect=S(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(e=>this.rememberMe.set(e??!1)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus())}submit(){let e=this.loginForm.value.pass,n=this.loginForm.value.user;this.rememberMe.set(this.loginForm.value.rememberMe??!1),!n&&e&&(this.isLoading.set(!0),this.#t.login(e,this.rememberMe()).pipe(u(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>{this.successLogin.set(!0),this.#e.navigate(["/"])}}))}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=h({type:a,selectors:[["app-login"]],viewQuery:function(n,i){n&1&&v(i.passwordInput,H,5),n&2&&L()},decls:24,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[["passwordInput",""],[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["type","text","hidden","","autocomplete","off","name","username","formControlName","user"],["for","password"],["href","https://docs.duplicati.com/detailed-descriptions/duplicati-access-password","target","_blank","rel","noopener noreferrer"],["type","password","name","password","autocomplete","current-password","placeholder",e,"tabindex","1","formControlName","pass"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(n,i){if(n&1){let X=_();t(0,"form",1),w("submit",function(){return g(X),f(i.submit())}),b(1,K,2,0,"sh-alert",2),t(2,"div",3),s(3,"app-logo"),o(),t(4,"div",4)(5,"div",5),s(6,"input",6),t(7,"sh-form-field")(8,"label",7),r(9," Password "),t(10,"a",8)(11,"sh-icon"),r(12,"question"),o()()(),s(13,"input",9,0),o(),t(15,"button",10),r(16," Login "),t(17,"sh-icon"),r(18,"arrow-right"),o()()(),t(19,"sh-checkbox",11),r(20," Keep me logged in "),s(21,"input",12),o(),t(22,"div",13),s(23,"label",14),o()()()}n&2&&(M("formGroup",i.loginForm),c(),C(i.failedLogin()&&!i.successLogin()?1:-1),c(14),y("loader",i.isLoading()))},dependencies:[j,q,G,A,R,V,$,B,z,F,E,P,O,I],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}"],changeDetection:0})};export{d as default};
@@ -0,0 +1 @@
1
+ import{g as ht}from"./chunk-PN3U7MRX.js";import{a as pt,b as Ot,c as Ct,d as mt,e as Rt}from"./chunk-QYI4IMJE.js";import"./chunk-7IQY6U5W.js";import"./chunk-L6CWVBZ6.js";import"./chunk-OMMUXRXE.js";import{a as Dt}from"./chunk-KDYD6LMI.js";import{h as Et}from"./chunk-MSLKIHQQ.js";import"./chunk-N6ABN43N.js";import"./chunk-DDWLL7XA.js";import"./chunk-2QJC4PGQ.js";import"./chunk-O64ZZGQZ.js";import"./chunk-UIJYCGKA.js";import{a as m}from"./chunk-DELLEGXW.js";import"./chunk-RHW5QVAY.js";import"./chunk-VTSUHAP5.js";import"./chunk-UP5EOICU.js";import{c as _t,e as ct,f as ut,g as Tt,i as gt,j as St,s as dt}from"./chunk-N5SC4SKW.js";import"./chunk-UKQFDBNO.js";import{b as nt,d as it}from"./chunk-LVP2TPMO.js";import"./chunk-43JMN2ZY.js";import{a as ot,b as at,d as st,e as rt,l as Ft,o as lt}from"./chunk-H7K35UUX.js";import"./chunk-NOPMCS2Z.js";import"./chunk-RUXCS4ZK.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as r,Cb as g,Gb as w,Hb as b,Jb as p,Oc as v,Qb as u,Ra as F,Rb as T,Sb as N,Tb as f,Ub as $,Vb as B,Vc as et,Wb as d,Yb as l,_ as O,bb as j,ea as _,ec as Q,fa as c,fc as q,ia as K,ic as Y,lc as I,mc as k,nc as J,oa as C,qc as A,rc as M,sc as y,ub as D,vb as E,wb as P,xb as x,yb as L,yc as Z,zb as h,zc as tt}from"./chunk-HNWRQABR.js";import"./chunk-EUDKD2JW.js";var It=["formRef"],Nt=()=>({maxWidth:"700px",width:"100%"});function ft(i,n){if(i&1){let t=p();u(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),r(),T()}if(i&2){let t=l();F(),Y("loader",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing")}}function $t(i,n){if(i&1){let t=p();u(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),r(),T()}}function At(i,n){i&1&&(s(0,"sh-alert"),u(1,5),g(2,"sh-icon",31),T(),r())}function Mt(i,n){i&1&&(s(0,"sh-alert",21),u(1,6),g(2,"sh-icon",31),T(),r())}function yt(i,n){if(i&1&&(s(0,"sh-alert",22),u(1,7),g(2,"sh-icon",31),T(),r()),i&2){let t=l();F(2),f(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1&&(s(0,"sh-alert",23),u(1,8),g(2,"sh-icon",31),T(),r()),i&2){let t=l();F(2),f(t.testErrorMessage()),$(1)}}function xt(i,n){if(i&1){let t=p();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),u(1,9),g(2,"strong")(3,"br")(4,"span",33),T(),r()}if(i&2){let t,o=l();F(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Lt(i,n){if(i&1){let t=p();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),r(),s(3,"p"),I(4),r()()}if(i&2){let t=n.$implicit;F(2),k(t.displayName),F(2),k(t.description)}}function wt(i,n){if(i&1){let t=p();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),r()}if(i&2){let t=n.$implicit;F(2),J(" ",t.displayName," ")}}function bt(i,n){if(i&1&&(s(0,"div",34),x(1,Lt,5,2,"div",35,P),r(),s(3,"sh-menu",36)(4,"button",37),N(5,10),r(),w(6,19),x(7,wt,3,1,"button",38,P),b(),r()),i&2){let t=l();F(),L(t.destinationTypeOptionsFocused()),F(2),h("searchable",!0),F(4),L(t.destinationTypeOptions())}}function Bt(i,n){if(i&1){let t=p();s(0,"app-single-destination",41),y("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),r()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function kt(i,n){i&1&&(u(0,4,1),g(1,"sh-icon",28),T())}function vt(i,n){i&1&&(u(0,4,2),g(1,"sh-icon"),T())}function Gt(i,n){if(i&1){let t=p();s(0,"sh-dialog",42),y("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),N(3,11),r(),s(4,"sh-alert",22),N(5,12),r()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),y("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),r()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),r(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),u(13,13),g(14,"sh-icon"),T(),r()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),h("options",tt(3,Nt)),F(8),A("ngModel",t.targetUrlCtrl)}}var G=class i{#i=O(it);#o=O(nt);#e=O(rt);#a=O(pt);injector=O(K);#t=O(ht);#s=O(Ot);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=C(null);targetUrlInitial=C(null);targetUrlDialogOpen=C(!1);toggleNewDestination=C(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=C(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=v(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=v(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Dt(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(m,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let R=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${R?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(m,{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:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(m,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(m,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=j({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&Q(o.formRef,It,5),t&2&&q()},features:[Z([Et,{provide:mt,useClass:Ct}])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=B(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27: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/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28: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/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=B(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let R;R=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let X;return X=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,R,U,V,W,z,H,X,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[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","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=p();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),u(4,2),s(5,"div",16),D(6,ft,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),r(),w(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),r(),D(13,$t,3,0,"button",18),b(),r()(),T(),r(),D(14,At,3,0,"sh-alert")(15,Mt,3,0,"sh-alert",21)(16,yt,3,1,"sh-alert",22)(17,Pt,3,1,"sh-alert",23),D(18,xt,5,1,"p"),r(),D(19,bt,9,1),D(20,Bt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),u(23,3),g(24,"sh-icon"),T(),r(),s(25,"button",27),u(26,4),D(27,kt,2,0,"sh-icon",28)(28,vt,2,0,"sh-icon"),T(),r()()(),D(29,Gt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();F(6),E(e?6:-1),F(7),E(e?13:-1),F(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),F(4),E(e?18:-1),F(),E(e?-1:19),F(),E(e?20:-1),F(5),h("disabled",o.testSignal()=="testing"||!e),F(2),E(o.testSignal()=="testing"?27:28),F(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Rt,dt,St,_t,ct,ut,gt,Tt,Ft,lt,ot,st,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}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}"],changeDetection:0})};export{G as default};
@@ -0,0 +1 @@
1
+ import{a as xt,b as Lt,c as Rt,d as Ut,e as wt}from"./chunk-QYI4IMJE.js";import"./chunk-7IQY6U5W.js";import"./chunk-OMMUXRXE.js";import{a as Pt}from"./chunk-KDYD6LMI.js";import{h as Bt}from"./chunk-MSLKIHQQ.js";import"./chunk-N6ABN43N.js";import"./chunk-DDWLL7XA.js";import"./chunk-2QJC4PGQ.js";import"./chunk-O64ZZGQZ.js";import{a as $}from"./chunk-DELLEGXW.js";import"./chunk-RHW5QVAY.js";import"./chunk-VTSUHAP5.js";import{c as b,e as v,f as At,g as $t,i as k,j as Mt,r as yt,s as G}from"./chunk-N5SC4SKW.js";import{b as St,d as Ct}from"./chunk-LVP2TPMO.js";import"./chunk-43JMN2ZY.js";import{a as U,b as ht,d as It,e as Nt,g as ft,h as Ot,l as w,o as Et}from"./chunk-H7K35UUX.js";import"./chunk-NOPMCS2Z.js";import"./chunk-RUXCS4ZK.js";import"./chunk-FPPZ4BUR.js";import{Ab as s,Bb as F,Cb as c,Gb as Ft,Hb as rt,Jb as g,Oa as it,Oc as L,Qb as u,Ra as r,Rb as _,Sb as B,Tb as z,Tc as gt,Ub as H,Uc as pt,Vb as X,Vc as mt,Wb as D,Yb as l,Zb as lt,_ as C,_b as ct,bb as f,ea as d,ec as ut,fa as T,fc as _t,ia as nt,ic as dt,lc as x,mc as W,oa as I,qc as O,rc as E,sc as A,tc as j,ub as m,uc as q,vb as S,vc as R,wb as ot,wc as Q,xb as at,yb as st,yc as Tt,zb as h,zc as Dt}from"./chunk-HNWRQABR.js";import"./chunk-EUDKD2JW.js";var kt=["*"],M=class o{destination=pt.required();static \u0275fac=function(t){return new(t||o)};static \u0275cmp=f({type:o,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"]},ngContentSelectors:kt,decls:9,vars:6,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"description"],[1,"actions"]],template:function(t,n){if(t&1&&(lt(),s(0,"sh-card",0)(1,"div",1),c(2,"img",2),F(),s(3,"div",3),x(4),F(),s(5,"div",4),x(6),F(),s(7,"div",5),ct(8),F()()),t&2){let i=n.destination();r(2),h("src",Q(i.icon),it)("alt",Q(i.displayName)),r(2),W(i.displayName),r(2),W(i.description)}},dependencies:[Ot],styles:['[_nghost-%COMP%]{display:block}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};function Kt(o,e){if(o&1){let t=g();s(0,"app-destination-list-item",3)(1,"button",4),D("click",function(){let i=d(t).$implicit,a=l();return T(a.setDestination.emit(i.key))}),u(2,0),c(3,"sh-icon"),_(),F()()}if(o&2){let t=e.$implicit;h("destination",t)}}var K=class o{#i=C(Lt);setDestination=gt();destinationSearchTerm=I("");destinationTypeOptionsInFocus=I(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#i.destinationTypeOptions;destinationTypeOptionsFocused=L(()=>{let e=new Set(this.destinationTypeOptionsInFocus()),t=this.destinationTypeOptions(),n=this.destinationSearchTerm().toLowerCase(),i=[...t].sort((a,N)=>{let y=e.has(a.key),P=e.has(N.key);return y&&!P?-1:!y&&P?1:0});return n?i.filter(a=>a.displayName.toLowerCase().includes(n)):i});static \u0275fac=function(t){return new(t||o)};static \u0275cmp=f({type:o,selectors:[["app-destination-list"]],outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let e;e=$localize`Search for destination...`;let t;return t=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,["type","text","placeholder",e,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(t,n){t&1&&(s(0,"sh-form-field")(1,"input",1),A("ngModelChange",function(a){return E(n.destinationSearchTerm,a)||(n.destinationSearchTerm=a),a}),F()(),s(2,"div",2),at(3,Kt,4,1,"app-destination-list-item",3,ot),F()),t&2&&(r(),O("ngModel",n.destinationSearchTerm),r(2),st(n.destinationTypeOptionsFocused()))},dependencies:[M,G,b,v,k,w,ft,U],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var Vt=["formRef"],zt=()=>({maxWidth:"700px",width:"100%"});function Ht(o,e){if(o&1){let t=g();u(0,1,1),s(1,"button",28),D("click",function(){d(t);let i=l();return T(i.testDestination(0,!0))}),F(),_()}if(o&2){let t=l();r(),dt("loader",t.testSignal()=="testing"),h("disabled",t.testSignal()=="testing")}}function Xt(o,e){if(o&1){let t=g();u(0,1,2),s(1,"button",29),D("click",function(){d(t);let i=l();return T(i.openTargetUrlDialog())}),c(2,"sh-icon"),F(),_()}}function Wt(o,e){if(o&1){let t=g();u(0,1,4),s(1,"button",29),D("click",function(){d(t);let i=l(2);return T(i.copyTargetUrl())}),c(2,"sh-icon"),F(),_()}}function jt(o,e){if(o&1){let t=g();u(0,1,3),s(1,"sh-menu")(2,"button",17),c(3,"sh-icon"),F(),Ft(4,30),s(5,"button",29),D("click",function(){d(t);let i=l();return T(i.openTargetUrlDialog())}),c(6,"sh-icon"),F(),m(7,Wt,3,0,"button",17),rt(),F(),_()}if(o&2){l();let t=R(0);r(7),S(t?7:-1)}}function qt(o,e){o&1&&(s(0,"sh-alert"),u(1,4),c(2,"sh-icon",31),_(),F())}function Qt(o,e){o&1&&(s(0,"sh-alert",18),u(1,5),c(2,"sh-icon",31),_(),F())}function Yt(o,e){if(o&1&&(s(0,"sh-alert",19),u(1,6),c(2,"sh-icon",31),_(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function Jt(o,e){if(o&1&&(s(0,"sh-alert",20),u(1,7),c(2,"sh-icon",31),_(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function Zt(o,e){if(o&1){let t=g();s(0,"app-destination-list-item",21)(1,"button",24),D("click",function(){d(t);let i=l();return T(i.removeDestination())}),B(2,8),F()()}if(o&2){l();let t=R(14);h("destination",t)}}function te(o,e){if(o&1){let t=g();s(0,"app-destination-list",32),D("setDestination",function(i){d(t);let a=l();return T(a.setDestination(i))}),F()}}function ee(o,e){if(o&1){let t=g();s(0,"app-single-destination",33),A("targetUrlChange",function(i){d(t);let a=l();return E(a.targetUrlModel,i)||(a.targetUrlModel=i),T(i)}),F()}if(o&2){let t=l();O("targetUrl",t.targetUrlModel)}}function ne(o,e){o&1&&(u(0,3,1),c(1,"sh-icon",26),_())}function ie(o,e){o&1&&(u(0,3,2),c(1,"sh-icon"),_())}function oe(o,e){o&1&&(s(0,"h2"),B(1,11),F())}function ae(o,e){o&1&&(s(0,"h2"),B(1,12),F())}function se(o,e){if(o&1){let t=g();s(0,"sh-dialog",34),A("isOpenChange",function(i){d(t);let a=l();return E(a.targetUrlDialogOpen,i)||(a.targetUrlDialogOpen=i),T(i)}),s(1,"header",35),m(2,oe,2,0,"h2")(3,ae,2,0,"h2"),s(4,"sh-alert",19),B(5,9),F()(),s(6,"div",36)(7,"sh-form-field")(8,"textarea",37),A("ngModelChange",function(i){d(t);let a=l();return E(a.targetUrlCtrl,i)||(a.targetUrlCtrl=i),T(i)}),F()()(),s(9,"footer",38)(10,"button",24),D("click",function(){d(t);let i=l();return T(i.closeTargetUrlDialog(!1))}),x(11,"Cancel"),F(),s(12,"button",39),D("click",function(){d(t);let i=l();return T(i.closeTargetUrlDialog(!0))}),u(13,10),c(14,"sh-icon"),_(),F()()()}if(o&2){let t=l(),n=R(0);O("isOpen",t.targetUrlDialogOpen),h("options",Dt(4,zt)),r(2),S(n?3:2),r(6),O("ngModel",t.targetUrlCtrl)}}var V=new yt,we=(o={destinations:[]})=>V.group({destinations:V.array(o.destinations)}),be=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>V.group({destinationType:V.control(o),custom:e,dynamic:t,advanced:n}),Y=class o{#i=C(Ct);#o=C(St);#t=C(Bt);#e=C(Nt);#a=C(xt);injector=C(nt);formRef=mt.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=I(null);targetUrlInitial=I(null);targetUrlDialogOpen=I(!1);toggleNewDestination=I(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;selectedDestinationType=L(()=>{let e=this.targetUrlModel();if(!e)return null;let t=e.split("://")[0];return Pt(t)??null});selectedDestinationTypeOption=L(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let e=this.targetUrlModel();this.targetUrlCtrl.set(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();!e||t===n||!t||this.#t.setTargetUrl(t)}testDestination(e,t,n){let i=this.targetUrlModel();i&&(this.#t.setTestState("testing"),this.#a.testDestination(i,e,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),this.#t.isNew()&&(a.containsBackup===!0?(this.#t.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),t||this.#e.open($,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#t.setTestState("warning",$localize`The remote destination contains unknown files.`),t||this.#e.open($,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),n?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){n?.();return}let N=i.includes("?");a.action==="trust-cert"&&this.#t.setTargetUrl(i+`${N?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.setTargetUrl(i+`${N?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):n?.()}}))}setDestination(e){this.#t.setTargetUrl(`${e}://`,!0)}removeDestination(){this.#t.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let e=this.#t.isNew(),t=this.testSignal();if(!e){this.#n();return}if(t===""){this.#e.open($,{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.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open($,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(t!=="success"){this.#e.open($,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#n()}});return}this.#n()}#n(){this.#t.isNew()||this.#t.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=f({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&ut(n.formRef,Vt,5),t&2&&_t()},features:[Tt([{provide:Ut,useClass:Rt}])],decls:27,vars:11,consts:()=>{let e;e=$localize` Backup destination ${"\uFFFD#6\uFFFD"}:START_TAG_DIV:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*8:2\uFFFD"}:START_BLOCK_IF_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Set target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*9:3\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:3\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#2:3\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#4:3\uFFFD"}:START_TAG_NG_CONTAINER:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:4\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy url to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#4:3\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#1:3\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/*9:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_DIV:`,e=X(e);let t;t=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*24: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/*24:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*25: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/*25:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=X(n);let i;i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let N;N=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let y;y=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let P;P=$localize`Change`;let J;J=$localize`Be careful, this will overwrite everything you have in your destination.`;let Z;Z=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let tt;tt=$localize`Set target URL`;let et;return et=$localize`Edit target URL`,[["formRef",""],e,t,n,i,a,N,y,P,J,Z,tt,et,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"loader","disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[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","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1){let i=g();j(0),s(1,"form",13,0),D("submit",function(){return d(i),T(n.next())}),s(3,"header")(4,"h3",14),u(5,1),s(6,"div",15),m(7,Ht,2,3,"button",16),m(8,Xt,3,0,"button",17)(9,jt,8,1,"sh-menu"),F(),_(),F(),m(10,qt,3,0,"sh-alert")(11,Qt,3,0,"sh-alert",18)(12,Yt,3,1,"sh-alert",19)(13,Jt,3,1,"sh-alert",20),j(14),m(15,Zt,3,1,"app-destination-list-item",21),F(),m(16,te,1,0,"app-destination-list"),m(17,ee,1,1,"app-single-destination",22),s(18,"div",23)(19,"button",24),D("click",function(){return d(i),T(n.goBack())}),u(20,2),c(21,"sh-icon"),_(),F(),s(22,"button",25),u(23,3),m(24,ne,2,0,"sh-icon",26)(25,ie,2,0,"sh-icon"),_(),F()()(),m(26,se,15,5,"sh-dialog",27)}if(t&2){let i=q(!!n.targetUrlModel());r(7),S(i?7:-1),r(),S(i?9:8),r(2),S(n.testSignal()=="testing"?10:n.testSignal()=="success"?11:n.testSignal()=="warning"?12:n.testSignal()=="error"?13:-1),r(4);let a=q(n.selectedDestinationTypeOption());r(),S(a?15:-1),r(),S(i?-1:16),r(),S(i?17:-1),r(5),h("disabled",n.testSignal()=="testing"||!i),r(2),S(n.testSignal()=="testing"?24:25),r(2),S(n.targetUrlDialogOpen()?26:-1)}},dependencies:[wt,K,M,G,Mt,b,v,At,k,$t,w,Et,U,It,ht],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:.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}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;overflow:hidden;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}"],changeDetection:0})};export{we as createDestinationForm,be as createDestinationFormGroup,Y as default};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import{b as k,c as G,e as L,f as w,j as U,o as x,q as j,r as K,t as X}from"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{d as A,e as O}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{A as E,a as y,c as N,g as b,l as B,m as R}from"./chunk-WRNQOX5R.js";import{h as $}from"./chunk-J3BBLPAD.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as a,Bb as n,Cb as l,H as g,Qb as C,Ra as s,Rb as h,Sb as _,Vb as I,Wb as d,_ as F,bb as T,ic as P,oa as m,ub as S,vb as D,zb as c,zc as M}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var V=()=>["/"];function z(p,o){p&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var u=new K,f=class p{#e=F(N);#o=F($);#n=F(v);#t=F(A);isImporting=m(!1);isSecureFile=m(!1);importForm=u.group({config:u.control(""),cmdline:u.control(!1),import_metadata:u.control(!1),direct:u.control(!1),passphrase:u.control("")});selectedFile=m([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#i.bind(this),t.readAsArrayBuffer(e)}}#i(o){let e=o.target?.result;this.isSecureFile.set(this.#r(e)!=="json"),this.importForm.patchValue({config:this.#a(e)})}#r(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return"json"}catch{}return"unknown"}#a(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return btoa(i)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#o.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#e.success("Backup imported successfully."),this.#t.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#t.navigate(["/backup-draft",t])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(e){return new(e||p)};static \u0275cmp=T({type:p,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),C(2,0),a(3,"div",4)(4,"button",5),l(5,"sh-icon"),n(),a(6,"button",6),d("click",function(){return t.submit()}),l(7,"sh-icon"),n()(),h(),n()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),n(),S(10,z,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),c("routerLink",M(7,V)),s(2),P("loader",t.isImporting()),c("disabled",t.isImporting()),s(2),c("formGroup",t.importForm),s(),c("files",t.selectedFile()),s(),D(t.isSecureFile()?10:-1))},dependencies:[X,U,G,k,L,w,x,j,O,B,y,b,E,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
1
+ import{a as v}from"./chunk-DVDTYV66.js";import"./chunk-UIJYCGKA.js";import"./chunk-RHW5QVAY.js";import"./chunk-VTSUHAP5.js";import{b as k,c as G,e as L,f as w,j as U,o as x,q as j,r as K,t as X}from"./chunk-N5SC4SKW.js";import"./chunk-Z3EPZZGY.js";import"./chunk-UKQFDBNO.js";import{d as A,e as O}from"./chunk-LVP2TPMO.js";import"./chunk-43JMN2ZY.js";import{A as E,a as y,c as N,g as b,l as B,m as R}from"./chunk-H7K35UUX.js";import{h as $}from"./chunk-NOPMCS2Z.js";import"./chunk-RUXCS4ZK.js";import"./chunk-FPPZ4BUR.js";import{Ab as a,Bb as n,Cb as l,H as g,Qb as C,Ra as s,Rb as h,Sb as _,Vb as I,Wb as d,_ as F,bb as T,ic as P,oa as m,ub as S,vb as D,zb as c,zc as M}from"./chunk-HNWRQABR.js";import"./chunk-EUDKD2JW.js";var V=()=>["/"];function z(p,o){p&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),n(),l(3,"input",15),n())}var u=new K,f=class p{#e=F(N);#o=F($);#n=F(v);#t=F(A);isImporting=m(!1);isSecureFile=m(!1);importForm=u.group({config:u.control(""),cmdline:u.control(!1),import_metadata:u.control(!1),direct:u.control(!1),passphrase:u.control("")});selectedFile=m([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#i.bind(this),t.readAsArrayBuffer(e)}}#i(o){let e=o.target?.result;this.isSecureFile.set(this.#r(e)!=="json"),this.importForm.patchValue({config:this.#a(e)})}#r(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return"json"}catch{}return"unknown"}#a(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return btoa(i)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#o.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#e.success("Backup imported successfully."),this.#t.navigate(["/"]);return}let t=this.#n.addDraftBackup(e.data);this.#t.navigate(["/backup-draft",t])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(e){return new(e||p)};static \u0275cmp=T({type:p,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),C(2,0),a(3,"div",4)(4,"button",5),l(5,"sh-icon"),n(),a(6,"button",6),d("click",function(){return t.submit()}),l(7,"sh-icon"),n()(),h(),n()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),n(),S(10,z,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),n(),l(14,"input",11),n(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),n(),l(18,"input",13),n()()),e&2&&(s(4),c("routerLink",M(7,V)),s(2),P("loader",t.isImporting()),c("disabled",t.isImporting()),s(2),c("formGroup",t.importForm),s(),c("files",t.selectedFile()),s(),D(t.isSecureFile()?10:-1))},dependencies:[X,U,G,k,L,w,x,j,O,B,y,b,E,R],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{f as default};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-WWFNG47J.js";import"./chunk-XNVRJH42.js";import"./chunk-3UN32GIC.js";import"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{e as S}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as T,g as M,h as f}from"./chunk-WRNQOX5R.js";import"./chunk-J3BBLPAD.js";import"./chunk-B5FUQFEQ.js";import"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-73RDJP55.js";import{Ab as e,Bb as n,Cb as _,Qb as l,Ra as s,Rb as d,Sb as i,bb as P,zb as r,zc as u}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";var F=()=>["/backup/new"],N=()=>["/backup/import"],C=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=P({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let c;c=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let m;m=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let D;return D=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,c,A,g,m,D,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,c){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),l(12,3),_(13,"sh-icon"),d(),n()(),e(14,"sh-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),l(21,6),_(22,"sh-icon"),d(),n()()()()),t&2&&(s(11),r("routerLink",u(2,F)),s(9),r("routerLink",u(3,N)))},dependencies:[E,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{C as default};
1
+ import{a as E}from"./chunk-NJEX2N4Q.js";import"./chunk-6LTGTS6B.js";import"./chunk-DVDTYV66.js";import"./chunk-UIJYCGKA.js";import"./chunk-DELLEGXW.js";import"./chunk-RHW5QVAY.js";import"./chunk-VTSUHAP5.js";import"./chunk-UP5EOICU.js";import"./chunk-N5SC4SKW.js";import"./chunk-Z3EPZZGY.js";import"./chunk-UKQFDBNO.js";import{e as S}from"./chunk-LVP2TPMO.js";import"./chunk-43JMN2ZY.js";import{a as T,g as M,h as f}from"./chunk-H7K35UUX.js";import"./chunk-NOPMCS2Z.js";import"./chunk-TDKBGGNK.js";import"./chunk-RUXCS4ZK.js";import"./chunk-FPPZ4BUR.js";import"./chunk-6OPAGPKF.js";import{Ab as e,Bb as n,Cb as _,Qb as l,Ra as s,Rb as d,Sb as i,bb as P,zb as r,zc as u}from"./chunk-HNWRQABR.js";import"./chunk-EUDKD2JW.js";var F=()=>["/backup/new"],N=()=>["/backup/import"],C=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=P({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let c;c=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let g;g=$localize`Import from file`;let m;m=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let D;return D=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,c,A,g,m,D,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,c){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),l(12,3),_(13,"sh-icon"),d(),n()(),e(14,"sh-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),l(21,6),_(22,"sh-icon"),d(),n()()()()),t&2&&(s(11),r("routerLink",u(2,F)),s(9),r("routerLink",u(3,N)))},dependencies:[E,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{C as default};
@@ -1 +1 @@
1
- import{a as K}from"./chunk-SCOG2I64.js";import"./chunk-GO22DJ44.js";import{g as J}from"./chunk-TJOWPBPB.js";import"./chunk-K3ZQ67VT.js";import"./chunk-CZLLEVMJ.js";import"./chunk-QY6E755W.js";import"./chunk-UACX27D3.js";import"./chunk-QGFC5ZUR.js";import{b as q}from"./chunk-FFY3NRCC.js";import"./chunk-BGUKMOKY.js";import{a as Z}from"./chunk-XNVRJH42.js";import"./chunk-3UN32GIC.js";import{a as V}from"./chunk-OXOOR7I4.js";import"./chunk-GUH5TMOS.js";import"./chunk-RHW5QVAY.js";import"./chunk-66BSPEOQ.js";import{a as H}from"./chunk-CWBEE627.js";import"./chunk-USU2EHJV.js";import"./chunk-ZGAC2JKG.js";import"./chunk-ETCRT3EV.js";import{b as w}from"./chunk-L2EO4M4B.js";import"./chunk-4YL5DZVH.js";import{a as W,h as X,p as z,s as B}from"./chunk-WRNQOX5R.js";import{h as j}from"./chunk-J3BBLPAD.js";import{qa as k}from"./chunk-WJPLJKPQ.js";import"./chunk-FPPZ4BUR.js";import{Ab as i,Bb as s,Cb as S,Dc as d,Ec as m,Gb as u,Hb as T,Oc as b,Qb as v,Ra as _,Rb as D,Sb as r,Tb as I,Ub as x,Yb as g,_ as R,bb as y,ga as C,ha as f,lc as M,oa as L,oc as h,ub as p,vb as O,zb as P}from"./chunk-QDFCX6XE.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(i(0,"div",17),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(i(0,"div",18),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(i(0,"sh-card",10),u(1,16),r(2,2),T(),p(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();_(3),O(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),d(1,"number"),d(2,"number")),n&2){let e,o=g(2);h(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileCount)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(u(0),r(1,8),T())}function ne(n,t){if(n&1&&(M(0),d(1,"bytes"),d(2,"bytes")),n&2){let e,o=g(2);h(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileSize)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileSize)," ")}}function oe(n,t){n&1&&(u(0),r(1,9),T())}function ie(n,t){if(n&1&&(i(0,"sh-card",10)(1,"h3"),v(2,5),S(3,"sh-spinner",23),D(),s(),i(4,"div",24),S(5,"sh-progress-bar",25),i(6,"p")(7,"span"),r(8,6),s(),p(9,ee,3,6)(10,te,2,0,"ng-container"),s(),i(11,"p")(12,"span"),r(13,7),s(),p(14,ne,3,6)(15,oe,2,0,"ng-container"),s()()()),n&2){let e,o,l,E,c=g();_(3),I((e=c.statusData())==null?null:e.statusText),x(2),_(2),P("value",(o=c.statusData())==null?null:o.OverallProgress),_(4),O((l=c.statusData())!=null&&l.ProcessedFileCount?9:10),_(5),O((E=c.statusData())!=null&&E.ProcessedFileSize?14:15)}}var F=class n{#i=R(j);#s=R(V);#t=R(Z);#n=R(J);#r=R(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=L("");#e=null;lastRestoreStarted=b(()=>{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())??!1}};ngOnInit(){let t=this.#r.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.#a(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.")}})}#a(t){this.#s.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=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let o;o=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let c;c=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let N;N=$localize`Files processed:`;let G;G=$localize`Size processed:`;let $;$=$localize`N/A`;let A;return A=$localize`N/A`,[t,e,o,l,E,c,N,G,$,A,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","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,o){if(e&1&&(i(0,"section"),p(1,Y,5,1,"sh-card",10)(2,ie,16,4,"sh-card",10),i(3,"sh-card",11)(4,"h3"),r(5,0),s(),i(6,"div",12),S(7,"app-notifications",13),s()(),i(8,"sh-card",14)(9,"h3"),r(10,1),s(),S(11,"app-logs-live",15),s()()),e&2){let l;_(),O(o.restoreResult()!=""?1:2),_(6),P("notificationFilterPredicate",o.notificationFilterPredicate()),_(4),P("asSimpleList",!0)("polling",o.restoreResult()=="")("whenFilter",(l=o.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",o.backupId())}},dependencies:[K,z,B,W,X,q,H,k],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}'],changeDetection:0})};export{F as default};
1
+ import{a as K}from"./chunk-62QANGOE.js";import"./chunk-ESUPNSKH.js";import{g as J}from"./chunk-PN3U7MRX.js";import"./chunk-L6CWVBZ6.js";import"./chunk-OMMUXRXE.js";import"./chunk-N6ABN43N.js";import"./chunk-DDWLL7XA.js";import"./chunk-O64ZZGQZ.js";import{b as q}from"./chunk-DNDTLTUM.js";import"./chunk-QDFDQHU3.js";import{a as Z}from"./chunk-6LTGTS6B.js";import"./chunk-DVDTYV66.js";import{a as V}from"./chunk-UIJYCGKA.js";import"./chunk-DELLEGXW.js";import"./chunk-RHW5QVAY.js";import"./chunk-VTSUHAP5.js";import{a as H}from"./chunk-UP5EOICU.js";import"./chunk-N5SC4SKW.js";import"./chunk-Z3EPZZGY.js";import"./chunk-UKQFDBNO.js";import{b as w}from"./chunk-LVP2TPMO.js";import"./chunk-43JMN2ZY.js";import{a as W,h as X,p as z,s as B}from"./chunk-H7K35UUX.js";import{h as j}from"./chunk-NOPMCS2Z.js";import{qa as k}from"./chunk-RUXCS4ZK.js";import"./chunk-FPPZ4BUR.js";import{Ab as i,Bb as s,Cb as S,Dc as d,Ec as m,Gb as u,Hb as T,Oc as b,Qb as v,Ra as _,Rb as D,Sb as r,Tb as I,Ub as x,Yb as g,_ as R,bb as y,ga as C,ha as f,lc as M,oa as L,oc as h,ub as p,vb as O,zb as P}from"./chunk-HNWRQABR.js";import"./chunk-EUDKD2JW.js";function Q(n,t){n&1&&(i(0,"div",17),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"sh-icon",21),r(4,3),s()())}function U(n,t){n&1&&(i(0,"div",18),C(),i(1,"svg",19),S(2,"circle",20),s(),f(),i(3,"sh-icon",22),r(4,4),s()())}function Y(n,t){if(n&1&&(i(0,"sh-card",10),u(1,16),r(2,2),T(),p(3,Q,5,0,"div",17)(4,U,5,0,"div",18),s()),n&2){let e=g();_(3),O(e.restoreResult()=="success"?3:4)}}function ee(n,t){if(n&1&&(M(0),d(1,"number"),d(2,"number")),n&2){let e,o=g(2);h(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileCount)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileCount)," ")}}function te(n,t){n&1&&(u(0),r(1,8),T())}function ne(n,t){if(n&1&&(M(0),d(1,"bytes"),d(2,"bytes")),n&2){let e,o=g(2);h(" ",m(1,2,(e=o.statusData())==null?null:e.ProcessedFileSize)," of ",m(2,4,(e=o.statusData())==null?null:e.TotalFileSize)," ")}}function oe(n,t){n&1&&(u(0),r(1,9),T())}function ie(n,t){if(n&1&&(i(0,"sh-card",10)(1,"h3"),v(2,5),S(3,"sh-spinner",23),D(),s(),i(4,"div",24),S(5,"sh-progress-bar",25),i(6,"p")(7,"span"),r(8,6),s(),p(9,ee,3,6)(10,te,2,0,"ng-container"),s(),i(11,"p")(12,"span"),r(13,7),s(),p(14,ne,3,6)(15,oe,2,0,"ng-container"),s()()()),n&2){let e,o,l,E,c=g();_(3),I((e=c.statusData())==null?null:e.statusText),x(2),_(2),P("value",(o=c.statusData())==null?null:o.OverallProgress),_(4),O((l=c.statusData())!=null&&l.ProcessedFileCount?9:10),_(5),O((E=c.statusData())!=null&&E.ProcessedFileSize?14:15)}}var F=class n{#i=R(j);#s=R(V);#t=R(Z);#n=R(J);#r=R(w);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=L("");#e=null;lastRestoreStarted=b(()=>{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())??!1}};ngOnInit(){let t=this.#r.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.#a(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.")}})}#a(t){this.#s.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=y({type:n,selectors:[["app-restore-progress"]],decls:12,vars:6,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let o;o=$localize`Restore completed`;let l;l=$localize`check-bold`;let E;E=$localize`warning-octagon`;let c;c=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let N;N=$localize`Files processed:`;let G;G=$localize`Size processed:`;let $;$=$localize`N/A`;let A;return A=$localize`N/A`,[t,e,o,l,E,c,N,G,$,A,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"asSimpleList","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,o){if(e&1&&(i(0,"section"),p(1,Y,5,1,"sh-card",10)(2,ie,16,4,"sh-card",10),i(3,"sh-card",11)(4,"h3"),r(5,0),s(),i(6,"div",12),S(7,"app-notifications",13),s()(),i(8,"sh-card",14)(9,"h3"),r(10,1),s(),S(11,"app-logs-live",15),s()()),e&2){let l;_(),O(o.restoreResult()!=""?1:2),_(6),P("notificationFilterPredicate",o.notificationFilterPredicate()),_(4),P("asSimpleList",!0)("polling",o.restoreResult()=="")("whenFilter",(l=o.lastRestoreStarted())==null?null:l.getTime())("backupIdFilter",o.backupId())}},dependencies:[K,z,B,W,X,q,H,k],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}'],changeDetection:0})};export{F as default};
@@ -0,0 +1 @@
1
+ import{ea as Ct}from"./chunk-RUXCS4ZK.js";import{Ab as x,Ac as Re,Bb as I,Bc as Xe,Cb as fe,Db as B,Eb as q,Fb as _e,Ib as ge,Jb as ie,Mc as Ge,Oc as F,Pc as Y,Qa as pt,Ra as b,Ta as Ie,Tc as ue,Uc as w,V as Le,Va as be,Vc as ae,Wb as X,Wc as vt,Xa as ut,Xb as me,Xc as Z,Y as at,Yb as D,Zb as W,_ as V,_b as y,a as rt,ba as lt,bb as L,ca as ct,da as dt,db as ke,dc as ft,dd as Ke,ea as H,ec as se,fa as j,fc as ce,gb as he,gc as gt,hc as ne,ia as Fe,ic as z,jc as mt,ka as Te,kc as ve,lb as je,lc as k,mc as xe,na as He,nc as pe,oa as N,oc as Ne,qb as ht,qc as ze,rc as $e,sc as Ue,tb as ye,tc as Qe,ua as K,ub as P,uc as re,vb as A,vc as U,wb as Be,xb as We,yb as qe,zb as oe,zc as Ye}from"./chunk-HNWRQABR.js";import{a as le,b as Ce,c as st,d as f,e as O,f as M,g as E}from"./chunk-EUDKD2JW.js";var ee=["*"],Vt=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Pt=["[icon]","[title]","*","[content]"];function At(t,e){t&1&&(x(0,"sh-icon",3),k(1,"info"),I())}function Lt(t,e){t&1&&(x(0,"sh-icon",3),k(1,"info"),I())}function Ft(t,e){t&1&&(x(0,"sh-icon",3),k(1,"warning"),I())}function Ht(t,e){t&1&&(x(0,"sh-icon",3),k(1,"warning-octagon"),I())}function jt(t,e){t&1&&(x(0,"sh-icon",3),k(1,"check-circle"),I())}function Bt(t,e){t&1&&(x(0,"sh-icon",3),k(1,"question"),I())}function Wt(t,e){if(t&1){let o=ie();x(0,"sh-icon",7),X("click",function(){H(o);let i=D();return j(i.removeAlert())}),k(1,"plus"),I()}}var qt=["dialogRef"];function zt(t,e){if(t&1){let o=ie();B(0,"div",4),me("click",function(){H(o);let i=D();return j(i.isOpen.set(!1))}),q()}}var $t=["shButton",""];var Ut=["triggerRef"],Qt=["popoverRef"],Yt=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],Xt=["[trigger]","button","[shButton]","*"];var Gt=()=>({closeOnButton:!1,closeOnEsc:!0});var Kt=[[["label"]],[["","boxPrefix",""]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","boxSuffix",""]],[["","error",""]],[["","hint",""]]],Zt=["label","[boxPrefix]","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[boxSuffix]","[error]","[hint]"],_t=["input"],Jt=[[["label"]]],ei=["label"];function ti(t,e){if(t&1&&(x(0,"div",3),k(1),I()),t&2){let o=D();b(),xe(o.files()[0].name)}}function ii(t,e){if(t&1&&(x(0,"div",3),k(1),I()),t&2){let o=D();b(),pe("",o.files().length," files selected")}}function ni(t,e){if(t&1&&(x(0,"div",4),k(1),I()),t&2){let o=D();b(),xe(o.filesOver()?o.overlayText():o.placeholder())}}var oi=["optionsRef"],si=["*",[["","menu",""]]],ri=["*","[menu]"];function ai(t,e){t&1&&(x(0,"sh-icon",5),k(1,"caret-down"),I())}var li=[[["label"]],[["input","type","range"]]],ci=["label","input[type=range]"],di=["optionsWrap"],pi=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],ui=["label","[prefix]","[boxPrefix]","input","textarea"],hi=()=>({closeOnButton:!1,closeOnEsc:!1}),St=(t,e)=>({$implicit:t,last:e}),it=t=>({$implicit:t});function fi(t,e){if(t&1&&k(0),t&2){let o=D();pe(" ",o.inputValue()," ")}}function gi(t,e){t&1&&ge(0)}function mi(t,e){if(t&1&&he(0,gi,1,0,"ng-container",13),t&2){let o=D(3),n=o.$implicit,i=o.$index,s=o.$count;D(2);let h=U(3);oe("ngTemplateOutlet",h)("ngTemplateOutletContext",Xe(2,St,n,i===s-1))}}function vi(t,e){if(t&1&&k(0),t&2){let o=D(3).$implicit,n=D(2);pe(" ",n.getLabel(o)," ")}}function Ci(t,e){if(t&1){let o=ie();x(0,"sh-chip",12),X("click",function(i){H(o);let s=D(2).$index,h=D(2);return j(h.removeSelectedOptionByIndex(i,s))}),P(1,mi,1,5,"ng-container")(2,vi,1,1),x(3,"sh-icon"),k(4,"x-bold"),I()()}if(t&2){let o=D(4),n=U(3);ve(o.selectClasses()),b(),A(n?1:2)}}function _i(t,e){t&1&&ge(0)}function Si(t,e){if(t&1&&he(0,_i,1,0,"ng-container",13),t&2){let o=D(4),n=o.$implicit,i=o.$index,s=o.$count;D(2);let h=U(3);oe("ngTemplateOutlet",h)("ngTemplateOutletContext",Xe(2,St,n,i===s-1))}}function Di(t,e){if(t&1&&k(0),t&2){let o=D(4),n=o.$implicit,i=o.$index,s=o.$count,h=D(2);pe(" ",i===s-1?h.getLabel(n):h.getLabel(n)+","," ")}}function bi(t,e){if(t&1&&P(0,Si,1,5,"ng-container")(1,Di,1,1),t&2){D(5);let o=U(3);A(o?0:1)}}function yi(t,e){if(t&1&&P(0,bi,2,1),t&2){D(4);let o=U(6);A(o?-1:0)}}function xi(t,e){if(t&1&&P(0,Ci,5,3,"sh-chip",11)(1,yi,1,1),t&2){D(3);let o=U(5);A(o?0:1)}}function Oi(t,e){if(t&1&&P(0,xi,2,1),t&2){let o=e.$implicit;A(o?0:-1)}}function Ei(t,e){if(t&1&&We(0,Oi,1,1,null,null,Be),t&2){D();let o=U(2);qe(o)}}function wi(t,e){t&1&&ge(0)}function Mi(t,e){if(t&1&&he(0,wi,1,0,"ng-container",14),t&2){D(2);let o=U(0);oe("ngTemplateOutlet",o)}}function Ti(t,e){if(t&1&&k(0),t&2){let o=D(2);pe(" ",o.placeholderText()??""," ")}}function Ii(t,e){if(t&1&&P(0,Mi,1,1,"ng-container")(1,Ti,1,1),t&2){D();let o=U(0);A(o?0:1)}}function ki(t,e){t&1&&(x(0,"sh-icon",6),k(1,"caret-down"),I())}function Ni(t,e){t&1&&fe(0,"sh-spinner",7)}function Ri(t,e){t&1&&(x(0,"sh-icon",6),k(1,"list-magnifying-glass"),I())}function Vi(t,e){t&1&&(x(0,"sh-icon",6),k(1,"magnifying-glass"),I())}function Pi(t,e){if(t&1){let o=ie();x(0,"sh-icon",15),X("click",function(i){H(o);let s=D();return j(s.clear(i))}),k(1,"x-bold"),I()}}function Ai(t,e){t&1&&(x(0,"sh-icon",6),k(1,"caret-down"),I())}function Li(t,e){t&1&&(x(0,"sh-icon",6),k(1,"caret-up"),I())}function Fi(t,e){if(t&1&&(x(0,"p",9),k(1),I()),t&2){let o=D(3);b(),xe(o.freeTextTitle())}}function Hi(t,e){t&1&&ge(0)}function ji(t,e){if(t&1&&he(0,Hi,1,0,"ng-container",13),t&2){D(2);let o=U(0);D();let n=U(1);oe("ngTemplateOutlet",n)("ngTemplateOutletContext",Re(2,it,o))}}function Bi(t,e){t&1&&ge(0)}function Wi(t,e){if(t&1&&he(0,Bi,1,0,"ng-container",13),t&2){D(2);let o=U(0);D();let n=U(4);oe("ngTemplateOutlet",n)("ngTemplateOutletContext",Re(2,it,o))}}function qi(t,e){if(t&1&&k(0),t&2){D(2);let o=U(1);pe(" ",o," ")}}function zi(t,e){t&1&&fe(0,"sh-divider")}function $i(t,e){if(t&1){let o=ie();P(0,Fi,2,1,"p",9),x(1,"li",16),X("click",function(){H(o);let i=D(2);return j(i.toggleOptionByIndex(-1))}),P(2,ji,1,4,"ng-container")(3,Wi,1,4,"ng-container")(4,qi,1,1),I(),P(5,zi,1,0,"sh-divider")}if(t&2){D();let o=U(0),n=D(),i=U(1),s=U(4);A(n.freeTextTitle()?0:-1),b(),z("selected",n.isSelected(-1))("focused",n.focusedOptionIndex()===-1),oe("id",n.getLabelAsSlug(o)),ye("aria-selected",n.isSelected(-1)),b(),A(i?2:s?3:4),b(3),A(n.freeTextTitle()&&n.filteredOptions().length>0?5:-1)}}function Ui(t,e){if(t&1&&(Qe(0)(1),P(2,$i,6,9)),t&2){let o=D(),n=re(o.computedFreeTextOption());b();let i=re(o.getValue(n));b(),A(i.length>0?2:-1)}}function Qi(t,e){if(t&1&&(x(0,"p",9),k(1),I()),t&2){let o=D();b(),xe(o.optionTitle())}}function Yi(t,e){if(t&1&&fe(0,"sh-checkbox"),t&2){let o=D().$index,n=D();ve(n.selectClasses()),z("active",n.isSelected(o))}}function Xi(t,e){t&1&&ge(0)}function Gi(t,e){if(t&1&&he(0,Xi,1,0,"ng-container",13),t&2){let o=D().$implicit;D();let n=U(4);oe("ngTemplateOutlet",n)("ngTemplateOutletContext",Re(2,it,o))}}function Ki(t,e){if(t&1&&k(0),t&2){let o=D().$implicit,n=D();pe(" ",n.getLabel(o)," ")}}function Zi(t,e){if(t&1){let o=ie();x(0,"li",16),X("click",function(){let i=H(o).$index,s=D();return j(s.toggleOptionByIndex(i))}),P(1,Yi,1,4,"sh-checkbox",17),P(2,Gi,1,4,"ng-container")(3,Ki,1,1),I()}if(t&2){let o=e.$implicit,n=e.$index,i=D(),s=U(4);z("selected",i.isSelected(n))("focused",n===i.focusedOptionIndex()),oe("id",i.getLabelAsSlug(o)),ye("aria-selected",i.isSelected(n)),b(),A(i.selectMultiple()?1:-1),b(),A(s?2:3)}}var Ji=["dragImageElement"],en=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],tn=["[sidenav]","[sidenav-closed-topbar]","*"];function nn(t,e){t&1&&_e(0,"div",1,0)}function on(t,e){if(t&1){let o=ie();B(0,"div",7),me("drop",function(i){H(o);let s=D();return j(s.drop(i))})("dragenter",function(){H(o);let i=D();return j(i.dragEnter())})("dragleave",function(){H(o);let i=D();return j(i.dragLeave())}),q()}}function sn(t,e){if(t&1){let o=ie();B(0,"div",8),me("dragstart",function(i){H(o);let s=D();return j(s.dragStart(i))})("dragend",function(i){H(o);let s=D();return j(s.dragEnd(i))})("drag",function(i){H(o);let s=D();return j(s.drag(i))})("touchstart",function(i){H(o);let s=D();return j(s.touchStart(i))})("touchmove",function(i){H(o);let s=D();return j(s.touchMove(i))})("touchend",function(i){H(o);let s=D();return j(s.touchEnd(i))})("touchcancel",function(i){H(o);let s=D();return j(s.touchCancel(i))}),q()}}var rn=["tbody"],an=["*",[["","table-no-rows",""]]],ln=["*","[table-no-rows]"];function cn(t,e){t&1&&fe(0,"sh-progress-bar",1)}function dn(t,e){t&1&&(x(0,"div",2),y(1,1),I())}var pn=[[["","title",""]],"*"],un=["[title]","*"];function hn(t,e){t&1&&k(0,"Title")}function fn(t,e){t&1&&(x(0,"sh-icon",1),k(1,"caret-down"),I())}var gn=["bold","thin","light","fill"],De=(()=>{var e,o;let n=class n{constructor(){O(this,e,V(K));O(this,o,V(be))}ngAfterContentInit(){let s=f(this,e).nativeElement.textContent?.trim();if(!s)return;let h=s.split("-").at(-1);h&&gn.includes(h)&&f(this,o).addClass(f(this,e).nativeElement,h)}};e=new WeakMap,o=new WeakMap,n.\u0275fac=function(h){return new(h||n)},n.\u0275cmp=L({type:n,selectors:[["sh-icon"]],ngContentSelectors:ee,decls:1,vars:0,template:function(h,p){h&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=n;return t})(),Gn=(()=>{let e=class e{constructor(){this._el=V(K),this.alertService=w(null),this.id=w(null),this.alertClasses=F(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Pt,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(i,s){if(i&1&&(W(Vt),x(0,"div",1)(1,"div",2,0),y(3),I(),x(4,"div",2),P(5,At,2,0,"sh-icon",3)(6,Lt,2,0,"sh-icon",3)(7,Ft,2,0,"sh-icon",3)(8,Ht,2,0,"sh-icon",3)(9,jt,2,0,"sh-icon",3)(10,Bt,2,0,"sh-icon",3),I(),x(11,"div",4),y(12,1),y(13,2),I(),P(14,Wt,2,0,"sh-icon",5),x(15,"div",6),y(16,3),I()()),i&2){let h=gt(2);b(),ne("display",h.children.length?"block":"none");let p=s.alertClasses();b(4),A(p.includes("primary")?5:p.includes("accent")?6:p.includes("warn")?7:p.includes("error")?8:p.includes("success")?9:10),b(9),A(s.id()?14:-1)}},dependencies:[De],encapsulation:2,changeDetection:0});let t=e;return t})();function Ae(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Kn=(()=>{let e=class e{constructor(){this.alertHistory=N([]),this.alertHistoryIsOpen=N(!1),this.alertHistoryIsHidden=N(!0)}error(n){this.addAlert({type:"error",title:n??"An error occured"})}success(n){this.addAlert({type:"success",title:n})}question(n){this.addAlert({type:"question",title:n})}warning(n){this.addAlert({type:"warn",title:n})}info(n){this.addAlert({type:"primary",title:n})}addAlert(n){let i=Ae();this.alertHistory.update(s=>[Ce(le({},n),{isOpen:!0,animateIn:!0,animateOut:!1,id:i}),...s]),setTimeout(()=>{this.alertHistory.update(s=>s.map(h=>Ce(le({},h),{animateIn:h.id===i?!1:h.animateIn})))},40),setTimeout(()=>{this.hideAlert(i)},2500)}removeAlert(n){this.alertHistory.update(i=>i.map(s=>Ce(le({},s),{animateOut:s.id===n?!1:s.animateOut}))),setTimeout(()=>{this.alertHistory.update(i=>i.filter(s=>s.id!==n))},300)}hideAlert(n){this.alertHistory.update(i=>i.map(s=>Ce(le({},s),{isOpen:s.id===n?!1:s.isOpen})))}setHidden(n){this.alertHistoryIsHidden.set(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=Le({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),nt=new at("Ship UI Config"),mn={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},vn=(()=>{var e;let o=class o{constructor(){O(this,e);M(this,e,V(nt,{optional:!0})),this.dialogRef=ae("dialogRef"),this.isOpen=Z(!1),this.options=w(),this.closed=ue(),this.defaultOptionMerge=F(()=>le(Ce(le({},mn),{class:f(this,e)?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=Y(()=>{let i=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(i?.showModal(),i?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",s=>{s.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&s.preventDefault(),s.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),i?.close())})}ngOnDestroy(){this.abortController?.abort()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=L({type:o,selectors:[["sh-dialog"]],viewQuery:function(s,h){s&1&&se(h.dialogRef,qt,5),s&2&&ce()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ee,decls:5,vars:11,consts:[["dialogRef",""],["shDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(s,h){if(s&1&&(W(),B(0,"dialog",1,0)(2,"div",2),y(3),q(),P(4,zt,1,0,"div",3),q()),s&2){let p=h.defaultOptionMerge();ve(p.class),ne("width",p.width??"")("max-width",p.maxWidth??"")("max-height",p.maxHeight??"")("height",p.height??""),b(4),A(h.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0});let t=o;return t})(),Zn=(()=>{var e,o,n,Dt,Oe;let h=class h{constructor(){O(this,n);O(this,e);O(this,o);M(this,e,typeof document<"u"?document.querySelector("body"):null),M(this,o,V(ht)),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}open(a,r){let d=f(this,o).injector,C=E(this,n,Dt).call(this),_=r||{},{data:v,closed:m}=_,S=st(_,["data","closed"]);this.compRef&&E(this,n,Oe).call(this),this.insertedCompRef=Ke(a,{environmentInjector:d}),this.compRef=Ke(vn,{hostElement:C,environmentInjector:d,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let c=this.insertedCompRef.instance?.data,l=this.insertedCompRef.instance?.closed;if(v){if(He(c))this.insertedCompRef.setInput("data",v);else if(!He(c))throw new Error("data is not an input signal on the passed component")}l instanceof Ge&&(this.closedFieldSub=l.subscribe((...T)=>{m?.(...T),E(this,n,Oe).call(this)})),f(this,o).attachView(this.insertedCompRef.hostView),f(this,o).attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",S),this.compRef.instance.closed.subscribe(()=>g());let u=this;function g(){var T;l&&l instanceof Ge?l.emit(!1):m?.(void 0),E(T=u,n,Oe).call(T)}return{component:this.insertedCompRef.instance,close:g}}ngOnDestroy(){E(this,n,Oe).call(this)}};e=new WeakMap,o=new WeakMap,n=new WeakSet,Dt=function(){let a=document.createElement("sh-dialog-ref");return a.id="sh-dialog-ref",document.getElementById("sh-dialog-ref")||f(this,e)?.append(a),document.getElementById("sh-dialog-ref")},Oe=function(){this.insertedCompRef&&(f(this,o).detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(f(this,o).detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())},h.\u0275fac=function(r){return new(r||h)},h.\u0275prov=Le({token:h,factory:h.\u0275fac,providedIn:"root"});let t=h;return t})(),Jn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-button-group"]],ngContentSelectors:ee,decls:1,vars:0,template:function(i,s){i&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),eo=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["","shButton",""]],attrs:$t,ngContentSelectors:ee,decls:1,vars:0,template:function(i,s){i&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),to=(()=>{var e;let o=class o{constructor(){O(this,e);M(this,e,V(nt,{optional:!0})),this.class=N(f(this,e)?.cardType??"default")}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=L({type:o,selectors:[["sh-card"]],hostVars:2,hostBindings:function(s,h){s&2&&ve(h.class())},ngContentSelectors:ee,decls:1,vars:0,template:function(s,h){s&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=o;return t})(),Cn=(()=>{var e;let o=class o{constructor(){O(this,e,V(K))}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=L({type:o,selectors:[["sh-checkbox"]],ngContentSelectors:ee,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(s,h){s&1&&(W(),x(0,"div",0)(1,"sh-icon",1),k(2,"check-bold"),I(),x(3,"sh-icon",2),k(4,"minus-bold"),I()(),y(5))},dependencies:[De],encapsulation:2,changeDetection:0});let t=o;return t})(),_n=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-chip"]],ngContentSelectors:ee,decls:2,vars:0,template:function(i,s){i&1&&(W(),B(0,"div"),y(1),q())},encapsulation:2,changeDetection:0});let t=e;return t})();var Sn=["scroll","auto"],Dn={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},bt=(()=>{var e,o,yt,Ve;let s=class s{constructor(){O(this,o);O(this,e);M(this,e,4),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=w(!1),this.disableOpenByClick=w(!1),this.isOpen=Z(!1),this.options=w(),this.closed=ue(),this.defaultOptionMerge=F(()=>le(le({},Dn),this.options())),this.triggerRef=ae.required("triggerRef"),this.popoverRef=ae.required("popoverRef"),this.id=N("--"+Ae()),this.menuStyle=N(null),this.openAbort=null,this.openEffect=Y(()=>{let p=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let r={signal:this.openAbort?.signal};p?.showPopover(),document.addEventListener("keydown",d=>{d.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&d.preventDefault(),d.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},r),setTimeout(()=>{E(this,o,yt).call(this,this.popoverRef()?.nativeElement).addEventListener("scroll",()=>E(this,o,Ve).call(this),r),window?.addEventListener("resize",()=>E(this,o,Ve).call(this),r),E(this,o,Ve).call(this)})}else p.hidePopover&&p.hidePopover(),this.openAbort?.abort(),this.closed.emit()})}toggleIsOpen(p){p.preventDefault(),p.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(p){p.stopPropagation(),p.preventDefault(),this.isOpen.set(!1)}};e=new WeakMap,o=new WeakSet,yt=function(p){let a=p.parentElement;for(;a;){if(Sn.indexOf(window?.getComputedStyle(a).overflowY)>-1&&a.scrollHeight>a.clientHeight)return a;a=a.parentElement}return document.documentElement},Ve=function(){let p=this.triggerRef()?.nativeElement.getBoundingClientRect(),a=this.popoverRef()?.nativeElement.getBoundingClientRect(),r=p.left,d=p.bottom,C=r,v=d+f(this,e),m=C+a.width>window?.innerWidth,S=v+a.height>window?.innerHeight;if(!this.SUPPORTS_ANCHOR){if(C=r,v=d+f(this,e),S){let l=p.top-a.height-f(this,e);l<0||(v=l)}m&&(C=p.right-a.width,C<0&&(C=0));let c={left:C+"px",top:v+"px"};this.menuStyle.set(c)}},s.\u0275fac=function(a){return new(a||s)},s.\u0275cmp=L({type:s,selectors:[["sh-popover"]],viewQuery:function(a,r){a&1&&(se(r.triggerRef,Ut,5),se(r.popoverRef,Qt,5)),a&2&&ce(2)},hostVars:2,hostBindings:function(a,r){a&2&&z("multi-layer",r.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Xt,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(a,r){if(a&1){let d=ie();W(Yt),B(0,"div",2,0),me("click",function(v){return H(d),j(r.toggleIsOpen(v))}),B(2,"div",3),y(3),y(4,1),y(5,2),q()(),B(6,"div",4,1)(8,"div",5),me("click",function(v){return H(d),j(r.isOpen()&&r.eventClose(v))}),q(),y(9,3),q()}a&2&&(ne("anchor-name",r.id()),b(6),mt(r.menuStyle()),ne("position-anchor",r.id()))},encapsulation:2,changeDetection:0});let t=s;return t})();var bn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-divider"]],ngContentSelectors:ee,decls:1,vars:0,template:function(i,s){i&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),ot=(()=>{var e;let o=class o{constructor(){O(this,e,V(K));je(()=>{let i=typeof CSS<"u"&&CSS.supports("field-sizing","content"),s=f(this,e).nativeElement.querySelector("textarea");if(!i&&s!==null){let a=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},r=function(){setTimeout(a,0)};var h=a,p=r;s.addEventListener("change",a),s.addEventListener("cut",r),s.addEventListener("paste",r),s.addEventListener("drop",r),s.addEventListener("keydown",r),s.focus(),s.select(),a()}})}onClick(){f(this,e).nativeElement.querySelector("input")&&f(this,e).nativeElement.querySelector("input").focus(),f(this,e).nativeElement.querySelector("textarea")&&f(this,e).nativeElement.querySelector("textarea").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=L({type:o,selectors:[["sh-form-field"]],hostBindings:function(s,h){s&1&&X("click",function(){return h.onClick()})},ngContentSelectors:Zt,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(s,h){s&1&&(W(Kt),y(0),B(1,"div",0)(2,"div",1),y(3,1),y(4,2),y(5,3),q(),y(6,4),y(7,5),B(8,"div",2),y(9,6),y(10,7),y(11,8),q()(),B(12,"div",3)(13,"div",4),y(14,9),q(),B(15,"div",5),y(16,10),q()())},encapsulation:2,changeDetection:0});let t=o;return t})(),io=(()=>{let e=class e{constructor(){this._el=V(K),this.inputRef=ae.required("input"),this.filesOver=N(!1),this.multiple=w(),this.accept=w(null),this.placeholder=Z("Click or drag files here"),this.overlayText=w("Drop files here"),this.files=Z([]),this.fileUploadClasses=F(()=>this._el.nativeElement.classList.toString()),this.inputEffect=Y(()=>{let n=this.inputRef().nativeElement;n&&(n.placeholder&&this.placeholder.set(n.placeholder),n.addEventListener("dragover",i=>{i.preventDefault(),this.filesOver.set(!0)}),n.addEventListener("dragleave",i=>{i.preventDefault(),this.filesOver.set(!1)}),n.addEventListener("drop",i=>{i.preventDefault(),this.filesOver.set(!1);let s=i.dataTransfer?.files;s&&s.length>0&&(this.handleFileUpload(Array.from(s)),n.files=s)}),n.addEventListener("change",i=>{i.preventDefault(),this.handleFileUpload(Array.from(i.target.files))}))})}handleFileUpload(n){this.multiple()?this.files.update(i=>[...i,...n]):this.files.set(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-file-upload"]],viewQuery:function(i,s){i&1&&se(s.inputRef,_t,5),i&2&&ce()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:ei,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(i,s){i&1&&(W(Jt),x(0,"sh-form-field"),y(1,0,["ngProjectAs","label",5,["label"]]),x(2,"div",2,0),P(4,ti,2,1,"div",3)(5,ii,2,1,"div",3)(6,ni,2,1,"div",4),fe(7,"input",5,1)(9,"div",6),I(),x(10,"sh-icon",7),k(11,"upload-simple"),I()()),i&2&&(ve(s.fileUploadClasses()),b(4),A(s.files().length===1?4:s.files().length>1?5:6),b(3),ye("multiple",s.multiple())("accept",s.accept()),b(2),z("files-over",s.filesOver()))},dependencies:[ot,De],encapsulation:2,changeDetection:0});let t=e;return t})(),no=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-list"]],ngContentSelectors:ee,decls:1,vars:0,template:function(i,s){i&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})();function xt(t,e){let o=e?.injector||(dt(xt),V(Fe)),{debounce:n=0,initialValue:i=void 0,transform:s=g=>g,compare:h=(g,_)=>g===_,forceType:p=void 0,returnPreviousValue:a=!0}=e||{},r=N(i),d=o.get(Te),C=F(()=>{let g=t()?.nativeElement;if(g instanceof HTMLInputElement||g instanceof HTMLTextAreaElement)return l(g)}),v=!1,m,S=null;return Y(()=>{let g=C();if(!g)return r.set(a&&m?s(m):void 0);i!==void 0&&g.value===""?r.set(i):g.value!==""&&c();let _=T=>{S!==null&&clearTimeout(S),S=setTimeout(()=>{S=null,c()},n)};g.addEventListener("input",_),g.addEventListener("inputValueChanged",_),d.onDestroy(()=>{g.removeEventListener("input",_),g.removeEventListener("inputValueChanged",_),S!==null&&clearTimeout(S)})},{injector:o}),Y(()=>{let g=C();if(!g)return;let _=r()??"",T=_==null?"":String(_);g.value!==T&&(m=T,g.value=T,g.dispatchEvent(new Event("input")))},{injector:o}),r;function c(){if(!v){v=!0;try{let g=C();if(!g)return;let _=g.value,T=p?u(_,p):s(_);m=_,h(r(),T)||r.set(T)}finally{v=!1}}}function l(g){return Object.defineProperty(g,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(g),"value").get.call(this)},set(_){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(g),"value").set.call(this,_);let G=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:_}});return this.dispatchEvent(G),_}}),g}function u(g,_){switch(_){case"string":return g.toString();case"number":let T=Number(g);return isNaN(T)?void 0:T;case"boolean":return g.toLowerCase()==="true"?!0:g.toLowerCase()==="false"?!1:void 0;default:return g}}}function Ot(t,e){let o=V(Fe),n=o.get(Te),i=N([]),s=null,h=null,p=(r,d)=>{h&&h.disconnect();let C=Array.from(r.nativeElement.querySelectorAll(d.join(",")));i.set(C),typeof MutationObserver<"u"&&(h=new MutationObserver(v=>{queueMicrotask(()=>{let m=Array.from(r.nativeElement.querySelectorAll(d.join(",")));i.set(m)})}),h.observe(r.nativeElement,{childList:!0,subtree:!0})),n.onDestroy(()=>a())};s=Y(()=>{let r=typeof t=="function"&&t[rt]?t():t,d=typeof e=="function"?e():e;r&&d?.length>0?p(r,d):(i.set([]),h&&(h.disconnect(),h=null))},{injector:o});function a(){s&&s.destroy(),h&&h.disconnect()}return{signal:i.asReadonly(),destroy:a}}var oo=(()=>{var e,o,Et,Ze;let s=class s{constructor(){O(this,o);O(this,e);M(this,e,V(be)),this.asMultiLayer=w(!1),this.openIndicator=w(!1),this.disabled=w(!1),this.customOptionElementSelectors=w(["button"]),this.keepClickedOptionActive=w(!1),this.closeOnClick=w(!0),this.isOpen=Z(!1),this.closed=ue(),this.searchable=w(!1),this.activeOptionIndex=N(-1),this.inputRef=ae("input"),this.optionsRef=ae("optionsRef"),this.options=Ot(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=F(()=>this.options.signal().filter(p=>!p.disabled)),this.inputValue=xt(this.inputRef),this.abortController=null,this.optionsEffect=Y(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let p=this.inputRef()?.nativeElement;p&&(queueMicrotask(()=>p.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",r=>{let d=r.target,C=this.activeElements();if(!C.length){let m=this.optionsEl();this.activeElements.set(m),C=m}let v=C.findIndex(m=>m===d);v>-1&&(this.activeOptionIndex.set(v),p.focus())}),p.addEventListener("keydown",a=>{let r=this.activeOptionIndex();a.key==="ArrowDown"?(a.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(r))):a.key==="ArrowUp"?(a.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(r))):a.key==="Enter"?(a.preventDefault(),r>-1&&(this.activeElements()[r].click(),queueMicrotask(()=>this.close("active")))):a.key==="Tab"&&(a.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=N([]),this.lastInputValue="",this.inputValueEffect=Y(()=>{if(!this.searchable())return;let a=(this.inputValue()??"").toLowerCase();if(E(this,o,Ze).call(this),!a||a==="")return;let r=this._lastElementList.length&&a.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=a;for(let d=0;d<r.length;d++){let C=r[d],v=C.textContent?.toLowerCase()||"",m=E(this,o,Et).call(this,v,a);C.value=m}r=r.filter(d=>d.value>0).sort((d,C)=>C.value-d.value);for(let d=0;d<r.length;d++)f(this,e).setStyle(r[d],"order",d);this.activeElements.set(r),this._lastElementList=r}),this.activeOptionIndexEffect=Y(()=>{let p=this.activeElements(),a=this.activeOptionIndex();for(let r=0;r<p.length;r++)p[r].classList.remove("active");a>-1&&(p[a].scrollIntoView({block:"center"}),p[a].classList.add("active"))})}nextActiveIndex(p){let a=this.activeElements();if(!a.length){let d=this.optionsEl();this.activeElements.set(d),a=d}if(p===-1||p===a.length-1)return 0;let r=p+1;return a[r].disabled?this.nextActiveIndex(r):r}prevActiveIndex(p){let a=this.activeElements();if(!a.length){let d=this.optionsEl();this.activeElements.set(d),a=d}if(p===0||p===-1)return a.length-1;let r=p-1;return a[r].disabled?this.prevActiveIndex(r):r}close(p="closed",a){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||p==="closed")&&E(this,o,Ze).call(this),this.isOpen.set(!1),this.closed.emit(p==="active"))}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};e=new WeakMap,o=new WeakSet,Et=function(p,a){if(!a)return 0;let r=0,d=-1,C=0,v=!0;for(let m=0;m<a.length;m++){let S=a[m];if(p.length>d+1&&p[d+1]===S)r+=m===0?100:150,d++,C++;else{let c=p.indexOf(S,d+1);if(m>0&&(v=!1),c===-1)return 0;r+=100,d=c,C++}}return v&&a.length===C&&(r+=1e3),r+=C*20,r},Ze=function(){this.activeOptionIndex.set(-1);let p=this.optionsEl();for(let a=0;a<p.length;a++)p[a].classList.remove("active")},s.\u0275fac=function(a){return new(a||s)},s.\u0275cmp=L({type:s,selectors:[["sh-menu"]],viewQuery:function(a,r){a&1&&(se(r.inputRef,_t,5),se(r.optionsRef,oi,5)),a&2&&ce(2)},hostVars:6,hostBindings:function(a,r){a&2&&z("disabled",r.disabled())("has-search",r.searchable())("multi-layer",r.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ri,decls:12,vars:12,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(a,r){if(a&1){let d=ie();W(si),x(0,"sh-popover",3,0),Ue("isOpenChange",function(v){return H(d),$e(r.isOpen,v)||(r.isOpen=v),j(v)}),X("closed",function(){return H(d),j(r.close("fromPopover"))}),x(2,"div",4),X("click",function(){return H(d),j(!r.disabled()&&r.isOpen.set(!0))}),y(3),P(4,ai,2,0,"sh-icon",5),I(),x(5,"div",6)(6,"sh-form-field",7),fe(7,"input",8,1),I()(),x(9,"div",9,2),X("click",function(){return H(d),j(r.close("active"))}),y(11,1),I()()}a&2&&(ze("isOpen",r.isOpen),oe("disableOpenByClick",!0)("asMultiLayer",r.asMultiLayer())("options",Ye(11,Gt)),b(2),z("is-open",r.isOpen()),b(2),A(r.openIndicator()?4:-1),b(2),z("hidden",r.searchable()===!1),b(3),z("searching",r.searchable()&&r.inputValue()!==""))},dependencies:[bt,ot,De],encapsulation:2,changeDetection:0});let t=s;return t})(),yn=(()=>{let e=class e{constructor(){this.value=w(void 0)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(i,s){i&1&&_e(0,"div",0),i&2&&ne("width",s.value(),"%")},encapsulation:2,changeDetection:0});let t=e;return t})(),so=(()=>{var e;let o=class o{constructor(){O(this,e,V(K))}onClick(){f(this,e).nativeElement.querySelector("input")&&f(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=L({type:o,selectors:[["sh-radio"]],hostBindings:function(s,h){s&1&&X("click",function(){return h.onClick()})},ngContentSelectors:ee,decls:2,vars:0,consts:[[1,"radio"]],template:function(s,h){s&1&&(W(),_e(0,"div",0),y(1))},encapsulation:2,changeDetection:0});let t=o;return t})(),ro=(()=>{var e,o,n,i,s,Je,wt,Mt,Tt;let d=class d{constructor(){O(this,s);O(this,e);O(this,o);O(this,n);O(this,i);M(this,e,V(K)),M(this,o,null),M(this,n,null),M(this,i,0),this.unit=w(""),this.value=Z(f(this,i)),this.inputState=N({min:0,max:100,step:1}),this.valuePercentage=F(()=>{let{min:v,max:m}=this.inputState(),S=this.value()??v;if(isNaN(S))return 0;let c=m-v;if(c===0)return 0;let l=(S-v)/c*100;return Math.max(0,Math.min(100,l))}),this.trackFilledPercentage=F(()=>this.valuePercentage()),this.thumbPositionPercentage=F(()=>this.valuePercentage()),this.syncModelToInputEffect=Y(()=>{let v=this.value();if(f(this,n)){let m=parseFloat(f(this,n).value);(isNaN(m)||String(m)!==String(v))&&(f(this,n).value=String(v))}})}get hasInputElement(){return!!f(this,n)}ngAfterViewInit(){M(this,n,f(this,e).nativeElement.querySelector('input[type="range"]')),f(this,n)?(E(this,s,Tt).call(this,f(this,n)),f(this,n).oninput=()=>{this.setNewInputValue(f(this,n).value)},f(this,n).addEventListener("inputValueChanged",v=>{this.setNewInputValue(v.detail.value)}),queueMicrotask(()=>E(this,s,Je).call(this,!0)),E(this,s,wt).call(this)):console.error('ShipRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(v){let m=parseFloat(v??"0");if(!isNaN(m)){let{min:S,max:c}=this.inputState();this.value.set(Math.max(S,Math.min(c,m)))}}trackEvent(v){if(!f(this,n)||f(this,n).readOnly||f(this,n).disabled){v.preventDefault(),v.stopPropagation();return}if(v.target===f(this,n)||v.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let S=v.currentTarget.getBoundingClientRect(),c=v.clientX-S.left,l=S.width,{min:u,max:g,step:_}=this.inputState(),T=g-u;if(l>0&&T!==0&&_>0){let $=(c/l*T+u-u)/_,R=u+Math.round($)*_,Q=E(this,s,Mt).call(this,_);R=parseFloat(R.toFixed(Q));let te=Math.max(u,Math.min(g,R));this.value.set(te)}}ngOnDestroy(){f(this,o)&&f(this,o).disconnect(),f(this,n)&&(f(this,n).oninput=null)}};e=new WeakMap,o=new WeakMap,n=new WeakMap,i=new WeakMap,s=new WeakSet,Je=function(v=!1){if(!f(this,n))return;let m=parseFloat(f(this,n).min??"0")??0,S=parseFloat(f(this,n).max??"100")??100,c=f(this,n).step,l=1;if(c&&c.toLowerCase()!=="any"){let g=parseFloat(c);!isNaN(g)&&g>0&&(l=g)}this.inputState.set({min:m,max:S,step:l});let u=parseFloat(f(this,n).value??String(m))??m;if(v&&this.value()!==f(this,i)){let g=this.value(),_=Math.max(m,Math.min(S,g));u!==_&&(f(this,n).value=String(_)),g!==_&&this.value.set(_)}else{let g=Math.max(m,Math.min(S,u));this.value()!==g&&this.value.set(g)}},wt=function(){if(!f(this,n)||typeof MutationObserver>"u")return;let v=["min","max","step","value","readonly","disabled"];M(this,o,new MutationObserver(m=>{let S=!1;for(let c of m)if(c.type==="attributes"&&v.includes(c.attributeName??"")){S=!0;break}S&&E(this,s,Je).call(this,!1)})),f(this,o).observe(f(this,n),{attributes:!0})},Mt=function(v){if(isNaN(v)||Math.floor(v)===v)return 0;let S=v.toString().split(".")[1];return S?S.length:0},Tt=function(v){Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(m){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,m);let c=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:m}});return this.dispatchEvent(c),m}})},d.\u0275fac=function(m){return new(m||d)},d.\u0275cmp=L({type:d,selectors:[["sh-range-slider"]],hostVars:2,hostBindings:function(m,S){m&2&&z("has-input",S.hasInputElement)},inputs:{unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:ci,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(m,S){m&1&&(W(li),B(0,"div",0),y(1),q(),B(2,"div",1)(3,"div",2),k(4),q(),B(5,"div",3),me("click",function(l){return S.trackEvent(l)}),y(6,1),B(7,"div",4),_e(8,"div",5),q(),B(9,"div",6)(10,"div",7)(11,"div",8),k(12),q()()()(),B(13,"div",9),k(14),q()()),m&2&&(b(4),Ne("",S.inputState().min,"",S.unit()),b(4),ne("width",S.trackFilledPercentage(),"%"),b(),ne("left",S.thumbPositionPercentage(),"%"),b(3),Ne("",S.value(),"",S.unit()),b(2),Ne("",S.inputState().max,"",S.unit()))},encapsulation:2,changeDetection:0});let t=d;return t})(),xn=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-spinner"]],decls:0,vars:0,template:function(i,s){},encapsulation:2,changeDetection:0});let t=e;return t})(),ao=(()=>{var e,o,n,i,et,h,p,tt,J,It,kt,Nt;let m=class m{constructor(){O(this,i);O(this,e);O(this,o);O(this,n);O(this,h);O(this,p);M(this,e,V(K)),this.value=w(),this.label=w(),this.asFreeText=w(!1),this.optionTitle=w(null),this.freeTextTitle=w(null),this.freeTextPlaceholder=w("Type to create a new option"),this.validateFreeText=w(),this.placeholder=w(),this.readonly=Z(!1),this.disabled=Z(!1),this.lazySearch=w(!1),this.inlineSearch=w(!1),this.asText=w(!1),this.isClearable=w(!0),this.selectMultiple=w(!1),this.optionTemplate=w(null),this.selectedOptionTemplate=w(null),this.placeholderTemplate=w(null),this.freeTextOptionTemplate=w(null),this.isOpen=Z(!1),this.isLoading=Z(!1),this.options=Z([]),this.selectedOptions=Z([]),this.cleared=ue(),this.onAddNewFreeTextOption=ue(),this.computedFreeTextOption=F(()=>{let c=this.inputValue(),l=this.value(),u=l?{}:c;return l&&typeof u=="object"&&(u[l]=c),u}),M(this,o,N(null)),this.inlineTemplate=vt(Ie),this.optionsWrapRef=ae.required("optionsWrap"),this.inputRefInput=N(null),M(this,n,typeof MutationObserver<"u"&&new MutationObserver(c=>{for(var l of c)l&&(l.target.nodeName==="INPUT"||l.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new K(l.target)),f(this,n).disconnect())})),this.inputValue=N(""),this.prevInputValue=N(null),this.focusedOptionIndex=N(-1),this._isClearable=F(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=F(()=>f(this,e).nativeElement.classList.toString()),this.stretch=F(()=>this.selectClasses().includes("stretch")),this.small=F(()=>this.selectClasses().includes("small")),this.placeholderText=F(()=>{let c=this.placeholder(),l=this.inputRefEl();return c||l?.placeholder||null}),this.selectedOptionValues=F(()=>{let c=this.selectedOptions(),l=this.value();return l?c.map(u=>E(this,i,J).call(this,u,l)):c}),this.filteredOptions=F(()=>{let c=this.options()||[],l=this.label(),u=this.value(),g=this.inlineSearch(),_=this.inputValue().toLowerCase(),T=E(this,i,kt).call(this,_);if(c.length<=0)return[];if(!g||_==="")return c;let $=c.filter(R=>{let Q=l?(E(this,i,J).call(this,R,l)??"").toString().toLowerCase():(R??"").toString().toLowerCase(),te=((u?E(this,i,J).call(this,R,u):R)??"").toString().toLowerCase(),de=T.test(Q),we=T.test(te);return de||we}).map(R=>{let Q=l?(E(this,i,J).call(this,R,l)??"").toString().toLowerCase():(R??"").toString().toLowerCase(),te=((u?E(this,i,J).call(this,R,u):R)??"").toString().toLowerCase(),de=E(this,i,et).call(this,Q,_),we=E(this,i,et).call(this,te,_);return{item:R,score:Math.max(de,we)}});return $.sort((R,Q)=>Q.score-R.score),$.map(R=>R.item)}),M(this,h,Ae()),this.inputRefEl=F(()=>{let c=this.inputRefInput();if(c===null)return;let l=c?c.nativeElement:null;return l?(l.autocomplete="off",l.setAttribute("role","combobox"),l.setAttribute("id",`combobox-${f(this,h)}`),l.setAttribute("aria-haspopup","listbox"),l.setAttribute("aria-owns","optionsWrapId"),E(this,i,It).call(this,l),l.addEventListener("focus",()=>{this.readonly()||this.open()}),l.addEventListener("input",u=>{let g=u.target.value,_=this.inputValue();g!==_&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(g),this.updateInputElValue())}),l.addEventListener("inputValueChanged",u=>{let g=u.detail.value,_=this.inputValue();if(g!==_){if(g===""){this.clear();return}this.setSelectedOptionsFromValue(g),this.setInputValueFromOptions(this.selectedOptions()),E(this,i,tt).call(this)}}),l):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=Y(()=>{let c=this.inputRefEl();if(!c)return;let l=this.getLabelAsSlug(this.filteredOptions()[this.focusedOptionIndex()]);l?c.setAttribute("aria-activedescendant",l):c.removeAttribute("aria-activedescendant")}),this.openAbortController=null,this.isOpenEffect=Y(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let l=this.inputRefEl(),g=this.asFreeText()?-1:0;if(!l)return;l.setAttribute("aria-expanded",this.isOpen().toString()),l.addEventListener("keydown",_=>{if((_.key==="Escape"||_.key==="Tab")&&(_.preventDefault(),this.close()),_.key==="Enter"&&(_.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,!0)),_.key==="ArrowDown"){_.preventDefault();let T=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(T>this.filteredOptions().length-1?g:T)}if(_.key==="ArrowUp"){_.preventDefault();let T=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(T<g?this.filteredOptions().length-1:T)}},{signal:this.openAbortController?.signal})}else{let l=this.inputRefEl();if(!l)return;l.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=Y(()=>{let c=this.inputValue();this._inputValue=c}),this.inputRefElEffect=Y(()=>{let c=this.inputRefEl();c&&c.value!==this._inputValue&&(this.disabled.set(c.disabled),this.setSelectedOptionsFromValue(c.value),this.setInputValueFromOptions(this.selectedOptions()))}),this.selectedLabels=F(()=>{let c=this.selectedOptions();return this.label()?c.map(u=>this.getLabel(u)).join(", "):c.join(", ")}),this.inputState=F(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=F(()=>this.inlineSearch()||this.lazySearch()),M(this,p,Y(()=>{if(this.selectMultiple()&&this.hasSearch())return;let c=this.selectedOptions(),l=this.value(),u=c.map(g=>l?E(this,i,J).call(this,g,l):g).join(",");this.inputValue.set(u)}))}ngOnInit(){this.setInitInput()}setInitInput(){let c=f(this,e).nativeElement.querySelector("input");if(c){this.inputRefInput.set(new K(c));return}let l=f(this,e).nativeElement.querySelector("textarea");if(l){this.inputRefInput.set(new K(l));return}typeof MutationObserver<"u"&&f(this,n).observe(f(this,e).nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(c){let l=this.options()||[],u=this.value(),g=this.selectMultiple(),_=c.toString().split(",");if(_.length===0){this.selectedOptions.set([]);return}let T=g?_:[_[0]],G=l.filter($=>{let R=u?E(this,i,J).call(this,$,u)?.toString():$?.toString();return R&&T.includes(R)});this.selectedOptions.set(g?G:[G[0]])}setInputValueFromOptions(c){let l=this.value();if(c.length===0){this.inputValue.set(""),this.updateInputElValue();return}let u=c.map(g=>l?E(this,i,J).call(this,g,l):g).join(",");u!==this.inputValue()&&(this.inputValue.set(u),this.updateInputElValue())}getValue(c){let l=this.value();return l?E(this,i,J).call(this,c,l):c}getLabel(c){let l=this.label();return l?E(this,i,J).call(this,c,l):c}getLabelAsSlug(c){let l=this.getLabel(c);return!l||typeof l!="string"?"":l.replaceAll(" ","-")}toggleOptionByIndex(c,l,u=!1){let g=this.filteredOptions()[c];if(this.asFreeText()&&c===-1){let Q=this.computedFreeTextOption(),te=this.getValue(Q);if(!(this.validateFreeText()??(Me=>!0))(te))return;this.options.update(Me=>Me.findIndex(Rt=>this.getValue(Rt)===te)>-1?Me:(this.onAddNewFreeTextOption.emit(te),[Q,...Me])),c=0,g=Q}else if(!g){this.close();return}l&&l.stopPropagation();let _=this.selectMultiple(),T=this._isClearable(),G=this.value(),$=this.selectedOptionValues(),R=G?E(this,i,J).call(this,g,G):g;this.prevInputValue.set(null),f(this,o).set(null),this.selectedOptions.update(Q=>{let te=$.indexOf(R);if(te>-1){let de=[...Q.slice(0,te),...Q.slice(te+1)];return T||de.length>0?de:Q}else return this.focusedOptionIndex.set(c),_?[...Q,g]:[g]}),_?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromOptions(this.selectedOptions()),_&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(c,l){c.stopPropagation(),this.selectedOptions.update(u=>[...u.slice(0,l),...u.slice(l+1)]),this.setInputValueFromOptions(this.selectedOptions())}isSelected(c){let l=this.value(),u=this.filteredOptions()[c],g=l?E(this,i,J).call(this,u,l):u;return this.selectedOptionValues().indexOf(g)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):f(this,o).set(this.selectedOptions()),this.selectMultiple()||E(this,i,tt).call(this))}close(){this.isOpen.set(!1);let c=this.prevInputValue(),l=f(this,o).call(this);if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&c&&(this.inputValue.set(c),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&l!==null&&this.setInputValueFromOptions(l),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions())}clear(c){c?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let c=this.inputRefEl(),l=this.inputValue();c&&(c.value=l,c.dispatchEvent(new Event("input")))}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&f(this,n).disconnect()}};e=new WeakMap,o=new WeakMap,n=new WeakMap,i=new WeakSet,et=function(c,l){if(!l)return 0;let u=0,g=-1,_=0,T=!0;for(let G=0;G<l.length;G++){let $=l[G];if(c.length>g+1&&c[g+1]===$)u+=G===0?100:150,g++,_++;else{let R=c.indexOf($,g+1);if(G>0&&(T=!1),R===-1)return 0;u+=100,g=R,_++}}return T&&l.length===_&&(u+=1e3),u+=_*20,u},h=new WeakMap,p=new WeakMap,tt=function(){let c=this.selectedOptionValues()[0],l=this.value();if(c){let u=this.filteredOptions().findIndex(g=>l?E(this,i,J).call(this,g,l)===c:g===c);this.focusedOptionIndex.set(u)}else this.focusedOptionIndex.set(-1)},J=function(c,l){return l.split(".").reduce((u,g)=>u?.[g],c)},It=function(c){Object.defineProperty(c,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(c),"value").get.call(this)},set(l){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(c),"value").set.call(this,l);let g=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:l}});return this.dispatchEvent(g),l}})},kt=function(c){let l=(c??"").toLowerCase(),u="^";for(let g of l)u+=".*"+E(this,i,Nt).call(this,g);return u+=".*$",new RegExp(u,"i")},Nt=function(c){return c.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")},m.\u0275fac=function(l){return new(l||m)},m.\u0275cmp=L({type:m,selectors:[["sh-select"]],contentQueries:function(l,u,g){l&1&&ft(g,u.inlineTemplate,Ie,5),l&2&&ce()},viewQuery:function(l,u){l&1&&se(u.optionsWrapRef,di,5),l&2&&ce()},hostVars:2,hostBindings:function(l,u){l&2&&z("multiple",u.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:ui,decls:33,vars:25,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["id","optionsWrapId","role","listbox",1,"ship-options"],["title",""],[1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click","id"],[3,"class","active"]],template:function(l,u){if(l&1){let g=ie();W(pi),Qe(0)(1)(2)(3)(4)(5)(6),x(7,"sh-popover",2,0),Ue("isOpenChange",function(T){return H(g),$e(u.isOpen,T)||(u.isOpen=T),j(T)}),X("closed",function(){return H(g),j(u.close())}),x(9,"sh-form-field",3),X("click",function(){return H(g),j(u.open())}),y(10,0,["ngProjectAs","label",5,["label"]]),y(11,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),y(12,2,["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]]),x(13,"div",4)(14,"div",5),P(15,fi,1,1)(16,Ei,2,0)(17,Ii,2,1),y(18,3),y(19,4),I()(),P(20,ki,2,0,"sh-icon",6)(21,Ni,1,0,"sh-spinner",7)(22,Ri,2,0,"sh-icon",6)(23,Vi,2,0,"sh-icon",6)(24,Pi,2,0,"sh-icon",6)(25,Ai,2,0,"sh-icon",6)(26,Li,2,0,"sh-icon",6),I(),x(27,"div",8,1),P(29,Ui,3,3),P(30,Qi,2,1,"p",9),We(31,Zi,4,8,"li",10,Be),I()()}if(l&2){re(u.placeholderTemplate());let g=u.optionTemplate();b(),re(u.freeTextOptionTemplate());let _=u.selectedOptionTemplate(),T=u.inlineTemplate();b();let G=re(u.selectedOptions()),$=u.inputState();b(),re(_||g||T),b(),re(g||T),b();let R=re(!u.asText()&&u.selectMultiple());b();let Q=re(u.isOpen()&&u.hasSearch()&&(R||u.inputValue().length>-1));b(),ze("isOpen",u.isOpen),oe("disableOpenByClick",!0)("options",Ye(24,hi)),b(2),z("stretch",u.stretch())("small",u.small())("readonly",u.readonly()||u.disabled()),b(4),z("show-search-text",Q),b(),z("is-selected",$==="selected"),b(),A(u.asFreeText()&&u.inputValue().length>0&&!u.isOpen()?15:G.length>0?16:Q?-1:17),b(5),A($==="closed"?20:$==="loading"?21:$==="open-searching"?22:$==="searching"?23:$==="selected"&&u._isClearable()?24:$==="selected"&&!u._isClearable()?25:26),b(9),A(u.asFreeText()?29:-1),b(),A(u.optionTitle()&&u.filteredOptions().length>0?30:-1),b(),qe(u.filteredOptions())}},dependencies:[Ct,bt,ot,De,Cn,xn,_n,bn],encapsulation:2,changeDetection:0});let t=m;return t})();function On(t){let e=V(K),o=V(Te),n=N(!1),i=typeof MutationObserver<"u"&&new MutationObserver(s=>{s.forEach(h=>{h.type==="attributes"&&h.attributeName==="class"&&n.set(e.nativeElement.classList.contains(t))})});return ct(e.nativeElement,()=>{i&&i.observe(e.nativeElement,{attributes:!0}),n.set(e.nativeElement.classList.contains(t))}),o.onDestroy(()=>{i&&i.disconnect()}),n}var lo=(()=>{var e,o,n,i,Ee;let h=class h{constructor(){O(this,i);O(this,e);O(this,o);O(this,n);M(this,e,V(K)),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=w(!1),this.isOpen=Z(!1),this.isOverlay=On("overlay"),M(this,o,f(this,e).nativeElement.parentElement),M(this,n,f(this,o).getBoundingClientRect&&f(this,o).getBoundingClientRect()),this.dragImageElement=ae.required("dragImageElement"),this.dragIsEnding=N(!1),this.dragIsOnScreen=N(!0),this.isDragging=N(!1),this.dragPositionX=N(0),this.dragActualPositionX=F(()=>{let a=this.dragPositionX(),r=280,d=100,C=.008,v=r/2,m=v-d/2,S=v+d/2;if(a>S){let c=a-S,u=(r-S)*(1-Math.exp(-C*c));return S+u}else if(a<m){let c=m-a,u=m*(1-Math.exp(-C*c));return m-u}return a}),this.draggingStyle=F(()=>this.isOverlay()?this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)":null),this.draggingEffect=Y(()=>{typeof document>"u"||(this.isDragging()?document.body.classList.add("dragging"):document.body.classList.remove("dragging"))})}drop(a){a.stopPropagation(),E(this,i,Ee).call(this,a.clientX-f(this,n).left)}dragEnd(a){a.clientX-f(this,n).left<0&&E(this,i,Ee).call(this,0),a.clientX-f(this,n).left>this.openWidthTreshold&&E(this,i,Ee).call(this,this.openWidthTreshold)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragStart(a){a.stopPropagation(),M(this,n,f(this,o).getBoundingClientRect()),this.isDragging.set(!0)}drag(a){a.stopPropagation(),this.isDragging()&&(a.clientX!==0||a.clientY!==0)&&this.dragPositionX.set(a.clientX-f(this,n).left)}touchStart(a){a.stopPropagation(),this.isDragging.set(!0),M(this,n,f(this,o).getBoundingClientRect()),this.dragPositionX.set(0)}touchMove(a){a.stopPropagation(),this.isDragging()&&this.dragPositionX.set(a.touches[0].clientX-f(this,n).left)}touchEnd(a){a.stopPropagation(),E(this,i,Ee).call(this,a.changedTouches[0].clientX-f(this,n).left)}touchCancel(a){a.stopPropagation(),this.isDragging.set(!1)}};e=new WeakMap,o=new WeakMap,n=new WeakMap,i=new WeakSet,Ee=function(a){this.isDragging.set(!1),a>=this.openWidthTreshold?this.isOpen.set(!0):this.isOpen.set(!1)},h.\u0275fac=function(r){return new(r||h)},h.\u0275cmp=L({type:h,selectors:[["sh-sidenav"]],viewQuery:function(r,d){r&1&&se(d.dragImageElement,Ji,5),r&2&&ce()},hostVars:6,hostBindings:function(r,d){r&2&&z("open",d.isOpen())("closed",!d.isOpen())("is-dragging",d.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:tn,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(r,d){r&1&&(W(en),P(0,nn,2,0,"div",1),P(1,on,1,0,"div",2),B(2,"div",3),y(3),q(),B(4,"div",4),P(5,sn,1,0,"div",5),B(6,"div",6),y(7,1),q(),B(8,"main"),y(9,2),q()()),r&2&&(A(d.isOverlay()?0:-1),b(),A(d.isOverlay()&&d.isDragging()?1:-1),b(3),ne("transform",d.draggingStyle()),b(),A(d.isOverlay()&&!d.disableDrag()?5:-1))},encapsulation:2,changeDetection:0});let t=h;return t})();var co=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-stepper"]],ngContentSelectors:ee,decls:1,vars:0,template:function(i,s){i&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})();var po=(()=>{var e;let o=class o{constructor(){O(this,e);M(this,e,V(En)),this.shSort=w(),this.sortAsc=F(()=>{let i=f(this,e).sortByColumn(),s=this.shSort();return!i||!s?!1:i===s}),this.sortDesc=F(()=>{let i=f(this,e).sortByColumn(),s=this.shSort();return!i||!s?!1:i===`-${s}`})}toggleSort(){let i=this.shSort();i&&f(this,e).toggleSort(i)}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275dir=ke({type:o,selectors:[["","shSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(s,h){s&1&&X("mousedown",function(){return h.toggleSort()}),s&2&&z("sort-asc",h.sortAsc())("sort-desc",h.sortDesc())},inputs:{shSort:[1,"shSort"]}});let t=o;return t})();var Se=1.5,En=(()=>{var e,o,n,i,s,Pe;let p=class p{constructor(){O(this,s);O(this,e);O(this,o);O(this,n);O(this,i);M(this,e,V(K)),M(this,o,V(nt,{optional:!0})),this.loading=w(!1),this.data=w([]),this.dataChange=ue(),this.sortByColumn=Z(null),this.tbody=ae("tbody"),this.columns=Ot(this.tbody,["tr:first-child th"]),this.class=N(f(this,o)?.tableType??"default"),this.resizing=N(!1),this.sizeTrigger=N(!0),M(this,n,null),M(this,i,N(!1)),this.scrollXState=N(-1),this.scrollYState=N(-1),this.canScrollX=N(!1),this.canScrollY=N(!1),this.columnSizes=F(()=>{this.sizeTrigger();let r=this.columns.signal();return r.reduce((d,C,v)=>{let m=C,S=m.getAttribute("size"),c=v===r.length-1;return S?`${d} ${S}`:m.classList.contains("sticky")||m.classList.contains("sticky-end")?`${d} min-content`:c?`${d} 1fr`:`${d} 1fr`},"")}),this.e=Y(()=>{let r=this.sortByColumn();if(r===null)return f(this,i).call(this)||(M(this,n,this.data()),f(this,i).set(!0)),this.dataChange.emit(structuredClone(f(this,n)));let d=r.startsWith("-")?r.slice(1):r,C=r.startsWith("-"),v=this.data().sort((m,S)=>{let c=m[d],l=S[d],u=0;return typeof c=="number"&&typeof l=="number"&&(u=c-l),c instanceof Date&&l instanceof Date&&(u=c.getTime()-l.getTime()),typeof c=="string"&&typeof l=="string"&&(u=c.localeCompare(l,void 0,{sensitivity:"base"})),C?-u:u});this.dataChange.emit(v)})}updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){E(this,s,Pe).call(this)}onResize(r){E(this,s,Pe).call(this)}ngAfterViewInit(){queueMicrotask(()=>E(this,s,Pe).call(this))}toggleSort(r){let d=this.sortByColumn(),C=d===r?`-${r}`:d===`-${r}`?null:r;this.sortByColumn.set(C)}};e=new WeakMap,o=new WeakMap,n=new WeakMap,i=new WeakMap,s=new WeakSet,Pe=function(){let r=f(this,e).nativeElement,d=-1,C=-1,v=r.scrollWidth>r.clientWidth+Se;if(v){let S=r.scrollLeft<=Se;r.scrollWidth-(r.scrollLeft+r.clientWidth)<Se?d=1:S||(d=0)}this.scrollXState.set(d),this.canScrollX.set(v);let m=r.scrollHeight>r.clientHeight+Se;if(m){let S=r.scrollTop<=Se;r.scrollHeight-(r.scrollTop+r.clientHeight)<Se?C=1:S||(C=0)}this.scrollYState.set(C),this.canScrollY.set(m)},p.\u0275fac=function(d){return new(d||p)},p.\u0275cmp=L({type:p,selectors:[["sh-table"]],viewQuery:function(d,C){d&1&&se(C.tbody,rn,5),d&2&&ce()},hostVars:18,hostBindings:function(d,C){d&1&&X("scroll",function(){return C.onScroll()})("resize",function(m){return C.onResize(m)},pt),d&2&&(ve(C.class()),ne("grid-template-columns",C.columnSizes()),z("resizing",C.resizing())("can-scroll-x",C.canScrollX())("can-scroll-y",C.canScrollY())("scrolled-x",C.scrollXState()>=0)("scrolled-x-end",C.scrollXState()===1)("scrolled-y",C.scrollYState()>=0)("scrolled-y-end",C.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:ln,decls:5,vars:2,consts:[["tbody",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(d,C){d&1&&(W(an),P(0,cn,1,0,"sh-progress-bar",1),x(1,"tbody",null,0),y(3),I(),P(4,dn,2,0,"div",2)),d&2&&(A(C.loading()?0:-1),b(4),A(C.loading()?-1:4))},dependencies:[yn],encapsulation:2,changeDetection:0});let t=p;return t})(),uo=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-tabs"]],ngContentSelectors:ee,decls:1,vars:0,template:function(i,s){i&1&&(W(),y(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),ho=(()=>{let e=class e{constructor(){this.isActive=Z(!1),this.disallowToggle=w(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-toggle-card"]],hostVars:2,hostBindings:function(i,s){i&2&&z("active",s.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:un,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(i,s){i&1&&(W(pn),x(0,"h3",0),X("click",function(){return s.disallowToggle()||s.toggle()}),y(1,0,null,hn,1,0),P(3,fn,2,0,"sh-icon",1),I(),x(4,"div",2)(5,"div",3),y(6,1),I()()),i&2&&(b(3),A(s.disallowToggle()?-1:3))},dependencies:[De],encapsulation:2,changeDetection:0});let t=e;return t})(),fo=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=L({type:e,selectors:[["sh-toggle"]],ngContentSelectors:ee,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(i,s){i&1&&(W(),B(0,"div",0),_e(1,"div",1),q(),y(2))},encapsulation:2,changeDetection:0});let t=e;return t})();var go=(()=>{let e=class e{constructor(){this.filesOver=N(!1),this.filesDropped=ue()}onDragOver(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!0)}onDragLeave(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!1)}ondrop(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!1);let i=n.dataTransfer?.files;i&&i.length>0&&this.filesDropped.emit(i)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ke({type:e,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(i,s){i&1&&X("dragover",function(p){return s.onDragOver(p)})("dragleave",function(p){return s.onDragLeave(p)})("drop",function(p){return s.ondrop(p)}),i&2&&z("filesover",s.filesOver())},outputs:{filesDropped:"filesDropped"}});let t=e;return t})();var wn=(()=>{var e,o,n;let i=class i{constructor(){O(this,e);O(this,o);O(this,n);this.positionAnchorName=w.required(),this.anchorEl=w.required(),this.isOpen=w(!1),M(this,e,V(K)),M(this,o,V(be)),M(this,n,null),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc"),this.isBelow=N(!1),this.openEffect=Y(()=>{this.isOpen()?setTimeout(()=>{f(this,e).nativeElement.showPopover(),this.calculateTooltipPosition()}):f(this,e).nativeElement.hidePopover()}),this.calculateTooltipPosition=()=>{if(!this.anchorEl())return;let h=this.anchorEl().nativeElement.getBoundingClientRect(),p=f(this,e).nativeElement,a=p.getBoundingClientRect();if(a.width===0&&a.height===0)return;let r=h.top-a.height<0;if(this.isBelow.set(r),!this.SUPPORTS_ANCHOR){let d=h.top-a.height,C=h.left+h.width/2-a.width/2;r&&(d=h.top+h.height),C+a.width>window?.innerWidth&&(C=h.right-a.width/2),C<0&&(C=-(a.width/2)),f(this,o).setStyle(p,"left",`${C}px`),f(this,o).setStyle(p,"top",`${d}px`),f(this,o).setStyle(p,"position","fixed")}},je(()=>{M(this,n,new AbortController);let h={signal:f(this,n).signal,capture:!0};window?.addEventListener("scroll",this.calculateTooltipPosition,h),window?.addEventListener("resize",this.calculateTooltipPosition,{signal:f(this,n).signal}),setTimeout(()=>this.calculateTooltipPosition())})}ngOnDestroy(){f(this,n)?.abort()}};e=new WeakMap,o=new WeakMap,n=new WeakMap,i.\u0275fac=function(p){return new(p||i)},i.\u0275cmp=L({type:i,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(p,a){p&2&&(ye("popover","auto"),ne("position-anchor",a.positionAnchorName()),z("below",a.isBelow()))},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"]},ngContentSelectors:ee,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(p,a){p&1&&(W(),B(0,"div",0),y(1),q())},encapsulation:2});let t=i;return t})(),mo=(()=>{var e,o,n,i,s,h;let p=class p{constructor(){O(this,e);O(this,o);O(this,n);O(this,i);O(this,s);O(this,h);this.shTooltip=w.required(),M(this,e,V(K)),M(this,o,V(ut)),M(this,n,V(lt)),M(this,i,V(be)),M(this,s,null),M(this,h,null),this.anchorName=`--${Ae()}`,this.isOpen=N(!1)}onMouseEnter(){this.cleanupTooltip(),queueMicrotask(()=>this.showTooltip())}ngOnDestroy(){this.cleanupTooltip()}showTooltip(){if(f(this,s)||!this.shTooltip())return;this.isOpen.set(!0);let r,d=this.shTooltip();if(typeof d=="string")r=[[f(this,i).createText(d)]];else if(d instanceof Ie)M(this,h,d.createEmbeddedView({})),f(this,h).detectChanges(),r=[f(this,h).rootNodes];else return;M(this,s,f(this,o).createComponent(wn,{environmentInjector:f(this,n),projectableNodes:r})),f(this,s).setInput("positionAnchorName",this.anchorName),f(this,s).setInput("anchorEl",f(this,e)),f(this,s).setInput("isOpen",this.isOpen),f(this,s).changeDetectorRef.detectChanges()}cleanupTooltip(){this.isOpen.set(!1),f(this,s)&&(f(this,s).destroy(),M(this,s,null)),f(this,h)&&(f(this,h).destroy(),M(this,h,null))}};e=new WeakMap,o=new WeakMap,n=new WeakMap,i=new WeakMap,s=new WeakMap,h=new WeakMap,p.\u0275fac=function(d){return new(d||p)},p.\u0275dir=ke({type:p,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(d,C){d&1&&X("mouseenter",function(){return C.onMouseEnter()}),d&2&&(ne("anchor-name",C.anchorName),z("active",C.isOpen()))},inputs:{shTooltip:[1,"shTooltip"]}});let t=p;return t})();export{De as a,Gn as b,Kn as c,vn as d,Zn as e,Jn as f,eo as g,to as h,Cn as i,_n as j,bn as k,ot as l,io as m,no as n,oo as o,yn as p,so as q,ro as r,xn as s,ao as t,lo as u,co as v,po as w,En as x,uo as y,ho as z,fo as A,go as B,mo as C};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-TDKBGGNK.js";import"./chunk-RUXCS4ZK.js";import"./chunk-FPPZ4BUR.js";import"./chunk-6OPAGPKF.js";import"./chunk-HNWRQABR.js";import"./chunk-EUDKD2JW.js";export{a as RelativeTimePipe};