@sync-in/server 1.6.1 → 1.8.0
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.
- package/CHANGELOG.md +169 -55
- package/environment/environment.dist.yaml +14 -5
- package/migrations/0003_giant_luckman.sql +6 -0
- package/migrations/meta/0003_snapshot.json +2463 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +16 -15
- package/server/app.bootstrap.js +1 -0
- package/server/app.bootstrap.js.map +1 -1
- package/server/app.constants.js +0 -4
- package/server/app.constants.js.map +1 -1
- package/server/app.service.js +7 -6
- package/server/app.service.js.map +1 -1
- package/server/applications/files/constants/only-office.js +12 -0
- package/server/applications/files/constants/only-office.js.map +1 -1
- package/server/applications/files/files.config.js +5 -0
- package/server/applications/files/files.config.js.map +1 -1
- package/server/applications/files/services/files-content-manager.service.js +6 -6
- package/server/applications/files/services/files-content-manager.service.js.map +1 -1
- package/server/applications/files/services/files-manager.service.js +4 -4
- package/server/applications/files/services/files-manager.service.js.map +1 -1
- package/server/applications/files/services/files-methods.service.js +5 -3
- package/server/applications/files/services/files-methods.service.js.map +1 -1
- package/server/applications/files/services/files-only-office-manager.service.js +2 -2
- package/server/applications/files/services/files-only-office-manager.service.js.map +1 -1
- package/server/applications/files/services/files-parser.service.js +6 -3
- package/server/applications/files/services/files-parser.service.js.map +1 -1
- package/server/applications/files/services/files-scheduler.service.js +51 -3
- package/server/applications/files/services/files-scheduler.service.js.map +1 -1
- package/server/applications/files/services/files-search-manager.service.js +4 -0
- package/server/applications/files/services/files-search-manager.service.js.map +1 -1
- package/server/applications/files/utils/doc-textify/adapters/pdf.js +10 -1
- package/server/applications/files/utils/doc-textify/adapters/pdf.js.map +1 -1
- package/server/applications/notifications/i18n/de.js +56 -0
- package/server/applications/notifications/i18n/de.js.map +1 -0
- package/server/applications/notifications/i18n/es.js +52 -0
- package/server/applications/notifications/i18n/es.js.map +1 -0
- package/server/applications/notifications/i18n/hi.js +52 -0
- package/server/applications/notifications/i18n/hi.js.map +1 -0
- package/server/applications/notifications/i18n/index.js +73 -8
- package/server/applications/notifications/i18n/index.js.map +1 -1
- package/server/applications/notifications/i18n/it.js +52 -0
- package/server/applications/notifications/i18n/it.js.map +1 -0
- package/server/applications/notifications/i18n/ja.js +52 -0
- package/server/applications/notifications/i18n/ja.js.map +1 -0
- package/server/applications/notifications/i18n/ko.js +52 -0
- package/server/applications/notifications/i18n/ko.js.map +1 -0
- package/server/applications/notifications/i18n/pl.js +52 -0
- package/server/applications/notifications/i18n/pl.js.map +1 -0
- package/server/applications/notifications/i18n/pt.js +52 -0
- package/server/applications/notifications/i18n/pt.js.map +1 -0
- package/server/applications/notifications/i18n/pt_br.js +52 -0
- package/server/applications/notifications/i18n/pt_br.js.map +1 -0
- package/server/applications/notifications/i18n/ru.js +52 -0
- package/server/applications/notifications/i18n/ru.js.map +1 -0
- package/server/applications/notifications/i18n/tr.js +52 -0
- package/server/applications/notifications/i18n/tr.js.map +1 -0
- package/server/applications/notifications/i18n/zh.js +52 -0
- package/server/applications/notifications/i18n/zh.js.map +1 -0
- package/server/applications/notifications/mails/models.js +6 -7
- package/server/applications/notifications/mails/models.js.map +1 -1
- package/server/applications/notifications/services/notifications-manager.service.js.map +1 -1
- package/server/applications/shares/dto/create-or-update-share.dto.js +11 -0
- package/server/applications/shares/dto/create-or-update-share.dto.js.map +1 -1
- package/server/applications/shares/interfaces/share-props.interface.js.map +1 -1
- package/server/applications/shares/schemas/share.interface.js.map +1 -1
- package/server/applications/shares/schemas/shares.schema.js +9 -0
- package/server/applications/shares/schemas/shares.schema.js.map +1 -1
- package/server/applications/shares/services/shares-manager.service.js +46 -17
- package/server/applications/shares/services/shares-manager.service.js.map +1 -1
- package/server/applications/shares/services/shares-queries.service.js +24 -5
- package/server/applications/shares/services/shares-queries.service.js.map +1 -1
- package/server/applications/spaces/constants/cache.js +4 -0
- package/server/applications/spaces/constants/cache.js.map +1 -1
- package/server/applications/spaces/dto/create-or-update-space.dto.js +5 -0
- package/server/applications/spaces/dto/create-or-update-space.dto.js.map +1 -1
- package/server/applications/spaces/guards/space.guard.js +3 -3
- package/server/applications/spaces/guards/space.guard.js.map +1 -1
- package/server/applications/spaces/models/space-props.model.js.map +1 -1
- package/server/applications/spaces/models/space.model.js.map +1 -1
- package/server/applications/spaces/schemas/space.interface.js.map +1 -1
- package/server/applications/spaces/schemas/spaces.schema.js +1 -0
- package/server/applications/spaces/schemas/spaces.schema.js.map +1 -1
- package/server/applications/spaces/services/spaces-browser.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-manager.service.js +34 -31
- package/server/applications/spaces/services/spaces-manager.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-queries.service.js +23 -7
- package/server/applications/spaces/services/spaces-queries.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-scheduler.service.js +21 -20
- package/server/applications/spaces/services/spaces-scheduler.service.js.map +1 -1
- package/server/applications/spaces/spaces.controller.js +4 -2
- package/server/applications/spaces/spaces.controller.js.map +1 -1
- package/server/applications/spaces/utils/paths.js +14 -16
- package/server/applications/spaces/utils/paths.js.map +1 -1
- package/server/applications/sync/services/sync-manager.service.js +4 -3
- package/server/applications/sync/services/sync-manager.service.js.map +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.js +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.js.map +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.spec.js +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.spec.js.map +1 -1
- package/server/applications/sync/sync.controller.js +2 -1
- package/server/applications/sync/sync.controller.js.map +1 -1
- package/server/applications/users/constants/routes.js +5 -0
- package/server/applications/users/constants/routes.js.map +1 -1
- package/server/applications/users/constants/user.js +0 -16
- package/server/applications/users/constants/user.js.map +1 -1
- package/server/applications/users/dto/user-properties.dto.js +10 -0
- package/server/applications/users/dto/user-properties.dto.js.map +1 -1
- package/server/applications/users/models/user.model.js.map +1 -1
- package/server/applications/users/schemas/user.interface.js.map +1 -1
- package/server/applications/users/schemas/users.schema.js +3 -2
- package/server/applications/users/schemas/users.schema.js.map +1 -1
- package/server/applications/users/services/admin-users-manager.service.js +1 -0
- package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
- package/server/applications/users/services/admin-users-manager.service.spec.js +2 -1
- package/server/applications/users/services/admin-users-manager.service.spec.js.map +1 -1
- package/server/applications/users/services/users-manager.service.js +8 -2
- package/server/applications/users/services/users-manager.service.js.map +1 -1
- package/server/applications/users/services/users-manager.service.spec.js +1 -0
- package/server/applications/users/services/users-manager.service.spec.js.map +1 -1
- package/server/applications/users/services/users-queries.service.js +18 -4
- package/server/applications/users/services/users-queries.service.js.map +1 -1
- package/server/applications/users/users.controller.js +15 -0
- package/server/applications/users/users.controller.js.map +1 -1
- package/server/applications/users/utils/test.js +2 -2
- package/server/applications/users/utils/test.js.map +1 -1
- package/server/applications/webdav/constants/routes.js +2 -2
- package/server/applications/webdav/constants/routes.js.map +1 -1
- package/server/applications/webdav/constants/webdav.js +2 -2
- package/server/applications/webdav/constants/webdav.js.map +1 -1
- package/server/applications/webdav/filters/webdav.filter.js +2 -2
- package/server/applications/webdav/filters/webdav.filter.js.map +1 -1
- package/server/applications/webdav/filters/webdav.filter.spec.js +2 -2
- package/server/applications/webdav/filters/webdav.filter.spec.js.map +1 -1
- package/server/applications/webdav/services/webdav-methods.service.js +3 -2
- package/server/applications/webdav/services/webdav-methods.service.js.map +1 -1
- package/server/applications/webdav/utils/webdav.js +1 -2
- package/server/applications/webdav/utils/webdav.js.map +1 -1
- package/server/authentication/auth.config.js +17 -2
- package/server/authentication/auth.config.js.map +1 -1
- package/server/authentication/constants/auth-ldap.js +2 -1
- package/server/authentication/constants/auth-ldap.js.map +1 -1
- package/server/authentication/guards/auth-basic.strategy.js +4 -2
- package/server/authentication/guards/auth-basic.strategy.js.map +1 -1
- package/server/authentication/guards/auth-local.strategy.js +2 -0
- package/server/authentication/guards/auth-local.strategy.js.map +1 -1
- package/server/authentication/services/auth-methods/auth-method-ldap.service.js +75 -32
- package/server/authentication/services/auth-methods/auth-method-ldap.service.js.map +1 -1
- package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js +2 -1
- package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js.map +1 -1
- package/server/common/i18n.js +52 -0
- package/server/common/i18n.js.map +1 -0
- package/server/common/image.js +49 -33
- package/server/common/image.js.map +1 -1
- package/server/common/interfaces.js.map +1 -1
- package/server/common/shared.js +5 -2
- package/server/common/shared.js.map +1 -1
- package/server/configuration/config.validation.js +3 -3
- package/server/configuration/config.validation.js.map +1 -1
- package/server/infrastructure/cache/adapters/mysql-cache.adapter.js +8 -6
- package/server/infrastructure/cache/adapters/mysql-cache.adapter.js.map +1 -1
- package/server/infrastructure/cache/adapters/redis-cache.adapter.js +22 -17
- package/server/infrastructure/cache/adapters/redis-cache.adapter.js.map +1 -1
- package/server/infrastructure/cache/cache.e2e-spec.js +1 -0
- package/server/infrastructure/cache/cache.e2e-spec.js.map +1 -1
- package/server/infrastructure/cache/cache.module.js +1 -14
- package/server/infrastructure/cache/cache.module.js.map +1 -1
- package/server/infrastructure/cache/services/cache.service.js.map +1 -1
- package/server/infrastructure/database/database.module.js +20 -1
- package/server/infrastructure/database/database.module.js.map +1 -1
- package/server/infrastructure/database/utils.js +48 -0
- package/server/infrastructure/database/utils.js.map +1 -1
- package/server/infrastructure/scheduler/scheduler.module.js +1 -1
- package/server/infrastructure/scheduler/scheduler.module.js.map +1 -1
- package/server/infrastructure/websocket/adapters/cluster.adapter.js +1 -3
- package/server/infrastructure/websocket/adapters/cluster.adapter.js.map +1 -1
- package/static/3rdpartylicenses.txt +137 -137
- package/static/chunk-2KLC4T2Z.js +1 -0
- package/static/chunk-373XVRXW.js +1 -0
- package/static/chunk-3GMLWAFZ.js +1 -0
- package/static/chunk-3XVM35O2.js +1 -0
- package/static/chunk-3YVRP3VM.js +2 -0
- package/static/chunk-5NMSIIQB.js +1 -0
- package/static/chunk-AF24EYXU.js +1 -0
- package/static/chunk-AKQVEHO6.js +2 -0
- package/static/{chunk-LUWQFIWR.js → chunk-AY2SZ3G6.js} +1 -1
- package/static/chunk-BCVX464U.js +2 -0
- package/static/{chunk-IPAC4VAF.js → chunk-BIKLW4YS.js} +1 -1
- package/static/chunk-C36MW4ME.js +562 -0
- package/static/chunk-CHJ64RJM.js +1 -0
- package/static/chunk-DKSEQTMX.js +1 -0
- package/static/chunk-DM4NXKEP.js +1 -0
- package/static/chunk-DPUVSXRB.js +1 -0
- package/static/chunk-DSWEWLXJ.js +1 -0
- package/static/chunk-FJE6BOFL.js +1 -0
- package/static/chunk-FZ3JPGYZ.js +1 -0
- package/static/chunk-GUGNR5TF.js +3 -0
- package/static/chunk-H6NE33VX.js +1 -0
- package/static/{chunk-S75P2FFI.js → chunk-HAS5ZOTR.js} +1 -1
- package/static/chunk-HNQRZALS.js +1 -0
- package/static/chunk-JPT5WEAT.js +1 -0
- package/static/{chunk-ZQQPUYLU.js → chunk-JSWCNGXJ.js} +1 -1
- package/static/chunk-KFJIQIGR.js +1 -0
- package/static/chunk-LNTUR3GU.js +1 -0
- package/static/chunk-LVM4QB22.js +1 -0
- package/static/chunk-M3XVNQZQ.js +1 -0
- package/static/{chunk-AWQ2YTVC.js → chunk-MFLIJH6T.js} +1 -1
- package/static/{chunk-IQOALFYU.js → chunk-MSUHTBB2.js} +1 -1
- package/static/chunk-N3U6637P.js +1 -0
- package/static/chunk-NNV4OXSB.js +1 -0
- package/static/chunk-NO2LTNW3.js +1 -0
- package/static/chunk-OOGP4WSH.js +2 -0
- package/static/chunk-PB4AIT7O.js +1 -0
- package/static/chunk-PCWDQPOM.js +2 -0
- package/static/chunk-PGZZP5W3.js +1 -0
- package/static/chunk-PVDHBQRM.js +1 -0
- package/static/chunk-Q5KM7LTX.js +1 -0
- package/static/chunk-QHC6ZPQ4.js +1 -0
- package/static/chunk-QO6BTONN.js +1 -0
- package/static/chunk-QZU2S5CV.js +1 -0
- package/static/chunk-SBZ572Q4.js +2 -0
- package/static/chunk-SHIVUDP3.js +1 -0
- package/static/chunk-SLHTEGRU.js +1 -0
- package/static/{chunk-SH5EVL4E.js → chunk-SSFF27P2.js} +1 -1
- package/static/chunk-TPYBFZS5.js +1 -0
- package/static/chunk-UEQCWMXD.js +1 -0
- package/static/chunk-UG5DMXYO.js +1 -0
- package/static/chunk-UJPPR4MX.js +1 -0
- package/static/chunk-UNCPXHHT.js +1 -0
- package/static/chunk-URHTCJ7G.js +1 -0
- package/static/chunk-V3AT2BKP.js +1 -0
- package/static/chunk-VKK5BSLX.js +1 -0
- package/static/{chunk-7DN7ZAPU.js → chunk-VM4YX6Q7.js} +1 -1
- package/static/chunk-WJW7CT6G.js +27 -0
- package/static/{chunk-7ITZXYYJ.js → chunk-WLMNXRBS.js} +1 -1
- package/static/chunk-X5XGK6T7.js +4 -0
- package/static/chunk-YEKR5OPO.js +1 -0
- package/static/chunk-YW57T2PF.js +1 -0
- package/static/chunk-Z5J5F5SX.js +1 -0
- package/static/chunk-ZIJQRARU.js +1 -0
- package/static/chunk-ZPF2DSQV.js +1 -0
- package/static/chunk-ZTCRGJ6Y.js +7 -0
- package/static/index.html +2 -2
- package/static/main-VOL6OMJ5.js +9 -0
- package/static/scripts-WRDOQIU5.js +24 -0
- package/static/{styles-A5VYX3CE.css → styles-2C2UNCNB.css} +1 -1
- package/server/applications/spaces/interfaces/space-quota.interface.js +0 -10
- package/server/applications/spaces/interfaces/space-quota.interface.js.map +0 -1
- package/static/chunk-22EANI6R.js +0 -1
- package/static/chunk-27YQB3TE.js +0 -1
- package/static/chunk-2I4CUFUA.js +0 -1
- package/static/chunk-2MTM6SWN.js +0 -4
- package/static/chunk-34MKICK5.js +0 -27
- package/static/chunk-5O3DIUU3.js +0 -1
- package/static/chunk-6NMVZIIT.js +0 -1
- package/static/chunk-7FUM3JGM.js +0 -1
- package/static/chunk-7P27WBGC.js +0 -4
- package/static/chunk-ATP3BFHV.js +0 -562
- package/static/chunk-DSOE3FEP.js +0 -1
- package/static/chunk-EFKMBLRE.js +0 -1
- package/static/chunk-FUFKVHPU.js +0 -1
- package/static/chunk-HCDLWTMW.js +0 -7
- package/static/chunk-JASU3CIH.js +0 -1
- package/static/chunk-JQ5FTO2M.js +0 -1
- package/static/chunk-JUNZFADM.js +0 -1
- package/static/chunk-JXZCNFW7.js +0 -1
- package/static/chunk-LJUKI4SQ.js +0 -1
- package/static/chunk-ORMRCEGT.js +0 -1
- package/static/chunk-Q7D6RN4N.js +0 -1
- package/static/chunk-QJX6ITLW.js +0 -1
- package/static/chunk-QQ6UQQBR.js +0 -1
- package/static/chunk-RTRJ3KFH.js +0 -1
- package/static/chunk-S2HDY3OL.js +0 -1
- package/static/chunk-T3EYFSVZ.js +0 -1
- package/static/chunk-U34OZUZ7.js +0 -1
- package/static/chunk-Y7EH7G5K.js +0 -1
- package/static/main-7SQDDVMD.js +0 -9
- package/static/scripts-VZVAP2P4.js +0 -30
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as sa,b as ma,c as pa}from"./chunk-MFLIJH6T.js";import{B as ca,C as on,a as qo,b as _2,c as t1,d as Yo,e as d3,f as jo,g as Ko,h as Qo,i as Xo,j as Zo,k as tn,l as Jo,m as ea,n as ta,o as H1,p as ia,q as na,r as oa,s as aa,t as ra,u as R2,v as nn,w as E1,y as la}from"./chunk-WJW7CT6G.js";import{a as St}from"./chunk-JSWCNGXJ.js";import{a as f3}from"./chunk-AY2SZ3G6.js";import{a as zo,b as ji,c as Mo,d as Fo}from"./chunk-UEQCWMXD.js";import{a as ze}from"./chunk-TPYBFZS5.js";import{a as Nt,c as m3,d as Do}from"./chunk-ZTCRGJ6Y.js";import{a as d2}from"./chunk-MSUHTBB2.js";import{a as Ge,b as We,c as qe,d as Ki}from"./chunk-HAS5ZOTR.js";import{a as Lt,d as to,e as p2}from"./chunk-VM4YX6Q7.js";import{a as L1,b as Ao,c as No,g as B1,h as ko}from"./chunk-X5XGK6T7.js";import{a as V1,b as tt,c as m2,d as He,e as $e}from"./chunk-H6NE33VX.js";import{a as f2,b as Qi,c as Ho,d as Go,e as Wo}from"./chunk-V3AT2BKP.js";import{a as p3,g as $o}from"./chunk-VKK5BSLX.js";import{b as Ro,c as Ce,d as u2,e as Xi,f as Zi,g as Io,h as U1,i as Oo,j as Ji,k as Vo,m as en,n as Bo,o as Uo}from"./chunk-3XVM35O2.js";import{a as Lo}from"./chunk-BIKLW4YS.js";import{a as c3,b as Ne}from"./chunk-SHIVUDP3.js";import{a as w0,b as ci,c as qt,d as i1,e as Yt,f as z0,g as M0}from"./chunk-UJPPR4MX.js";import{a as P0,b as A0,c as N0,e as i3,f as jt,g as L0,h as k0,i as U0,j as go,k as bo,l as Yi,m as we,p as r1,q as c2}from"./chunk-HNQRZALS.js";import{$a as Hi,A as At,Ab as So,C as Xe,Ca as r3,D as Bi,Da as oo,E as x1,F as Ze,Fa as ao,Fb as et,G as W4,Gb as xo,H as ht,Ha as Je,Hb as vo,I as he,Ia as ro,Ib as Ue,Jb as o1,K as o3,Ka as r2,Kb as O,L as q4,La as so,M as Y4,Ma as y1,Mb as yo,N as j4,Na as lo,O as K4,Ob as To,P as Q4,Q as X4,Qb as wo,R as Z4,Ra as co,S as J4,Sa as kt,T as Ui,U as eo,Ua as mo,Ub as Eo,V as F2,Va as s2,W as io,Wa as s3,Wb as Po,X as a3,Z as D2,Za as re,a as a1,ab as po,b as Pe,bb as fo,cb as uo,e as E0,eb as se,f as t3,fb as $i,gb as Be,hb as v1,i as Et,ib as B,j as mi,jb as _o,k as N2,kb as l2,m as Pt,mb as Y,nb as le,ob as Ft,p as B0,pb as Ct,q as fi,qb as ho,r as w1,s as Zt,sb as Co,tb as Ae,u as H0,ub as Gi,v as $0,va as n2,vb as gt,w as G0,wa as o2,wb as Wi,xa as a2,xb as qi,ya as no,yb as L,z as L2}from"./chunk-GUGNR5TF.js";import{$ as J2,$a as E,$b as Ee,$d as oe,$e as Li,$f as G4,Ab as b,Ac as ri,Ad as O0,Ae as p4,Af as D4,Bc as _0,Bd as V0,Be as d4,Cc as h0,Cd as X,Da as Qn,Db as _,Dd as F,De as Pi,Df as t2,E as J1,Ed as ve,Ef as R4,Fb as c,Fc as Wt,Fd as W0,Fe as Ai,Ff as I4,G as X2,Ga as A2,Gc as si,Ge as f4,Gf as be,Ha as Q,Hd as q0,He as u4,Hf as ut,I as e0,Ic as ee,Id as Y0,Ie as _4,If as _t,Jb as s1,Jd as ui,Jf as O4,Ka as ni,Kb as l1,Kd as _i,Ke as h4,Kf as V4,L as M1,La as Re,Lb as c1,Lc as li,Ld as j0,M as t0,Mb as S1,Mc as C0,Md as K0,Me as C4,Mf as B4,Na as s,Nb as n1,Nc as g0,Nd as Q0,Ne as g4,O as Z2,Oa as a0,Ob as U,Oe as S4,Of as Ii,Pa as h1,Pb as M,Pc as S0,Pd as X0,Pe as x4,Pf as Oi,Qa as oi,Qb as m,Qc as x0,Qd as Z0,Rb as v,Rc as rt,Rd as J0,Re as v4,Sb as A,Sc as v0,Tb as Q1,Tc as y0,Td as hi,Te as Ni,U as i0,Ua as r0,Ub as m1,Uc as b0,Ue as ye,Uf as Te,Va as Ie,Vb as p1,Vc as T0,Vd as Ci,Ve as y4,Vf as i2,Wa as Mt,Wb as d1,Wd as gi,We as q1,Wf as U4,Xb as Xn,Xd as e4,Xe as pt,Xf as H4,Yb as I,Yc as n3,Yd as t4,Yf as $4,Z as E2,Zb as Qe,Zc as st,Ze as b4,_b as Zn,_c as O1,_d as i4,_e as dt,_f as Vi,aa as u1,ac as I1,ad as _e,ae as n4,af as T4,bb as s0,bc as xe,bf as ae,ca as Kn,cb as l0,cc as m0,cd as _1,ce as o4,cf as w4,da as W1,dd as lt,de as Si,dg as N,eb as V,ec as T,ee as xi,fc as J,fd as F0,ff as ki,g as X3,gc as z,ge as vi,gf as z4,gg as l3,ha as ei,hc as fe,hd as C1,he as a4,ia as x,ic as ue,id as ct,ie as yi,if as M4,jb as c0,jd as D0,je as bi,jf as Fi,ka as n0,kb as h,kc as p0,ke as Ti,kf as Ve,lb as C,ld as Kt,le as r4,lf as E4,mb as A1,mc as N1,md as Qt,me as s4,mf as Di,na as g,nc as Gt,nd as te,ne as wi,oa as S,ob as D,od as ie,oe as zi,of as Jt,p as M2,pa as o0,pb as R,pc as Oe,pd as ne,pf as P4,q as $t,qa as ti,qb as d,qd as R0,qe as Mi,rb as r,rc as d0,rd as pi,rf as A4,sb as l,sc as Jn,sd as di,sf as N4,t as Z3,tb as f,tf as ft,ua as ii,ud as Xt,uf as L4,v as de,vd as g1,vf as Ri,w as J3,wc as f0,wd as mt,we as l4,wf as k4,xc as ai,xd as q,xe as c4,xf as e2,yc as u0,ye as Ei,yf as F4,za as P2,zb as F1,zc as e3,zd as I0,ze as m4}from"./chunk-C36MW4ME.js";import{n as k2}from"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import{a as P1,b as Se,d as Q3,j as K1}from"./chunk-N3U6637P.js";var da=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-root"]],decls:1,vars:0,template:function(o,a){o&1&&f(0,"router-outlet")},dependencies:[qt],encapsulation:2});let i=n;return i})();function fa(i){return new u1(3e3,!1)}function j5(){return new u1(3100,!1)}function K5(){return new u1(3101,!1)}function Q5(i){return new u1(3001,!1)}function X5(i){return new u1(3003,!1)}function Z5(i){return new u1(3004,!1)}function _a(i,n){return new u1(3005,!1)}function ha(){return new u1(3006,!1)}function Ca(){return new u1(3007,!1)}function ga(i,n){return new u1(3008,!1)}function Sa(i){return new u1(3002,!1)}function xa(i,n,e,t,o){return new u1(3010,!1)}function va(){return new u1(3011,!1)}function ya(){return new u1(3012,!1)}function ba(){return new u1(3200,!1)}function Ta(){return new u1(3202,!1)}function wa(){return new u1(3013,!1)}function za(i){return new u1(3014,!1)}function Ma(i){return new u1(3015,!1)}function Ea(i){return new u1(3016,!1)}function Pa(i,n){return new u1(3404,!1)}function J5(i){return new u1(3502,!1)}function Aa(i){return new u1(3503,!1)}function Na(){return new u1(3300,!1)}function La(i){return new u1(3504,!1)}function ka(i){return new u1(3301,!1)}function Fa(i,n){return new u1(3302,!1)}function Da(i){return new u1(3303,!1)}function Ra(i,n){return new u1(3400,!1)}function Ia(i){return new u1(3401,!1)}function Oa(i){return new u1(3402,!1)}function Va(i,n){return new u1(3505,!1)}function it(i){switch(i.length){case 0:return new Et;case 1:return i[0];default:return new mi(i)}}function C3(i,n,e=new Map,t=new Map){let o=[],a=[],p=-1,u=null;if(n.forEach(y=>{let w=y.get("offset"),k=w==p,P=k&&u||new Map;y.forEach((j,G)=>{let W=G,e1=j;if(G!=="offset")switch(W=i.normalizePropertyName(W,o),e1){case N2:e1=e.get(G);break;case Pe:e1=t.get(G);break;default:e1=i.normalizeStyleValue(G,W,e1,o);break}P.set(W,e1)}),k||a.push(P),u=P,p=w}),o.length)throw J5(o);return a}function an(i,n,e,t){switch(n){case"start":i.onStart(()=>t(e&&u3(e,"start",i)));break;case"done":i.onDone(()=>t(e&&u3(e,"done",i)));break;case"destroy":i.onDestroy(()=>t(e&&u3(e,"destroy",i)));break}}function u3(i,n,e){let t=e.totalTime,o=!!e.disabled,a=rn(i.element,i.triggerName,i.fromState,i.toState,n||i.phaseName,t??i.totalTime,o),p=i._data;return p!=null&&(a._data=p),a}function rn(i,n,e,t,o="",a=0,p){return{element:i,triggerName:n,fromState:e,toState:t,phaseName:o,totalTime:a,disabled:!!p}}function ce(i,n,e){let t=i.get(n);return t||i.set(n,t=e),t}function g3(i){let n=i.indexOf(":"),e=i.substring(1,n),t=i.slice(n+1);return[e,t]}var es=typeof document>"u"?null:document.documentElement;function sn(i){let n=i.parentNode||i.host||null;return n===es?null:n}function ts(i){return i.substring(1,6)=="ebkit"}var Dt=null,ua=!1;function Ba(i){Dt||(Dt=is()||{},ua=Dt.style?"WebkitAppearance"in Dt.style:!1);let n=!0;return Dt.style&&!ts(i)&&(n=i in Dt.style,!n&&ua&&(n="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Dt.style)),n}function is(){return typeof document<"u"?document.body:null}function S3(i,n){for(;n;){if(n===i)return!0;n=sn(n)}return!1}function x3(i,n,e){if(e)return Array.from(i.querySelectorAll(n));let t=i.querySelector(n);return t?[t]:[]}var ns=1e3,v3="{{",os="}}",y3="ng-enter",ln="ng-leave",I2="ng-trigger",O2=".ng-trigger",b3="ng-animating",cn=".ng-animating";function Ye(i){if(typeof i=="number")return i;let n=i.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:_3(parseFloat(n[1]),n[2])}function _3(i,n){switch(n){case"s":return i*ns;default:return i}}function V2(i,n,e){return i.hasOwnProperty("duration")?i:rs(i,n,e)}var as=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function rs(i,n,e){let t,o=0,a="";if(typeof i=="string"){let p=i.match(as);if(p===null)return n.push(fa(i)),{duration:0,delay:0,easing:""};t=_3(parseFloat(p[1]),p[2]);let u=p[3];u!=null&&(o=_3(parseFloat(u),p[4]));let y=p[5];y&&(a=y)}else t=i;if(!e){let p=!1,u=n.length;t<0&&(n.push(j5()),p=!0),o<0&&(n.push(K5()),p=!0),p&&n.splice(u,0,fa(i))}return{duration:t,delay:o,easing:a}}function Ua(i){return i.length?i[0]instanceof Map?i:i.map(n=>new Map(Object.entries(n))):[]}function Le(i,n,e){n.forEach((t,o)=>{let a=mn(o);e&&!e.has(o)&&e.set(o,i.style[a]),i.style[a]=t})}function xt(i,n){n.forEach((e,t)=>{let o=mn(t);i.style[o]=""})}function h2(i){return Array.isArray(i)?i.length==1?i[0]:E0(i):i}function Ha(i,n,e){let t=n.params||{},o=T3(i);o.length&&o.forEach(a=>{t.hasOwnProperty(a)||e.push(Q5(a))})}var h3=new RegExp(`${v3}\\s*(.+?)\\s*${os}`,"g");function T3(i){let n=[];if(typeof i=="string"){let e;for(;e=h3.exec(i);)n.push(e[1]);h3.lastIndex=0}return n}function C2(i,n,e){let t=`${i}`,o=t.replace(h3,(a,p)=>{let u=n[p];return u==null&&(e.push(X5(p)),u=""),u.toString()});return o==t?i:o}var ss=/-+([a-z0-9])/g;function mn(i){return i.replace(ss,(...n)=>n[1].toUpperCase())}function $a(i,n){return i===0||n===0}function Ga(i,n,e){if(e.size&&n.length){let t=n[0],o=[];if(e.forEach((a,p)=>{t.has(p)||o.push(p),t.set(p,a)}),o.length)for(let a=1;a<n.length;a++){let p=n[a];o.forEach(u=>p.set(u,pn(i,u)))}}return n}function me(i,n,e){switch(n.type){case a1.Trigger:return i.visitTrigger(n,e);case a1.State:return i.visitState(n,e);case a1.Transition:return i.visitTransition(n,e);case a1.Sequence:return i.visitSequence(n,e);case a1.Group:return i.visitGroup(n,e);case a1.Animate:return i.visitAnimate(n,e);case a1.Keyframes:return i.visitKeyframes(n,e);case a1.Style:return i.visitStyle(n,e);case a1.Reference:return i.visitReference(n,e);case a1.AnimateChild:return i.visitAnimateChild(n,e);case a1.AnimateRef:return i.visitAnimateRef(n,e);case a1.Query:return i.visitQuery(n,e);case a1.Stagger:return i.visitStagger(n,e);default:throw Z5(n.type)}}function pn(i,n){return window.getComputedStyle(i)[n]}var U3=(()=>{class i{validateStyleProperty(e){return Ba(e)}containsElement(e,t){return S3(e,t)}getParentElement(e){return sn(e)}query(e,t,o){return x3(e,t,o)}computeStyle(e,t,o){return o||""}animate(e,t,o,a,p,u=[],y){return new Et(o,a)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=W1({token:i,factory:i.\u0275fac})}return i})(),It=class{static NOOP=new U3},Ot=class{};var ls=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),hn=class extends Ot{normalizePropertyName(n,e){return mn(n)}normalizeStyleValue(n,e,t,o){let a="",p=t.toString().trim();if(ls.has(e)&&t!==0&&t!=="0")if(typeof t=="number")a="px";else{let u=t.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&u[1].length==0&&o.push(_a(n,t))}return p+a}};var Cn="*";function cs(i,n){let e=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(t=>ms(t,e,n)):e.push(i),e}function ms(i,n,e){if(i[0]==":"){let y=ps(i,e);if(typeof y=="function"){n.push(y);return}i=y}let t=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(Ma(i)),n;let o=t[1],a=t[2],p=t[3];n.push(Wa(o,p));let u=o==Cn&&p==Cn;a[0]=="<"&&!u&&n.push(Wa(p,o))}function ps(i,n){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t)<parseFloat(e);default:return n.push(Ea(i)),"* => *"}}var dn=new Set(["true","1"]),fn=new Set(["false","0"]);function Wa(i,n){let e=dn.has(i)||fn.has(i),t=dn.has(n)||fn.has(n);return(o,a)=>{let p=i==Cn||i==o,u=n==Cn||n==a;return!p&&e&&typeof o=="boolean"&&(p=o?dn.has(i):fn.has(i)),!u&&t&&typeof a=="boolean"&&(u=a?dn.has(n):fn.has(n)),p&&u}}var tr=":self",ds=new RegExp(`s*${tr}s*,?`,"g");function ir(i,n,e,t){return new A3(i).build(n,e,t)}var qa="",A3=class{_driver;constructor(n){this._driver=n}build(n,e,t){let o=new N3(e);return this._resetContextStyleTimingState(o),me(this,h2(n),o)}_resetContextStyleTimingState(n){n.currentQuerySelector=qa,n.collectedStyles=new Map,n.collectedStyles.set(qa,new Map),n.currentTime=0}visitTrigger(n,e){let t=e.queryCount=0,o=e.depCount=0,a=[],p=[];return n.name.charAt(0)=="@"&&e.errors.push(ha()),n.definitions.forEach(u=>{if(this._resetContextStyleTimingState(e),u.type==a1.State){let y=u,w=y.name;w.toString().split(/\s*,\s*/).forEach(k=>{y.name=k,a.push(this.visitState(y,e))}),y.name=w}else if(u.type==a1.Transition){let y=this.visitTransition(u,e);t+=y.queryCount,o+=y.depCount,p.push(y)}else e.errors.push(Ca())}),{type:a1.Trigger,name:n.name,states:a,transitions:p,queryCount:t,depCount:o,options:null}}visitState(n,e){let t=this.visitStyle(n.styles,e),o=n.options&&n.options.params||null;if(t.containsDynamicStyles){let a=new Set,p=o||{};t.styles.forEach(u=>{u instanceof Map&&u.forEach(y=>{T3(y).forEach(w=>{p.hasOwnProperty(w)||a.add(w)})})}),a.size&&e.errors.push(ga(n.name,[...a.values()]))}return{type:a1.State,name:n.name,style:t,options:o?{params:o}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;let t=me(this,h2(n.animation),e),o=cs(n.expr,e.errors);return{type:a1.Transition,matchers:o,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:Rt(n.options)}}visitSequence(n,e){return{type:a1.Sequence,steps:n.steps.map(t=>me(this,t,e)),options:Rt(n.options)}}visitGroup(n,e){let t=e.currentTime,o=0,a=n.steps.map(p=>{e.currentTime=t;let u=me(this,p,e);return o=Math.max(o,e.currentTime),u});return e.currentTime=o,{type:a1.Group,steps:a,options:Rt(n.options)}}visitAnimate(n,e){let t=hs(n.timings,e.errors);e.currentAnimateTimings=t;let o,a=n.styles?n.styles:t3({});if(a.type==a1.Keyframes)o=this.visitKeyframes(a,e);else{let p=n.styles,u=!1;if(!p){u=!0;let w={};t.easing&&(w.easing=t.easing),p=t3(w)}e.currentTime+=t.duration+t.delay;let y=this.visitStyle(p,e);y.isEmptyStep=u,o=y}return e.currentAnimateTimings=null,{type:a1.Animate,timings:t,style:o,options:null}}visitStyle(n,e){let t=this._makeStyleAst(n,e);return this._validateStyleAst(t,e),t}_makeStyleAst(n,e){let t=[],o=Array.isArray(n.styles)?n.styles:[n.styles];for(let u of o)typeof u=="string"?u===Pe?t.push(u):e.errors.push(Sa(u)):t.push(new Map(Object.entries(u)));let a=!1,p=null;return t.forEach(u=>{if(u instanceof Map&&(u.has("easing")&&(p=u.get("easing"),u.delete("easing")),!a)){for(let y of u.values())if(y.toString().indexOf(v3)>=0){a=!0;break}}}),{type:a1.Style,styles:t,easing:p,offset:n.offset,containsDynamicStyles:a,options:null}}_validateStyleAst(n,e){let t=e.currentAnimateTimings,o=e.currentTime,a=e.currentTime;t&&a>0&&(a-=t.duration+t.delay),n.styles.forEach(p=>{typeof p!="string"&&p.forEach((u,y)=>{let w=e.collectedStyles.get(e.currentQuerySelector),k=w.get(y),P=!0;k&&(a!=o&&a>=k.startTime&&o<=k.endTime&&(e.errors.push(xa(y,k.startTime,k.endTime,a,o)),P=!1),a=k.startTime),P&&w.set(y,{startTime:a,endTime:o}),e.options&&Ha(u,e.options,e.errors)})})}visitKeyframes(n,e){let t={type:a1.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(va()),t;let o=1,a=0,p=[],u=!1,y=!1,w=0,k=n.steps.map(k1=>{let D1=this._makeStyleAst(k1,e),Y1=D1.offset!=null?D1.offset:_s(D1.styles),$1=0;return Y1!=null&&(a++,$1=D1.offset=Y1),y=y||$1<0||$1>1,u=u||$1<w,w=$1,p.push($1),D1});y&&e.errors.push(ya()),u&&e.errors.push(ba());let P=n.steps.length,j=0;a>0&&a<P?e.errors.push(Ta()):a==0&&(j=o/(P-1));let G=P-1,W=e.currentTime,e1=e.currentAnimateTimings,T1=e1.duration;return k.forEach((k1,D1)=>{let Y1=j>0?D1==G?1:j*D1:p[D1],$1=Y1*T1;e.currentTime=W+e1.delay+$1,e1.duration=$1,this._validateStyleAst(k1,e),k1.offset=Y1,t.styles.push(k1)}),t}visitReference(n,e){return{type:a1.Reference,animation:me(this,h2(n.animation),e),options:Rt(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:a1.AnimateChild,options:Rt(n.options)}}visitAnimateRef(n,e){return{type:a1.AnimateRef,animation:this.visitReference(n.animation,e),options:Rt(n.options)}}visitQuery(n,e){let t=e.currentQuerySelector,o=n.options||{};e.queryCount++,e.currentQuery=n;let[a,p]=fs(n.selector);e.currentQuerySelector=t.length?t+" "+a:a,ce(e.collectedStyles,e.currentQuerySelector,new Map);let u=me(this,h2(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:a1.Query,selector:a,limit:o.limit||0,optional:!!o.optional,includeSelf:p,animation:u,originalSelector:n.selector,options:Rt(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(wa());let t=n.timings==="full"?{duration:0,delay:0,easing:"full"}:V2(n.timings,e.errors,!0);return{type:a1.Stagger,animation:me(this,h2(n.animation),e),timings:t,options:null}}};function fs(i){let n=!!i.split(/\s*,\s*/).find(e=>e==tr);return n&&(i=i.replace(ds,"")),i=i.replace(/@\*/g,O2).replace(/@\w+/g,e=>O2+"-"+e.slice(1)).replace(/:animating/g,cn),[i,n]}function us(i){return i?P1({},i):null}var N3=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(n){this.errors=n}};function _s(i){if(typeof i=="string")return null;let n=null;if(Array.isArray(i))i.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;n=parseFloat(t.get("offset")),t.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let e=i;n=parseFloat(e.get("offset")),e.delete("offset")}return n}function hs(i,n){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let a=V2(i,n).duration;return w3(a,0,"")}let e=i;if(e.split(/\s+/).some(a=>a.charAt(0)=="{"&&a.charAt(1)=="{")){let a=w3(0,0,"");return a.dynamic=!0,a.strValue=e,a}let o=V2(e,n);return w3(o.duration,o.delay,o.easing)}function Rt(i){return i?(i=P1({},i),i.params&&(i.params=us(i.params))):i={},i}function w3(i,n,e){return{duration:i,delay:n,easing:e}}function H3(i,n,e,t,o,a,p=null,u=!1){return{type:1,element:i,keyframes:n,preStyleProps:e,postStyleProps:t,duration:o,delay:a,totalTime:o+a,easing:p,subTimeline:u}}var U2=class{_map=new Map;get(n){return this._map.get(n)||[]}append(n,e){let t=this._map.get(n);t||this._map.set(n,t=[]),t.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}},Cs=1,gs=":enter",Ss=new RegExp(gs,"g"),xs=":leave",vs=new RegExp(xs,"g");function nr(i,n,e,t,o,a=new Map,p=new Map,u,y,w=[]){return new L3().buildKeyframes(i,n,e,t,o,a,p,u,y,w)}var L3=class{buildKeyframes(n,e,t,o,a,p,u,y,w,k=[]){w=w||new U2;let P=new k3(n,e,w,o,a,k,[]);P.options=y;let j=y.delay?Ye(y.delay):0;P.currentTimeline.delayNextStep(j),P.currentTimeline.setStyles([p],null,P.errors,y),me(this,t,P);let G=P.timelines.filter(W=>W.containsAnimation());if(G.length&&u.size){let W;for(let e1=G.length-1;e1>=0;e1--){let T1=G[e1];if(T1.element===e){W=T1;break}}W&&!W.allowOnlyTimelineStyles()&&W.setStyles([u],null,P.errors,y)}return G.length?G.map(W=>W.buildKeyframes()):[H3(e,[],[],[],0,j,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){let t=e.subInstructions.get(e.element);if(t){let o=e.createSubContext(n.options),a=e.currentTimeline.currentTime,p=this._visitSubInstructions(t,o,o.options);a!=p&&e.transformIntoNewTimeline(p)}e.previousNode=n}visitAnimateRef(n,e){let t=e.createSubContext(n.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,t),this.visitReference(n.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,t){for(let o of n){let a=o?.delay;if(a){let p=typeof a=="number"?a:Ye(C2(a,o?.params??{},e.errors));t.delayNextStep(p)}}}_visitSubInstructions(n,e,t){let a=e.currentTimeline.currentTime,p=t.duration!=null?Ye(t.duration):null,u=t.delay!=null?Ye(t.delay):null;return p!==0&&n.forEach(y=>{let w=e.appendInstructionToTimeline(y,p,u);a=Math.max(a,w.duration+w.delay)}),a}visitReference(n,e){e.updateOptions(n.options,!0),me(this,n.animation,e),e.previousNode=n}visitSequence(n,e){let t=e.subContextCount,o=e,a=n.options;if(a&&(a.params||a.delay)&&(o=e.createSubContext(a),o.transformIntoNewTimeline(),a.delay!=null)){o.previousNode.type==a1.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=gn);let p=Ye(a.delay);o.delayNextStep(p)}n.steps.length&&(n.steps.forEach(p=>me(this,p,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>t&&o.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){let t=[],o=e.currentTimeline.currentTime,a=n.options&&n.options.delay?Ye(n.options.delay):0;n.steps.forEach(p=>{let u=e.createSubContext(n.options);a&&u.delayNextStep(a),me(this,p,u),o=Math.max(o,u.currentTimeline.currentTime),t.push(u.currentTimeline)}),t.forEach(p=>e.currentTimeline.mergeTimelineCollectedStyles(p)),e.transformIntoNewTimeline(o),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){let t=n.strValue,o=e.params?C2(t,e.params,e.errors):t;return V2(o,e.errors)}else return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){let t=e.currentAnimateTimings=this._visitTiming(n.timings,e),o=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),o.snapshotCurrentStyles());let a=n.style;a.type==a1.Keyframes?this.visitKeyframes(a,e):(e.incrementTime(t.duration),this.visitStyle(a,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){let t=e.currentTimeline,o=e.currentAnimateTimings;!o&&t.hasCurrentStyleProperties()&&t.forwardFrame();let a=o&&o.easing||n.easing;n.isEmptyStep?t.applyEmptyStep(a):t.setStyles(n.styles,a,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){let t=e.currentAnimateTimings,o=e.currentTimeline.duration,a=t.duration,u=e.createSubContext().currentTimeline;u.easing=t.easing,n.styles.forEach(y=>{let w=y.offset||0;u.forwardTime(w*a),u.setStyles(y.styles,y.easing,e.errors,e.options),u.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(u),e.transformIntoNewTimeline(o+a),e.previousNode=n}visitQuery(n,e){let t=e.currentTimeline.currentTime,o=n.options||{},a=o.delay?Ye(o.delay):0;a&&(e.previousNode.type===a1.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=gn);let p=t,u=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=u.length;let y=null;u.forEach((w,k)=>{e.currentQueryIndex=k;let P=e.createSubContext(n.options,w);a&&P.delayNextStep(a),w===e.element&&(y=P.currentTimeline),me(this,n.animation,P),P.currentTimeline.applyStylesToKeyframe();let j=P.currentTimeline.currentTime;p=Math.max(p,j)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(p),y&&(e.currentTimeline.mergeTimelineCollectedStyles(y),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){let t=e.parentContext,o=e.currentTimeline,a=n.timings,p=Math.abs(a.duration),u=p*(e.currentQueryTotal-1),y=p*e.currentQueryIndex;switch(a.duration<0?"reverse":a.easing){case"reverse":y=u-y;break;case"full":y=t.currentStaggerTime;break}let k=e.currentTimeline;y&&k.delayNextStep(y);let P=k.currentTime;me(this,n.animation,e),e.previousNode=n,t.currentStaggerTime=o.currentTime-P+(o.startTime-t.currentTimeline.startTime)}},gn={},k3=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=gn;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(n,e,t,o,a,p,u,y){this._driver=n,this.element=e,this.subInstructions=t,this._enterClassName=o,this._leaveClassName=a,this.errors=p,this.timelines=u,this.currentTimeline=y||new Sn(this._driver,e,0),u.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;let t=n,o=this.options;t.duration!=null&&(o.duration=Ye(t.duration)),t.delay!=null&&(o.delay=Ye(t.delay));let a=t.params;if(a){let p=o.params;p||(p=this.options.params={}),Object.keys(a).forEach(u=>{(!e||!p.hasOwnProperty(u))&&(p[u]=C2(a[u],p,this.errors))})}}_copyOptions(){let n={};if(this.options){let e=this.options.params;if(e){let t=n.params={};Object.keys(e).forEach(o=>{t[o]=e[o]})}}return n}createSubContext(n=null,e,t){let o=e||this.element,a=new i(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,t||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(n),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}transformIntoNewTimeline(n){return this.previousNode=gn,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,t){let o={duration:e??n.duration,delay:this.currentTimeline.currentTime+(t??0)+n.delay,easing:""},a=new F3(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,o,n.stretchStartingKeyframe);return this.timelines.push(a),o}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,t,o,a,p){let u=[];if(o&&u.push(this.element),n.length>0){n=n.replace(Ss,"."+this._enterClassName),n=n.replace(vs,"."+this._leaveClassName);let y=t!=1,w=this._driver.query(this.element,n,y);t!==0&&(w=t<0?w.slice(w.length+t,w.length):w.slice(0,t)),u.push(...w)}return!a&&u.length==0&&p.push(za(e)),u}},Sn=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(n,e,t,o){this._driver=n,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new i(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Cs,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||Pe),this._currentKeyframe.set(e,Pe);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,t,o){e&&this._previousKeyframe.set("easing",e);let a=o&&o.params||{},p=ys(n,this._globalTimelineStyles);for(let[u,y]of p){let w=C2(y,a,t);this._pendingStyles.set(u,w),this._localTimelineStyles.has(u)||this._backFill.set(u,this._globalTimelineStyles.get(u)??Pe),this._updateStyle(u,w)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,t)=>{let o=this._styleSummary.get(t);(!o||e.time>o.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let n=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((u,y)=>{let w=new Map([...this._backFill,...u]);w.forEach((k,P)=>{k===N2?n.add(P):k===Pe&&e.add(P)}),t||w.set("offset",y/this.duration),o.push(w)});let a=[...n.values()],p=[...e.values()];if(t){let u=o[0],y=new Map(u);u.set("offset",0),y.set("offset",1),o=[u,y]}return H3(this.element,o,a,p,this.duration,this.startTime,this.easing,!1)}},F3=class extends Sn{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(n,e,t,o,a,p,u=!1){super(n,e,p.delay),this.keyframes=t,this.preStyleProps=o,this.postStyleProps=a,this._stretchStartingKeyframe=u,this.timings={duration:p.duration,delay:p.delay,easing:p.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:t,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let a=[],p=t+e,u=e/p,y=new Map(n[0]);y.set("offset",0),a.push(y);let w=new Map(n[0]);w.set("offset",Ya(u)),a.push(w);let k=n.length-1;for(let P=1;P<=k;P++){let j=new Map(n[P]),G=j.get("offset"),W=e+G*t;j.set("offset",Ya(W/p)),a.push(j)}t=p,e=0,o="",n=a}return H3(this.element,n,this.preStyleProps,this.postStyleProps,t,e,o,!0)}};function Ya(i,n=3){let e=Math.pow(10,n-1);return Math.round(i*e)/e}function ys(i,n){let e=new Map,t;return i.forEach(o=>{if(o==="*"){t??=n.keys();for(let a of t)e.set(a,Pe)}else for(let[a,p]of o)e.set(a,p)}),e}function ja(i,n,e,t,o,a,p,u,y,w,k,P,j){return{type:0,element:i,triggerName:n,isRemovalTransition:o,fromState:e,fromStyles:a,toState:t,toStyles:p,timelines:u,queriedElements:y,preStyleProps:w,postStyleProps:k,totalTime:P,errors:j}}var z3={},xn=class{_triggerName;ast;_stateStyles;constructor(n,e,t){this._triggerName=n,this.ast=e,this._stateStyles=t}match(n,e,t,o){return bs(this.ast.matchers,n,e,t,o)}buildStyles(n,e,t){let o=this._stateStyles.get("*");return n!==void 0&&(o=this._stateStyles.get(n?.toString())||o),o?o.buildStyles(e,t):new Map}build(n,e,t,o,a,p,u,y,w,k){let P=[],j=this.ast.options&&this.ast.options.params||z3,G=u&&u.params||z3,W=this.buildStyles(t,G,P),e1=y&&y.params||z3,T1=this.buildStyles(o,e1,P),k1=new Set,D1=new Map,Y1=new Map,$1=o==="void",Ut={params:or(e1,j),delay:this.ast.options?.delay},Fe=k?[]:nr(n,e,this.ast.animation,a,p,W,T1,Ut,w,P),j1=0;return Fe.forEach(Z1=>{j1=Math.max(Z1.duration+Z1.delay,j1)}),P.length?ja(e,this._triggerName,t,o,$1,W,T1,[],[],D1,Y1,j1,P):(Fe.forEach(Z1=>{let Tt=Z1.element,Ht=ce(D1,Tt,new Set);Z1.preStyleProps.forEach(wt=>Ht.add(wt));let q3=ce(Y1,Tt,new Set);Z1.postStyleProps.forEach(wt=>q3.add(wt)),Tt!==e&&k1.add(Tt)}),ja(e,this._triggerName,t,o,$1,W,T1,Fe,[...k1.values()],D1,Y1,j1))}};function bs(i,n,e,t,o){return i.some(a=>a(n,e,t,o))}function or(i,n){let e=P1({},n);return Object.entries(i).forEach(([t,o])=>{o!=null&&(e[t]=o)}),e}var D3=class{styles;defaultParams;normalizer;constructor(n,e,t){this.styles=n,this.defaultParams=e,this.normalizer=t}buildStyles(n,e){let t=new Map,o=or(n,this.defaultParams);return this.styles.styles.forEach(a=>{typeof a!="string"&&a.forEach((p,u)=>{p&&(p=C2(p,o,e));let y=this.normalizer.normalizePropertyName(u,e);p=this.normalizer.normalizeStyleValue(u,y,p,e),t.set(u,p)})}),t}};function Ts(i,n,e){return new R3(i,n,e)}var R3=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(n,e,t){this.name=n,this.ast=e,this._normalizer=t,e.states.forEach(o=>{let a=o.options&&o.options.params||{};this.states.set(o.name,new D3(o.style,a,t))}),Ka(this.states,"true","1"),Ka(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new xn(n,o,this.states))}),this.fallbackTransition=ws(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,t,o){return this.transitionFactories.find(p=>p.match(n,e,t,o))||null}matchStyles(n,e,t){return this.fallbackTransition.buildStyles(n,e,t)}};function ws(i,n,e){let t=[(p,u)=>!0],o={type:a1.Sequence,steps:[],options:null},a={type:a1.Transition,animation:o,matchers:t,options:null,queryCount:0,depCount:0};return new xn(i,a,n)}function Ka(i,n,e){i.has(n)?i.has(e)||i.set(e,i.get(n)):i.has(e)&&i.set(n,i.get(e))}var zs=new U2,I3=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(n,e,t){this.bodyNode=n,this._driver=e,this._normalizer=t}register(n,e){let t=[],o=[],a=ir(this._driver,e,t,o);if(t.length)throw Aa(t);this._animations.set(n,a)}_buildPlayer(n,e,t){let o=n.element,a=C3(this._normalizer,n.keyframes,e,t);return this._driver.animate(o,a,n.duration,n.delay,n.easing,[],!0)}create(n,e,t={}){let o=[],a=this._animations.get(n),p,u=new Map;if(a?(p=nr(this._driver,e,a,y3,ln,new Map,new Map,t,zs,o),p.forEach(k=>{let P=ce(u,k.element,new Map);k.postStyleProps.forEach(j=>P.set(j,null))})):(o.push(Na()),p=[]),o.length)throw La(o);u.forEach((k,P)=>{k.forEach((j,G)=>{k.set(G,this._driver.computeStyle(P,G,Pe))})});let y=p.map(k=>{let P=u.get(k.element);return this._buildPlayer(k,new Map,P)}),w=it(y);return this._playersById.set(n,w),w.onDestroy(()=>this.destroy(n)),this.players.push(w),w}destroy(n){let e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(n){let e=this._playersById.get(n);if(!e)throw ka(n);return e}listen(n,e,t,o){let a=rn(e,"","","");return an(this._getPlayer(n),t,a,o),()=>{}}command(n,e,t,o){if(t=="register"){this.register(n,o[0]);return}if(t=="create"){let p=o[0]||{};this.create(n,e,p);return}let a=this._getPlayer(n);switch(t){case"play":a.play();break;case"pause":a.pause();break;case"reset":a.reset();break;case"restart":a.restart();break;case"finish":a.finish();break;case"init":a.init();break;case"setPosition":a.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(n);break}}},Qa="ng-animate-queued",Ms=".ng-animate-queued",M3="ng-animate-disabled",Es=".ng-animate-disabled",Ps="ng-star-inserted",As=".ng-star-inserted",Ns=[],ar={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ls={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ke="__ng_removed",H2=class{namespaceId;value;options;get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;let t=n&&n.hasOwnProperty("value"),o=t?n.value:n;if(this.value=Fs(o),t){let a=n,{value:p}=a,u=Q3(a,["value"]);this.options=u}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){let e=n.params;if(e){let t=this.options.params;Object.keys(e).forEach(o=>{t[o]==null&&(t[o]=e[o])})}}},B2="void",E3=new H2(B2),O3=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(n,e,t){this.id=n,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+n,Me(e,this._hostClassName)}listen(n,e,t,o){if(!this._triggers.has(e))throw Fa(t,e);if(t==null||t.length==0)throw Da(e);if(!Ds(t))throw Ra(t,e);let a=ce(this._elementListeners,n,[]),p={name:e,phase:t,callback:o};a.push(p);let u=ce(this._engine.statesByElement,n,new Map);return u.has(e)||(Me(n,I2),Me(n,I2+"-"+e),u.set(e,E3)),()=>{this._engine.afterFlush(()=>{let y=a.indexOf(p);y>=0&&a.splice(y,1),this._triggers.has(e)||u.delete(e)})}}register(n,e){return this._triggers.has(n)?!1:(this._triggers.set(n,e),!0)}_getTrigger(n){let e=this._triggers.get(n);if(!e)throw Ia(n);return e}trigger(n,e,t,o=!0){let a=this._getTrigger(e),p=new $2(this.id,e,n),u=this._engine.statesByElement.get(n);u||(Me(n,I2),Me(n,I2+"-"+e),this._engine.statesByElement.set(n,u=new Map));let y=u.get(e),w=new H2(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&y&&w.absorbOptions(y.options),u.set(e,w),y||(y=E3),!(w.value===B2)&&y.value===w.value){if(!Os(y.params,w.params)){let e1=[],T1=a.matchStyles(y.value,y.params,e1),k1=a.matchStyles(w.value,w.params,e1);e1.length?this._engine.reportError(e1):this._engine.afterFlush(()=>{xt(n,T1),Le(n,k1)})}return}let j=ce(this._engine.playersByElement,n,[]);j.forEach(e1=>{e1.namespaceId==this.id&&e1.triggerName==e&&e1.queued&&e1.destroy()});let G=a.matchTransition(y.value,w.value,n,w.params),W=!1;if(!G){if(!o)return;G=a.fallbackTransition,W=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:G,fromState:y,toState:w,player:p,isFallbackTransition:W}),W||(Me(n,Qa),p.onStart(()=>{g2(n,Qa)})),p.onDone(()=>{let e1=this.players.indexOf(p);e1>=0&&this.players.splice(e1,1);let T1=this._engine.playersByElement.get(n);if(T1){let k1=T1.indexOf(p);k1>=0&&T1.splice(k1,1)}}),this.players.push(p),j.push(p),p}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(o=>o.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);let e=this._engine.playersByElement.get(n);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){let t=this._engine.driver.query(n,O2,!0);t.forEach(o=>{if(o[ke])return;let a=this._engine.fetchNamespacesByElement(o);a.size?a.forEach(p=>p.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(n,e,t,o){let a=this._engine.statesByElement.get(n),p=new Map;if(a){let u=[];if(a.forEach((y,w)=>{if(p.set(w,y.value),this._triggers.has(w)){let k=this.trigger(n,w,B2,o);k&&u.push(k)}}),u.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,p),t&&it(u).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){let e=this._elementListeners.get(n),t=this._engine.statesByElement.get(n);if(e&&t){let o=new Set;e.forEach(a=>{let p=a.name;if(o.has(p))return;o.add(p);let y=this._triggers.get(p).fallbackTransition,w=t.get(p)||E3,k=new H2(B2),P=new $2(this.id,p,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:p,transition:y,fromState:w,toState:k,player:P,isFallbackTransition:!0})})}}removeNode(n,e){let t=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let o=!1;if(t.totalAnimations){let a=t.players.length?t.playersByQueriedElement.get(n):[];if(a&&a.length)o=!0;else{let p=n;for(;p=p.parentNode;)if(t.statesByElement.get(p)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(n),o)t.markElementAsRemoved(this.id,n,!1,e);else{let a=n[ke];(!a||a===ar)&&(t.afterFlush(()=>this.clearElementCache(n)),t.destroyInnerAnimations(n),t._onRemovalComplete(n,e))}}insertNode(n,e){Me(n,this._hostClassName)}drainQueuedTransitions(n){let e=[];return this._queue.forEach(t=>{let o=t.player;if(o.destroyed)return;let a=t.element,p=this._elementListeners.get(a);p&&p.forEach(u=>{if(u.name==t.triggerName){let y=rn(a,t.triggerName,t.fromState.value,t.toState.value);y._data=n,an(t.player,u.phase,y,u.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(t)}),this._queue=[],e.sort((t,o)=>{let a=t.transition.ast.depCount,p=o.transition.ast.depCount;return a==0||p==0?a-p:this._engine.driver.containsElement(t.element,o.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}},V3=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(n,e)=>{};_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,t){this.bodyNode=n,this.driver=e,this._normalizer=t}get queuedPlayers(){let n=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&n.push(t)})}),n}createNamespace(n,e){let t=new O3(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[n]=t}_balanceNamespaceList(n,e){let t=this._namespaceList,o=this.namespacesByHostElement;if(t.length-1>=0){let p=!1,u=this.driver.getParentElement(e);for(;u;){let y=o.get(u);if(y){let w=t.indexOf(y);t.splice(w+1,0,n),p=!0;break}u=this.driver.getParentElement(u)}p||t.unshift(n)}else t.push(n);return o.set(e,n),n}register(n,e){let t=this._namespaceLookup[n];return t||(t=this.createNamespace(n,e)),t}registerTrigger(n,e,t){let o=this._namespaceLookup[n];o&&o.register(e,t)&&this.totalAnimations++}destroy(n,e){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(n);this.namespacesByHostElement.delete(t.hostElement);let o=this._namespaceList.indexOf(t);o>=0&&this._namespaceList.splice(o,1),t.destroy(e),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){let e=new Set,t=this.statesByElement.get(n);if(t){for(let o of t.values())if(o.namespaceId){let a=this._fetchNamespace(o.namespaceId);a&&e.add(a)}}return e}trigger(n,e,t,o){if(un(e)){let a=this._fetchNamespace(n);if(a)return a.trigger(e,t,o),!0}return!1}insertNode(n,e,t,o){if(!un(e))return;let a=e[ke];if(a&&a.setForRemoval){a.setForRemoval=!1,a.setForMove=!0;let p=this.collectedLeaveElements.indexOf(e);p>=0&&this.collectedLeaveElements.splice(p,1)}if(n){let p=this._fetchNamespace(n);p&&p.insertNode(e,t)}o&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Me(n,M3)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),g2(n,M3))}removeNode(n,e,t){if(un(e)){let o=n?this._fetchNamespace(n):null;o?o.removeNode(e,t):this.markElementAsRemoved(n,e,!1,t);let a=this.namespacesByHostElement.get(e);a&&a.id!==n&&a.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(n,e,t,o,a){this.collectedLeaveElements.push(e),e[ke]={namespaceId:n,setForRemoval:o,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:a}}listen(n,e,t,o,a){return un(e)?this._fetchNamespace(n).listen(e,t,o,a):()=>{}}_buildInstruction(n,e,t,o,a){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,t,o,n.fromState.options,n.toState.options,e,a)}destroyInnerAnimations(n){let e=this.driver.query(n,O2,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(n,cn,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(n){let e=this.playersByElement.get(n);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(n){let e=this.playersByQueriedElement.get(n);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return it(this.players).onDone(()=>n());n()})}processLeaveNode(n){let e=n[ke];if(e&&e.setForRemoval){if(n[ke]=ar,e.namespaceId){this.destroyInnerAnimations(n);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(M3)&&this.markElementAsDisabled(n,!1),this.driver.query(n,Es,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,o)=>this._balanceNamespaceList(t,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;t<this.collectedEnterElements.length;t++){let o=this.collectedEnterElements[t];Me(o,Ps)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let t=[];try{e=this._flushAnimations(t,n)}finally{for(let o=0;o<t.length;o++)t[o]()}}else for(let t=0;t<this.collectedLeaveElements.length;t++){let o=this.collectedLeaveElements[t];this.processLeaveNode(o)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?it(e).onDone(()=>{t.forEach(o=>o())}):t.forEach(o=>o())}}reportError(n){throw Oa(n)}_flushAnimations(n,e){let t=new U2,o=[],a=new Map,p=[],u=new Map,y=new Map,w=new Map,k=new Set;this.disabledNodes.forEach(H=>{k.add(H);let K=this.driver.query(H,Ms,!0);for(let Z=0;Z<K.length;Z++)k.add(K[Z])});let P=this.bodyNode,j=Array.from(this.statesByElement.keys()),G=Ja(j,this.collectedEnterElements),W=new Map,e1=0;G.forEach((H,K)=>{let Z=y3+e1++;W.set(K,Z),H.forEach(f1=>Me(f1,Z))});let T1=[],k1=new Set,D1=new Set;for(let H=0;H<this.collectedLeaveElements.length;H++){let K=this.collectedLeaveElements[H],Z=K[ke];Z&&Z.setForRemoval&&(T1.push(K),k1.add(K),Z.hasAnimation?this.driver.query(K,As,!0).forEach(f1=>k1.add(f1)):D1.add(K))}let Y1=new Map,$1=Ja(j,Array.from(k1));$1.forEach((H,K)=>{let Z=ln+e1++;Y1.set(K,Z),H.forEach(f1=>Me(f1,Z))}),n.push(()=>{G.forEach((H,K)=>{let Z=W.get(K);H.forEach(f1=>g2(f1,Z))}),$1.forEach((H,K)=>{let Z=Y1.get(K);H.forEach(f1=>g2(f1,Z))}),T1.forEach(H=>{this.processLeaveNode(H)})});let Ut=[],Fe=[];for(let H=this._namespaceList.length-1;H>=0;H--)this._namespaceList[H].drainQueuedTransitions(e).forEach(Z=>{let f1=Z.player,R1=Z.element;if(Ut.push(f1),this.collectedEnterElements.length){let G1=R1[ke];if(G1&&G1.setForMove){if(G1.previousTriggersValues&&G1.previousTriggersValues.has(Z.triggerName)){let zt=G1.previousTriggersValues.get(Z.triggerName),ge=this.statesByElement.get(Z.element);if(ge&&ge.has(Z.triggerName)){let Q2=ge.get(Z.triggerName);Q2.value=zt,ge.set(Z.triggerName,Q2)}}f1.destroy();return}}let De=!P||!this.driver.containsElement(P,R1),pe=Y1.get(R1),at=W.get(R1),z1=this._buildInstruction(Z,t,at,pe,De);if(z1.errors&&z1.errors.length){Fe.push(z1);return}if(De){f1.onStart(()=>xt(R1,z1.fromStyles)),f1.onDestroy(()=>Le(R1,z1.toStyles)),o.push(f1);return}if(Z.isFallbackTransition){f1.onStart(()=>xt(R1,z1.fromStyles)),f1.onDestroy(()=>Le(R1,z1.toStyles)),o.push(f1);return}let K3=[];z1.timelines.forEach(G1=>{G1.stretchStartingKeyframe=!0,this.disabledNodes.has(G1.element)||K3.push(G1)}),z1.timelines=K3,t.append(R1,z1.timelines);let Y5={instruction:z1,player:f1,element:R1};p.push(Y5),z1.queriedElements.forEach(G1=>ce(u,G1,[]).push(f1)),z1.preStyleProps.forEach((G1,zt)=>{if(G1.size){let ge=y.get(zt);ge||y.set(zt,ge=new Set),G1.forEach((Q2,jn)=>ge.add(jn))}}),z1.postStyleProps.forEach((G1,zt)=>{let ge=w.get(zt);ge||w.set(zt,ge=new Set),G1.forEach((Q2,jn)=>ge.add(jn))})});if(Fe.length){let H=[];Fe.forEach(K=>{H.push(Va(K.triggerName,K.errors))}),Ut.forEach(K=>K.destroy()),this.reportError(H)}let j1=new Map,Z1=new Map;p.forEach(H=>{let K=H.element;t.has(K)&&(Z1.set(K,K),this._beforeAnimationBuild(H.player.namespaceId,H.instruction,j1))}),o.forEach(H=>{let K=H.element;this._getPreviousPlayers(K,!1,H.namespaceId,H.triggerName,null).forEach(f1=>{ce(j1,K,[]).push(f1),f1.destroy()})});let Tt=T1.filter(H=>er(H,y,w)),Ht=new Map;Za(Ht,this.driver,D1,w,Pe).forEach(H=>{er(H,y,w)&&Tt.push(H)});let wt=new Map;G.forEach((H,K)=>{Za(wt,this.driver,new Set(H),y,N2)}),Tt.forEach(H=>{let K=Ht.get(H),Z=wt.get(H);Ht.set(H,new Map([...K?.entries()??[],...Z?.entries()??[]]))});let Yn=[],Y3=[],j3={};p.forEach(H=>{let{element:K,player:Z,instruction:f1}=H;if(t.has(K)){if(k.has(K)){Z.onDestroy(()=>Le(K,f1.toStyles)),Z.disabled=!0,Z.overrideTotalTime(f1.totalTime),o.push(Z);return}let R1=j3;if(Z1.size>1){let pe=K,at=[];for(;pe=pe.parentNode;){let z1=Z1.get(pe);if(z1){R1=z1;break}at.push(pe)}at.forEach(z1=>Z1.set(z1,R1))}let De=this._buildAnimation(Z.namespaceId,f1,j1,a,wt,Ht);if(Z.setRealPlayer(De),R1===j3)Yn.push(Z);else{let pe=this.playersByElement.get(R1);pe&&pe.length&&(Z.parentPlayer=it(pe)),o.push(Z)}}else xt(K,f1.fromStyles),Z.onDestroy(()=>Le(K,f1.toStyles)),Y3.push(Z),k.has(K)&&o.push(Z)}),Y3.forEach(H=>{let K=a.get(H.element);if(K&&K.length){let Z=it(K);H.setRealPlayer(Z)}}),o.forEach(H=>{H.parentPlayer?H.syncPlayerEvents(H.parentPlayer):H.destroy()});for(let H=0;H<T1.length;H++){let K=T1[H],Z=K[ke];if(g2(K,ln),Z&&Z.hasAnimation)continue;let f1=[];if(u.size){let De=u.get(K);De&&De.length&&f1.push(...De);let pe=this.driver.query(K,cn,!0);for(let at=0;at<pe.length;at++){let z1=u.get(pe[at]);z1&&z1.length&&f1.push(...z1)}}let R1=f1.filter(De=>!De.destroyed);R1.length?Rs(this,K,R1):this.processLeaveNode(K)}return T1.length=0,Yn.forEach(H=>{this.players.push(H),H.onDone(()=>{H.destroy();let K=this.players.indexOf(H);this.players.splice(K,1)}),H.play()}),Yn}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,t,o,a){let p=[];if(e){let u=this.playersByQueriedElement.get(n);u&&(p=u)}else{let u=this.playersByElement.get(n);if(u){let y=!a||a==B2;u.forEach(w=>{w.queued||!y&&w.triggerName!=o||p.push(w)})}}return(t||o)&&(p=p.filter(u=>!(t&&t!=u.namespaceId||o&&o!=u.triggerName))),p}_beforeAnimationBuild(n,e,t){let o=e.triggerName,a=e.element,p=e.isRemovalTransition?void 0:n,u=e.isRemovalTransition?void 0:o;for(let y of e.timelines){let w=y.element,k=w!==a,P=ce(t,w,[]);this._getPreviousPlayers(w,k,p,u,e.toState).forEach(G=>{let W=G.getRealPlayer();W.beforeDestroy&&W.beforeDestroy(),G.destroy(),P.push(G)})}xt(a,e.fromStyles)}_buildAnimation(n,e,t,o,a,p){let u=e.triggerName,y=e.element,w=[],k=new Set,P=new Set,j=e.timelines.map(W=>{let e1=W.element;k.add(e1);let T1=e1[ke];if(T1&&T1.removedBeforeQueried)return new Et(W.duration,W.delay);let k1=e1!==y,D1=Is((t.get(e1)||Ns).map(j1=>j1.getRealPlayer())).filter(j1=>{let Z1=j1;return Z1.element?Z1.element===e1:!1}),Y1=a.get(e1),$1=p.get(e1),Ut=C3(this._normalizer,W.keyframes,Y1,$1),Fe=this._buildPlayer(W,Ut,D1);if(W.subTimeline&&o&&P.add(e1),k1){let j1=new $2(n,u,e1);j1.setRealPlayer(Fe),w.push(j1)}return Fe});w.forEach(W=>{ce(this.playersByQueriedElement,W.element,[]).push(W),W.onDone(()=>ks(this.playersByQueriedElement,W.element,W))}),k.forEach(W=>Me(W,b3));let G=it(j);return G.onDestroy(()=>{k.forEach(W=>g2(W,b3)),Le(y,e.toStyles)}),P.forEach(W=>{ce(o,W,[]).push(G)}),G}_buildPlayer(n,e,t){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,t):new Et(n.duration,n.delay)}},$2=class{namespaceId;triggerName;element;_player=new Et;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(n,e,t){this.namespaceId=n,this.triggerName=e,this.element=t}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,t)=>{e.forEach(o=>an(n,t,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){let e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){ce(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){let e=this._player;e.triggerCallback&&e.triggerCallback(n)}};function ks(i,n,e){let t=i.get(n);if(t){if(t.length){let o=t.indexOf(e);t.splice(o,1)}t.length==0&&i.delete(n)}return t}function Fs(i){return i??null}function un(i){return i&&i.nodeType===1}function Ds(i){return i=="start"||i=="done"}function Xa(i,n){let e=i.style.display;return i.style.display=n??"none",e}function Za(i,n,e,t,o){let a=[];e.forEach(y=>a.push(Xa(y)));let p=[];t.forEach((y,w)=>{let k=new Map;y.forEach(P=>{let j=n.computeStyle(w,P,o);k.set(P,j),(!j||j.length==0)&&(w[ke]=Ls,p.push(w))}),i.set(w,k)});let u=0;return e.forEach(y=>Xa(y,a[u++])),p}function Ja(i,n){let e=new Map;if(i.forEach(u=>e.set(u,[])),n.length==0)return e;let t=1,o=new Set(n),a=new Map;function p(u){if(!u)return t;let y=a.get(u);if(y)return y;let w=u.parentNode;return e.has(w)?y=w:o.has(w)?y=t:y=p(w),a.set(u,y),y}return n.forEach(u=>{let y=p(u);y!==t&&e.get(y).push(u)}),e}function Me(i,n){i.classList?.add(n)}function g2(i,n){i.classList?.remove(n)}function Rs(i,n,e){it(e).onDone(()=>i.processLeaveNode(n))}function Is(i){let n=[];return rr(i,n),n}function rr(i,n){for(let e=0;e<i.length;e++){let t=i[e];t instanceof mi?rr(t.players,n):n.push(t)}}function Os(i,n){let e=Object.keys(i),t=Object.keys(n);if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++){let a=e[o];if(!n.hasOwnProperty(a)||i[a]!==n[a])return!1}return!0}function er(i,n,e){let t=e.get(i);if(!t)return!1;let o=n.get(i);return o?t.forEach(a=>o.add(a)):n.set(i,t),e.delete(i),!0}var S2=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(n,e)=>{};constructor(n,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new V3(n.body,e,t),this._timelineEngine=new I3(n.body,e,t),this._transitionEngine.onRemovalComplete=(o,a)=>this.onRemovalComplete(o,a)}registerTrigger(n,e,t,o,a){let p=n+"-"+o,u=this._triggerCache[p];if(!u){let y=[],w=[],k=ir(this._driver,a,y,w);if(y.length)throw Pa(o,y);u=Ts(o,k,this._normalizer),this._triggerCache[p]=u}this._transitionEngine.registerTrigger(e,o,u)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,t,o){this._transitionEngine.insertNode(n,e,t,o)}onRemove(n,e,t){this._transitionEngine.removeNode(n,e,t)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,t,o){if(t.charAt(0)=="@"){let[a,p]=g3(t),u=o;this._timelineEngine.command(a,e,p,u)}else this._transitionEngine.trigger(n,e,t,o)}listen(n,e,t,o,a){if(t.charAt(0)=="@"){let[p,u]=g3(t);return this._timelineEngine.listen(p,e,u,a)}return this._transitionEngine.listen(n,e,t,o,a)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}};function Vs(i,n){let e=null,t=null;return Array.isArray(n)&&n.length?(e=P3(n[0]),n.length>1&&(t=P3(n[n.length-1]))):n instanceof Map&&(e=P3(n)),e||t?new Bs(i,e,t):null}var Bs=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,o){this._element=e,this._startStyles=t,this._endStyles=o;let a=i.initialStylesByElement.get(e);a||i.initialStylesByElement.set(e,a=new Map),this._initialStyles=a}start(){this._state<1&&(this._startStyles&&Le(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Le(this._element,this._initialStyles),this._endStyles&&(Le(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(xt(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(xt(this._element,this._endStyles),this._endStyles=null),Le(this._element,this._initialStyles),this._state=3)}}return i})();function P3(i){let n=null;return i.forEach((e,t)=>{Us(t)&&(n=n||new Map,n.set(t,e))}),n}function Us(i){return i==="display"||i==="position"}var vn=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(n,e,t,o){this.element=n,this.keyframes=e,this.options=t,this._specialStyles=o,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let n=this.keyframes,e=this._triggerWebAnimation(this.element,n,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=n.length?n[n.length-1]:new Map;let t=()=>this._onFinish();return e.addEventListener("finish",t),this.onDestroy(()=>{e.removeEventListener("finish",t)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(n){let e=[];return n.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(n,e,t){let o=this._convertKeyframesToObject(e);try{return n.animate(o,t)}catch{return null}}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){let n=this._buildPlayer();n&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),n.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=n*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,o)=>{o!=="offset"&&n.set(o,this._finished?t:pn(this.element,o))}),this.currentSnapshot=n}triggerCallback(n){let e=n==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},yn=class{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}containsElement(n,e){return S3(n,e)}getParentElement(n){return sn(n)}query(n,e,t){return x3(n,e,t)}computeStyle(n,e,t){return pn(n,e)}animate(n,e,t,o,a,p=[]){let u=o==0?"both":"forwards",y={duration:t,delay:o,fill:u};a&&(y.easing=a);let w=new Map,k=p.filter(G=>G instanceof vn);$a(t,o)&&k.forEach(G=>{G.currentSnapshot.forEach((W,e1)=>w.set(e1,W))});let P=Ua(e).map(G=>new Map(G));P=Ga(n,P,w);let j=Vs(n,P);return new vn(n,P,y,j)}};var _n="@",sr="@.disabled",bn=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(n,e,t,o){this.namespaceId=n,this.delegate=e,this.engine=t,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(n){this.delegate.destroyNode?.(n)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,t,o=!0){this.delegate.insertBefore(n,e,t),this.engine.onInsert(this.namespaceId,e,n,o)}removeChild(n,e,t,o){if(o){this.delegate.removeChild(n,e,t,o);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,t,o){this.delegate.setAttribute(n,e,t,o)}removeAttribute(n,e,t){this.delegate.removeAttribute(n,e,t)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,t,o){this.delegate.setStyle(n,e,t,o)}removeStyle(n,e,t){this.delegate.removeStyle(n,e,t)}setProperty(n,e,t){e.charAt(0)==_n&&e==sr?this.disableAnimations(n,!!t):this.delegate.setProperty(n,e,t)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,t,o){return this.delegate.listen(n,e,t,o)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}},B3=class extends bn{factory;constructor(n,e,t,o,a){super(e,t,o,a),this.factory=n,this.namespaceId=e}setProperty(n,e,t){e.charAt(0)==_n?e.charAt(1)=="."&&e==sr?(t=t===void 0?!0:!!t,this.disableAnimations(n,t)):this.engine.process(this.namespaceId,n,e.slice(1),t):this.delegate.setProperty(n,e,t)}listen(n,e,t,o){if(e.charAt(0)==_n){let a=Hs(n),p=e.slice(1),u="";return p.charAt(0)!=_n&&([p,u]=$s(p)),this.engine.listen(this.namespaceId,a,p,u,y=>{let w=y._data||-1;this.factory.scheduleListenerCallback(w,t,y)})}return this.delegate.listen(n,e,t,o)}};function Hs(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function $s(i){let n=i.indexOf("."),e=i.substring(0,n),t=i.slice(n+1);return[e,t]}var Tn=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(n,e,t){this.delegate=n,this.engine=e,this._zone=t,e.onRemovalComplete=(o,a)=>{a?.removeChild(null,o)}}createRenderer(n,e){let o=this.delegate.createRenderer(n,e);if(!n||!e?.data?.animation){let w=this._rendererCache,k=w.get(o);if(!k){let P=()=>w.delete(o);k=new bn("",o,this.engine,P),w.set(o,k)}return k}let a=e.id,p=e.id+"-"+this._currentId;this._currentId++,this.engine.register(p,n);let u=w=>{Array.isArray(w)?w.forEach(u):this.engine.registerTrigger(a,p,n,w.name,w)};return e.data.animation.forEach(u),new B3(this,p,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,e,t){if(n>=0&&n<this._microtaskId){this._zone.run(()=>e(t));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(a=>{let[p,u]=a;p(u)}),this._animationCallbacksBuffer=[]})}),o.push([e,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(n){this.engine.flush(),this.delegate.componentReplaced?.(n)}};var Ys=(()=>{class i extends S2{constructor(e,t,o){super(e,t,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(ei(ti),ei(It),ei(Ot))};static \u0275prov=W1({token:i,factory:i.\u0275fac})}return i})();function js(){return new hn}function Ks(i,n,e){return new Tn(i,n,e)}var lr=[{provide:Ot,useFactory:js},{provide:S2,useClass:Ys},{provide:r0,useFactory:Ks,deps:[C0,S2,oi]}],zu=[{provide:It,useClass:U3},{provide:Qn,useValue:"NoopAnimations"},...lr],Qs=[{provide:It,useFactory:()=>new yn},{provide:Qn,useFactory:()=>"BrowserAnimations"},...lr];function cr(){return a0("NgEagerAnimations"),[...Qs]}var G2=i=>i.url;var mr=()=>x(r1).user.isAdmin;var pr=[{path:Lt.BASE,pathMatch:"prefix",canActivate:[mr],children:[{path:Lt.USERS,data:{type:L2.USER},loadComponent:()=>import("./chunk-NO2LTNW3.js").then(i=>i.AdminUsersComponent)},{path:Lt.GUESTS,data:{type:L2.GUEST},loadComponent:()=>import("./chunk-NO2LTNW3.js").then(i=>i.AdminUsersComponent)},{path:Lt.GROUPS,children:[{path:"**",resolve:{routes:G2},data:{type:Nt.USER},loadComponent:()=>import("./chunk-KFJIQIGR.js").then(i=>i.AdminGroupsComponent)}]},{path:Lt.PGROUPS,children:[{path:"**",resolve:{routes:G2},data:{type:Nt.PERSONAL},loadComponent:()=>import("./chunk-KFJIQIGR.js").then(i=>i.AdminGroupsComponent)}]},{path:"**",redirectTo:Lt.USERS}]}];var dr=i=>x(Wo).linkValidation(i.params.uuid).pipe(E2(n=>n===!1?M2(!1):(i.data=Se(P1({},i.data),{link:n}),M2(!0))));var fr=[{path:l3.LINK,children:[{path:":uuid",loadComponent:()=>import("./chunk-ZPF2DSQV.js").then(i=>i.PublicLinkComponent),canActivate:[dr]},{path:`:uuid/${l3.AUTH}`,loadComponent:()=>import("./chunk-PGZZP5W3.js").then(i=>i.PublicLinkAuthComponent)},{path:":uuid/:error",loadComponent:()=>import("./chunk-WLMNXRBS.js").then(i=>i.PublicLinkErrorComponent)}]}];var wn={BASE:`${io}/comments`,RECENTS:"recents",SPACES:"spaces"},W2=`${wn.BASE}/${wn.SPACES}`,ur=`${wn.BASE}/${wn.RECENTS}`;var zn=class{constructor(n){Object.assign(this,n),this.author&&(this.author.avatarUrl=l2(this.author.login)),this.mimeUrl=U1(this.file.mime),this.icon=this.file.fromShare?o1.SHARES:this.file.fromSpace?o1.SPACES:o1.PERSONAL,this.iconClass=this.file.fromShare?"purple":"primary",this.showedPath=[...this.file.path.split("/").slice(this.file.path.split("/")[1]===Ct.PERSONAL?2:1),this.file.name].join("/")}};var x2=class{constructor(n){this.wasModified=!1,Object.assign(this,n),this.author.avatarUrl=l2(this.author.login),this.wasModified=this.createdAt!==this.modifiedAt,this.dateToShow=this.wasModified?this.modifiedAt:this.createdAt}};var Mn=(()=>{let n=class n{constructor(){this.store=x(Y),this.layout=x(L),this.http=x(rt)}getComments(t){return this.http.get(`${W2}/${t.path}`).pipe(de(o=>o.map(a=>new x2(a))))}createComment(t,o){return this.http.post(`${W2}/${t.path}`,o).pipe(de(a=>new x2(a)))}updateComment(t,o){return this.http.patch(`${W2}/${t.path}`,o).pipe(de(a=>new x2(a)))}deleteComment(t,o){return this.http.request("delete",`${W2}/${t.path}`,{body:o})}loadRecents(t){this.http.get(ur,{params:new S0().set("limit",t)}).pipe(de(o=>o.map(a=>new zn(a)))).subscribe({next:o=>{this.store.commentsRecents.update(a=>[...o,...a.slice(t)])},error:o=>this.layout.sendNotification("error","Comments","Unable to load",o)})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=W1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var Xs=(i,n)=>n.id;function Zs(i,n){if(i&1&&f(0,"fa-icon",2),i&2){let e=c(2);d("icon",e.icons.faTrashAlt)}}function Js(i,n){if(i&1){let e=b();r(0,"ul",8)(1,"li",9),_("click",function(){let o=g(e).$implicit,a=c();return S(a.goToFile(o))}),r(2,"div",10),f(3,"app-user-avatar",11),l(),r(4,"div",12)(5,"span",13)(6,"span"),m(7),l()(),r(8,"span"),h(9,Zs,1,1,"fa-icon",2),f(10,"fa-icon",14),r(11,"span"),m(12),l()()(),r(13,"div",15)(14,"span",16),m(15),T(16,"amTimeAgo"),l()()()()}if(i&2){let e=n.$implicit,t=n.$index,o=n.$count;U("border-0",t===o-1),s(3),d("user",e.author),s(4),v(e.content),s(),M(I("product-description text-",e.iconClass)),s(),C(e.file.inTrash?9:-1),s(),d("icon",e.icon),s(2),v(e.showedPath),s(3),v(z(16,11,e.modifiedAt,!0))}}function el(i,n){if(i&1&&(r(0,"div",7),f(1,"fa-icon",17),r(2,"div",18),m(3,"No recent comments"),l()()),i&2){let e=c();s(),d("icon",e.icons.faCommentDots)}}var _r=(()=>{let n=class n{constructor(){this.moreElements=!1,this.icons={faCommentDots:tn,faMagnifyingGlassPlus:wi,faMagnifyingGlassMinus:bi,faTrashAlt:pt},this.router=x(i1),this.layout=x(L),this.store=x(Y),this.commentsService=x(Mn),this.nbInitialComments=10,this.nbComments=this.nbInitialComments,this.comments=N1(()=>this.store.commentsRecents().slice(0,this.nbComments)),this.load()}switchMore(){this.moreElements?(this.moreElements=!1,this.nbComments=this.nbInitialComments):(this.moreElements=!0,this.nbComments*=5),this.load()}goToFile(t){this.router.navigate([O.SPACES,...t.file.path.split("/")],{queryParams:{select:t.file.name}}).then(()=>this.layout.showRSideBarTab(y1.COMMENTS,!0))}load(){this.commentsService.loadRecents(this.nbComments)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-comments-recents-widget"]],decls:10,vars:3,consts:[[1,"box-transparent"],[1,"box-header"],[3,"icon"],["l10nTranslate","",1,"box-title"],["role","button",1,"ms-auto","btn-link",3,"click","icon"],[1,"box-body","px-0","py-0"],[1,"products-list","product-list-in-box",3,"border-0"],[1,"d-flex","flex-column","justify-content-center","text-align-center","text-gray","mt-5"],[1,"products-list","product-list-in-box"],[1,"item",3,"click"],[1,"product-img"],[3,"user"],[1,"product-info"],[1,"product-title"],[1,"me-1",3,"icon"],[1,"product-badge"],[1,"badge","rounded-pill","bg-warning"],["size","4x",3,"icon"],["l10nTranslate","",1,"mt-4"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Comments"),l(),r(5,"fa-icon",4),_("click",function(){return a.switchMore()}),l()(),r(6,"div",5),D(7,Js,17,14,"ul",6,Xs,!1,el,4,1,"div",7),l()()),o&2&&(s(2),d("icon",a.icons.faCommentDots),s(3),d("icon",a.moreElements?a.icons.faMagnifyingGlassMinus:a.icons.faMagnifyingGlassPlus),s(2),R(a.comments()))},dependencies:[F,N,ze,B1],encapsulation:2});let i=n;return i})();var tl=(i,n)=>n.id;function il(i,n){if(i&1&&f(0,"fa-icon",2),i&2){let e=c(2);d("icon",e.icons.faTrashAlt)}}function nl(i,n){if(i&1){let e=b();r(0,"ul",8)(1,"li",9),_("click",function(){let o=g(e).$implicit,a=c();return S(a.goToFile(o))}),r(2,"div",10)(3,"img",11),_("error",function(){let o=g(e).$implicit;return S(o.fallBackMimeUrl())}),l()(),r(4,"div",12)(5,"span",13)(6,"span"),m(7),l()(),r(8,"span"),h(9,il,1,1,"fa-icon",2),f(10,"fa-icon",14),r(11,"span"),m(12),l()()(),r(13,"div",15)(14,"span",16),m(15),T(16,"amTimeAgo"),l()()()()}if(i&2){let e=n.$implicit,t=n.$index,o=n.$count;U("border-0",t===o-1),s(3),d("src",e.mimeUrl,Q),s(4),v(e.name),s(),M(I("product-description text-",e.iconClass)),s(),C(e.inTrash?9:-1),s(),d("icon",e.icon),s(2),v(e.showedPath),s(3),v(z(16,11,e.mtime,!0))}}function ol(i,n){if(i&1&&(r(0,"div",7),f(1,"fa-icon",17),r(2,"div",18),m(3,"No recent files"),l()()),i&2){let e=c();s(),d("icon",e.icons.faFileLines)}}var hr=(()=>{let n=class n{constructor(){this.moreElements=!1,this.icons={faFileLines:Zo,faMagnifyingGlassPlus:wi,faMagnifyingGlassMinus:bi,faTrashAlt:pt},this.router=x(i1),this.store=x(Y),this.filesService=x(E1),this.nbInitialFiles=10,this.nbFiles=this.nbInitialFiles,this.files=N1(()=>this.store.filesRecents().slice(0,this.nbFiles)),this.load()}switchMore(){this.moreElements?(this.moreElements=!1,this.nbFiles=this.nbInitialFiles):(this.moreElements=!0,this.nbFiles*=5),this.load()}goToFile(t){this.router.navigate([O.SPACES,...t.path.split("/")],{queryParams:{select:t.name}}).catch(console.error)}load(){this.filesService.loadRecents(this.nbFiles)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-recents-widget"]],decls:10,vars:3,consts:[[1,"box-transparent"],[1,"box-header"],[3,"icon"],["l10nTranslate","",1,"box-title"],["role","button",1,"ms-auto","btn-link",3,"click","icon"],[1,"box-body","px-0","py-0"],[1,"products-list","product-list-in-box",3,"border-0"],[1,"d-flex","flex-column","justify-content-center","text-align-center","text-gray","mt-5"],[1,"products-list","product-list-in-box"],[1,"item",3,"click"],[1,"product-img"],["alt","",3,"error","src"],[1,"product-info"],[1,"product-title"],[1,"me-1",3,"icon"],[1,"product-badge"],[1,"badge","rounded-pill","bg-warning"],["size","4x",3,"icon"],["l10nTranslate","",1,"mt-4"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Files"),l(),r(5,"fa-icon",4),_("click",function(){return a.switchMore()}),l()(),r(6,"div",5),D(7,nl,17,14,"ul",6,tl,!1,ol,4,1,"div",7),l()()),o&2&&(s(2),d("icon",a.icons.faFileLines),s(3),d("icon",a.moreElements?a.icons.faMagnifyingGlassMinus:a.icons.faMagnifyingGlassPlus),s(2),R(a.files()))},dependencies:[F,N,B1],encapsulation:2});let i=n;return i})();var Cr=(()=>{let n=class n{constructor(){this.layout=x(L),this.layout.setBreadcrumbIcon(vo),this.layout.setBreadcrumbNav({url:`/${et.BASE}/${xo}`,translating:!0,sameLink:!0})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-recents"]],decls:6,vars:2,consts:[["appAutoResize","",1,"fs-xs","px-2",3,"useMaxHeight","resizeOffset"],[1,"row"],[1,"col-md-6"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),f(3,"app-files-recents-widget"),l(),r(4,"div",2),f(5,"app-comments-recents-widget"),l()()()),o&2&&d("useMaxHeight",!1)("resizeOffset",40)},dependencies:[t1,hr,_r],encapsulation:2});let i=n;return i})();var gr=[{path:Ui.BASE,pathMatch:"full",redirectTo:et.BASE},{path:et.BASE,component:Cr}];var q2={BASE:"search"},al="Search",En=gi,Sr={title:al,link:q2.BASE,icon:En,level:2,submenus:[]};function sl(i,n){if(i&1){let e=b();r(0,"span",5)(1,"fa-icon",12),_("click",function(){g(e);let o=c();return S(o.clearSearch())}),l()()}if(i&2){let e=c();s(),d("icon",e.icons.faTimes)}}function ll(i,n){if(i&1&&(r(0,"div",10),m(1),l()),i&2){let e=c();s(),v(e.errorMessage)}}function cl(i,n){if(i&1&&(r(0,"div")(1,"span"),m(2,"..."),l(),f(3,"span",22),r(4,"span"),m(5,"..."),l()()),i&2){let e=n.$implicit;s(3),d("innerHTML",e,A2)}}function ml(i,n){if(i&1&&(f(0,"hr",20),r(1,"div",21),D(2,cl,6,1,"div",null,A1),l()),i&2){let e=c().$implicit;s(2),R(e.matches)}}function pl(i,n){if(i&1){let e=b();r(0,"div",13),_("click",function(){let o=g(e).$index,a=c();return S(a.selectedId=o)})("appTap",function(){let o=g(e).$implicit,a=c();return S(a.goTo(o))}),r(1,"div",14)(2,"img",15),_("error",function(){let o=g(e).$implicit;return S(o.fallBackMimeUrl())}),l(),r(3,"div",16)(4,"span",17),m(5),l(),r(6,"div"),f(7,"fa-icon",18),r(8,"span",19)(9,"span"),m(10),l()()()()(),h(11,ml,4,0),l()}if(i&2){let e=n.$implicit,t=n.$index,o=c();U("selected",t===o.selectedId),s(2),d("src",e.mimeUrl,Q),s(3),v(e.name),s(),M(I("d-flex align-items-center text-",e.iconClass)),s(),d("icon",e.icon),s(3),v(e.showedPath),s(),C(e.matches!=null&&e.matches.length?11:-1)}}var xr=(()=>{let n=class n{constructor(){this.locale=x(q),this.store=x(Y),this.searchContent=N1(()=>this.store.currentSearch().content),this.icons={SEARCH_ICON:En,faSpinner:ae,faTrashCan:q1,faTimes:Ve,faFont:D4},this.minCharsToSearch=3,this.loading=!1,this.errorMessage=null,this.selectedId=null,this.router=x(i1),this.layout=x(L),this.filesService=x(E1),this.layout.setBreadcrumbIcon(En),this.layout.setBreadcrumbNav({url:`/${q2.BASE}`,translating:!1,sameLink:!0})}setCurrentSearch(t){this.store.currentSearch.update(o=>Se(P1({},o),{content:t.target.value}))}doSearch(){this.searchContent().length<this.minCharsToSearch||(this.errorMessage=null,this.loading=!0,this.selectedId=null,this.filesService.search(this.store.currentSearch()).subscribe({next:t=>{this.store.filesSearch.set(t),this.loading=!1},error:t=>{this.store.filesSearch.set([]),this.errorMessage=t.error.message,this.loading=!1}}))}toggleFullText(){this.store.currentSearch.update(t=>Se(P1({},t),{fullText:!t.fullText}))}clearSearch(){this.store.currentSearch.update(t=>Se(P1({},t),{content:""})),this.store.filesSearch.set([])}goTo(t){this.router.navigate([O.SPACES,...t.path.split("/")],{queryParams:{select:t.name}}).catch(console.error)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-search"]],viewQuery:function(o,a){if(o&1&&s1(V1,7),o&2){let p;l1(p=c1())&&(a.inputFilter=p.first)}},decls:16,vars:19,consts:[[1,"app-top-menu"],[1,"input-group",2,"width","45%"],["role","button","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled"],[3,"icon","animation"],["name","search","type","text","appAutofocus","","autocomplete","",1,"flex-fill","form-control","form-control-sm",2,"padding-right","24px",3,"input","keyup.enter","keyup.escape","value","placeholder"],[1,"cursor-pointer",2,"position","absolute","right","40px","top","3px","z-index","1001","font-size","1rem"],["placement","bottom","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary-alt","fs-xxs",3,"ngModelChange","ngModel","tooltip"],[3,"icon"],[1,"d-none","d-sm-block","ms-auto"],["appAutoResize","",1,"fs-xs"],["l10nTranslate","",1,"p-3","text-danger","fw-500"],[1,"app-div-striped","py-2",3,"selected"],["role","button",3,"click","icon"],[1,"app-div-striped","py-2",3,"click","appTap"],[1,"d-flex","align-items-center","text-truncate","px-2","py-1"],["alt","","draggable","false","height","28",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-2",2,"height","34px"],[1,"fs-xxs","text-truncate"],[1,"me-1",3,"icon"],[1,"fs-xxxs","text-truncate"],[1,"m-0"],[1,"d-flex","flex-column","px-2","py-1"],[1,"fs-xxxs",3,"innerHTML"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"button",2),_("click",function(){return a.doSearch()}),f(3,"fa-icon",3),l(),r(4,"input",4),T(5,"translate"),_("input",function(u){return a.setCurrentSearch(u)})("keyup.enter",function(){return a.doSearch()})("keyup.escape",function(){return a.clearSearch()}),l(),h(6,sl,2,1,"span",5),r(7,"button",6),T(8,"translate"),_("ngModelChange",function(){return a.toggleFullText()}),f(9,"fa-icon",7),l()(),f(10,"app-input-filter",8),l(),r(11,"div",9),h(12,ll,2,1,"div",10),D(13,pl,12,10,"div",11,A1),T(15,"searchFilter"),l()),o&2&&(s(2),d("disabled",a.searchContent().length<a.minCharsToSearch),s(),d("icon",a.loading?a.icons.faSpinner:a.icons.SEARCH_ICON)("animation",a.loading?"spin":null),s(),d("value",a.searchContent())("placeholder",z(5,10,a.store.currentSearch().fullText?"Search for content":"Search for files",a.locale.language)),s(2),C(a.searchContent()?6:-1),s(),d("ngModel",a.store.currentSearch().fullText)("tooltip",z(8,13,"Search for content",a.locale.language)),s(2),d("icon",a.icons.faFont),s(3),C(a.errorMessage?12:-1),s(),R(z(15,16,a.store.filesSearch(),a.inputFilter.search())))},dependencies:[V1,N,we,c2,g1,_1,C1,t1,w1,m2,F,X,He],encapsulation:2});let i=n;return i})();var vr=[{path:q2.BASE,component:xr}];var yr=(()=>{let n=class n{constructor(){this.uploadFiles=new h1,this.elementRef=x(P2),this.renderer=x(Ie)}ngOnInit(){let t=document.createElement("input");this.renderer.setAttribute(t,"type","file"),this.renderer.setStyle(t,"display","none"),this.renderer.setStyle(t,"position","absolute"),this.elementRef.nativeElement.appendChild(t),this.eventElement=this.renderer.listen(this.elementRef.nativeElement,"click",()=>t.click()),this.options?.isMultiple&&this.renderer.setAttribute(t,"multiple","multiple"),this.options?.isDirectory&&this.renderer.setAttribute(t,"webkitdirectory","webkitdirectory"),this.eventInput=this.renderer.listen(t,"change",o=>{o.target.value&&(this.uploadFiles.next({files:o.target.files,isDirectory:this.options?.isDirectory||!1}),o.target.value="")})}ngOnDestroy(){try{this.eventElement(),this.eventInput()}catch(t){console.warn(t)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=s0({type:n,selectors:[["","appUploadFiles",""]],inputs:{options:"options"},outputs:{uploadFiles:"uploadFiles"}});let i=n;return i})();function fl(i,n){i&1&&(r(0,"span",3),m(1,"Compress and Save"),l())}function ul(i,n){i&1&&(r(0,"span",3),m(1,"Compress and Download"),l())}function _l(i,n){if(i&1){let e=b();r(0,"div",15)(1,"label",12)(2,"input",13),d1("ngModelChange",function(o){g(e);let a=c();return p1(a.archiveProps.compressInDirectory,o)||(a.archiveProps.compressInDirectory=o),S(o)}),l(),r(3,"span",19),m(4,"Save in the current directory"),l()()()}if(i&2){let e=c();s(2),m1("ngModel",e.archiveProps.compressInDirectory)}}var Pn=(()=>{let n=class n{constructor(){this.archiveProps={name:"",files:[],compressInDirectory:!0,extension:"tar"},this.submitEvent=new h1,this.disableInDirCompression=!1,this.locale=x(q),this.layout=x(L),this.compression=!1,this.icons={faFileArchive:Ci},this.submitted=!1,this.filesService=x(E1)}ngOnInit(){this.disableInDirCompression&&(this.archiveProps.compressInDirectory=!1)}onEnter(){this.onSubmit()}onSubmit(){this.archiveProps.name&&!this.submitted&&(this.submitted=!0,this.filesService.compress(this.archiveProps),this.submitEvent.emit(),this.layout.closeDialog())}setCompression(t){this.archiveProps.extension=t?"tgz":"tar"}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-compression-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Re)},inputs:{archiveProps:"archiveProps"},outputs:{submitEvent:"submitEvent"},decls:29,vars:16,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],["l10nTranslate",""],[1,"fs-xs","ms-1"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"input-group","input-group-sm"],["appAutofocus","","type","text",1,"form-control","form-control-sm","fs-xs",3,"ngModelChange","ngModel","placeholder"],[1,"input-group-text"],[2,"min-width","40px"],[1,"form-check","mb-0","mt-2","ps-0"],[1,"form-check-label","ps-1"],["type","checkbox",3,"ngModelChange","ngModel"],["l10nTranslate","",1,"fs-xs","me-1"],[1,"form-check","mb-0","mt-1","ps-0"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["l10nTranslate","",1,"fs-xs"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),h(3,fl,2,0,"span",3)(4,ul,2,0,"span",3),r(5,"span",4),m(6),T(7,"translate"),l()(),r(8,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),r(9,"div",6)(10,"div",7)(11,"input",8),T(12,"translate"),d1("ngModelChange",function(u){return p1(a.archiveProps.name,u)||(a.archiveProps.name=u),u}),l(),r(13,"div",9)(14,"span",10),m(15),l()()(),r(16,"div",11)(17,"label",12)(18,"input",13),d1("ngModelChange",function(u){return p1(a.compression,u)||(a.compression=u),u}),_("ngModelChange",function(u){return a.setCompression(u)}),l(),r(19,"span",14),m(20,"Enable compression"),l(),r(21,"small",3),m(22,"(this may take longer)"),l()()(),h(23,_l,5,1,"div",15),l(),r(24,"div",16)(25,"button",17),_("click",function(){return a.layout.closeDialog()}),m(26,"Cancel"),l(),r(27,"button",18),_("click",function(){return a.onSubmit()}),m(28,"Confirm"),l()()),o&2&&(s(2),d("icon",a.icons.faFileArchive),s(),C(a.archiveProps.compressInDirectory?3:4),s(3),Q1("(",a.archiveProps.files.length," ",z(7,10,a.archiveProps.files.length>1?"items":"item",a.locale.language),")"),s(5),m1("ngModel",a.archiveProps.name),d("placeholder",z(12,13,"Archive name",a.locale.language)),s(4),A(".",a.archiveProps.extension),s(3),m1("ngModel",a.compression),s(5),C(a.disableInDirCompression?-1:23),s(4),d("disabled",!a.archiveProps.name||a.submitted))},dependencies:[N,g1,O1,st,_1,C1,we,F,X],encapsulation:2,changeDetection:0});let i=n;return i})();var br={"Microsoft Word":".docx","Microsoft Excel":".xlsx","Microsoft PowerPoint":".pptx","Open Document Text":".odt","Open Document Spreadsheet":".ods","Open Document Presentation":".odp","Rich Text Format":".rtf",Text:".txt"};var Cl=["InputText"],gl=(i,n)=>n.key;function Sl(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faGlobe)}}function xl(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFolderClosed)}}function vl(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFileAlt)}}function yl(i,n){if(i&1){let e=b();r(0,"li",20)(1,"a",21),_("click",function(){let o=g(e).$implicit,a=c(3);return S(a.onSelectDocType(o.key))}),m(2),l()()}if(i&2){let e=n.$implicit;s(2),v(e.key)}}function bl(i,n){if(i&1&&(r(0,"ul",19),D(1,yl,3,1,"li",20,gl),T(3,"keyvalue"),l()),i&2){let e=c(2);s(),R(z(3,0,e.docTypes,e.originalOrderKeyValue))}}function Tl(i,n){if(i&1&&(r(0,"div",7)(1,"button",15)(2,"span",16),m(3),l(),f(4,"fa-icon",17),l(),V(5,bl,4,3,"ul",18),l()),i&2){let e=c();s(3),v(e.selectedDocType),s(),d("icon",e.icons.faCaretDown)}}function wl(i,n){if(i&1){let e=b();r(0,"div",8)(1,"span",9),f(2,"fa-icon",3),l(),r(3,"input",22),T(4,"translate"),d1("ngModelChange",function(o){g(e);let a=c();return p1(a.downloadProp.url,o)||(a.downloadProp.url=o),S(o)}),_("keydown.control.v",function(){g(e);let o=c();return S(o.pasteUrl())})("keydown.meta.v",function(){g(e);let o=c();return S(o.pasteUrl())}),l()()}if(i&2){let e=c();s(2),d("icon",e.icons.faGlobe),s(),m1("ngModel",e.downloadProp.url),d("placeholder",z(4,3,e.downloadProp.placeholder,e.locale.language))}}function zl(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFolderClosed)}}function Ml(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();d("icon",e.icons.faFileAlt)}}function El(i,n){if(i&1&&(r(0,"span",12),m(1),l()),i&2){let e=c();s(),v(e.error)}}var Tr=(()=>{let n=class n{constructor(){this.refreshFiles=new h1,this.locale=x(q),this.layout=x(L),this.originalOrderKeyValue=re,this.icons={faCaretDown:V4,faGlobe:t2,faFolderClosed:U4,faFileAlt:Di},this.fileProp={title:"",name:"",placeholder:""},this.downloadProp={title:"Download from an external link",url:"",placeholder:"URL (https://...)"},this.selectedDocType="Text",this.docTypes=br,this.submitted=!1,this.filesService=x(E1)}ngOnInit(){this.inputType==="download"?(this.fileProp.title="Download from URL",this.fileProp.placeholder="File name"):this.inputType==="file"?(this.fileProp.name=`${this.layout.translateString("New document")}.txt`,this.fileProp.title="New document",this.fileProp.placeholder="Document name",this.updateFileSelection()):(this.fileProp.title="New folder",this.fileProp.placeholder="Folder name")}onSelectDocType(t){this.selectedDocType=t;let o=this.fileNamePosition();this.fileProp.name=`${this.fileProp.name.substring(0,o<0?this.fileProp.name.length:o)}${this.docTypes[t]}`,this.updateFileSelection()}onEnter(){this.fileProp.name&&this.onSubmit()}onSubmit(){if(this.submitted=!0,this.files.find(t=>t.name.toLowerCase()===this.fileProp.name.toLowerCase())){this.error="This name is already used",this.submitted=!1;return}if(this.inputType==="download"){if(!Fo.test(this.downloadProp.url)){this.error="Malformed URL",this.submitted=!1;return}this.filesService.downloadFromUrl(this.downloadProp.url,this.fileProp.name)}else this.filesService.make(this.inputType,this.fileProp.name);this.layout.closeDialog()}pasteUrl(){setTimeout(()=>{this.fileProp.name=this.downloadProp.url.split("/").slice(-1)[0]},200)}fileNamePosition(){return this.fileProp.name.lastIndexOf(".")}updateFileSelection(){setTimeout(()=>{this.inputText.nativeElement.focus(),this.inputText.nativeElement.setSelectionRange(0,this.fileNamePosition())},0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-files-new-dialog"]],viewQuery:function(o,a){if(o&1&&s1(Cl,7),o&2){let p;l1(p=c1())&&(a.inputText=p.first)}},hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Re)},inputs:{files:"files",inputType:"inputType"},outputs:{refreshFiles:"refreshFiles"},decls:24,vars:12,consts:[["InputText",""],[1,"modal-header"],[1,"modal-title"],[3,"icon"],["l10nTranslate","",1,"ms-1"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["dropdown","",1,"btn-group","btn-group-sm","mb-3"],[1,"input-group","input-group-sm","my-2"],[1,"input-group-text"],["type","text","appAutofocus","",1,"form-control","fs-xs",3,"ngModelChange","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-xs","text-danger"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["aria-controls","dropdown-animated","dropdownToggle","","id","button-animated","type","button",1,"btn","btn-primary","dropdown-toggle"],["l10nTranslate",""],[1,"ms-3",3,"icon"],["aria-labelledby","button-animated","class","dropdown-menu","id","dropdown-animated","role","menu",4,"dropdownMenu"],["aria-labelledby","button-animated","id","dropdown-animated","role","menu",1,"dropdown-menu"],["role","menuitem"],["l10nTranslate","",1,"dropdown-item",3,"click"],["type","text","appAutofocus","",1,"form-control","fs-xs",3,"ngModelChange","keydown.control.v","keydown.meta.v","ngModel","placeholder"]],template:function(o,a){if(o&1){let p=b();r(0,"div",1)(1,"h4",2),h(2,Sl,1,1,"fa-icon",3)(3,xl,1,1,"fa-icon",3)(4,vl,1,1,"fa-icon",3),r(5,"span",4),m(6),l()(),r(7,"button",5),_("click",function(){return g(p),S(a.layout.closeDialog())}),l()(),r(8,"div",6),h(9,Tl,6,2,"div",7),h(10,wl,5,6,"div",8),r(11,"div",8)(12,"span",9),h(13,zl,1,1,"fa-icon",3)(14,Ml,1,1,"fa-icon",3),l(),r(15,"input",10,0),T(17,"translate"),d1("ngModelChange",function(y){return g(p),p1(a.fileProp.name,y)||(a.fileProp.name=y),S(y)}),l()()(),r(18,"div",11),h(19,El,2,1,"span",12),r(20,"button",13),_("click",function(){return g(p),S(a.layout.closeDialog())}),m(21,"Cancel"),l(),r(22,"button",14),_("click",function(){return g(p),S(a.onSubmit())}),m(23,"Confirm "),l()()}if(o&2){let p;s(2),C((p=a.inputType)==="download"?2:p==="directory"?3:p==="file"?4:-1),s(4),v(a.fileProp.title),s(3),C(a.inputType==="file"?9:-1),s(),C(a.inputType==="download"?10:-1),s(3),C(a.inputType==="directory"?13:14),s(2),m1("ngModel",a.fileProp.name),d("placeholder",z(17,9,a.fileProp.placeholder,a.locale.language)),s(4),C(a.error?19:-1),s(3),d("disabled",!a.fileProp.name||a.inputType==="download"&&!a.downloadProp.url||a.submitted)}},dependencies:[N,F,Ki,We,qe,Ge,g1,O1,_1,C1,we,X,ee],encapsulation:2});let i=n;return i})();var wr=i=>({arg:i});function Pl(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}function Al(i,n){if(i&1&&(f(0,"div",11),T(1,"translate")),i&2){let e=c(2);d("innerHTML",fe(1,1,e.permanently?"delete_multiple_files":"trash_multiple_files",e.locale.language,I1(5,wr,e.files.length)),A2)}}function Nl(i,n){if(i&1&&(f(0,"div",11),T(1,"translate")),i&2){let e=c(2);d("innerHTML",fe(1,1,e.permanently?"delete_one_file":"trash_one_file",e.locale.language,I1(5,wr,e.files[0].name)),A2)}}function Ll(i,n){if(i&1&&h(0,Al,2,7,"div",11)(1,Nl,2,7,"div",11),i&2){let e=c();C(e.files.length>1?0:e.files.length===1?1:-1)}}function kl(i,n){if(i&1&&(r(0,"div",3),m(1),l()),i&2){let e=c();s(),v(e.permanently?"Permanent deletion":"Moving to trash")}}var zr=(()=>{let n=class n{constructor(){this.files=[],this.permanently=!1,this.removeFiles=new h1,this.locale=x(q),this.layout=x(L),this.icons={faTrashCan:q1,faSpinner:ae},this.submitted=!1}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.removeFiles.next(),this.layout.closeDialog())}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-trash-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Re)},inputs:{files:"files",permanently:"permanently"},outputs:{removeFiles:"removeFiles"},decls:16,vars:4,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"overflow-wrap-and-whitespace"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"innerHTML"]],template:function(o,a){if(o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Trash"),l(),h(5,Pl,1,1,"fa-icon",4),l(),r(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),r(7,"div",6)(8,"div",7),h(9,Ll,2,1)(10,kl,2,1,"div",3),l()(),r(11,"div",8)(12,"button",9),_("click",function(){return a.layout.closeDialog()}),m(13,"Cancel"),l(),r(14,"button",10),_("click",function(){return a.onSubmit()}),m(15,"Confirm"),l()()),o&2){let p;s(2),d("icon",a.icons.faTrashCan),s(3),C(a.submitted?5:-1),s(4),C((p=a.submitted)===!1?9:p===!0?10:-1),s(5),d("disabled",a.submitted)}},dependencies:[F,N,X],encapsulation:2,changeDetection:0});let i=n;return i})();function Fl(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}var Mr=(()=>{let n=class n{constructor(){this.files=[],this.layout=x(L),this.icons={faTrashCan:q1,faSpinner:ae},this.submitted=!1,this.filesService=x(E1)}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.filesService.delete(this.files),this.layout.closeDialog(),this.submitted=!1)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-trash-empty-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Re)},inputs:{files:"files"},decls:17,vars:3,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Trash"),l(),h(5,Fl,1,1,"fa-icon",4),l(),r(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),r(7,"div",6)(8,"div",3),m(9,"Would you like to empty the trash ?"),l(),r(10,"small",3),m(11,"All items will be permanently deleted"),l()(),r(12,"div",7)(13,"button",8),_("click",function(){return a.layout.closeDialog()}),m(14,"Cancel"),l(),r(15,"button",9),_("click",function(){return a.onSubmit()}),m(16,"Confirm"),l()()),o&2&&(s(2),d("icon",a.icons.faTrashCan),s(3),C(a.submitted?5:-1),s(10),d("disabled",a.submitted))},dependencies:[N,F],encapsulation:2});let i=n;return i})();var y2={VIEWABLE:new Map([["doc","word"],["docm","word"],["docx","word"],["dot","word"],["dotm","word"],["dotx","word"],["epub","word"],["fb2","word"],["fodt","word"],["gdoc","word"],["htm","word"],["html","word"],["hwp","word"],["hwpx","word"],["md","word"],["mht","word"],["mhtml","word"],["odt","word"],["ott","word"],["pages","word"],["rtf","word"],["stw","word"],["sxw","word"],["txt","word"],["wps","word"],["wpt","word"],["xml","word"],["md","word"],["csv","cell"],["et","cell"],["ett","cell"],["fods","cell"],["gsheet","cell"],["numbers","cell"],["ods","cell"],["ots","cell"],["sxc","cell"],["xls","cell"],["xlsm","cell"],["xlsx","cell"],["xlt","cell"],["xltm","cell"],["xltx","cell"],["dps","slide"],["dpt","slide"],["fodp","slide"],["gslide","slide"],["key","slide"],["odg","slide"],["odp","slide"],["otp","slide"],["pot","slide"],["potm","slide"],["potx","slide"],["pps","slide"],["ppsm","slide"],["ppsx","slide"],["ppt","slide"],["pptm","slide"],["pptx","slide"],["sxi","slide"],["djvu","pdf"],["docxf","pdf"],["oform","pdf"],["oxps","pdf"],["pdf","pdf"],["xps","pdf"],["vsdm","diagram"],["vsdx","diagram"],["vssm","diagram"],["vssx","diagram"],["vstm","diagram"],["vstx","diagram"]]),EDITABLE:new Map([["doc","word"],["docm","word"],["docx","word"],["dotm","word"],["dotx","word"],["epub","word"],["fb2","word"],["html","word"],["odt","word"],["ott","word"],["rtf","word"],["txt","word"],["md","word"],["xlsb","cell"],["xlsm","cell"],["xls","cell"],["xlsx","cell"],["xltm","cell"],["xltx","cell"],["csv","cell"],["ods","cell"],["ots","cell"],["potm","slide"],["potx","slide"],["ppsm","slide"],["ppsx","slide"],["pptm","slide"],["ppt","slide"],["pptx","slide"],["odp","slide"],["otp","slide"],["pdf","pdf"]])};var An=class{constructor(n,e,t=!1){this.shares=[],this.links=[],this.spaces=[],this.syncs=[],this.newly=0,this.isRenamed=!1,this.isImage=!1,this.isViewable=!1,this.isEditable=!1,this.isCompressible=!0,this.isBeingDeleted=!1,this.isSelected=!1,this.isDisabled=!1,this.canBeReShared=!1,this.haveThumbnail=!1,this.setShares(Je("shares",n)),Object.assign(this,n),this.path=`${e}/${this.path!=="."?`${this.path}/`:""}${this.root?.alias||this.name}`,this.mime=this.getMime(this.mime,t),this.hTimeAgo=k2(this.mtime).fromNow(!0),this.newly=kt(this.mtime),this.setMimeUrl(),this.setHSize(),this.setRoot(t)}get dataUrl(){return`${ia}/${this.path}`}get taskUrl(){return`${aa}/${this.path}`}get thumbnailUrl(){return`${na}/${this.path}`}fallBackMimeUrl(){this.mimeUrl=en}rename(n){this.name=n,this.path=[...this.path.split("/").slice(0,-1),this.name].join("/")}getType(n){return this.isDir?n?u2:Ce:Ro}getMime(n,e){if(this.isDir)return this.isViewable=!1,this.getType(e);if(n){let t=n.split("-"),o=t[t.length-1],a=this.name.split(".").pop().toLowerCase();return this.shortMime=t[0],a==="pdf"?(this.shortMime=o,this.isViewable=!0,this.isEditable=y2.EDITABLE.has(a)):y2.EDITABLE.has(a)||y2.VIEWABLE.has(a)?(this.shortMime="document",this.isEditable=y2.EDITABLE.has(a),this.isViewable=this.isEditable||y2.VIEWABLE.has(a)):o==="html"?(this.isViewable=!0,this.isEditable=!0):a==="mp4"?(this.isViewable=!0,this.shortMime="media",this.haveThumbnail=!0):this.shortMime==="image"?(this.isImage=!0,this.isViewable=!0,this.haveThumbnail=!0):["video","audio"].indexOf(this.shortMime)>-1?(this.shortMime="media",this.isViewable=!0,this.haveThumbnail=!0):Bo.has(n)?(this.isCompressible=!1,this.isViewable=!1):Uo.has(a)||(this.isViewable=!0,this.shortMime="text"),n}else return this.isViewable=!0,this.shortMime="text",this.getType(e)}setMimeUrl(){this.mimeUrl=U1(this.mime)}setRoot(n){this.root&&(this.root.enabled===!1&&(this.isDisabled=!0),this.root.hPerms=wo(this.root.permissions,this.isDir?[]:[le.DELETE,le.ADD]),this.root?.owner?.login&&(this.root.owner.avatarUrl=l2(this.root.owner.login)),this.canBeReShared=n&&le.SHARE_OUTSIDE in this.root.hPerms)}setHSize(){this.hSize=this.isDir?"\u25CF":co(this.size,0,!0)}setShares(n){if(n?.length)for(let e of n)e.type===0?this.shares.push(e):this.links.push(e)}};var Er=(()=>{let n=class n{constructor(){this.supportUploadDirectory=uo(),this.http=x(rt),this.filesService=x(E1),this.filesTasksService=x(nn)}addFiles(t){return K1(this,null,function*(){let o=`${oa}/${this.filesService.currentRoute}`,a=[];for(let[p,u]of Object.entries(this.sortFiles(t))){let y=`${this.filesService.currentRoute}/${p}`.split("/").slice(0,-1).join("/"),w=`${this.filesService.currentRoute}/${p}`.split("/").slice(-1)[0],k=this.filesTasksService.createUploadTask(y,w,u.size);a.unshift([k,this.uploadFiles(`${o}/${p}`,u.form).pipe(J1(P=>P.type===x0.UploadProgress),J2(P=>this.updateProgress(k,P)))])}for(let[p,u]of a)try{yield Z3(u),p.props.progress=100,p.status=R2.SUCCESS}catch(y){p.status=R2.ERROR,y.status===0?p.result=y.statusText:p.result=y.error.message}finally{this.filesTasksService.updateTask(p)}})}onDropFiles(t){t.dataTransfer.items&&t.dataTransfer.items[0]?.webkitGetAsEntry?this.webkitReadDataTransfer(t):this.addFiles(t.dataTransfer.files).catch(console.error)}uploadFiles(t,o){return this.http.post(t,o,{reportProgress:!0,observe:"events"})}updateProgress(t,o){t.props.size=o.loaded,t.props.progress=Math.round(100*o.loaded/o.total)}sortFiles(t){let o={};for(let a of t){let p=a.relativePath||a.webkitRelativePath,u=(p?p.split("/")[0]:a.name).normalize();u in o||(o[u]={nb:0,size:0,form:new FormData}),o[u].form.append("file",a,(p||a.name).normalize()),o[u].nb++,o[u].size+=a.size}return o}webkitReadDataTransfer(t){let o=t.dataTransfer.items.length,a=[],p=P=>{P.readEntries(function(j){if(j.length){o+=j.length;for(let G of j)G.isFile?G.file(W=>{u(G,W)},y):G.isDirectory&&p(G.createReader());p(P)}else w()},y)},u=(P,j)=>{k(P,j),a.push(j),w()},y=P=>{throw w(),P},w=()=>{--o==0&&this.addFiles(a).catch(console.error)},k=(P,j)=>{P.fullPath&&P.fullPath!==`/${j.name}`&&(j.relativePath=P.fullPath.startsWith("/")?P.fullPath.slice(1):P.fullPath)};for(let P of t.dataTransfer.items){let j=P.webkitGetAsEntry();if(!j){w();return}j.isFile?u(j,P.getAsFile()):p(j.createReader())}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=W1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var Pr=(()=>{let n=class n{constructor(){this.inPersonalSpace=!1,this.http=x(rt),this.layout=x(L),this.breadCrumbFilesRepo=!1,this.inShareRepo=!1,this.inRootSpace=!1}setEnvironment(t,o){this.breadCrumbFilesRepo=O.FILES===t,this.inPersonalSpace=o.length&&o[0].path===O.PERSONAL,this.inShareRepo=t===O.SHARES,this.inRootSpace=this.inShareRepo?o.length===0:o.length===1,this.browseApi=mo(`${So}/${t}`,o,!1),this.breadCrumbUrl=`/${O.SPACES}/${t}${s2(o)}`,this.breadCrumbIcon=this.inShareRepo?o1.SHARED_WITH_ME:this.breadCrumbFilesRepo?this.inPersonalSpace&&this.breadCrumbFilesRepo?o1.PERSONAL:o1.SPACES:o1.TRASH}loadFiles(){return this.http.get(this.browseApi).pipe(J2(()=>{this.layout.setBreadcrumbIcon(this.breadCrumbIcon),this.layout.setBreadcrumbNav(this.breadcrumbNav())}),X2(t=>$t(()=>t)))}breadcrumbNav(){return{url:this.inPersonalSpace&&this.inRootSpace?`${this.breadCrumbUrl}/${Ue.SHORT_PERSONAL_FILES}`:this.inShareRepo&&this.inRootSpace?`${this.breadCrumbUrl}/${Ue.SHARED_WITH_ME}`:this.breadCrumbUrl,translating:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),sameLink:this.inRootSpace&&(this.inPersonalSpace||this.inShareRepo),firstLink:this.inPersonalSpace&&this.breadCrumbFilesRepo?null:this.breadCrumbFilesRepo?O.SPACES:this.inShareRepo?O.SPACES_SHARES:O.TRASH,mutateLevel:this.inPersonalSpace&&!this.breadCrumbFilesRepo&&!this.inRootSpace?{0:{setTitle:Ue.PERSONAL_FILES,translateTitle:!0}}:null,splicing:this.inPersonalSpace?!this.breadCrumbFilesRepo&&!this.inRootSpace?2:3:2}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=W1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function Dl(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}var Ar=(()=>{let n=class n{constructor(){this.addAnchoredFiles=new h1,this.locale=x(q),this.layout=x(L),this.icons={faAnchor:Ri,faPlus:be,faSpinner:ae,SPACES:o1.SPACES},this.space={roots:[]},this.submitted=!1,this.loading=!1,this.userService=x(r1),this.user=this.userService.user,this.spacesService=x($o)}ngOnInit(){for(let t of this.files)this.space.roots.push({id:t.id,name:t.name,alias:t.name,permissions:"",createdAt:new Date,isRenamed:!1,hPerms:To("",[le.SHARE_INSIDE]),isDir:t.mime===Ce,owner:{id:this.user.id,login:this.user.login},file:t})}onSetSpace(t){this.selectedSpace=t}onSearchSpaces(t){return this.spacesService.searchSpaces({search:t,shareInsidePermission:!0,limit:6})}onSubmit(){!this.selectedSpace||!this.space.roots.length||(this.loading=!0,this.submitted=!0,this.spacesService.createUserSpaceRoots(this.selectedSpace.id,this.space.roots).subscribe({next:t=>{t.length&&this.addAnchoredFiles.emit({space:this.selectedSpace,rootFiles:t.map(o=>({id:o.file.id,name:o.file.path.split("/").at(-1)}))}),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Anchor files to a space",t.error.message),this.loading=!1,this.submitted=!1}}))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-space-anchor-file-dialog"]],inputs:{files:"files"},decls:22,vars:14,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-auto",3,"click"],[1,"modal-body"],[1,"mb-3"],["for","space","l10nTranslate",""],["id","space",3,"data","searchFunction","active","itemIcon","placeholder"],["for","files","l10nTranslate",""],["id","files",3,"space","user","showInfos","showUsers"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Anchor files to a space"),l()(),h(5,Dl,1,1,"fa-icon",4),r(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),r(7,"div",6)(8,"div",7)(9,"label",8),m(10,"Space"),l(),r(11,"app-select",9),T(12,"translate"),_("data",function(u){return a.onSetSpace(u)}),l()(),r(13,"div",7)(14,"label",10),m(15,"Files"),l(),f(16,"app-space-manage-roots",11),l()(),r(17,"div",12)(18,"button",13),_("click",function(){return a.layout.closeDialog()}),m(19,"Cancel"),l(),r(20,"button",14),_("click",function(){return a.onSubmit()}),m(21," Confirm "),l()()),o&2&&(s(2),d("icon",a.icons.faAnchor),s(3),C(a.loading?5:-1),s(6),d("searchFunction",a.onSearchSpaces.bind(a))("active",a.selectedSpace)("itemIcon",a.icons.SPACES)("placeholder",z(12,11,"Type to search for space to select",a.locale.language)),s(5),d("space",a.space)("user",a.user)("showInfos",!1)("showUsers",!1),s(4),d("disabled",a.submitted||!a.selectedSpace||!a.space.roots.length))},dependencies:[N,F,ma,Do,X],encapsulation:2});let i=n;return i})();var Rl=["MainContextMenu"],Il=["MainReadOnlyContextMenu"],Ol=["FileContextMenu"],Vl=i=>({nb:i}),Bl=()=>({isMultiple:!0}),Ul=()=>({isDirectory:!0}),kr=(i,n)=>n.id,Fr=(i,n)=>n.key;function Hl(i,n){if(i&1){let e=b();r(0,"a",33),_("uploadFiles",function(o){g(e);let a=c(3);return S(a.onUploadFiles(o,!0))}),r(1,"span",22),f(2,"fa-icon",10),m(3,"Upload folders"),l()()}if(i&2){let e=c(3);d("options",Ee(2,Ul)),s(2),d("icon",e.icons.faUpload)}}function $l(i,n){if(i&1){let e=b();r(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){g(e);let o=c(2);return S(o.openNewDialog("directory"))}),r(3,"span",22),f(4,"fa-icon",10),m(5,"New folder"),l()()(),r(6,"li",29)(7,"a",30),_("click",function(){g(e);let o=c(2);return S(o.openNewDialog("file"))}),r(8,"span",22),f(9,"fa-icon",10),m(10,"New document"),l()()(),r(11,"li",29)(12,"a",30),_("click",function(){g(e);let o=c(2);return S(o.openNewDialog("download"))}),r(13,"span",22),f(14,"fa-icon",10),m(15,"Download from URL"),l()()(),r(16,"li",29)(17,"a",31),_("uploadFiles",function(o){g(e);let a=c(2);return S(a.onUploadFiles(o))}),r(18,"span",22),f(19,"fa-icon",10),m(20,"Upload files"),l()(),h(21,Hl,4,3,"a",32),l()()}if(i&2){let e=c(2);s(4),d("icon",e.icons.PERSONAL),s(5),d("icon",e.icons.faFileAlt),s(5),d("icon",e.icons.faGlobe),s(3),d("options",Ee(6,Bl)),s(2),d("icon",e.icons.faUpload),s(2),C(e.supportUploadFolder?21:-1)}}function Gl(i,n){if(i&1){let e=b();r(0,"div",26),_("onShown",function(){g(e);let o=c();return S(o.initUpload())}),r(1,"button",27),T(2,"translate"),f(3,"fa-icon",10),l(),V(4,$l,22,7,"ul",13),l()}if(i&2){let e=c();s(),d("tooltip",z(2,2,"New",e.locale.language)),s(2),d("icon",e.icons.faPlus)}}function Wl(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(3);return S(o.openSpaceAnchorFileDialog())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"Anchor to a space"),l()()()}if(i&2){let e=c(3);s(3),d("icon",e.icons.faAnchor)}}function ql(i,n){if(i&1){let e=b();r(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){g(e);let o=c(2);return S(o.openShareDialog())}),r(3,"span",22),f(4,"fa-icon",10),m(5,"New share"),l()()(),r(6,"li",29)(7,"a",30),_("click",function(){g(e);let o=c(2);return S(o.openShareLinkDialog())}),r(8,"span",22),f(9,"fa-icon",10),m(10,"New share link"),l()()(),h(11,Wl,5,1,"li",29),l()}if(i&2){let e=c(2);s(4),d("icon",e.icons.SHARES),s(5),d("icon",e.icons.faLink),s(2),C(e.isFilesRepo?11:-1)}}function Yl(i,n){if(i&1&&(r(0,"div",11)(1,"button",27),T(2,"translate"),f(3,"fa-icon",10),l(),V(4,ql,12,3,"ul",13),l()),i&2){let e=c();d("isDisabled",!e.hasSelection||e.inSharesList&&!e.selection[0].canBeReShared),s(),d("tooltip",z(2,3,"Share",e.locale.language)),s(2),d("icon",e.icons.SHARES)}}function jl(i,n){if(i&1){let e=b();r(0,"button",9),T(1,"translate"),_("click",function(){g(e);let o=c(2);return S(o.openEmptyTrashDialog())}),f(2,"fa-icon",10),l()}if(i&2){let e=c(2);d("disabled",!e.stats.elements)("tooltip",z(1,3,"Empty",e.locale.language)),s(2),d("icon",e.icons.TRASH)}}function Kl(i,n){if(i&1){let e=b();r(0,"button",9),T(1,"translate"),_("click",function(){g(e);let o=c();return S(o.openTrashDialog(!0))}),f(2,"fa-icon",10),l(),h(3,jl,3,6,"button",34)}if(i&2){let e=c();d("disabled",!e.hasSelection)("tooltip",z(1,4,"Remove",e.locale.language)),s(2),d("icon",e.icons.faBan),s(),C(e.inRootSpace?3:-1)}}function Ql(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(3);return S(o.shortcutView())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"View"),l()()()}if(i&2){let e=c(3);s(3),d("icon",e.icons.faEye)}}function Xl(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(3);return S(o.shortcutEdit())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"Edit"),l()()()}if(i&2){let e=c(3);s(3),d("icon",e.icons.faPen)}}function Zl(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(3);return S(o.shortcutRename())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"Rename"),l()()()}if(i&2){let e=c(3);s(3),d("icon",e.icons.faSpellCheck)}}function Jl(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(3);return S(o.addToSync())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"Synchronize"),l()()()}if(i&2){let e=c(3);s(3),d("icon",e.icons.faRotate)}}function e6(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(3);return S(o.decompressFile())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"Decompress"),l()()()}if(i&2){let e=c(3);s(3),d("icon",e.icons.faFileArchive)}}function t6(i,n){if(i&1){let e=b();h(0,Ql,5,1,"li",29),h(1,Xl,5,1,"li",29),h(2,Zl,5,1,"li",29),r(3,"li",29)(4,"a",30),_("click",function(){g(e);let o=c(2);return S(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),r(5,"span",22),f(6,"fa-icon",10),m(7,"Comment"),l()()(),h(8,Jl,5,1,"li",29),h(9,e6,5,1,"li",29)}if(i&2){let e=c(2);C(e.selection[0].isViewable?0:-1),s(),C(e.selection[0].isEditable?1:-1),s(),C(e.inSharesList?-1:2),s(4),d("icon",e.icons.faCommentDots),s(2),C(e.isElectronApp&&e.selection[0].isDir?8:-1),s(),C(!e.inSharesList&&!e.selection[0].isCompressible?9:-1)}}function i6(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(2);return S(o.openCompressionDialog())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"Compress"),l()()()}if(i&2){let e=c(2);s(3),d("icon",e.icons.faFileArchive)}}function n6(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(2);return S(o.copyMoveFiles())}),r(2,"span",22),f(3,"fa-icon",10),m(4,"Copy/Move"),l()()()}if(i&2){let e=c(2);s(3),d("icon",e.icons.faArrowsAlt)}}function o6(i,n){if(i&1){let e=b();r(0,"a",30),_("click",function(){g(e);let o=c(3);return S(o.openTrashDialog(!0))}),r(1,"span",22),f(2,"fa-icon",10),m(3,"Remove"),l()()}if(i&2){let e=c(3);s(2),d("icon",e.icons.faBan)}}function a6(i,n){if(i&1){let e=b();r(0,"a",30),_("click",function(){g(e);let o=c(3);return S(o.openTrashDialog())}),r(1,"span",22),f(2,"fa-icon",10),m(3,"Trash"),l()()}if(i&2){let e=c(3);s(2),d("icon",e.icons.TRASH)}}function r6(i,n){if(i&1&&(f(0,"li",35),r(1,"li",29),h(2,o6,4,1,"a",36)(3,a6,4,1,"a",36),l()),i&2){let e=c(2);s(2),C(e.isTrashRepo?2:3)}}function s6(i,n){if(i&1){let e=b();r(0,"ul",28),h(1,t6,10,6),h(2,i6,5,1,"li",29),h(3,n6,5,1,"li",29),r(4,"li",29)(5,"a",30),_("click",function(){g(e);let o=c();return S(o.addToClipboard())}),r(6,"span",22),f(7,"fa-icon",10),m(8,"Clipboard"),l()()(),r(9,"li",29)(10,"a",30),_("click",function(){g(e);let o=c();return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION))}),r(11,"span",22),f(12,"fa-icon",10),m(13,"Informations"),l()()(),h(14,r6,4,1),l()}if(i&2){let e=c();s(),C(e.selection.length===1?1:-1),s(),C(e.canCompress?2:-1),s(),C(e.hasDisabledItemsInSelection?-1:3),s(4),d("icon",e.icons.faClipboardList),s(5),d("icon",e.icons.faCircleInfo),s(2),C(e.inSharesList?-1:14)}}function l6(i,n){i&1&&f(0,"div")}function c6(i,n){if(i&1){let e=b();r(0,"img",56),_("error",function(){g(e);let o=c().$implicit;return S(o.isImage=!1)}),l()}if(i&2){let e=c().$implicit,t=c(2);n1("max-height",t.galleryMode.image,"px"),d("src",Qe("",e.thumbnailUrl,"?size=",t.galleryMode.imageRes),Q)}}function m6(i,n){if(i&1){let e=b();r(0,"img",57),_("error",function(){g(e);let o=c().$implicit;return S(o.fallBackMimeUrl())}),l()}if(i&2){let e=c().$implicit,t=c(2);d("src",e.mimeUrl,Q)("height",t.galleryMode.image)("width",t.galleryMode.image)}}function p6(i,n){if(i&1&&(r(0,"span",46),f(1,"fa-icon",10),l()),i&2){let e=c().$implicit,t=c(2);d("tooltip",Xn(e.lock.owner)),s(),d("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faLockOpen)}}function d6(i,n){if(i&1){let e=b();r(0,"span",58),_("click",function(){g(e);let o=c(3);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),s(),d("icon",t.icons.SHARES),s(),A("\xA0",e.shares.length," ")}}function f6(i,n){if(i&1){let e=b();r(0,"span",59),_("click",function(){g(e);let o=c(3);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),s(),d("icon",t.icons.SPACES),s(),A("\xA0",e.spaces.length," ")}}function u6(i,n){if(i&1){let e=b();r(0,"span",60),_("click",function(){g(e);let o=c(3);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),s(),d("icon",t.icons.LINKS),s(),A("\xA0",e.links.length," ")}}function _6(i,n){if(i&1){let e=b();r(0,"span",60),_("click",function(){g(e);let o=c(3);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),s(),d("icon",t.icons.SYNC),s(),A("\xA0",e.syncs.length," ")}}function h6(i,n){if(i&1){let e=b();r(0,"span",61),_("click",function(){g(e);let o=c(3);return S(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),f(1,"fa-icon",10),l()}if(i&2){let e=c(3);n1("font-size",e.galleryMode.textSize,"px"),s(),d("icon",e.icons.faCommentDots)}}function C6(i,n){if(i&1&&(r(0,"span",51),f(1,"app-user-avatar",62),l()),i&2){let e=c().$implicit,t=c(2);s(),d("user",e.root.owner)("height",t.galleryMode.dimensions/3)("width",t.galleryMode.dimensions/3)("fontSize",t.galleryMode.faSize/2)}}function g6(i,n){if(i&1&&(r(0,"span",52)(1,"span",63),m(2),l()()),i&2){let e=c().$implicit,t=c(2);s(),n1("font-size",t.galleryMode.textSize,"px"),s(),v(e.hTimeAgo)}}function S6(i,n){if(i&1){let e=b();r(0,"input",64),_("renamingInProgress",function(o){g(e);let a=c(3);return S(a.setRenamingInProgress(o))})("updateObject",function(o){g(e);let a=c(3);return S(a.renameFile(o))}),l()}if(i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),d("inputObject",e)("fullWidth",!0)("textCenter",!0)}}function x6(i,n){if(i&1&&(r(0,"span",65),m(1),l()),i&2){let e=c().$implicit,t=c(2);n1("font-size",t.galleryMode.textSize,"px"),s(),v(e.name)}}function v6(i,n){if(i&1){let e=b();r(0,"div",41),_("click",function(o){let a=g(e).$implicit,p=c(2);return S(p.onSelect(o,a))})("contextmenu",function(o){let a=g(e).$implicit,p=c(2);return S(p.onTargetContextMenu(o,a))})("appTap",function(){let o=g(e).$implicit,a=c(2);return S(a.browse(o))}),r(1,"div",42),h(2,c6,1,5,"img",43)(3,m6,1,3,"img",44),r(4,"span",45),h(5,p6,2,3,"span",46),h(6,d6,3,4,"span",47),h(7,f6,3,4,"span",48),h(8,u6,3,4,"span",49),h(9,_6,3,4,"span",49),h(10,h6,2,3,"span",50),l(),h(11,C6,2,4,"span",51),h(12,g6,3,3,"span",52),l(),r(13,"div",53),h(14,S6,1,5,"input",54)(15,x6,2,3,"span",55),l()()}if(i&2){let e=n.$implicit,t=n.$index,o=c(2);n1("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),U("disabled",e.isDisabled)("deleted",e.isBeingDeleted)("selected",e.isSelected),s(),c0("rowIndex",t),s(),C(e.isImage?2:3),s(3),C(e.lock?5:-1),s(),C(e.shares.length?6:-1),s(),C(e.spaces.length?7:-1),s(),C(e.links.length?8:-1),s(),C(e.syncs.length?9:-1),s(),C(e.hasComments?10:-1),s(),C(e.root?11:-1),s(),C(e.newly?12:-1),s(2),C(e.isRenamed?14:15)}}function y6(i,n){if(i&1){let e=b();r(0,"div",18)(1,"app-virtual-scroll",37),T(2,"searchFilter"),_("contextmenu",function(o){g(e);let a=c();return S(a.onContextMenu(o))}),V(3,l6,1,0,"div",38),r(4,"div",39),D(5,v6,16,21,"div",40,kr),l()()()}if(i&2){let e=c(),t=S1(33);s(),d("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",fe(2,6,e.files,e.inputFilter.search(),"name"))("galleryMode",!0)("resizeOffset",110),s(2),d("ngTemplateOutlet",t),s(2),R(e.scrollView==null?null:e.scrollView.viewPortItems)}}function b6(i,n){if(i&1&&f(0,"fa-icon",72),i&2){let e=c(4);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function T6(i,n){if(i&1){let e=b();r(0,"th",71),_("click",function(){g(e);let o=c().$implicit,a=c(2);return S(a.sortBy(o.key))}),m(1),h(2,b6,1,2,"fa-icon",72),l()}if(i&2){let e=c().$implicit,t=c(2);M(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function w6(i,n){if(i&1&&h(0,T6,3,10,"th",70),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function z6(i,n){i&1&&f(0,"div")}function M6(i,n){if(i&1){let e=b();r(0,"input",79),_("renamingInProgress",function(o){g(e);let a=c(6);return S(a.setRenamingInProgress(o))})("updateObject",function(o){g(e);let a=c(6);return S(a.renameFile(o))}),l()}if(i&2){let e=c(4).$implicit;d("inputObject",e)}}function E6(i,n){if(i&1&&(r(0,"span",80),m(1),l()),i&2){let e=c(5).$implicit;s(),v(e.root.description)}}function P6(i,n){if(i&1&&(r(0,"div",78)(1,"span",65),m(2),l(),h(3,E6,2,1,"span",80),l()),i&2){let e=c(4).$implicit,t=c(2);s(2),v(e.name),s(),C(t.inSharesList&&(e.root!=null&&e.root.description)?3:-1)}}function A6(i,n){if(i&1){let e=b();r(0,"div",75)(1,"img",76),_("error",function(){g(e);let o=c(3).$implicit;return S(o.fallBackMimeUrl())}),l(),h(2,M6,1,1,"input",77)(3,P6,4,2,"div",78),l()}if(i&2){let e=c(3).$implicit;s(),d("src",e.mimeUrl,Q),s(),C(e.isRenamed?2:3)}}function N6(i,n){if(i&1&&(r(0,"div",81),f(1,"app-user-avatar",82),l()),i&2){let e=c(4).$implicit;s(),d("user",e.root.owner)}}function L6(i,n){if(i&1&&h(0,N6,2,1,"div",81),i&2){let e=c(3).$implicit;C(e.root?0:-1)}}function k6(i,n){if(i&1&&(r(0,"span",46),f(1,"fa-icon",10),l()),i&2){let e=c(4).$implicit,t=c(2);d("tooltip",Xn(e.lock.owner)),s(),d("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faLockOpen)}}function F6(i,n){if(i&1){let e=b();r(0,"span",60),_("click",function(){g(e);let o=c(6);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),d("icon",t.icons.SHARES),s(),A("\xA0",e.shares.length," ")}}function D6(i,n){if(i&1){let e=b();r(0,"span",60),_("click",function(){g(e);let o=c(6);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),d("icon",t.icons.LINKS),s(),A("\xA0",e.links.length," ")}}function R6(i,n){if(i&1){let e=b();r(0,"span",60),_("click",function(){g(e);let o=c(6);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),d("icon",t.icons.SPACES),s(),A("\xA0",e.spaces.length," ")}}function I6(i,n){if(i&1){let e=b();r(0,"span",60),_("click",function(){g(e);let o=c(6);return S(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),m(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),d("icon",t.icons.SYNC),s(),A("\xA0",e.syncs.length," ")}}function O6(i,n){if(i&1){let e=b();r(0,"span",61),_("click",function(){g(e);let o=c(6);return S(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),f(1,"fa-icon",10),l()}if(i&2){let e=c(6);s(),d("icon",e.icons.faCommentDots)}}function V6(i,n){if(i&1&&(h(0,k6,2,3,"span",46),h(1,F6,3,2,"span",83),h(2,D6,3,2,"span",83),h(3,R6,3,2,"span",83),h(4,I6,3,2,"span",83),h(5,O6,2,1,"span",84)),i&2){let e=c(3).$implicit;C(e.lock?0:-1),s(),C(e.shares.length?1:-1),s(),C(e.links.length?2:-1),s(),C(e.spaces.length?3:-1),s(),C(e.syncs.length?4:-1),s(),C(e.hasComments?5:-1)}}function B6(i,n){if(i&1&&f(0,"app-file-permissions",85),i&2){let e=c(4).$implicit;d("permissions",e.root.hPerms)}}function U6(i,n){if(i&1&&h(0,B6,1,1,"app-file-permissions",85),i&2){let e=c(3).$implicit;C(e.root&&e.root.permissions?0:-1)}}function H6(i,n){if(i&1&&m(0),i&2){let e=c(3).$implicit;A(" ",e.hSize," ")}}function $6(i,n){if(i&1&&m(0),i&2){let e=c(3).$implicit;A(" ",e.hTimeAgo," ")}}function G6(i,n){if(i&1&&(r(0,"td"),h(1,A6,4,2,"div",75)(2,L6,1,1)(3,V6,6,6)(4,U6,1,1)(5,H6,1,1)(6,$6,1,1),l()),i&2){let e,t=c().$implicit,o=c().$implicit;M(Qe("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),s(),C((e=t.key)==="name"?1:e==="anchored"?2:e==="infos"?3:e==="permissions"?4:e==="size"?5:e==="mtime"?6:-1)}}function W6(i,n){if(i&1&&h(0,G6,7,9,"td",74),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function q6(i,n){if(i&1){let e=b();r(0,"tr",73),_("click",function(o){let a=g(e).$implicit,p=c(2);return S(p.onSelect(o,a))})("contextmenu",function(o){let a=g(e).$implicit,p=c(2);return S(p.onTargetContextMenu(o,a))})("appTap",function(){let o=g(e).$implicit,a=c(2);return S(a.browse(o))}),D(1,W6,1,1,null,null,Fr),T(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c(2);U("disabled",e.isDisabled)("deleted",e.isBeingDeleted)("selected",e.isSelected),s(),R(z(3,6,t.tableHeaders,t.originalOrderKeyValue))}}function Y6(i,n){if(i&1){let e=b();r(0,"table",66)(1,"thead")(2,"tr"),D(3,w6,1,1,null,null,Fr),T(5,"keyvalue"),l()()(),r(6,"app-virtual-scroll",67),T(7,"searchFilter"),_("contextmenu",function(o){g(e);let a=c();return S(a.onContextMenu(o))}),V(8,z6,1,0,"div",38),r(9,"table",66)(10,"tbody",68),D(11,q6,4,9,"tr",69,kr),l()()()}if(i&2){let e=c(),t=S1(33);s(3),R(z(5,3,e.tableHeaders,e.originalOrderKeyValue)),s(3),d("bufferAmount",5)("items",fe(7,6,e.files,e.inputFilter.search(),"name")),s(2),d("ngTemplateOutlet",t),s(3),R(e.scrollView==null?null:e.scrollView.viewPortItems)}}function j6(i,n){if(i&1&&(r(0,"span",20),m(1),T(2,"translate"),l()),i&2){let e=c();s(),Q1("",e.stats.dirs," ",z(2,2,e.stats.dirs>1?"directories":"directory",e.locale.language))}}function K6(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"translate"),l()),i&2){let e=c();s(),Q1("",e.stats.files," ",z(2,2,e.stats.files>1?"files":"file",e.locale.language))}}function Q6(i,n){i&1&&(r(0,"div",86)(1,"span",22),m(2,"Forbidden resource"),l()())}function X6(i,n){i&1&&(r(0,"div",86)(1,"span",22),m(2,"Location not found"),l()())}function Z6(i,n){i&1&&(r(0,"div",86)(1,"span",22),m(2,"Server Error"),l()())}function J6(i,n){i&1&&(r(0,"div",87)(1,"span",22),m(2,"Drag and drop your files here"),l()())}function ec(i,n){if(i&1&&h(0,Q6,3,0,"div",86)(1,X6,3,0,"div",86)(2,Z6,3,0,"div",86)(3,J6,3,0,"div",87),i&2){let e=c();C(e.forbiddenResource?0:e.locationNotFound?1:e.serverError?2:!e.isTrashRepo&&!e.loading&&!e.stats.elements?3:-1)}}function tc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"View"),l()),i&2){let e=c(3);s(),d("icon",e.icons.faEye)}}function ic(i,n){if(i&1){let e=b();V(0,tc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c(2);return S(o.shortcutView())})}}function nc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Edit"),l()),i&2){let e=c(3);s(),d("icon",e.icons.faPen)}}function oc(i,n){if(i&1){let e=b();V(0,nc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c(2);return S(o.shortcutEdit())})}}function ac(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Rename"),l()),i&2){let e=c(3);s(),d("icon",e.icons.faSpellCheck)}}function rc(i,n){if(i&1){let e=b();V(0,ac,3,1,"ng-template",25),_("execute",function(){g(e);let o=c(2);return S(o.shortcutRename())})}}function sc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Comment"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faCommentDots)}}function lc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Synchronize"),l()),i&2){let e=c(3);s(),d("icon",e.icons.faRotate)}}function cc(i,n){if(i&1){let e=b();V(0,lc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c(2);return S(o.addToSync())})}}function mc(i,n){if(i&1){let e=b();h(0,ic,1,0,null,23),h(1,oc,1,0,null,23),h(2,rc,1,0,null,23),V(3,sc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),h(4,cc,1,0,null,23)}if(i&2){let e=c();C(e.selection[0].isViewable?0:-1),s(),C(e.selection[0].isEditable?1:-1),s(),C(e.inSharesList?-1:2),s(2),C(e.isElectronApp&&e.selection[0].isDir?4:-1)}}function pc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Compress"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faFileArchive)}}function dc(i,n){if(i&1){let e=b();V(0,pc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.openCompressionDialog())})}}function fc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Decompress"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faFileArchive)}}function uc(i,n){if(i&1){let e=b();V(0,fc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.decompressFile())})}}function _c(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Copy/Move"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faArrowsAlt)}}function hc(i,n){if(i&1){let e=b();V(0,_c,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.copyMoveFiles())})}}function Cc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Share"),l()),i&2){let e=c(2);s(),d("icon",e.icons.SHARES)}}function gc(i,n){if(i&1&&V(0,Cc,3,1,"ng-template",24),i&2){c();let e=S1(46);d("subMenu",e)}}function Sc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Clipboard"),l()),i&2){let e=c();s(),d("icon",e.icons.faClipboardList)}}function xc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Download"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faDownload)}}function vc(i,n){if(i&1){let e=b();V(0,xc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.downloadFiles())})}}function yc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Informations"),l()),i&2){let e=c();s(),d("icon",e.icons.faCircleInfo)}}function bc(i,n){}function Tc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2),l()),i&2){let e=c(2);s(),d("icon",e.isTrashRepo?e.icons.faBan:e.icons.TRASH),s(),A(" ",e.isTrashRepo?"Remove":"Trash")}}function wc(i,n){if(i&1){let e=b();V(0,bc,0,0,"ng-template",88)(1,Tc,3,2,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.openTrashDialog(o.isTrashRepo))})}i&2&&d("divider",!0)}function zc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"New share"),l()),i&2){let e=c();s(),d("icon",e.icons.SHARES)}}function Mc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"New share link"),l()),i&2){let e=c();s(),d("icon",e.icons.faLink)}}function Ec(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Anchor to a space"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faAnchor)}}function Pc(i,n){if(i&1){let e=b();V(0,Ec,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.openSpaceAnchorFileDialog())})}}function Ac(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Empty"),l()),i&2){let e=c();s(),d("icon",e.icons.TRASH)}}function Nc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Refresh"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faArrowRotateRight)}}function Lc(i,n){if(i&1){let e=b();V(0,Nc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.loadFiles())})}}function kc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"New folder"),l()),i&2){let e=c(2);s(),d("icon",e.icons.PERSONAL)}}function Fc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"New document"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faFileAlt)}}function Dc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Download from URL"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faGlobe)}}function Rc(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Upload files"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faUpload)}}function Ic(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",10),m(2,"Upload folders"),l()),i&2){let e=c(3);s(),d("icon",e.icons.faUpload)}}function Oc(i,n){if(i&1){let e=b();V(0,Ic,3,1,"ng-template",25),_("execute",function(){g(e);let o=c(2);return S(o.shortcutUploadFolders())})}}function Vc(i,n){if(i&1){let e=b();V(0,kc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.openNewDialog("directory"))}),V(1,Fc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.openNewDialog("file"))}),V(2,Dc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.openNewDialog("download"))}),V(3,Rc,3,1,"ng-template",25),_("execute",function(){g(e);let o=c();return S(o.shortcutUploadFiles())}),h(4,Oc,1,0,null,23)}if(i&2){let e=c();s(4),C(e.supportUploadFolder?4:-1)}}var Nn=(()=>{let n=class n{constructor(){this.locale=x(q),this.layout=x(L),this.icons={SPACES:o1.SPACES,SHARES:o1.SHARES,TRASH:o1.TRASH,PERSONAL:o1.PERSONAL,LINKS:o1.LINKS,SYNC:v1.SYNC,faArrowRotateRight:_t,faPlus:be,faFileAlt:Di,faGlobe:t2,faUpload:R4,faDownload:e2,faLink:S4,faAnchor:Ri,faEllipsis:hi,faPen:Jt,faEye:n4,faRotate:ve,faCommentDots:P4,faFileArchive:Ci,faSpellCheck:z4,faArrowsAlt:dt,faCircleInfo:Vi,faBan:t4,faArrowUp:ye,faArrowDown:Te,faLock:ft,faLockOpen:E4,faClipboardList:Ei},this.loading=!1,this.locationNotFound=!1,this.forbiddenResource=!1,this.serverError=!1,this.hasRoots=!1,this.canShare={inside:!1,outside:!1},this.multipleSelection=!1,this.hasSelection=!1,this.hasDisabledItemsInSelection=!1,this.canCompress=!0,this.renamingInProgress=!1,this.supportUploadFolder=!1,this.originalOrderKeyValue=re,this.TAB_MENU=y1,this.tableHeaders={name:{label:"Name",width:45,textCenter:!1,class:"",show:!0,sortable:!0},anchored:{label:"Anchored by",width:5,class:"d-none d-md-table-cell",textCenter:!0,show:this.hasRoots,sortable:!0},infos:{label:"Infos",width:15,textCenter:!0,class:"d-none d-md-table-cell",show:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:this.hasRoots},size:{label:"Size",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},mtime:{label:"Modified",width:10,textCenter:!0,class:"d-none d-sm-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",isDir:"Type",size:"Size",mtime:"Modified"},this.files=[],this.selection=[],this.stats={dirs:0,files:0,size:0,elements:0},this.router=x(i1),this.activatedRoute=x(ci),this.zone=x(oi),this.renderer=x(Ie),this.store=x(Y),this.isElectronApp=this.store.isElectronApp(),this.spacesBrowser=x(Pr),this.filesService=x(E1),this.filesUpload=x(Er),this.uploadButtonsShowed=!1,this.subscriptions=[],this.sortSettings={default:[{prop:"name",type:"string"},{prop:"isDir",type:"number"}],name:[{prop:"name",type:"string"}],isDir:[{prop:"isDir",type:"number"}],anchored:[{prop:"root.id",type:"number"},{prop:"root.owner.fullName",type:"string"}],size:[{prop:"size",type:"number"}],mtime:[{prop:"mtime",type:"number"}]},this.sortTable=new $e(this.constructor.name,this.sortSettings),this.moveFromDrag=!1}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView(),this.supportUploadFolder=this.filesUpload.supportUploadDirectory,this.activatedRoute.queryParams.subscribe(t=>this.focusOn(t.select)),this.activatedRoute.data.subscribe(t=>this.setSpace(t)),this.subscriptions.push(this.store.filesOnEvent.subscribe(t=>this.onFileEvent(t)))}ngAfterViewInit(){setTimeout(()=>this.initEventHandlers(),500)}ngOnDestroy(){this.destroyEventHandlers(),this.resetFilesSelection(),this.subscriptions.forEach(t=>t.unsubscribe())}onKeyPress(t){if((t.target.id==="table-files"||t.target.id==="thumb-files")&&(t.ctrlKey||t.metaKey))switch(t.which||t.keyCode){case 65:t.preventDefault(),t.stopPropagation(),this.updateSelection(this.files);return;case 67:case 88:t.preventDefault(),t.stopPropagation(),this.selection.length&&(this.filesService.clipboardAction=t.keyCode==67?"copyPaste":"cutPaste",this.filesService.addToClipboard(this.selection));return;case 86:t.preventDefault(),t.stopPropagation(),this.filesService.onPasteClipboard();return;default:return}}loadFiles(){this.loading=!0,this.forbiddenResource=!1,this.locationNotFound=!1,this.serverError=!1,this.inputFilter.clear(),this.resetFilesSelection(),this.spacesBrowser.loadFiles().subscribe({next:t=>{this.spacePermissions=t.permissions,this.canShare.outside=this.spacePermissions.indexOf(le.SHARE_OUTSIDE)>-1,this.canShare.inside=this.spacePermissions.indexOf(le.SHARE_INSIDE)>-1,this.hasRoots=t.hasRoots,this.tableHeaders.anchored.show=t.hasRoots,this.tableHeaders.anchored.label=this.isSharesRepo?"Owner":"Anchored by",this.tableHeaders.anchored.width=10,this.tableHeaders.permissions.show=t.hasRoots,this.sortBy(this.sortTable.sortParam.column,!1,t.files.map(o=>new An(o,this.baseRepoUrl,this.isSharesRepo))),this.updateFilesStats(this.files),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:t=>{this.files=[],this.updateFilesStats(this.files),t.status!==401&&(this.forbiddenResource=t.status===403,this.locationNotFound=t.status===404,this.serverError=t.status===0,this.layout.sendNotification("error","Files",t.error.message)),this.loading=!1}})}sortBy(t,o=!0,a){this.files=this.sortTable.sortBy(t,o,a||this.files)}switchView(t){let o=this.galleryMode;this.galleryMode=t,this.galleryMode.enabled!==o.enabled&&(this.destroyEventHandlers(),setTimeout(()=>this.initEventHandlers(),500))}onSelect(t,o){this.loading||(t.shiftKey&&this.selection.length>0&&this.selection.indexOf(o)===-1?this.selectRangeFiles(o):!t.ctrlKey&&!t.metaKey?this.updateSelection([o]):this.modifySelection(o))}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.isTrashRepo||this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.selection.length<=1&&this.updateSelection([o]),this.layout.openContextMenu(t,this.fileContextMenu)}browse(t){if(t.isDisabled){this.layout.sendNotification("warning",t.name,"Share is disabled");return}t.isRenamed||(t.isDir?this.router.navigate([t.root?.alias||t.name],{relativeTo:this.activatedRoute}).catch(console.error):this.shortcutView(!0))}copyMoveFiles(){this.layout.showRSideBarTab(y1.TREE,!0),setTimeout(()=>this.filesService.treeCopyMoveOn.next(),100)}downloadFiles(){this.multipleSelection?this.openCompressionDialog(!1):this.filesService.download(this.selection[0])}shortcutView(t=!1){this.selection[0].isDir?this.browse(this.selection[0]):t&&this.selection[0].isEditable?this.openViewerDialog("edit"):this.selection[0].isViewable?this.openViewerDialog("view"):this.downloadFiles()}shortcutEdit(){if(this.selection[0]?.lock?.isExclusive){this.layout.sendNotification("info","The file is locked",this.selection[0].lock.owner);return}this.openViewerDialog("edit")}shortcutUploadFiles(){this.uploadButtonsShowed||document.getElementById("newButton").click(),setTimeout(()=>document.getElementById("uploadFilesButton").click(),100)}shortcutUploadFolders(){if(!this.uploadButtonsShowed){let t=document.getElementById("newButton");t.click(),t.click()}setTimeout(()=>document.getElementById("uploadFoldersButton").click(),100)}shortcutRename(){this.selection[0].isRenamed=!this.selection[0].isRenamed}renameFile(t){let o=t.object,a=t.name;if(this.files.find(p=>p.name===a)){this.layout.sendNotification("error","Rename","The destination already exists");return}this.filesService.rename(o,a)}setRenamingInProgress(t){this.renamingInProgress=t}addToSync(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_CLIENT],{state:{file:this.selection[0]}}).catch(console.error)}addToClipboard(){this.filesService.addToClipboard(this.selection)}openShareDialog(){let t=this.setFilePermissionsAndSpace();if(t===null)return;this.layout.openDialog(ca,"lg",{initialState:{file:t,isSharesRepo:this.isSharesRepo,inSharesList:this.inSharesList,allowFilesOptions:!1}}).content.shareChange.pipe(M1(1)).subscribe(a=>{let p=a[1];this.selection[0].id<0&&(this.selection[0].id=p.file.id),this.selection[0].shares.push({id:p.id,alias:p.alias,name:p.name,type:p3.COMMON})})}openShareLinkDialog(){let t=this.setFilePermissionsAndSpace();if(t===null)return;this.layout.openDialog(Go,"md",{initialState:{file:t,isSharesRepo:this.isSharesRepo,inSharesList:this.inSharesList}}).content.shareChange.pipe(M1(1)).subscribe(a=>{let[p,u]=a;p==="add"&&(this.selection[0].id<0&&(this.selection[0].id=u.file.id),this.selection[0].links.push({id:u.id,alias:u.alias,name:u.name,type:p3.LINK}))})}openSpaceAnchorFileDialog(){this.layout.openDialog(Ar,"lg",{initialState:{files:this.selection}}).content.addAnchoredFiles.pipe(M1(1)).subscribe(o=>{for(let a of this.selection){let p=o.rootFiles.find(u=>u.name===a.name);p&&a.spaces.map(u=>u.id).indexOf(o.space.id)===-1&&(a.id<0&&(a.id=p.id),a.spaces.push(o.space))}})}initUpload(){!this.isTrashRepo&&!this.uploadButtonsShowed&&(this.uploadButtonsShowed=!0)}onUploadFiles(t,o=!1){if(o){let a=t.files[0].webkitRelativePath.split("/")[0];if(this.files.find(p=>p.name===a)){this.layout.sendNotification("warning","This folder already exists",a);return}}else for(let a of t.files)if(this.files.find(p=>a.name===p.name)){this.layout.sendNotification("warning","This file already exists",a.name);return}this.filesUpload.addFiles(t.files).catch(console.error)}onDropFiles(t){for(let o of t.dataTransfer.files)if(this.files.find(a=>o.name===a.name)){this.layout.sendNotification("warning","This file already exists",o.name);return}this.filesUpload.onDropFiles(t)}decompressFile(){this.filesService.decompress(this.selection[0])}openCompressionDialog(t=!0){let o={name:this.selection[0].name,compressInDirectory:this.inSharesList?!1:t,files:this.selection.map(a=>({name:a.name,rootAlias:a.root?.alias})),extension:"tar"};this.layout.openDialog(Pn,null,{initialState:{archiveProps:o,disableInDirCompression:this.inSharesList}})}openNewDialog(t){this.layout.openDialog(Tr,null,{initialState:{files:this.files,inputType:t}})}openEmptyTrashDialog(){this.isTrashRepo&&this.inRootSpace&&this.layout.openDialog(Mr,null,{initialState:{files:this.files}})}openTrashDialog(t=!1){if(!this.selection.length)return;this.layout.openDialog(zr,null,{initialState:{files:this.selection,permanently:t}}).content.removeFiles.pipe(M1(1)).subscribe(()=>this.removeFiles())}setSpace(t){this.currentRoute=this.filesService.currentRoute=`${t.repository}${s2(t.routes)}`,this.baseRepoUrl=`${t.repository}${t.routes.length?`/${t.routes[0].path}`:""}`,this.isFilesRepo=t.repository===O.FILES,this.isSharesRepo=t.repository===O.SHARES,this.isTrashRepo=t.repository===O.TRASH,this.inRootSpace=this.isSharesRepo?t.routes.length===0:t.routes.length===1,this.inSharesList=this.isSharesRepo&&this.inRootSpace,this.spacesBrowser.setEnvironment(t.repository,t.routes),this.isPersonalSpace=this.spacesBrowser.inPersonalSpace,this.loadFiles()}onFileEvent(t){if(t.archiveId){this.filesService.downloadTaskArchive(t.archiveId);return}let o=t?.fileDstPath===this.currentRoute;if(t.filePath===this.currentRoute||o){let a=o&&t.reloadFocusOnDst;if(t.fileName&&((t.focus||a)&&(this.focusOnSelect=t.fileName),t.delete&&!a))if(t.status===R2.SUCCESS)this.files=this.files.filter(p=>p.name!==t.fileName),this.updateFilesStats(this.files),this.resetFilesSelection();else{let p=this.files.find(u=>u.name===t.fileName);p&&(p.isBeingDeleted=!1)}(t.reload||a)&&this.loadFiles()}}removeFiles(){let t=this.selection.filter(o=>!o.root?.alias);this.selection.length!==t.length&&this.layout.sendNotification("warning","Remove","You can not remove an anchored file"),t.length&&this.filesService.delete(t)}setFilePermissionsAndSpace(){if(this.selection[0]?.root&&this.selection[0].root.permissions.indexOf(le.SHARE_OUTSIDE)===-1)return this.layout.sendNotification("warning",this.selection[0].name,"You do not have share permission"),null;let t=P1({},this.selection[0]);if(this.isPersonalSpace)t.permissions=this.spacePermissions;else if(this.selection[0]?.root)if(t.permissions=this.selection[0].root.permissions,this.inSharesList)t.space={alias:this.selection[0].root.alias,name:this.selection[0].root.alias,root:void 0};else{let o=this.currentRoute.split("/")[1];t.space={alias:o,name:o,root:{alias:this.selection[0].root.alias,name:this.selection[0].name}}}else{t.permissions=this.spacePermissions;let[o,a]=this.currentRoute.split("/").slice(1,3);t.space={alias:o,name:o,root:{alias:a,name:a}}}return t}openViewerDialog(t){this.filesService.openViewerDialog(t,this.selection[0]).catch(console.error)}focusOn(t){if(!t){this.focusOnSelect=null;return}if(!this.files.length){this.focusOnSelect=t;return}let o=this.files.find(a=>a.name.toLowerCase()===t.toLowerCase());!o&&this.hasRoots&&(o=this.files.find(a=>a.root?.alias.toLowerCase()===t.toLowerCase())),o?(setTimeout(()=>this.scrollView.scrollInto(o),100),this.updateSelection([o])):this.focusOnSelect=t}updateFilesStats(t){this.stats={dirs:0,files:0,size:0,elements:0};for(let o of t)this.updateCounters(o)}updateCounters(t,o=!0){let a=o?po:fo;this.stats.elements=a(this.stats.elements,1),this.stats.size=a(this.stats.size,t.size),t.isDir?this.stats.dirs=a(this.stats.dirs,1):this.stats.files=a(this.stats.files,1)}resetFilesSelection(){this.updateSelection([])}modifySelection(t){t&&(t.isSelected?this.updateSelection(this.selection.filter(o=>o.id!==t.id)):this.updateSelection([t,...this.selection]))}updateSelection(t){t.length?this.selection=this.files.filter(o=>t.indexOf(o)>-1?(o.isSelected=!0,!0):(o.isSelected=!1,!1)):this.selection=this.selection.filter(o=>(o.isSelected=!1,!1)),this.hasSelection=!!this.selection.length,this.hasDisabledItemsInSelection=!!this.selection.find(o=>o.isDisabled),this.canCompress=!this.hasDisabledItemsInSelection&&(this.selection.length>1||this.selection.length===1&&this.selection[0].isCompressible),this.multipleSelection=this.selection.length>1||this.selection.length===1&&this.selection[0].isDir,this.store.filesSelection.set(this.selection)}selectRangeFiles(t){let o=this.files.indexOf(t),a=this.selection.map(w=>this.files.indexOf(w)),p=[],u=Math.min(...a),y=Math.max(...a);if(o<u)for(let w=o;w<u;w++)p.push(this.files[w]);else if(o>y)for(let w=o;w>y;w--)p.push(this.files[w]);this.updateSelection([...this.selection,...p])}initEventHandlers(){this.zone.runOutsideAngular(()=>{this.eventDragOverHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragover",t=>{if(this.isTrashRepo&&!this.moveFromDrag)return t.preventDefault(),!1;["TD","TR","DIV","APP-VIRTUAL-SCROLL","IMG"].indexOf(t.target.nodeName)>-1&&(t.preventDefault(),this.moveFromDrag?t.dataTransfer.dropEffect="move":t.dataTransfer.dropEffect="copy")}),this.eventDragStartHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragstart",t=>{if(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV"){let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&(this.selection.indexOf(o)===-1&&this.zone.run(()=>this.updateSelection([o])),this.moveFromDrag=!0)}}),this.eventDragEnterHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragenter",t=>{if(t.preventDefault(),this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV")){let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&o.isDir&&this.selection.indexOf(o)===-1&&(t.target.parentElement.nodeName==="TD"?this.renderer.addClass(t.target.parentElement,_2):t.target.parentElement.classList.contains("card-body")&&this.renderer.addClass(t.target.parentElement.parentElement,_2))}}),this.eventDragLeaveHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragleave",t=>{t.preventDefault(),this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"?this.renderer.removeClass(t.target.parentElement,_2):t.target.parentElement.classList.contains("card-body")&&this.renderer.removeClass(t.target.parentElement.parentElement,_2))}),this.eventDragEndHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragend",t=>{t.preventDefault(),this.moveFromDrag=!1}),this.eventDropHandler=this.renderer.listen(this.scrollView.element.nativeElement,"drop",t=>{if(this.isTrashRepo&&!this.moveFromDrag)return t.preventDefault(),!1;if(this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV")){t.preventDefault();let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&o.isDir&&this.selection.indexOf(o)===-1&&(this.renderer.removeClass(t.target.parentElement,_2),this.selection.length&&this.zone.run(()=>this.filesService.copyMove(this.selection,o.path,H1.MOVE)))}else return t.dataTransfer.files.length?(t.preventDefault(),this.zone.run(()=>this.onDropFiles(t)),!1):(t.preventDefault(),!1)}),this.eventKeysHandler=this.renderer.listen(this.scrollView.element.nativeElement,"keydown",t=>{if(this.renamingInProgress)return;let o=t.keyCode||t.which;if([37,38,39,40].indexOf(o)===-1)return;if((o===37||o===39)&&!this.galleryMode.enabled)return;t.preventDefault(),t.stopPropagation();let a,p=this.selection.map(k=>this.files.indexOf(k)),u=this.galleryMode.enabled;o===37?(u=!1,o=38):o===39&&(u=!1,o=40),o===38?(u?a=Math.min(...p)-Math.ceil(this.scrollView.element.nativeElement.offsetWidth/(this.galleryMode.dimensions+this.galleryMode.margins)):a=Math.min(...p)-1,a<=-1&&(a=this.files.length-1)):(u?a=Math.max(...p)+Math.ceil(this.scrollView.element.nativeElement.offsetWidth/(this.galleryMode.dimensions+this.galleryMode.margins)):a=Math.max(...p)+1,a>=this.files.length&&(a=0));let y=this.files[a];this.zone.run(()=>{!t.shiftKey&&!t.ctrlKey&&!t.metaKey?this.updateSelection([y]):this.modifySelection(y)});let w=this.scrollView.element.nativeElement.querySelectorAll(qo);if(w.length){let k;o===38?(k=w[0],s3(k)||k.scrollIntoView(!0)):(k=w[w.length-1],s3(k)||k.scrollIntoView(!1))}else setTimeout(()=>this.scrollView.scrollInto(y),0)})})}destroyEventHandlers(){for(let t of[this.eventDragStartHandler,this.eventDragOverHandler,this.eventDragEnterHandler,this.eventDragLeaveHandler,this.eventDragEndHandler,this.eventDropHandler,this.eventKeysHandler].filter(o=>o))try{t()}catch(o){console.warn(o)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-spaces-browser"]],viewQuery:function(o,a){if(o&1&&(s1(tt,5),s1(V1,7),s1(f3,7),s1(Rl,7),s1(Il,7),s1(Ol,7)),o&2){let p;l1(p=c1())&&(a.scrollView=p.first),l1(p=c1())&&(a.inputFilter=p.first),l1(p=c1())&&(a.btnNavigationView=p.first),l1(p=c1())&&(a.mainContextMenu=p.first),l1(p=c1())&&(a.mainReadOnlyContextMenu=p.first),l1(p=c1())&&(a.fileContextMenu=p.first)}},hostBindings:function(o,a){o&1&&_("keydown",function(u){return a.onKeyPress(u)},ni)},decls:57,vars:41,consts:[["CommonMessages",""],["FileContextMenu",""],["ShareContextMenu",""],["MainReadOnlyContextMenu",""],["MainContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"me-1"],[1,"mx-auto"],["l10nTranslate",""],["contextMenuItem",""],["contextMenuItem","",3,"subMenu"],["contextMenuItem","",3,"execute"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"onShown"],["dropdownToggle","","container","body","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle",3,"tooltip"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["appUploadFiles","","id","uploadFilesButton",1,"dropdown-item",3,"uploadFiles","options"],["appUploadFiles","","id","uploadFoldersButton",1,"dropdown-item",3,"options"],["appUploadFiles","","id","uploadFoldersButton",1,"dropdown-item",3,"uploadFiles","options"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"disabled","tooltip"],[1,"dropdown-divider"],[1,"dropdown-item"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],[4,"ngTemplateOutlet"],["id","thumb-files","tabindex","-1",1,"row","g-0"],[1,"card",3,"disabled","deleted","selected","height","width"],[1,"card",3,"click","contextmenu","appTap"],[1,"card-body"],["alt","","draggable","true",1,"img-fluid",3,"max-height","src"],["alt","","draggable","true",3,"src","height","width"],[1,"label-bottom-right"],["placement","auto",1,"fs-lg","cursor-pointer","me-1",3,"tooltip"],[1,"badge","rounded-pill","bg-primary","cursor-pointer",3,"font-size"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","ms-1",3,"font-size"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"font-size"],[1,"badge","rounded-pill","bg-success","cursor-pointer",3,"font-size"],[1,"label-bottom-left"],[1,"label-top-right"],[1,"card-footer","text-center","text-truncate","p-1"],["appInputEdit","","type","text","required","",3,"inputObject","fullWidth","textCenter","font-size"],["draggable","false",1,"no-pointer-events",3,"font-size"],["alt","","draggable","true",1,"img-fluid",3,"error","src"],["alt","","draggable","true",3,"error","src","height","width"],[1,"badge","rounded-pill","bg-primary","cursor-pointer",3,"click"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","ms-1",3,"click"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"badge","rounded-pill","bg-success","cursor-pointer",3,"click"],[3,"user","height","width","fontSize"],[1,"badge","rounded-pill","bg-warning"],["appInputEdit","","type","text","required","",3,"renamingInProgress","updateObject","inputObject","fullWidth","textCenter"],["draggable","false",1,"no-pointer-events"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["id","table-files","tabindex","-1"],[3,"disabled","deleted","selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],["draggable","true",1,"d-flex","align-items-center"],["alt","","draggable","false","height","30","width","30",3,"error","src"],["appInputEdit","","required","","type","text",3,"inputObject"],[1,"d-flex","flex-column","text-truncate"],["appInputEdit","","required","","type","text",3,"renamingInProgress","updateObject","inputObject"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[1,"d-flex","flex-column","align-items-center"],[3,"user"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-success","cursor-pointer"],["tooltipPlacement","auto",3,"permissions"],[1,"fs-sm","text-center","text-danger","fw-bold","no-select"],[1,"fs-sm","text-center","text-muted","fw-bold","no-select"],["contextMenuItem","",3,"divider"]],template:function(o,a){if(o&1){let p=b();r(0,"div",5)(1,"button",6),T(2,"translate"),_("click",function(){return g(p),S(a.loadFiles())}),f(3,"fa-icon",7),l(),h(4,Gl,5,5,"div",8),r(5,"button",9),T(6,"translate"),_("click",function(){return g(p),S(a.downloadFiles())}),f(7,"fa-icon",10),l(),h(8,Yl,5,6,"div",11),h(9,Kl,4,7),r(10,"div",11)(11,"button",12),f(12,"fa-icon",10),l(),V(13,s6,15,6,"ul",13),l(),r(14,"div",14)(15,"div",15),f(16,"app-input-filter",16),l(),r(17,"app-navigation-view",17),_("sortBy",function(y){return g(p),S(a.sortBy(y))})("switchView",function(y){return g(p),S(a.switchView(y))}),l()()(),h(18,y6,7,10,"div",18)(19,Y6,13,10),r(20,"div",19)(21,"span"),h(22,j6,3,5,"span",20),h(23,K6,3,5,"span"),l(),r(24,"span",21),m(25),T(26,"translate"),l(),r(27,"span")(28,"span",22),m(29,"Total"),l(),m(30),T(31,"toBytes"),l()(),V(32,ec,4,1,"ng-template",null,0,ue),r(34,"context-menu",null,1),h(36,mc,5,4),h(37,dc,1,0,null,23),h(38,uc,1,0,null,23),h(39,hc,1,0,null,23),h(40,gc,1,1,null,24),V(41,Sc,3,1,"ng-template",25),_("execute",function(){return g(p),S(a.addToClipboard())}),h(42,vc,1,0,null,23),V(43,yc,3,1,"ng-template",25),_("execute",function(){return g(p),S(a.layout.showRSideBarTab(a.TAB_MENU.SELECTION))}),h(44,wc,2,1),l(),r(45,"context-menu",null,2),V(47,zc,3,1,"ng-template",25),_("execute",function(){return g(p),S(a.openShareDialog())}),V(48,Mc,3,1,"ng-template",25),_("execute",function(){return g(p),S(a.openShareLinkDialog())}),h(49,Pc,1,0,null,23),l(),r(50,"context-menu",null,3),V(52,Ac,3,1,"ng-template",25),_("execute",function(){return g(p),S(a.openEmptyTrashDialog())}),l(),r(53,"context-menu",null,4),h(55,Lc,1,0,null,23)(56,Vc,5,1),l()}o&2&&(s(),d("tooltip",z(2,27,"Refresh",a.locale.language)),s(2),d("icon",a.icons.faArrowRotateRight)("animation",a.loading?"spin":null),s(),C(!a.isTrashRepo&&!a.inSharesList?4:-1),s(),d("disabled",!a.hasSelection||a.hasDisabledItemsInSelection)("tooltip",z(6,30,"Download",a.locale.language)),s(2),d("icon",a.icons.faDownload),s(),C(!a.isTrashRepo&&a.canShare.outside||a.inSharesList?8:-1),s(),C(a.isTrashRepo?9:-1),s(),d("isDisabled",!a.hasSelection),s(2),d("icon",a.icons.faEllipsis),s(5),d("sortParams",a.sortTable.sortParam)("sortFields",a.btnSortFields),s(),C(a.galleryMode!=null&&a.galleryMode.enabled?18:19),s(4),C(a.stats.dirs?22:-1),s(),C(a.stats.files?23:-1),s(2),v(fe(26,33,a.hasSelection?a.selection.length>1?"nb_selections":"one_selection":"no_selection",a.locale.language,I1(39,Vl,a.selection.length))),s(5),A("\xA0",J(31,37,a.stats.size)),s(6),C(a.selection.length===1?36:-1),s(),C(a.canCompress?37:-1),s(),C(!a.inSharesList&&a.selection.length===1&&!a.selection[0].isCompressible?38:-1),s(),C(a.hasDisabledItemsInSelection?-1:39),s(),C(!a.isTrashRepo&&a.canShare.outside||a.inSharesList&&(a.selection[0]!=null&&a.selection[0].canBeReShared)?40:-1),s(2),C(a.hasDisabledItemsInSelection?-1:42),s(2),C(a.inSharesList?-1:44),s(5),C(a.isFilesRepo?49:-1),s(6),C(a.inSharesList?55:56))},dependencies:[F,N,Zt,w1,Ki,We,qe,Ge,V1,a2,o2,n2,tt,sa,f3,Wt,ze,yr,St,m2,X,ji,ee,He],encapsulation:2});let i=n;return i})();var b2=(i,n)=>n.id;function Bc(i,n){if(i&1){let e=b();r(0,"div",2)(1,"div",3)(2,"button",4),_("click",function(){g(e);let o=c(2);return S(o.addToClipboard())}),f(3,"fa-icon",5),m(4," Send to Clipboard "),l()()(),f(5,"hr",6)}if(i&2){let e=c(2);s(3),d("icon",e.icons.faClipboardCheck)}}function Uc(i,n){if(i&1){let e=b();r(0,"div",7)(1,"img",8),_("error",function(){let o=g(e).$implicit;return S(o.fallBackMimeUrl())}),l(),r(2,"span",9),m(3),l()()}if(i&2){let e=n.$implicit;s(),d("src",e.mimeUrl,Q),s(2),v(e.name)}}function Hc(i,n){if(i&1&&(r(0,"div",1),D(1,Uc,4,2,"div",7,b2),l()),i&2){let e=c(2);s(),R(e.files())}}function $c(i,n){if(i&1&&(r(0,"div",26),f(1,"img",27),l()),i&2){let e=c().$implicit,t=c(3);n1("height",t.cardImageSize,"px"),s(),n1("max-height",t.cardImageSize,"px"),d("src",I("",e.thumbnailUrl,"?size=256"),Q)}}function Gc(i,n){if(i&1&&f(0,"app-files-viewer-media",13),i&2){let e=c().$implicit,t=c(3);d("currentHeight",t.cardImageSize)("fileUrl",e.dataUrl)}}function Wc(i,n){if(i&1){let e=b();r(0,"img",28),_("error",function(){g(e);let o=c().$implicit;return S(o.fallBackMimeUrl())}),l()}if(i&2){let e=c().$implicit,t=c(3);n1("height",t.cardImageSize,"px"),d("src",e.mimeUrl,Q)}}function qc(i,n){if(i&1&&(r(0,"div",17)(1,"div",18),m(2,"Size"),l(),r(3,"div",20),m(4),l()()),i&2){let e=c().$implicit;s(4),v(e.hSize)}}function Yc(i,n){if(i&1&&(r(0,"span",23),f(1,"fa-icon",5),m(2),l()),i&2){let e=c().$implicit,t=c(3);s(),d("icon",t.icons.SHARES),s(),A("\xA0",e.shares.length+e.links.length," ")}}function jc(i,n){i&1&&(r(0,"span",24),m(1,"no"),l())}function Kc(i,n){if(i&1&&(r(0,"span",23),f(1,"fa-icon",5),m(2),l()),i&2){let e=c().$implicit,t=c(3);s(),d("icon",t.icons.SPACES),s(),A("\xA0",e.spaces.length)}}function Qc(i,n){i&1&&(r(0,"span",24),m(1,"no"),l())}function Xc(i,n){if(i&1&&(r(0,"div",21)(1,"div",18),m(2,"Owner"),l(),f(3,"app-user-avatar",30),l()),i&2){let e=c(2).$implicit;s(3),d("user",e.root.owner)("height",26)("width",26)}}function Zc(i,n){if(i&1&&f(0,"app-file-permissions",29),i&2){let e=c(2).$implicit;d("permissions",e.root.hPerms)}}function Jc(i,n){i&1&&(r(0,"span",24),m(1,"no"),l())}function e8(i,n){if(i&1&&(f(0,"hr",15),r(1,"div",16),h(2,Xc,4,3,"div",21),r(3,"div",26)(4,"div",18),m(5,"Permissions"),l(),h(6,Zc,1,1,"app-file-permissions",29)(7,Jc,2,0,"span",24),l()()),i&2){let e=c().$implicit;s(2),C(e.root.owner?2:-1),s(4),C(e.root.permissions?6:7)}}function t8(i,n){if(i&1&&(r(0,"div",33),f(1,"fa-icon",5),r(2,"span"),m(3),l()()),i&2){let e=c(2).$implicit,t=c(3);s(),d("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faUnlock),s(2),A("\xA0",e.lock.owner)}}function i8(i,n){if(i&1){let e=b();r(0,"div",35),_("click",function(){let o=g(e).$implicit,a=c(5);return S(a.goToSpace(o))}),f(1,"fa-icon",5),r(2,"span"),m(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),d("icon",t.icons.SPACES),s(2),A("\xA0",e.name)}}function n8(i,n){if(i&1){let e=b();r(0,"div",35),_("click",function(){let o=g(e).$implicit,a=c(5);return S(a.goToShare(o))}),f(1,"fa-icon",5),r(2,"span"),m(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),d("icon",t.icons.SHARES),s(2),A("\xA0",e.name)}}function o8(i,n){if(i&1){let e=b();r(0,"div",35),_("click",function(){let o=g(e).$implicit,a=c(5);return S(a.goToShare(o))}),f(1,"fa-icon",5),r(2,"span"),m(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),d("icon",t.icons.LINKS),s(2),A("\xA0",e.name)}}function a8(i,n){if(i&1){let e=b();r(0,"div",35),_("click",function(){let o=g(e).$implicit,a=c(5);return S(a.goToSync(o))}),f(1,"fa-icon",5),r(2,"span"),m(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),d("icon",t.icons.SYNC),s(2),A("\xA0",e.clientName)}}function r8(i,n){if(i&1&&(f(0,"hr",31),r(1,"div",32),h(2,t8,4,2,"div",33),D(3,i8,4,2,"div",34,b2),D(5,n8,4,2,"div",34,b2),D(7,o8,4,2,"div",34,b2),D(9,a8,4,2,"div",34,b2),l()),i&2){let e=c().$implicit;s(2),C(e.lock?2:-1),s(),R(e.spaces),s(2),R(e.shares),s(2),R(e.links),s(2),R(e.syncs)}}function s8(i,n){if(i&1){let e=b();r(0,"div",10)(1,"div",11),h(2,$c,2,6,"div",12)(3,Gc,1,2,"app-files-viewer-media",13)(4,Wc,1,3,"img",14),l()(),f(5,"hr",15),r(6,"div",16)(7,"div",17)(8,"div",18),m(9,"Name"),l(),r(10,"div",19),m(11),l()(),h(12,qc,5,1,"div",17),r(13,"div",17)(14,"div",18),m(15,"Created"),l(),r(16,"div",20),m(17),T(18,"amDateFormat"),l()(),r(19,"div",17)(20,"div",18),m(21,"Modified"),l(),r(22,"div",20),m(23),T(24,"amDateFormat"),l()(),r(25,"div",21)(26,"div",18),m(27,"Shared"),l(),r(28,"div",22),h(29,Yc,3,2,"span",23)(30,jc,2,0,"span",24),l()(),r(31,"div",21)(32,"div",18),m(33,"Anchored"),l(),h(34,Kc,3,2,"span",23)(35,Qc,2,0,"span",24),l(),r(36,"div",21)(37,"div",18),m(38,"Synced"),l(),r(39,"span"),m(40),T(41,"translate"),l()(),r(42,"div",21)(43,"div",18),m(44,"Comments"),l(),r(45,"span",25),_("click",function(){g(e);let o=c(3);return S(o.goToComments())}),m(46),T(47,"translate"),l()()(),h(48,e8,8,2),h(49,r8,11,1)}if(i&2){let e,t=n.$implicit,o=c(3);s(2),C((e=t.shortMime)==="image"?2:e==="media"?3:4),s(9),v(t.name),s(),C(t.size?12:-1),s(5),v(J(18,17,t.ctime)),s(6),v(J(24,19,t.mtime)),s(6),C(t.shares.length||t.links.length?29:30),s(5),C(t.spaces.length?34:35),s(5),M(I("badge rounded-pill ",t.syncs.length?"bg-primary":"bg-secondary-alt")),s(),A(" ",z(41,21,t.syncs.length?"yes":"no",o.locale.language)," "),s(5),M(I("badge rounded-pill ",t.hasComments?"bg-success":"bg-secondary-alt"," cursor-pointer")),s(),A(" ",z(47,24,t.hasComments?"yes":"no",o.locale.language)," "),s(2),C(t.root?48:-1),s(),C(t.lock||t.spaces.length||t.shares.length||t.links.length||t.syncs.length?49:-1)}}function l8(i,n){if(i&1&&D(0,s8,50,27,null,null,b2),i&2){let e=c(2);R(e.files())}}function c8(i,n){if(i&1&&(h(0,Bc,6,1),r(1,"div",0),h(2,Hc,3,0,"div",1)(3,l8,2,0),l()),i&2){let e=c();C(e.multiple()?0:-1),s(),d("resizeOffset",e.resizeOffset()),s(),C(e.multiple()?2:3)}}var Dr=(()=>{let n=class n{constructor(){this.files=Oe.required(),this.locale=x(q),this.multiple=N1(()=>this.files().length>1),this.resizeOffset=N1(()=>this.multiple()?120:80),this.cardImageSize=80,this.icons={SPACES:o1.SPACES,SHARES:o1.SHARES,LINKS:o1.LINKS,SYNC:v1.SYNC,faLock:ft,faUnlock:i4,faClipboardCheck:o4,faArrowsAlt:dt},this.router=x(i1),this.layout=x(L),this.filesService=x(E1)}goToShare(t){this.layout.toggleRSideBar(!1),this.router.navigate([t.type===0?O.SHARED:O.LINKS],{queryParams:{select:t.name}}).catch(console.error)}goToSpace(t){this.layout.toggleRSideBar(!1),this.router.navigate([O.SPACES],{queryParams:{select:t.name}}).catch(console.error)}goToComments(){this.layout.showRSideBarTab(y1.COMMENTS,!0)}addToClipboard(){this.filesService.addToClipboard(this.files()),this.layout.showRSideBarTab(y1.CLIPBOARD,!0)}goToSync(t){this.layout.toggleRSideBar(!1),this.router.navigate([x1.BASE,x1.CLIENTS],{state:{clientId:t.clientId,pathId:t.id}}).catch(console.error)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-selection"]],inputs:{files:[1,"files"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"flex-column","p-2","w-100"],[1,"px-2","pt-2","pb-0","fs-xxs"],[1,"d-flex","justify-content-center","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary","me-1",3,"click"],[3,"icon"],[1,"mx-0","mt-2","mb-0"],[1,"d-inline-flex","w-100","align-content-center","align-items-center","mx-1"],["alt","","height","30","width","auto",1,"me-1",3,"error","src"],[1,"text-truncate"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"d-flex","align-items-center",3,"height"],[3,"currentHeight","fileUrl"],["alt","",3,"src","height"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],[1,"d-flex","col-sm-7"],[1,"badge","rounded-pill","bg-primary"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[3,"click"],[1,"d-flex","align-items-center"],["alt","",1,"img-fluid",3,"src"],["alt","",3,"error","src"],[3,"permissions"],["tooltipPlacement","bottom",3,"user","height","width"],[1,"mt-1","mb-2"],[1,"d-flex","flex-wrap","align-items-center","p-2","fs-xs"],[1,"badge","rounded-pill","white-space","bg-warning","cursor-pointer","mb-2"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1","mb-2"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1","mb-2",3,"click"]],template:function(o,a){o&1&&h(0,c8,4,3),o&2&&C(a.files().length?0:-1)},dependencies:[t1,F,N,ra,ze,St,L1,X],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function m8(i,n){if(i&1&&m(0),i&2){let e=c(2);A(" ",e.link().link.currentIp," ")}}function p8(i,n){if(i&1&&(m(0),T(1,"amDateFormat")),i&2){let e=c(2);A(" ",J(1,1,e.link().link.currentAccess)," ")}}function d8(i,n){if(i&1&&m(0),i&2){let e=c(2);A(" ",e.link().link.lastIp," ")}}function f8(i,n){if(i&1&&(m(0),T(1,"amDateFormat")),i&2){let e=c(2);A(" ",J(1,1,e.link().link.lastAccess)," ")}}function u8(i,n){if(i&1&&(r(0,"span")(1,"span"),m(2),T(3,"translate"),T(4,"translate"),l()()),i&2){let e=c(2);M(I("badge rounded-pill bg-",e.link().hTimeExpirationAgo>=1?"warning":"danger")),s(2),v(e.link().hTimeExpirationAgo>=1?e.link().hTimeExpirationAgo+"\xA0"+z(3,4,"days",e.locale.language):z(4,7,"expired",e.locale.language))}}function _8(i,n){i&1&&(r(0,"span",13),m(1," no "),l())}function h8(i,n){if(i&1&&(r(0,"span"),m(1),l()),i&2){let e=c(2);M(I("badge rounded-pill ",e.link().link.nbAccess>=e.link().link.limitAccess?"bg-danger":"bg-success")),s(),Q1(" ",e.link().link.nbAccess,"/",e.link().link.limitAccess," ")}}function C8(i,n){if(i&1&&(r(0,"span",14),m(1),l()),i&2){let e=c(2);s(),v(e.link().link.nbAccess)}}function g8(i,n){if(i&1&&f(0,"app-file-permissions",16),i&2){let e=c(2);d("permissions",e.link().hPerms)}}function S8(i,n){i&1&&(r(0,"span",13),m(1,"no"),l())}function x8(i,n){if(i&1){let e=b();r(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),_("error",function(){g(e);let o=c();return S(o.link().fallBackMimeUrl())}),l()()(),f(4,"hr",4),r(5,"div",5)(6,"div",6)(7,"div",7),m(8,"Name"),l(),r(9,"div",8),m(10),l()(),r(11,"div",6)(12,"div",7),m(13,"Created"),l(),r(14,"div",9),m(15),T(16,"amDateFormat"),l()(),r(17,"div",10),_("mouseover",function(){g(e);let o=c();return S(o.accessHover=!0)})("mouseleave",function(){g(e);let o=c();return S(o.accessHover=!1)})("focus",function(){g(e);let o=c();return S(o.accessHover=!0)}),r(18,"div",7),m(19,"Accessed"),l(),r(20,"div",9),h(21,m8,1,1)(22,p8,2,3),l()(),r(23,"div",10),_("mouseover",function(){g(e);let o=c();return S(o.lastAccessHover=!0)})("mouseleave",function(){g(e);let o=c();return S(o.lastAccessHover=!1)})("focus",function(){g(e);let o=c();return S(o.accessHover=!0)}),r(24,"div",7),m(25,"Last access"),l(),r(26,"div",9),h(27,d8,1,1)(28,f8,2,3),l()(),r(29,"div",11)(30,"div",7),m(31,"Authentication"),l(),r(32,"span"),m(33),T(34,"translate"),l()(),r(35,"div",11)(36,"div",7),m(37,"Expired"),l(),h(38,u8,5,10,"span",12)(39,_8,2,0,"span",13),l(),r(40,"div",11)(41,"div",7),m(42,"Active"),l(),r(43,"span"),m(44),T(45,"translate"),l()(),r(46,"div",11)(47,"div",7),m(48,"Access"),l(),h(49,h8,2,5,"span",12)(50,C8,2,1,"span",14),l()(),f(51,"hr",4),r(52,"div",5)(53,"div",11)(54,"div",7),m(55,"Shared from"),l(),f(56,"app-share-repository",15),l(),r(57,"div",11)(58,"div",7),m(59,"Permissions"),l(),h(60,g8,1,1,"app-file-permissions",16)(61,S8,2,0,"span",13),l()()()}if(i&2){let e=c();d("resizeOffset",e.resizeOffset),s(3),n1("height",e.cardImageSize,"px"),d("src",e.link().mimeUrl,Q),s(7),v(e.link().name),s(5),v(J(16,21,e.link().link.createdAt)),s(6),C(e.accessHover?21:22),s(6),C(e.lastAccessHover?27:28),s(5),M(I("badge rounded-pill ",e.link().link.requireAuth?"bg-success":"bg-warning")),s(),A(" ",z(34,23,e.link().link.requireAuth?"yes":"no",e.locale.language)," "),s(5),C(e.link().link.expiresAt?38:39),s(5),M(I("badge rounded-pill ",e.link().link.isActive?"bg-primary":"bg-danger")),s(),A(" ",z(45,26,e.link().link.isActive?"yes":"no",e.locale.language)," "),s(5),C(e.link().link.limitAccess!==0?49:50),s(7),d("share",e.link())("showIcon",!1),s(4),C(e.link().link.permissions?60:61)}}var Rr=(()=>{let n=class n{constructor(){this.link=Oe.required(),this.locale=x(q),this.cardImageSize=80,this.resizeOffset=80,this.accessHover=!1,this.lastAccessHover=!1}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-link-selection"]],inputs:{link:[1,"link"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],["alt","","draggable","false",3,"error","src"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","mb-1",3,"mouseover","mouseleave","focus"],[1,"d-flex","align-items-center","mb-1"],[3,"class"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-success"],[3,"share","showIcon"],[3,"permissions"]],template:function(o,a){o&1&&h(0,x8,62,29,"div",0),o&2&&C(a.link()?0:-1)},dependencies:[t1,F,Qi,St,X,L1],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();var v8=()=>["shares"];function y8(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"joinCounts"),l()),i&2){let e=c(2);s(),v(z(2,1,e.share().counts,Ee(4,v8)))}}function b8(i,n){i&1&&(r(0,"span",11),m(1,"no"),l())}function T8(i,n){if(i&1){let e=b();r(0,"span",15),_("click",function(){g(e);let o=c(2);return S(o.childShareDialog(o.share()))}),f(1,"fa-icon",16),r(2,"span"),m(3),l()()}if(i&2){let e=c(2);s(),d("icon",e.iconShared),s(2),v(e.share().counts.shares)}}function w8(i,n){i&1&&(r(0,"span",11),m(1,"no"),l())}function z8(i,n){if(i&1){let e=b();r(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),_("error",function(){g(e);let o=c();return S(o.share().fallBackMimeUrl())}),l()()(),f(4,"hr",4),r(5,"div",5)(6,"div",6)(7,"div",7),m(8,"Name"),l(),r(9,"div",8),m(10),l()(),r(11,"div",6)(12,"div",7),m(13,"Created"),l(),r(14,"div",9),m(15),T(16,"amDateFormat"),l()(),r(17,"div",6)(18,"div",7),m(19,"Modified"),l(),r(20,"div",9),m(21),T(22,"amDateFormat"),l()(),r(23,"div",10)(24,"div",7),m(25,"Members"),l(),h(26,y8,3,5,"span")(27,b8,2,0,"span",11),l(),r(28,"div",10)(29,"div",7),m(30,"Child shares"),l(),h(31,T8,4,2,"span",12)(32,w8,2,0,"span",11),l(),r(33,"div",10)(34,"div",7),m(35,"Comments"),l(),r(36,"span",13),_("click",function(){g(e);let o=c();return S(o.goToComments())}),m(37),T(38,"translate"),l()()(),f(39,"hr",4),r(40,"div",5)(41,"div",10)(42,"div",7),m(43,"Shared from"),l(),f(44,"app-share-repository",14),l()()()}if(i&2){let e=c();d("resizeOffset",e.resizeOffset),s(3),n1("height",e.cardImageSize,"px"),d("src",e.share().mimeUrl,Q),s(7),v(e.share().name),s(5),v(J(16,15,e.share().createdAt)),s(6),v(J(22,17,e.share().modifiedAt)),s(5),C(e.share().counts.users||e.share().counts.groups?26:27),s(5),C(e.share().counts.shares?31:32),s(5),M(I("badge rounded-pill ",e.share().hasComments?"bg-success":"bg-secondary-alt"," cursor-pointer")),s(),A(" ",z(38,19,e.share().hasComments?"yes":"no",e.locale.language)," "),s(7),d("share",e.share())("showIcon",!1)}}var Ir=(()=>{let n=class n{constructor(){this.share=Oe.required(),this.locale=x(q),this.iconShared=o1.SHARED_WITH_OTHERS,this.cardImageSize=80,this.resizeOffset=80,this.layout=x(L),this.sharesService=x(Ho)}childShareDialog(t){t.counts.shares&&this.layout.openDialog(on,null,{initialState:{share:t}})}goToComments(){this.share().hasComments&&this.sharesService.goTo(this.share()).then(()=>this.layout.showRSideBarTab(y1.COMMENTS,!0))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-share-selection"]],inputs:{share:[1,"share"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],["alt","","draggable","false",3,"error","src"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[3,"click"],[3,"share","showIcon"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"]],template:function(o,a){o&1&&h(0,z8,45,22,"div",0),o&2&&C(a.share()?0:-1)},dependencies:[t1,F,N,Qi,X,L1,d2],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();var M8=()=>["roots"],E8=(i,n)=>n.id;function P8(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"joinCounts"),l()),i&2){let e=c(2);s(),v(z(2,1,e.space().counts,Ee(4,M8)))}}function A8(i,n){i&1&&(r(0,"span",11),m(1,"no"),l())}function N8(i,n){if(i&1){let e=b();r(0,"span",15),_("click",function(){g(e);let o=c(2);return S(o.openSpaceRootsDialog())}),f(1,"fa-icon",16),r(2,"span"),m(3),l()()}if(i&2){let e=c(2);s(),d("icon",e.icons.ANCHORED),s(2),v(e.space().counts.roots)}}function L8(i,n){i&1&&(r(0,"span",11),m(1,"no"),l())}function k8(i,n){if(i&1){let e=b();r(0,"span",18),_("click",function(){g(e);let o=c(3);return S(o.openChildShareDialog(o.space()))}),f(1,"fa-icon",16),r(2,"span"),m(3),l()()}if(i&2){let e=c(3);s(),d("icon",e.icons.SHARED),s(2),v(e.space().counts.shares)}}function F8(i,n){i&1&&(r(0,"span",11),m(1,"no"),l())}function D8(i,n){if(i&1&&(r(0,"div",10)(1,"div",7),m(2,"Child shares"),l(),h(3,k8,4,2,"span",17)(4,F8,2,0,"span",11),l()),i&2){let e=c(2);s(3),C(e.space().counts.shares?3:4)}}function R8(i,n){if(i&1&&f(0,"app-user-avatar",13),i&2){let e=n.$implicit;d("user",e)("isMember",!0)("height",26)("width",26)}}function I8(i,n){if(i&1&&f(0,"app-file-permissions",14),i&2){let e=c(2);d("permissions",e.space().hPerms)}}function O8(i,n){i&1&&(r(0,"span",11),m(1,"no"),l())}function V8(i,n){if(i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),f(3,"fa-icon",3),l()(),f(4,"hr",4),r(5,"div",5)(6,"div",6)(7,"div",7),m(8,"Name"),l(),r(9,"div",8),m(10),l()(),r(11,"div",6)(12,"div",7),m(13,"Created"),l(),r(14,"div",9),m(15),T(16,"amDateFormat"),l()(),r(17,"div",6)(18,"div",7),m(19,"Modified"),l(),r(20,"div",9),m(21),T(22,"amDateFormat"),l()(),r(23,"div",10)(24,"div",7),m(25,"Members"),l(),h(26,P8,3,5,"span")(27,A8,2,0,"span",11),l(),r(28,"div",10)(29,"div",7),m(30,"Anchored"),l(),h(31,N8,4,2,"span",12)(32,L8,2,0,"span",11),l(),h(33,D8,5,1,"div",10),l(),f(34,"hr",4),r(35,"div",5)(36,"div",10)(37,"div",7),m(38,"Managers"),l(),D(39,R8,1,4,"app-user-avatar",13,E8),l(),r(41,"div",10)(42,"div",7),m(43,"Permissions"),l(),h(44,I8,1,1,"app-file-permissions",14)(45,O8,2,0,"span",11),l()()()),i&2){let e=c();d("resizeOffset",e.resizeOffset),s(3),n1("width",e.cardImageSize,"px")("height",e.cardImageSize,"px"),d("icon",e.icons.SPACES)("fixedWidth",!1),s(7),v(e.space().name),s(5),v(J(16,14,e.space().createdAt)),s(6),v(J(22,16,e.space().modifiedAt)),s(5),C(e.space().counts.users||e.space().counts.groups?26:27),s(5),C(e.space().counts.roots?31:32),s(2),C(e.space().role===e.SPACE_ROLE.IS_MANAGER?33:-1),s(6),R(e.space().managers),s(5),C(e.space().permissions?44:45)}}var Or=(()=>{let n=class n{constructor(){this.space=Oe.required(),this.locale=x(q),this.SPACE_ROLE=ho,this.icons={SPACES:o1.SPACES,ANCHORED:o1.ANCHORED,SHARED:o1.SHARED_WITH_OTHERS},this.cardImageSize=80,this.resizeOffset=80,this.userService=x(r1),this.layout=x(L)}openSpaceRootsDialog(){this.layout.openDialog(pa,"md",{initialState:{space:this.space(),user:this.userService.user}})}openChildShareDialog(t){t.counts.shares&&this.layout.openDialog(on,null,{initialState:{space:t}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-space-selection"]],inputs:{space:[1,"space"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"circle-primary-icon",2,"font-size","48px",3,"icon","fixedWidth"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],["tooltipPlacement","bottom",3,"user","isMember","height","width"],[3,"permissions"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"]],template:function(o,a){o&1&&h(0,V8,46,18,"div",0),o&2&&C(a.space()?0:-1)},dependencies:[t1,N,F,St,ze,d2,L1],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function B8(i,n){if(i&1&&(r(0,"span",11),m(1),l()),i&2){let e=c(2);s(),v(e.trash().nb)}}function U8(i,n){i&1&&(r(0,"span",12),m(1,"no"),l())}function H8(i,n){if(i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),f(3,"fa-icon",3),l()(),f(4,"hr",4),r(5,"div",5)(6,"div",6)(7,"div",7),m(8,"Name"),l(),r(9,"div",8),m(10),T(11,"translate"),l()(),r(12,"div",6)(13,"div",7),m(14,"Created"),l(),r(15,"div",9),m(16),T(17,"amDateFormat"),l()(),r(18,"div",6)(19,"div",7),m(20,"Modified"),l(),r(21,"div",9),m(22),T(23,"amDateFormat"),l()(),r(24,"div",10)(25,"div",7),m(26,"Elements"),l(),h(27,B8,2,1,"span",11)(28,U8,2,0,"span",12),l()()()),i&2){let e=c();d("resizeOffset",e.resizeOffset),s(3),n1("width",e.cardImageSize,"px")("height",e.cardImageSize,"px"),d("icon",e.iconTrash)("fixedWidth",!1),s(7),v(e.trash().isPersonal?z(11,11,e.trash().name,e.locale.language):e.trash().name),s(6),v(J(17,14,e.trash().ctime)),s(6),v(J(23,16,e.trash().mtime)),s(5),C(e.trash().nb?27:28)}}var Vr=(()=>{let n=class n{constructor(){this.trash=Oe.required(),this.locale=x(q),this.iconTrash=o1.TRASH,this.cardImageSize=80,this.resizeOffset=80}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-trash-selection"]],inputs:{trash:[1,"trash"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"circle-primary-icon",2,"font-size","48px",3,"icon","fixedWidth"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"d-flex","col-sm-7","word-break-all","fs-xxs"],[1,"d-flex","col-sm-7","fs-xxs"],[1,"d-flex","align-items-center","mb-1"],[1,"badge","rounded-pill","bg-danger"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"]],template:function(o,a){o&1&&h(0,H8,29,18,"div",0),o&2&&C(a.trash()?0:-1)},dependencies:[t1,N,F,L1,X],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function $8(i,n){if(i&1&&f(0,"app-files-selection",0),i&2){let e=c();d("files",e.store.filesSelection())}}function G8(i,n){if(i&1&&f(0,"app-space-selection",1),i&2){let e=c();d("space",e.store.spaceSelection())}}function W8(i,n){if(i&1&&f(0,"app-share-selection",2),i&2){let e=c();d("share",e.store.shareSelection())}}function q8(i,n){if(i&1&&f(0,"app-trash-selection",3),i&2){let e=c();d("trash",e.store.trashSelection())}}function Y8(i,n){if(i&1&&f(0,"app-link-selection",4),i&2){let e=c();d("link",e.store.linkSelection())}}var Br=(()=>{let n=class n{constructor(){this.store=x(Y),this.SPACES_PATH=O,this.selectionType=N1(()=>this.setRepository(this.store.repository()))}setRepository(t){return[O.SPACES,O.SHARED,O.LINKS,O.TRASHES].indexOf(t)>-1?t:O.FILES}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-selection"]],decls:5,vars:1,consts:[[3,"files"],[3,"space"],[3,"share"],[3,"trash"],[3,"link"]],template:function(o,a){if(o&1&&h(0,$8,1,1,"app-files-selection",0)(1,G8,1,1,"app-space-selection",1)(2,W8,1,1,"app-share-selection",2)(3,q8,1,1,"app-trash-selection",3)(4,Y8,1,1,"app-link-selection",4),o&2){let p;C((p=a.selectionType())===a.SPACES_PATH.FILES?0:p===a.SPACES_PATH.SPACES?1:p===a.SPACES_PATH.SHARED?2:p===a.SPACES_PATH.TRASHES?3:p===a.SPACES_PATH.LINKS?4:-1)}},dependencies:[Dr,Ir,Or,Vr,Rr],encapsulation:2,changeDetection:0});let i=n;return i})();var j8=["CommentCreate"],K8=(i,n)=>n.id;function Q8(i,n){if(i&1){let e=b();r(0,"i",14),_("click",function(){g(e);let o=c().$implicit,a=c(2);return S(a.onEditComment(o))}),f(1,"fa-icon",15),l()}if(i&2){let e=c(3);s(),d("icon",e.icons.faEdit)}}function X8(i,n){if(i&1){let e=b();f(0,"textarea",16,1),r(2,"div",17)(3,"button",18),_("click",function(){g(e);let o=S1(1),a=c().$implicit,p=c(2);return S(p.updateComment(a,o.value))}),m(4," Update "),l(),r(5,"button",19),_("click",function(){g(e);let o=c().$implicit,a=c(2);return S(a.onEditComment(o))}),m(6," Cancel "),l(),r(7,"button",20),_("click",function(){g(e);let o=c().$implicit,a=c(2);return S(a.removeComment(o))}),m(8," Remove "),l()()}if(i&2){let e=S1(1),t=c().$implicit;d("ngModel",t.content)("disabled",!t.author.isAuthor&&t.isFileOwner),s(3),d("disabled",!e.value||t.content===e.value)}}function Z8(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"amDateFormat"),l()),i&2){let e=c(2).$implicit;s(),v(J(2,1,e.dateToShow))}}function J8(i,n){i&1&&(r(0,"span",22),m(1,"modified"),l())}function e7(i,n){if(i&1&&(h(0,J8,2,0,"span",22),r(1,"span"),m(2),T(3,"amTimeAgo"),l()),i&2){let e=c(2).$implicit;C(e.wasModified?0:-1),s(2),v(J(3,2,e.dateToShow))}}function t7(i,n){if(i&1){let e=b();r(0,"div"),m(1),l(),r(2,"span",21),_("mouseleave",function(){g(e);let o=c().$implicit;return S(o.isHover=!1)})("mouseover",function(){g(e);let o=c().$implicit;return S(o.isHover=!0)})("focus",function(){g(e);let o=c().$implicit;return S(o.isHover=!0)}),h(3,Z8,3,3,"span")(4,e7,4,4),l()}if(i&2){let e=c().$implicit;s(),v(e.content),s(2),C(e.isHover?3:4)}}function i7(i,n){if(i&1&&(r(0,"div",7)(1,"div",8),f(2,"app-user-avatar",9),r(3,"div",10)(4,"b"),m(5),T(6,"translate"),l()(),r(7,"div",11),h(8,Q8,2,1,"i",12),l()(),r(9,"div",13),h(10,X8,9,3)(11,t7,5,2),l()()),i&2){let e=n.$implicit,t=c(2);s(2),d("user",e.author)("width",24)("height",24),s(3),v(e.author.isAuthor?z(6,6,"Me",t.locale.language):e.author.fullName),s(3),C(e.author.isAuthor||e.isFileOwner?8:-1),s(2),C(e.isEdited?10:11)}}function n7(i,n){if(i&1&&(r(0,"div",6),D(1,i7,12,9,"div",7,K8),l()),i&2){let e=c();s(),R(e.comments)}}var Ur=(()=>{let n=class n{constructor(){this.locale=x(q),this.comments=[],this.icons={faEdit:vi},this.store=x(Y),this.file=N1(()=>this.store.filesSelection().length?this.store.filesSelection()[0]:null),this.layout=x(L),this.commentsService=x(Mn),this.subscriptions=[],this.subscriptions.push(Pt(this.file).subscribe(t=>this.loadComments(t)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onEditComment(t){t.isEdited||this.comments.forEach(o=>o.isEdited=!1),t.isEdited=!t.isEdited}loadComments(t){t&&t.hasComments?this.commentsService.getComments(this.file()).subscribe({next:o=>this.comments=o,error:o=>this.layout.sendNotification("error","Comments","Unable to load",o)}):this.comments=[]}postComment(){let t=this.commentInput.nativeElement.value;this.commentsService.createComment(this.file(),{content:t,fileId:this.file().id}).subscribe({next:o=>{this.comments.unshift(o),this.commentInput.nativeElement.value="",this.file().id=o.fileId,this.file().hasComments=!!this.comments.length},error:o=>this.layout.sendNotification("error","Comment","Unable to create",o)})}removeComment(t){this.commentsService.deleteComment(this.file(),{commentId:t.id,fileId:this.file().id}).subscribe({next:()=>{this.comments=this.comments.filter(o=>o.id!==t.id),this.file().hasComments=!!this.comments.length},error:o=>this.layout.sendNotification("error","Comment","Unable to delete",o)})}updateComment(t,o){this.commentsService.updateComment(this.file(),{commentId:t.id,fileId:this.file().id,content:o}).subscribe({next:a=>{t.isEdited=!1,Object.assign(t,a)},error:a=>{this.layout.sendNotification("error","Comment","Unable to update",a)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-comments-selection"]],viewQuery:function(o,a){if(o&1&&s1(j8,7),o&2){let p;l1(p=c1())&&(a.commentInput=p.first)}},decls:8,vars:7,consts:[["CommentCreate",""],["CommentUpdate",""],[1,"sidebar-component-title"],[1,"input-group","mb-0"],["type","text","appAutofocus","",1,"form-control","form-control-sm",3,"keyup.enter","disabled","placeholder"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary",3,"click","disabled"],["appAutoResize","",1,"fs-xxs","p-2"],[1,"mb-1","app-small-card","app-comment","rounded"],[1,"d-flex","px-2","pt-2","pb-1"],[3,"user","width","height"],[1,"align-self-center","ms-1"],[1,"ms-auto","align-self-center",2,"font-size","14px"],[1,"cursor-pointer"],[1,"pb-2","px-2"],[1,"cursor-pointer",3,"click"],[3,"icon"],["required","",1,"form-control","form-control-sm","mt-1","mb-2",3,"ngModel","disabled"],[1,"d-flex"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary","me-auto",3,"click","disabled"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary","align-content-around",3,"click"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-danger","ms-auto",3,"click"],[1,"text-muted","no-select","pt-1","fs-xxxs",3,"mouseleave","mouseover","focus"],["l10nTranslate","",1,"me-1"]],template:function(o,a){if(o&1){let p=b();r(0,"div",2)(1,"div",3)(2,"input",4,0),T(4,"translate"),_("keyup.enter",function(){return g(p),S(a.postComment())}),l(),r(5,"button",5),_("click",function(){return g(p),S(a.postComment())}),m(6," Add "),l()()(),h(7,n7,3,0,"div",6)}if(o&2){let p=S1(3);s(2),d("disabled",!a.file())("placeholder",z(4,4,"Write a comment ...",a.locale.language)),s(3),d("disabled",!p.value),s(2),C(a.comments.length?7:-1)}},dependencies:[we,F,t1,N,g1,O1,_1,pi,C1,ze,X,L1,B1],encapsulation:2});let i=n;return i})();var o7=(i,n)=>n.key,a7=(i,n)=>n.id;function r7(i,n){if(i&1&&(r(0,"option",8),m(1),l()),i&2){let e=n.$implicit;d("ngValue",e.key),s(),v(e.value.text)}}function s7(i,n){if(i&1){let e=b();r(0,"div",12)(1,"div",13)(2,"img",14),_("error",function(){let o=g(e).$implicit;return S(o.fallBackMimeUrl())}),l(),r(3,"div",15),m(4),l(),r(5,"button",16),_("click",function(){let o=g(e).$implicit,a=c(2);return S(a.remove(o))}),f(6,"fa-icon",4),l()()()}if(i&2){let e=n.$implicit,t=c(2);s(),d("tooltip",e.path),s(),d("src",e.mimeUrl,Q),s(2),v(e.name),s(2),d("icon",t.icons.faTimes)}}function l7(i,n){if(i&1){let e=b();r(0,"div",5)(1,"div",6)(2,"select",7),d1("ngModelChange",function(o){g(e);let a=c();return p1(a.selectedAction,o)||(a.selectedAction=o),S(o)}),D(3,r7,2,2,"option",8,o7),T(5,"keyvalue"),l(),r(6,"button",9),_("click",function(){g(e);let o=c();return S(o.doAction())}),m(7,"Confirm"),l()()(),f(8,"hr",10),r(9,"div",11),D(10,s7,7,4,"div",12,a7),l()}if(i&2){let e=c();s(2),m1("ngModel",e.selectedAction),s(),R(z(5,2,e.operations,e.originalOrderKeyValue)),s(6),d("resizeOffset",120),s(),R(e.files)}}var Hr=(()=>{let n=class n{constructor(){this.locale=x(q),this.icons={faTrashCan:q1,faTimes:Ve,faDownload:e2,faArrowsAlt:dt,faClone:Ti,faQuestion:q0},this.originalOrderKeyValue=re,this.operations={copyPaste:{text:"Copy-Paste",operation:H1.COPY},cutPaste:{text:"Cut-Paste",operation:H1.MOVE},download:{text:"Download",operation:H1.DOWNLOAD},compress:{text:"Compress",operation:H1.COMPRESS}},this.files=[],this.layout=x(L),this.store=x(Y),this.filesService=x(E1),this.selectedAction=this.filesService.clipboardAction,this.subscriptions=[],this.subscriptions.push(this.store.filesClipboard.subscribe(t=>this.files=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}clearAll(){this.layout.toggleRSideBar(!1),this.filesService.clearClipboard()}remove(t){this.files.length===1?this.clearAll():this.filesService.removeFromClipboard(t)}doAction(){if(this.selectedAction==="copyPaste"||this.selectedAction==="cutPaste")this.filesService.onPasteClipboard(this.selectedAction);else{let t={name:this.files[0].name,compressInDirectory:this.operations[this.selectedAction].operation===H1.COMPRESS,files:this.files.map(a=>({name:a.name,rootAlias:a.root?.alias,path:a.path})),extension:"tar"};this.layout.openDialog(Pn,null,{initialState:{archiveProps:t}}).content.submitEvent.pipe(M1(1)).subscribe(()=>this.filesService.clearClipboard())}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-clipboard"]],decls:8,vars:7,consts:[[1,"sidebar-component-title"],["container","body","placement","left",1,"cursor-pointer",3,"icon","tooltip"],["l10nTranslate",""],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],[1,"px-2","pt-2","pb-2","fs-xs"],[1,"d-flex","justify-content-between","mt-2"],[1,"form-select","form-select-sm","my-auto",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"ngValue"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary","ms-1",3,"click"],[1,"mx-0","mt-2","mb-0"],["appAutoResize","",1,"sidebar-item",3,"resizeOffset"],[1,"sidebar-item-container"],[1,"sidebar-item-content",3,"tooltip"],["alt","","height","28","width","auto",1,"me-1",3,"error","src"],[1,"text-truncate","fs-xxs"],[1,"btn","btn-xxs","btn-danger","ms-auto",3,"click"]],template:function(o,a){o&1&&(r(0,"div",0),f(1,"fa-icon",1),T(2,"translate"),r(3,"span",2),m(4,"Clipboard"),l(),r(5,"button",3),_("click",function(){return a.clearAll()}),f(6,"fa-icon",4),l()(),h(7,l7,12,5)),o&2&&(s(),d("icon",a.icons.faQuestion)("tooltip",z(2,4,"Actions will be performed in the current folder",a.locale.language)),s(5),d("icon",a.icons.faTrashCan),s(),C(a.files.length?7:-1))},dependencies:[t1,N,Zt,w1,F,g1,ie,ne,te,_1,C1,X,ee],encapsulation:2});let i=n;return i})();var $r=(()=>{let n=class n{constructor(){this.layout=x(L),this.store=x(Y),this.tabs=[{label:y1.SELECTION,components:[Br],loadComponent:!1,icon:w4,count:{value:Pt(N1(()=>this.store.filesSelection().length>1?this.store.filesSelection().length>1e3?"999+":this.store.filesSelection().length:0)),level:"primary"},title:"Informations",active:!1},{label:y1.TREE,components:[la],loadComponent:!0,icon:H4,title:null,active:!1},{label:y1.COMMENTS,components:[Ur],loadComponent:!1,icon:tn,title:null,active:!1},{label:y1.CLIPBOARD,components:[Hr],loadComponent:!1,icon:Ei,count:{value:this.store.filesClipboard.pipe(de(t=>t.length)),level:"maroon"},showOnCount:!0,title:null,active:!1}],this.layout.setTabsRSideBar(so.FILES,this.tabs)}ngOnDestroy(){this.layout.setTabsRSideBar(null)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-spaces-nav"]],decls:1,vars:0,template:function(o,a){o&1&&f(0,"router-outlet")},dependencies:[qt],encapsulation:2});let i=n;return i})();var vt=i=>(x(Y).repository.set(i.data.repository),i.url);var Gr=[{path:"",component:$r,children:[{path:O.SPACES,pathMatch:"full",loadComponent:()=>import("./chunk-UG5DMXYO.js").then(i=>i.SpacesComponent),resolve:{routes:vt},data:{repository:O.SPACES}},{path:O.TRASH,pathMatch:"full",loadComponent:()=>import("./chunk-M3XVNQZQ.js").then(i=>i.TrashComponent),resolve:{routes:vt},data:{repository:O.TRASHES}},{path:O.SHARED,pathMatch:"full",loadComponent:()=>import("./chunk-YW57T2PF.js").then(i=>i.SharedComponent),resolve:{routes:vt},data:{repository:O.SHARED}},{path:O.LINKS,pathMatch:"full",loadComponent:()=>import("./chunk-YEKR5OPO.js").then(i=>i.LinksComponent),resolve:{routes:vt},data:{repository:O.LINKS}},{path:O.SPACES_FILES,children:[{path:"**",component:Nn,resolve:{routes:vt},data:{repository:O.FILES}}]},{path:O.SPACES_SHARES,children:[{path:"**",component:Nn,resolve:{routes:vt},data:{repository:O.SHARES}}]},{path:O.SPACES_TRASH,children:[{path:"**",component:Nn,resolve:{routes:vt},data:{repository:O.TRASH}}]}]}];var yt=(function(i){return i.LIST="list",i.SYNC="sync",i.ADD="add",i.FLUSH="flush",i.SET="set",i.REMOVE="remove",i})(yt||{}),$3=(function(i){return i.FILE="file",i.FOLDER="folder",i.EXPERT="expert",i.START="start",i.END="end",i.IN="in",i})($3||{});var Ln={prefix:"fab",iconName:"windows",icon:[448,512,[],"f17a","M0 93.7l183.6-25.3 0 177.4-183.6 0 0-152.1zM0 418.3l183.6 25.3 0-175.2-183.6 0 0 149.9zm203.8 28l244.2 33.7 0-211.6-244.2 0 0 177.9zm0-380.6l0 180.1 244.2 0 0-213.8-244.2 33.7z"]};var kn={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M319.1 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7-55.8 .9-115.1 44.5-115.1 133.2 0 26.2 4.8 53.3 14.4 81.2 12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zM262.5 104.5c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]};var Fn={prefix:"fab",iconName:"linux",icon:[448,512,[],"f17c","M220.9 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5 .2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4 .2-.8 .7-.6 1.1 .3 1.3 2.3 1.1 3.4 1.7zM199 125c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6 .2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5 .1-1.3 .6-3.4 1.5-3.2 2.9 .1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72 .5-45.9 5.1-131.2-75.8-131.3-102.4-.2-76.8 103.4-77.9 135.2-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9 .6 7.9 1.2 11.8 1.2 8.1 2.5 15.7 .8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1 .6 2.3 1.4 4.6 2.5 6.7l0 .1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3 .4-8.2-4.4-17.3-15.5-29.7zM223.8 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183.1 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4 .7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4l0-.2c2.4-7.6 .6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7 .8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4 .6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1 .8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7 .4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6 .8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1 .3-.2 .7-.3 1-.5 .8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.4 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"]};function Dn(i){return i?i.includes(le.MODIFY)&&i.includes(le.DELETE)&&i.includes(le.ADD):!1}function Rn(i,n=!1){let e=i.split("/");return e[0]===O.FILES&&e.length>3||e[0]===O.SHARES&&e.length>(n?2:1)||e.length>2}function In(i){let n=i.split("/").filter(Boolean);return n.length?(n[0]===O.FILES&&(n[1]===O.PERSONAL?(n=n.slice(2),n.unshift(O.PERSONAL)):n[0]=O.SPACES),n.join("/")):""}var je=class{constructor(n,e=!1){this.mainError=null,this.lastErrors=[],this.newly=0,this.inSync=!1,this.nbSyncTasks=0,e?(this.id=Je("id",n),this.firstSync=Je("firstSync",n),this.mainError=Je("mainError",n),this.lastErrors=Je("lastErrors",n),this.settings=n):Object.assign(this,n),this.setInfos(),this.setStatus(!1)}setStatus(n){n?(this.mimeUrl=U1(Xi),this.inSync=!0):(this.nbSyncTasks=0,this.inSync=!1,this.newly=kt(this.settings.lastSync||0,!0),this.settings.enabled?this.mainError?this.mimeUrl=U1(Io):this.mimeUrl=U1(this.mime):this.mimeUrl=U1(Zi))}export(n=!1){return Se(P1({},n?{id:this.id}:{}),{name:this.settings.name,mode:this.settings.mode,enabled:this.settings.enabled,diffMode:this.settings.diffMode,conflictMode:this.settings.conflictMode,filters:this.settings.filters,scheduler:this.settings.scheduler})}setInfos(){this.isWriteable=Dn(this.settings?.permissions),this.newly=kt(this.settings.lastSync||0,!0);let n=this.settings.remotePath.split("/")[0];switch(this.showedPath=this.settings.remotePath.split("/").slice(1).join("/"),this.iconClass=n===Ft.SHARES?"purple":"primary",n){case O.PERSONAL:this.icon=o1.PERSONAL,this.mime=Ce;break;case O.SPACES:this.icon=o1.SPACES,this.mime=Ce;break;case O.SHARES:this.icon=o1.SHARES,this.mime=u2;break}}};var On=class{constructor(n){this.paths=(Je("paths",n)||[]).map(e=>new je(e)),Object.assign(this,n),this.setExpiration(),this.setIcon()}setExpiration(){let n=r3()>=this.tokenExpiration;this.expiration={value:this.tokenExpiration*1e3,reached:n,approaching:n?!1:r3()+90*86400>=this.tokenExpiration}}setIcon(){this.info.os==="darwin"?(this.icon=kn,this.osName="macOS"):this.info.os.startsWith("win")?(this.icon=Ln,this.osName="Windows"):this.info.os.startsWith("linux")&&(this.icon=Fn,this.osName="Linux")}};var ot=class{constructor(n){this.isDir=!0,this.mime="directory",this.isAlreadySynced=!1,this.isWriteable=Dn(n.permissions),Object.assign(this,n),this.icon||(this.mimeUrl=U1(this.enabled?this.inShare?u2:Ce:Zi)),this.isSynchronizable=Rn(this.path),this.serverPath=In(this.path)}setAlreadySynced(){this.isAlreadySynced=!0,this.mimeUrl=U1(Xi)}};var b1=(()=>{let n=class n{constructor(){this.router=x(i1),this.http=x(rt),this.layout=x(L),this.store=x(Y),this.electron=x(qi),this.resetWizard()}showOpenDialog(t){return this.electron.invoke(se.MISC.DIALOG_OPEN,t)}getFilePath(t){return this.electron.ipcRenderer.showFilePath(t)}getClients(){return this.http.get(D2).pipe(de(t=>t.map(o=>new On(o))))}deleteClient(t){return this.http.delete(`${D2}/${t}`)}updateSyncPath(t,o,a){return this.http.put(`${D2}/${t}/${a3.PATHS}/${o}`,a)}deleteSyncPath(t,o){return this.http.delete(`${D2}/${t}/${a3.PATHS}/${o}`)}addPath(t){return this.electron.invoke(se.SYNC.PATH_OPERATION,yt.ADD,t)}updatePath(t){return this.electron.invoke(se.SYNC.PATH_OPERATION,yt.SET,t)}flushPath(t){return this.electron.invoke(se.SYNC.PATH_OPERATION,yt.FLUSH,t)}removePath(t){return this.electron.invoke(se.SYNC.PATH_OPERATION,yt.REMOVE,t)}doSync(t,o,a=!1,p=!1){this.electron.invoke(se.SYNC.PATH_OPERATION,yt.SYNC,{state:t,paths:o,reportOnly:a,async:p}).catch(console.error)}refreshPaths(){return K1(this,null,function*(){try{let t=yield this.electron.invoke(se.SYNC.PATH_OPERATION,yt.LIST,null);this.store.clientSyncPaths.set(t.map(o=>new je(o,!0)))}catch(t){console.error(t)}})}goToPath(t,o=!0,a=""){if(o)this.electron.openPath(`${t.settings.localPath}/${a?`/${a}`:""}`);else{let p=[...t.settings.remotePath.split("/"),...a?a.split("/"):[]],u;p.length>1&&(u=p.pop());let y=p.shift();this.router.navigate([O.SPACES,...Co[y],...p],u?{queryParams:{select:u}}:{}).catch(console.error)}}setClientScheduler(t){this.electron.send(se.SYNC.SCHEDULER_STATE,"update",t)}getTransfers(t,o){return this.electron.invoke(se.SYNC.TRANSFER_LOGS,"get",t||null,o)}deleteTransfers(t){return this.electron.invoke(se.SYNC.TRANSFER_LOGS,"delete",t||null)}translateServerPath(t){let o=In(t).split("/");return o.length?(o[0]=o[0]===O.PERSONAL?this.layout.translateString(Ue.PERSONAL_FILES):this.layout.translateString(ro(o[0])),o.join("/")):""}addFileToRemotePath(t){this.wizard.remotePath=new ot({id:t.id,name:t.name,path:t.path,isDir:t.isDir,mime:t.mime,mimeUrl:t.mimeUrl,enabled:!0,isWriteable:!0,inShare:t.path.split("/")[0]===O.SHARES})}resetWizard(){this.wizard={localPath:null,remotePath:null,settings:{enabled:!0,name:"",mode:Ae.BOTH,conflictMode:gt.RECENT,diffMode:Gi.FAST,scheduler:{unit:"minute",value:15}}}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=W1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var c7=(i,n)=>({"pull-left":i,"float-left":n}),m7=(i,n)=>({"pull-right":i,"float-right":n}),Vn=(i,n)=>({disabled:i,currentPage:n}),p7=(i,n,e)=>({disabled:i,$implicit:n,currentPage:e});function d7(i,n){if(i&1){let e=b();r(0,"li",11)(1,"a",12),_("click",function(o){g(e);let a=c();return S(a.selectPage(1,o))}),F1(2,13),l()()}if(i&2){let e=c(),t=S1(13);U("disabled",e.noPrevious()||e.disabled),s(2),d("ngTemplateOutlet",e.customFirstTemplate||t)("ngTemplateOutletContext",xe(4,Vn,e.noPrevious()||e.disabled,e.page))}}function f7(i,n){if(i&1){let e=b();r(0,"li",14)(1,"a",12),_("click",function(o){g(e);let a=c();return S(a.selectPage(a.page-1,o))}),F1(2,13),l()()}if(i&2){let e=c(),t=S1(11);U("disabled",e.noPrevious()||e.disabled),s(2),d("ngTemplateOutlet",e.customPreviousTemplate||t)("ngTemplateOutletContext",xe(4,Vn,e.noPrevious()||e.disabled,e.page))}}function u7(i,n){if(i&1){let e=b();r(0,"li",15)(1,"a",12),_("click",function(o){let a=g(e).$implicit,p=c();return S(p.selectPage(a.number,o))}),F1(2,13),l()()}if(i&2){let e=n.$implicit,t=c(),o=S1(7);U("active",e.active)("disabled",t.disabled&&!e.active),s(2),d("ngTemplateOutlet",t.customPageTemplate||o)("ngTemplateOutletContext",m0(6,p7,t.disabled,e,t.page))}}function _7(i,n){if(i&1){let e=b();r(0,"li",16)(1,"a",12),_("click",function(o){g(e);let a=c();return S(a.selectPage(a.page+1,o))}),F1(2,13),l()()}if(i&2){let e=c(),t=S1(9);U("disabled",e.noNext()||e.disabled),s(2),d("ngTemplateOutlet",e.customNextTemplate||t)("ngTemplateOutletContext",xe(4,Vn,e.noNext()||e.disabled,e.page))}}function h7(i,n){if(i&1){let e=b();r(0,"li",17)(1,"a",12),_("click",function(o){g(e);let a=c();return S(a.selectPage(a.totalPages,o))}),F1(2,13),l()()}if(i&2){let e=c(),t=S1(15);U("disabled",e.noNext()||e.disabled),s(2),d("ngTemplateOutlet",e.customLastTemplate||t)("ngTemplateOutletContext",xe(4,Vn,e.noNext()||e.disabled,e.page))}}function C7(i,n){if(i&1&&m(0),i&2){let e=n.$implicit;v(e.text)}}function g7(i,n){if(i&1&&m(0),i&2){let e=c();v(e.getText("next"))}}function S7(i,n){if(i&1&&m(0),i&2){let e=c();v(e.getText("previous"))}}function x7(i,n){if(i&1&&m(0),i&2){let e=c();v(e.getText("first"))}}function v7(i,n){if(i&1&&m(0),i&2){let e=c();v(e.getText("last"))}}var Wr=(()=>{let n=class n{constructor(){this.main={itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",pageBtnClass:"",rotate:!0},this.pager={itemsPerPage:15,previousText:"\xAB Previous",nextText:"Next \xBB",pageBtnClass:"",align:!0}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=W1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),y7={provide:n3,useExisting:Kn(()=>b7),multi:!0},b7=(()=>{let n=class n{constructor(t,o,a){this.elementRef=t,this.changeDetection=a,this.align=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.firstText="First",this.previousText="\xAB Previous",this.nextText="Next \xBB",this.lastText="Last",this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new h1,this.pageChanged=new h1,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=15,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=t,this.config||this.configureOptions(Object.assign({},o.main,o.pager))}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(t){this._itemsPerPage=t,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(t){this._totalItems=t,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(t){this._totalPages=t,this.numPages.emit(t),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(t){let o=this._page;this._page=t>this.totalPages?this.totalPages:t||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(t){this.config=Object.assign({},t)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(t){this.page=t,this.pages=this.getPages(this.page,this.totalPages)}getText(t){return this[`${t}Text`]||this.config[`${t}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}selectPage(t,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(t),this.onChange(this.page))}makePage(t,o,a){return{text:o,number:t,active:a}}getPages(t,o){let a=[],p=1,u=o,y=typeof this.maxSize<"u"&&this.maxSize<o;y&&this.maxSize&&(this.rotate?(p=Math.max(t-Math.floor(this.maxSize/2),1),u=p+this.maxSize-1,u>o&&(u=o,p=u-this.maxSize+1)):(p=(Math.ceil(t/this.maxSize)-1)*this.maxSize+1,u=Math.min(p+this.maxSize-1,o)));for(let w=p;w<=u;w++){let k=this.makePage(w,w.toString(),w===t);a.push(k)}if(y&&!this.rotate){if(p>1){let w=this.makePage(p-1,"...",!1);a.unshift(w)}if(u<o){let w=this.makePage(u+1,"...",!1);a.push(w)}}return a}calculateTotalPages(){let t=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(t||0,1)}};n.\u0275fac=function(o){return new(o||n)(Mt(P2),Mt(Wr),Mt(Jn))},n.\u0275cmp=E({type:n,selectors:[["pager"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[Zn([y7])],decls:7,vars:22,consts:[[1,"pager"],[3,"ngClass"],["href","",3,"click"]],template:function(o,a){o&1&&(r(0,"ul",0)(1,"li",1)(2,"a",2),_("click",function(u){return a.selectPage(a.page-1,u)}),m(3),l()(),r(4,"li",1)(5,"a",2),_("click",function(u){return a.selectPage(a.page+1,u)}),m(6),l()()()),o&2&&(s(),M(a.pageBtnClass),U("disabled",a.noPrevious())("previous",a.align),d("ngClass",xe(16,c7,a.align,a.align)),s(2),v(a.getText("previous")),s(),M(a.pageBtnClass),U("disabled",a.noNext())("next",a.align),d("ngClass",xe(19,m7,a.align,a.align)),s(2),v(a.getText("next")))},dependencies:[e3],encapsulation:2});let i=n;return i})(),T7={provide:n3,useExisting:Kn(()=>G3),multi:!0},G3=(()=>{let n=class n{constructor(t,o,a){this.elementRef=t,this.changeDetection=a,this.align=!0,this.boundaryLinks=!1,this.directionLinks=!0,this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new h1,this.pageChanged=new h1,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=10,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=t,this.config||this.configureOptions(o.main)}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(t){this._itemsPerPage=t,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(t){this._totalItems=t,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(t){this._totalPages=t,this.numPages.emit(t),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(t){let o=this._page;this._page=t>this.totalPages?this.totalPages:t||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(t){this.config=Object.assign({},t)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(t){this.page=t,this.pages=this.getPages(this.page,this.totalPages)}getText(t){return this[`${t}Text`]||this.config[`${t}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}selectPage(t,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(t),this.onChange(this.page))}makePage(t,o,a){return{text:o,number:t,active:a}}getPages(t,o){let a=[],p=1,u=o,y=typeof this.maxSize<"u"&&this.maxSize<o;y&&this.maxSize&&(this.rotate?(p=Math.max(t-Math.floor(this.maxSize/2),1),u=p+this.maxSize-1,u>o&&(u=o,p=u-this.maxSize+1)):(p=(Math.ceil(t/this.maxSize)-1)*this.maxSize+1,u=Math.min(p+this.maxSize-1,o)));for(let w=p;w<=u;w++){let k=this.makePage(w,w.toString(),w===t);a.push(k)}if(y&&!this.rotate){if(p>1){let w=this.makePage(p-1,"...",!1);a.unshift(w)}if(u<o){let w=this.makePage(u+1,"...",!1);a.push(w)}}return a}calculateTotalPages(){let t=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(t||0,1)}};n.\u0275fac=function(o){return new(o||n)(Mt(P2),Mt(Wr),Mt(Jn))},n.\u0275cmp=E({type:n,selectors:[["pagination"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",customPageTemplate:"customPageTemplate",customNextTemplate:"customNextTemplate",customPreviousTemplate:"customPreviousTemplate",customFirstTemplate:"customFirstTemplate",customLastTemplate:"customLastTemplate",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[Zn([T7])],decls:16,vars:6,consts:[["defaultPageTemplate",""],["defaultNextTemplate",""],["defaultPreviousTemplate",""],["defaultFirstTemplate",""],["defaultLastTemplate",""],[1,"pagination",3,"ngClass"],["class","pagination-first page-item",3,"disabled",4,"ngIf"],["class","pagination-prev page-item",3,"disabled",4,"ngIf"],["class","pagination-page page-item",3,"active","disabled",4,"ngFor","ngForOf"],["class","pagination-next page-item",3,"disabled",4,"ngIf"],["class","pagination-last page-item",3,"disabled",4,"ngIf"],[1,"pagination-first","page-item"],["href","",1,"page-link",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"pagination-prev","page-item"],[1,"pagination-page","page-item"],[1,"pagination-next","page-item"],[1,"pagination-last","page-item"]],template:function(o,a){o&1&&(r(0,"ul",5),V(1,d7,3,7,"li",6)(2,f7,3,7,"li",7)(3,u7,3,10,"li",8)(4,_7,3,7,"li",9)(5,h7,3,7,"li",10),l(),V(6,C7,1,1,"ng-template",null,0,ue)(8,g7,1,1,"ng-template",null,1,ue)(10,S7,1,1,"ng-template",null,2,ue)(12,x7,1,1,"ng-template",null,3,ue)(14,v7,1,1,"ng-template",null,4,ue)),o&2&&(d("ngClass",a.classMap),s(),d("ngIf",a.boundaryLinks),s(),d("ngIf",a.directionLinks),s(),d("ngForOf",a.pages),s(),d("ngIf",a.directionLinks),s(),d("ngIf",a.boundaryLinks))},dependencies:[e3,h0,Wt,_0],encapsulation:2});let i=n;return i})();var qr=(()=>{let n=class n{transform(t,o=1,a){if(!t?.length)return[];let p=(o-1)*a;return t.slice(p,p+a)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275pipe=l0({name:"paginate",type:n,pure:!0});let i=n;return i})();var Bt=(function(i){return i.LOCAL="local",i.REMOTE="remote",i})(Bt||{}),Bn={[Bt.LOCAL]:"circle-purple-icon-sm",[Bt.REMOTE]:"circle-primary-icon-sm"},Un={[Bt.LOCAL]:Te,[Bt.REMOTE]:ye},Y2={NEW:"Added",DIFF:"Modified",RM:"Removed",RMDIR:"Removed",MOVE:"Moved",COPY:"Copied",MKDIR:"Added",MKFILE:"Added",FILTERED:"Filtered",ERROR:"Error"},Yr={Added:be,Modified:m4,Removed:Fi,Moved:b4,Copied:ut,Filtered:_i,Error:C4};var T2=class{constructor(n){this.selected=!1,this.hovered=!1,this.isFiltered=!1,this.newly=0,Object.assign(this,n),this.sideIcon=Un[this.side],this.sideIconClass=Bn[this.side],this.actionText=Y2[this.action],this.actionIcon=Yr[this.actionText],this.isFiltered=this.actionText===Y2.FILTERED,this.mimeUrl=U1(this.mime),this.timestamp&&(this.hTimeAgo=k2(this.timestamp).fromNow(!0),this.timestamp=k2(this.timestamp).format("YYYY-MM-DD HH:mm:ss"),this.newly=kt(this.timestamp))}fallBackMimeUrl(){this.mimeUrl=en}};var w7=i=>({nb:i}),z7=(i,n)=>n.nbTasks,jr=(i,n)=>n.key;function M7(i,n){if(i&1&&f(0,"fa-icon",12),i&2){let e=c();d("icon",e.icons.faSpinner)}}function E7(i,n){if(i&1&&(r(0,"span",13),m(1),T(2,"translate"),l()),i&2){let e=c();s(),v(fe(2,1,"nb_actions",e.locale.language,I1(5,w7,e.count.actions)))}}function P7(i,n){if(i&1){let e=b();r(0,"button",27),T(1,"translate"),d1("ngModelChange",function(o){g(e);let a=c();return p1(a.showFiltered,o)||(a.showFiltered=o),S(o)}),f(2,"fa-icon",2),r(3,"span"),m(4),l()()}if(i&2){let e=c();m1("ngModel",e.showFiltered),d("tooltip",z(1,4,"Show filtered files",e.locale.language)),s(2),d("icon",e.icons.faFilter),s(2),v(e.count.filtered)}}function A7(i,n){if(i&1){let e=b();r(0,"li",29)(1,"a",30),_("click",function(){g(e);let o=c(2);return S(o.goToPath(!1))}),r(2,"span",31),f(3,"fa-icon",2),r(4,"span",3),m(5,"Server"),l()()()()}if(i&2){let e=c(2);s(3),d("icon",e.icons.SERVER)}}function N7(i,n){if(i&1){let e=b();r(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){g(e);let o=c();return S(o.goToPath())}),r(3,"span",31),f(4,"fa-icon",2),r(5,"span",3),m(6,"Client"),l()()()(),h(7,A7,6,1,"li",29),l()}if(i&2){let e=c();s(4),d("icon",e.icons.CLIENT),s(3),C(e.transferSelected.action!==e.SYNC_TRANSFER_ACTION.FILTERED?7:-1)}}function L7(i,n){i&1&&(r(0,"div",21),m(1,"No differences"),l())}function k7(i,n){if(i&1&&f(0,"fa-icon",2),i&2){let e=c(4);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function F7(i,n){if(i&1){let e=b();r(0,"th",33),_("click",function(){g(e);let o=c().$implicit,a=c(2);return S(a.sortBy(o.key))}),m(1),h(2,k7,1,1,"fa-icon",2),l()}if(i&2){let e=c().$implicit,t=c(2);M(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function D7(i,n){if(i&1&&h(0,F7,3,10,"th",32),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function R7(i,n){if(i&1&&(r(0,"table",22)(1,"thead")(2,"tr"),D(3,D7,1,1,null,null,jr),T(5,"keyvalue"),l()()()),i&2){let e=c();s(3),R(z(5,0,e.tableHeaders,e.originalOrderKeyValue))}}function I7(i,n){if(i&1&&(r(0,"span",37),f(1,"fa-icon",2)(2,"fa-icon",39),r(3,"span",40),m(4),l()()),i&2){let e=c(4).$implicit;s(),M(e.sideIconClass),d("icon",e.sideIcon),s(),d("icon",e.actionIcon),s(2),v(e.actionText)}}function O7(i,n){if(i&1&&(r(0,"span"),m(1),l(),r(2,"span")(3,"b",31),m(4,"Source"),l(),m(5),l()),i&2){let e=c(5).$implicit;M(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),v(e.fileDst),s(),M(I("",e.selected?"overflow-wrap-and-whitespace":"truncate"," fs-xxxs")),s(3),A(":\xA0",e.file)}}function V7(i,n){if(i&1&&(r(0,"span"),m(1),l()),i&2){let e=c(5).$implicit;M(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),v(e.file)}}function B7(i,n){if(i&1){let e=b();r(0,"div",38)(1,"img",41),_("error",function(){g(e);let o=c(4).$implicit;return S(o.fallBackMimeUrl())}),l(),r(2,"span",42),h(3,O7,6,7)(4,V7,2,3,"span",43),l()()}if(i&2){let e=c(4).$implicit;s(),d("src",e.mimeUrl,Q),s(2),C(e.fileDst?3:4)}}function U7(i,n){if(i&1&&(r(0,"td"),h(1,I7,5,5,"span",37)(2,B7,5,2,"div",38),l()),i&2){let e,t=c().$implicit;M(t.value.class),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),s(),C((e=t.key)==="action"?1:e==="file"?2:-1)}}function H7(i,n){if(i&1&&h(0,U7,3,7,"td",36),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function $7(i,n){if(i&1){let e=b();r(0,"tr",35),_("click",function(){g(e);let o=c().$implicit,a=c();return S(a.onSelect(o))}),D(1,H7,1,1,null,null,jr),T(3,"keyvalue"),l()}if(i&2){let e=c().$implicit,t=c();U("selected",t.transferSelected&&t.transferSelected.nbTasks===e.nbTasks),s(),R(z(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function G7(i,n){if(i&1&&h(0,$7,4,5,"tr",34),i&2){let e=n.$implicit,t=c();C(!e.isFiltered||t.showFiltered&&e.isFiltered?0:-1)}}var Kr=(()=>{let n=class n{constructor(){this.locale=x(q),this.originalOrderKeyValue=re,this.SYNC_TRANSFER_ACTION=Y2,this.icons={faArrowDown:Te,faArrowUp:ye,faStop:Si,faFlask:zi,faSpinner:ae,faRotate:ve,faMapMarkerAlt:i2,faFilter:_i,CLIENT:v1.CLIENT,SERVER:v1.SERVER},this.tableHeaders={action:{label:"Action",width:16,textCenter:!1,class:"",show:!0,sortable:!0},file:{label:"File",width:84,textCenter:!1,class:"",show:!0,sortable:!0}},this.itemsPerPage=500,this.currentPage=1,this.running=!1,this.hasNoChanges=!1,this.transferSelected=null,this.showFiltered=!1,this.count={actions:0,filtered:0},this.transfers=ii([]),this.layout=x(L),this.electron=x(qi),this.store=x(Y),this.syncService=x(b1),this.sortSettings={default:[{prop:"nbTasks",type:"number"}],action:[{prop:"actionText",type:"string"}],file:[{prop:"file",type:"string"}]},this.sortTable=new $e(this.constructor.name,this.sortSettings),this.subscriptions=[]}ngOnInit(){this.electron.ipcRenderer.on(se.SYNC.REPORT_TRANSFER,(t,o)=>this.addTransfer(o)),this.subscriptions.push(this.store.clientSyncIsReporting.subscribe(t=>this.manageState(t)))}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe();this.electron.ipcRenderer.removeAllListeners(se.SYNC.REPORT_TRANSFER)}manageReport(t=!1){t&&(this.hasNoChanges=!1,this.count={actions:0,filtered:0},this.transfers.set([])),this.syncService.doSync(t,[this.syncPath.id],!0)}sortBy(t,o=!0,a){this.transfers.set(this.sortTable.sortBy(t,o,a||this.transfers()))}onSelect(t){this.transferSelected=t||null}goToPath(t=!0){this.syncService.goToPath(this.syncPath,t,this.transferSelected.file)}pageChanged(){this.onSelect(),this.autoResizeDirective.scrollTop()}onClose(){this.running&&this.syncService.doSync(!1,[this.syncPath.id],!0),this.layout.closeDialog(null,this.syncPath.id)}onMinimize(){this.layout.minimizeDialog(this.syncPath.id,{name:this.syncPath.settings.name,mimeUrl:this.syncPath.mimeUrl})}addTransfer(t){let o=new T2(t);o.isFiltered?this.count.filtered++:this.count.actions++,this.transfers.update(a=>[...a,o])}manageState(t){this.running&&t===!1&&this.transfers().length===0&&(this.hasNoChanges=!0),this.running=t}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-folder-report-dialog"]],viewQuery:function(o,a){if(o&1&&(s1(t1,7),s1(V1,7)),o&2){let p;l1(p=c1())&&(a.autoResizeDirective=p.first),l1(p=c1())&&(a.inputFilter=p.first)}},inputs:{syncPath:"syncPath"},decls:37,vars:27,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],[1,"ms-2"],["aria-label","Minimize","type","button",1,"btn-minimize","btn-minimize-white",3,"click"],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-3",3,"click"],[1,"modal-body","p-0"],[1,"app-top-menu","bg-theme-alt"],["type","button",1,"btn","btn-sm","btn-secondary","ms-1",3,"click"],[1,"d-flex","align-items-center"],["l10nTranslate","",1,"ms-1"],[1,"ms-auto"],["animation","spin",1,"me-2",3,"icon"],[1,"fs-xxs"],[1,"d-flex","align-items-center","ms-auto"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModel","tooltip"],[3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],[1,"d-none","d-sm-block"],["l10nTranslate","",1,"p-2"],[1,"app-table"],["appAutoResize","",3,"resizeOffset","useMaxHeight"],["tabindex","-1"],[1,"modal-footer","justify-content-center","align-items-center","fs-sm"],["previousText","\u2039","nextText","\u203A","firstText","\xAB","lastText","\xBB",1,"pagination","pagination-sm",2,"margin-bottom","-.6rem",3,"pageChanged","ngModelChange","ngModel","boundaryLinks","itemsPerPage","maxSize","totalItems"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModelChange","ngModel","tooltip"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"selected"],[3,"click"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center",2,"font-size","14px"],[1,"d-flex","align-items-center","fs-xxs"],["size","sm",1,"circle-gray-icon-sm",3,"icon"],["l10nTranslate","",1,"fs-xxxs"],["alt","","width","24",1,"me-2",3,"error","src"],[1,"d-flex","flex-column","fs-xxs"],[3,"class"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4),l()(),r(5,"button",4),_("click",function(){return a.onMinimize()}),l(),r(6,"button",5),_("click",function(){return a.onClose()}),l()(),r(7,"div",6)(8,"div",7)(9,"button",8),_("click",function(){return a.manageReport(!a.running)}),r(10,"div",9),f(11,"fa-icon",2),r(12,"span",10),m(13,"Simulate"),l()()(),r(14,"div",11),h(15,M7,1,1,"fa-icon",12),h(16,E7,3,7,"span",13),l(),r(17,"div",14),h(18,P7,5,7,"button",15),r(19,"div",16),T(20,"translate"),r(21,"div",17)(22,"button",18),f(23,"fa-icon",2),l(),V(24,N7,8,2,"ul",19),l()()(),f(25,"app-input-filter",20),l(),h(26,L7,2,0,"div",21)(27,R7,6,3,"table",22),r(28,"div",23)(29,"table",22)(30,"tbody",24),D(31,G7,1,1,null,null,z7),T(33,"searchFilter"),T(34,"paginate"),l()()()(),r(35,"div",25)(36,"pagination",26),_("pageChanged",function(){return a.pageChanged()}),d1("ngModelChange",function(u){return p1(a.currentPage,u)||(a.currentPage=u),u}),l()()),o&2&&(s(2),d("icon",a.icons.faRotate),s(2),v(a.syncPath.settings.name),s(7),d("icon",a.running?a.icons.faStop:a.icons.faFlask),s(4),C(a.running?15:-1),s(),C(a.transfers().length?16:-1),s(2),C(a.count.filtered?18:-1),s(),d("tooltip",z(20,17,"Go to",a.locale.language)),s(2),d("isDisabled",!a.transferSelected),s(2),d("icon",a.icons.faMapMarkerAlt),s(3),C(a.hasNoChanges?26:27),s(2),d("resizeOffset",225)("useMaxHeight",!1),s(3),R(fe(34,23,z(33,20,a.transfers(),a.inputFilter.search()),a.currentPage,a.itemsPerPage)),s(5),m1("ngModel",a.currentPage),d("boundaryLinks",!0)("itemsPerPage",a.itemsPerPage)("maxSize",20)("totalItems",a.transfers().length))},dependencies:[N,F,w1,Ge,qe,We,t1,G3,g1,_1,C1,V1,c2,X,ee,qr,He],encapsulation:2});let i=n;return i})();var w2=(function(i){return i.FILE="openFile",i.DIRECTORY="openDirectory",i.CREATE_DIRECTORY="createDirectory",i})(w2||{});function W7(i,n){if(i&1&&f(0,"fa-icon",1),i&2){let e=c(2);d("icon",e.icons.faLongArrowAltDown)("fixedWidth",e.syncPath.settings.mode!==e.SYNC_PATH_MODE.BOTH)}}function q7(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c(2);M(e.SYNC_TRANSFER_SIDE_CLASS[e.SYNC_TRANSFER_SIDE.LOCAL]),d("icon",e.SYNC_TRANSFER_SIDE_ICON[e.SYNC_TRANSFER_SIDE.LOCAL])}}function Y7(i,n){if(i&1&&h(0,W7,1,2,"fa-icon",1)(1,q7,1,3,"fa-icon",2),i&2){let e=c();C(e.small?0:1)}}function j7(i,n){if(i&1&&f(0,"fa-icon",1),i&2){let e=c(2);d("icon",e.icons.faLongArrowAltUp)("fixedWidth",e.syncPath.settings.mode!==e.SYNC_PATH_MODE.BOTH)}}function K7(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c(2);M(e.SYNC_TRANSFER_SIDE_CLASS[e.SYNC_TRANSFER_SIDE.REMOTE]),U("ms-1",e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH),d("icon",e.SYNC_TRANSFER_SIDE_ICON[e.SYNC_TRANSFER_SIDE.REMOTE])}}function Q7(i,n){if(i&1&&h(0,j7,1,2,"fa-icon",1)(1,K7,1,5,"fa-icon",4),i&2){let e=c();C(e.small?0:1)}}var z2=(()=>{let n=class n{constructor(){this.small=!1,this.SYNC_PATH_MODE=Ae,this.SYNC_TRANSFER_SIDE_ICON=Un,this.icons={faLongArrowAltDown:Ii,faLongArrowAltUp:Mi},this.SYNC_TRANSFER_SIDE=Bt,this.SYNC_TRANSFER_SIDE_CLASS=Bn}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-path-direction-icon"]],inputs:{syncPath:"syncPath",small:"small"},decls:3,vars:2,consts:[[1,"d-flex","justify-content-center"],[3,"icon","fixedWidth"],[3,"icon","class"],[3,"icon"],[3,"icon","ms-1","class"]],template:function(o,a){o&1&&(r(0,"span",0),h(1,Y7,2,1),h(2,Q7,2,1),l()),o&2&&(s(),C(a.syncPath.settings.mode===a.SYNC_PATH_MODE.DOWNLOAD||a.syncPath.settings.mode===a.SYNC_PATH_MODE.BOTH?1:-1),s(),C(a.syncPath.settings.mode===a.SYNC_PATH_MODE.UPLOAD||a.syncPath.settings.mode===a.SYNC_PATH_MODE.BOTH?2:-1))},dependencies:[N],encapsulation:2});let i=n;return i})();function X7(i,n){if(i&1&&(r(0,"div")(1,"div"),f(2,"fa-icon",0),r(3,"span",1),m(4,"Client"),l()(),r(5,"div",10)(6,"span",11),m(7),l()()(),r(8,"div")(9,"div"),f(10,"fa-icon",0),r(11,"span",1),m(12,"Server"),l()(),r(13,"div",10)(14,"span",11)(15,"div",12),f(16,"fa-icon",13),m(17),l()()()()),i&2){let e=c();M(I("d-flex justify-content-",e.direction," align-items-center mb-2")),s(),M(I("col-",e.colSize[e.size][0])),s(),d("icon",e.icons.CLIENT),s(5),v(e.syncPath.settings.localPath),s(),M(I("d-flex justify-content-",e.direction," align-items-center mb-2")),s(),M(I("col-",e.colSize[e.size][0])),s(),d("icon",e.icons.SERVER),s(6),d("icon",e.syncPath.icon),s(),A(" ",e.syncPath.showedPath," ")}}function Z7(i,n){if(i&1&&(r(0,"span",4),f(1,"fa-icon",14),T(2,"translate"),l()),i&2){let e=c();s(),d("icon",e.icons.faExclamationCircle)("tooltip",z(2,2,"You must have permission to modify the server folder to choose a different sync mode",e.locale.language))}}var Hn=(()=>{let n=class n{constructor(){this.direction="center",this.showPaths=!1,this.size="small",this.locale=x(q),this.icons={CLIENT:v1.CLIENT,SERVER:v1.SERVER,faExclamationCircle:g4,faLongArrowAltDown:Ii,faLongArrowAltUp:Mi,faGauge:X0,faClock:yi,faRotate:ve,faEdit:vi,faBug:F4},this.colSize={small:[2,5],large:[3,6]},this.SYNC_PATH_CONFLICT_MODE=gt,this.SYNC_PATH_MODE=Ae,this.SYNC_PATH_DIFF_MODE=Gi,this.SYNC_PATH_SCHEDULER_UNIT=Wi}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-path-settings"]],inputs:{syncPath:"syncPath",direction:"direction",showPaths:"showPaths",size:"size"},decls:74,vars:98,consts:[[3,"icon"],["l10nTranslate","",1,"ms-2"],["type","text",3,"ngModelChange","ngModel"],[3,"syncPath","small"],[1,"ms-2","fs-lg","cursor-pointer"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"disabled","ngValue"],["l10nTranslate","",3,"ngValue"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel","disabled"],["min","1","type","number",1,"form-control","form-select-sm","pe-1","me-2",2,"width","70px",3,"ngModelChange","ngModel","disabled"],[1,"col-8"],[1,"form-control-sm","form-control-plaintext"],[1,"d-flex","align-items-center"],[1,"me-1",3,"icon"],[1,"text-warning",3,"icon","tooltip"]],template:function(o,a){o&1&&(r(0,"div"),h(1,X7,18,17),r(2,"div")(3,"div"),f(4,"fa-icon",0),r(5,"span",1),m(6,"Name"),l()(),r(7,"div")(8,"input",2),d1("ngModelChange",function(u){return p1(a.syncPath.settings.name,u)||(a.syncPath.settings.name=u),u}),l()()(),r(9,"div")(10,"div"),f(11,"app-sync-path-direction-icon",3),r(12,"span",1),m(13,"Direction"),l(),h(14,Z7,3,5,"span",4),l(),r(15,"div")(16,"select",5),d1("ngModelChange",function(u){return p1(a.syncPath.settings.mode,u)||(a.syncPath.settings.mode=u),u}),r(17,"option",6),m(18,"upload only"),l(),r(19,"option",7),m(20,"download only"),l(),r(21,"option",6),m(22,"both"),l()()()(),r(23,"div")(24,"div"),f(25,"fa-icon",0),r(26,"span",1),m(27,"Conflict"),l()(),r(28,"div")(29,"select",8),d1("ngModelChange",function(u){return p1(a.syncPath.settings.conflictMode,u)||(a.syncPath.settings.conflictMode=u),u}),r(30,"option",7),m(31,"the client\u2019s files take precedence"),l(),r(32,"option",7),m(33,"the server\u2019s files take precedence"),l(),r(34,"option",7),m(35,"the most recent files will be kept"),l()()()(),r(36,"div")(37,"div"),f(38,"fa-icon",0),r(39,"span",1),m(40,"Mode"),l()(),r(41,"div")(42,"select",5),d1("ngModelChange",function(u){return p1(a.syncPath.settings.diffMode,u)||(a.syncPath.settings.diffMode=u),u}),r(43,"option",7),m(44),l(),r(45,"option",7),m(46),l()()()(),r(47,"div")(48,"div"),f(49,"fa-icon",0),r(50,"span",1),m(51,"Scheduler"),l()(),r(52,"div")(53,"input",9),d1("ngModelChange",function(u){return p1(a.syncPath.settings.scheduler.value,u)||(a.syncPath.settings.scheduler.value=u),u}),l(),r(54,"select",5),d1("ngModelChange",function(u){return p1(a.syncPath.settings.scheduler.unit,u)||(a.syncPath.settings.scheduler.unit=u),u}),r(55,"option",7),m(56,"disabled"),l(),r(57,"option",7),m(58,"scheduler_unit_minute"),l(),r(59,"option",7),m(60,"scheduler_unit_hour"),l(),r(61,"option",7),m(62,"scheduler_unit_day"),l()()()(),r(63,"div")(64,"div"),f(65,"fa-icon",0),r(66,"span",1),m(67,"Status"),l()(),r(68,"div")(69,"select",5),d1("ngModelChange",function(u){return p1(a.syncPath.settings.enabled,u)||(a.syncPath.settings.enabled=u),u}),r(70,"option",7),m(71,"enabled"),l(),r(72,"option",7),m(73,"disabled"),l()()()()()),o&2&&(M(I("d-flex flex-column justify-content-",a.direction)),s(),C(a.showPaths?1:-1),s(),M(I("d-flex justify-content-",a.direction," align-items-center mb-2")),s(),M(I("col-",a.colSize[a.size][0])),s(),d("icon",a.icons.faEdit),s(3),M(I("col-",a.colSize[a.size][1])),s(),M(I("form-control form-select-sm ",a.syncPath.settings.name?"":"is-invalid")),m1("ngModel",a.syncPath.settings.name),s(),M(I("d-flex justify-content-",a.direction," align-items-center mb-2")),s(),M(I("d-flex align-items-center col-",a.colSize[a.size][0])),s(),d("syncPath",a.syncPath)("small",!0),s(3),C(a.syncPath.isWriteable?-1:14),s(),M(I("col-",a.colSize[a.size][1])),s(),m1("ngModel",a.syncPath.settings.mode),s(),d("disabled",!a.syncPath.isWriteable)("ngValue",a.SYNC_PATH_MODE.UPLOAD),s(2),d("ngValue",a.SYNC_PATH_MODE.DOWNLOAD),s(2),d("disabled",!a.syncPath.isWriteable)("ngValue",a.SYNC_PATH_MODE.BOTH),s(2),M(I("d-flex justify-content-",a.direction," align-items-center mb-2")),s(),M(I("col-",a.colSize[a.size][0])),s(),d("icon",a.icons.faBug),s(3),M(I("col-",a.colSize[a.size][1])),s(),m1("ngModel",a.syncPath.settings.conflictMode),d("disabled",a.syncPath.settings.mode!=="both"),s(),d("ngValue",a.SYNC_PATH_CONFLICT_MODE.LOCAL),s(2),d("ngValue",a.SYNC_PATH_CONFLICT_MODE.REMOTE),s(2),d("ngValue",a.SYNC_PATH_CONFLICT_MODE.RECENT),s(2),M(I("d-flex justify-content-",a.direction," align-items-center mb-2")),s(),M(I("col-",a.colSize[a.size][0])),s(),d("icon",a.icons.faGauge),s(3),M(I("col-",a.colSize[a.size][1])),s(),m1("ngModel",a.syncPath.settings.diffMode),s(),d("ngValue",a.SYNC_PATH_DIFF_MODE.FAST),s(),v(a.SYNC_PATH_DIFF_MODE.FAST),s(),d("ngValue",a.SYNC_PATH_DIFF_MODE.SECURE),s(),v(a.SYNC_PATH_DIFF_MODE.SECURE),s(),M(I("d-flex justify-content-",a.direction," align-items-center mb-2")),s(),M(I("col-",a.colSize[a.size][0])),s(),d("icon",a.icons.faClock),s(3),M(I("d-flex flex-row col-",a.colSize[a.size][1])),s(),m1("ngModel",a.syncPath.settings.scheduler.value),d("disabled",a.syncPath.settings.scheduler.unit===a.SYNC_PATH_SCHEDULER_UNIT.DISABLED),s(),m1("ngModel",a.syncPath.settings.scheduler.unit),s(),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.DISABLED),s(2),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.MINUTE),s(2),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.HOUR),s(2),d("ngValue",a.SYNC_PATH_SCHEDULER_UNIT.DAY),s(2),M(I("d-flex justify-content-",a.direction," align-items-center")),s(),M(I("col-",a.colSize[a.size][0])),s(),d("icon",a.icons.faRotate),s(3),M(I("col-",a.colSize[a.size][1])),s(),U("text-danger",!a.syncPath.settings.enabled),m1("ngModel",a.syncPath.settings.enabled),s(),d("ngValue",!0),s(2),d("ngValue",!1))},dependencies:[F,N,g1,ie,ne,O1,D0,te,_1,R0,C1,w1,z2,X],encapsulation:2});let i=n;return i})();function J7(i,n){if(i&1&&(r(0,"option",13),m(1,"Select a file"),l(),r(2,"option",13),m(3,"Select a folder"),l()),i&2){let e=c();d("value",e.SYNC_PATH_FILTER_TYPE.FILE),s(2),d("value",e.SYNC_PATH_FILTER_TYPE.FOLDER)}}function e9(i,n){if(i&1){let e=b();r(0,"button",24),_("click",function(){g(e);let o=c();return S(o.onSelect())}),m(1,"Browse"),l()}}function t9(i,n){if(i&1){let e=b();r(0,"button",24),_("click",function(){g(e);let o=c();return S(o.onSelect(o.ELECTRON_DIALOG.DIRECTORY))}),m(1,"Browse"),l()}}function i9(i,n){if(i&1){let e=b();r(0,"div",18)(1,"input",25),d1("ngModelChange",function(o){let a=g(e).$index,p=c();return p1(p.syncPath.settings.filters[a],o)||(p.syncPath.settings.filters[a]=o),S(o)}),l(),r(2,"button",26),_("click",function(){let o=g(e).$index,a=c();return S(a.onRemoveFilter(o))}),f(3,"fa-icon",2),l()()}if(i&2){let e=n.$index,t=c();s(),m1("ngModel",t.syncPath.settings.filters[e]),s(2),d("icon",t.icons.faTimes)}}function n9(i,n){if(i&1){let e=b();r(0,"button",27),_("click",function(){g(e);let o=c();return S(o.onFlush())}),m(1,"Reset"),l()}}var $n=(()=>{let n=class n{constructor(){this.mustRefresh=new h1,this.locale=x(q),this.layout=x(L),this.store=x(Y),this.ELECTRON_DIALOG=w2,this.SYNC_PATH_FILTER_TYPE=$3,this.currentFilterType=this.store.isElectronApp()?this.SYNC_PATH_FILTER_TYPE.FILE:this.SYNC_PATH_FILTER_TYPE.START,this.filterTypePlaceholder={[this.SYNC_PATH_FILTER_TYPE.FILE]:"click on the browse button",[this.SYNC_PATH_FILTER_TYPE.FOLDER]:"click on the browse button",[this.SYNC_PATH_FILTER_TYPE.START]:"with a name or pattern",[this.SYNC_PATH_FILTER_TYPE.IN]:"with a name or pattern",[this.SYNC_PATH_FILTER_TYPE.END]:"with the extension ('.mp3', '.avi', '.mov' ...)",[this.SYNC_PATH_FILTER_TYPE.EXPERT]:"[-+]?[0-9]*\\.?[0-9]*"},this.icons={faTimes:Ve,faRotate:ve},this.confirmDeletion=!1,this.syncService=x(b1)}ngOnInit(){this.syncPath=new je(JSON.parse(JSON.stringify(this.syncPathSelected)))}onSubmit(){if(this.confirmDeletion){this.onRemove();return}this.store.isElectronApp()?this.syncService.updatePath(this.syncPath.export(!0)).then(()=>{this.syncService.refreshPaths().catch(console.error),this.layout.closeDialog()}):this.syncService.updateSyncPath(this.syncClientSelected.id,this.syncPath.id,this.syncPath.export()).subscribe({next:()=>{this.mustRefresh.emit(),this.layout.closeDialog()},error:t=>this.layout.sendNotification("error","Unable to update",this.syncPath.settings.name,t)})}onRemove(){this.store.isElectronApp()?this.syncService.removePath(this.syncPath.id).then(()=>{this.syncService.refreshPaths().catch(console.error),this.layout.closeDialog(),this.layout.sendNotification("success","Sync deleted",this.syncPath.settings.name)}).catch(t=>this.layout.sendNotification("error","Unable to delete",this.syncPath.settings.name,t)):this.syncService.deleteSyncPath(this.syncClientSelected.id,this.syncPath.id).subscribe({next:()=>{this.mustRefresh.emit(),this.layout.closeDialog(),this.layout.sendNotification("success","Sync deleted",this.syncPath.settings.name)},error:t=>this.layout.sendNotification("error","Unable to delete",this.syncPath.settings.name,t)})}onFlush(){this.syncService.flushPath(this.syncPath.id).then(()=>{this.layout.sendNotification("success","Sync was reset",this.syncPath.settings.name),this.layout.closeDialog()}).catch(t=>this.layout.sendNotification("error","Unable to reset",this.syncPath.settings.name,t))}onRemoveFilter(t){this.syncPath.settings.filters.splice(t,1)}onSelect(t=this.ELECTRON_DIALOG.FILE){this.syncService.showOpenDialog({properties:[t],defaultPath:this.syncPath.settings.localPath}).then(o=>{o.canceled||o.filePaths[0].startsWith(this.syncPath.settings.localPath)&&(this.currentFilter=o.filePaths[0].replace(this.syncPath.settings.localPath,"").substring(1))})}addFilter(){this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.FILE||this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.FOLDER||this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.EXPERT?this.syncPath.settings.filters.unshift(this.currentFilter):this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.START?this.syncPath.settings.filters.unshift(`^${this.currentFilter}.*`):this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.IN?this.syncPath.settings.filters.unshift(`.*${this.currentFilter}.*`):this.currentFilterType===this.SYNC_PATH_FILTER_TYPE.END&&this.syncPath.settings.filters.unshift(`.*${this.currentFilter}$`),this.currentFilter=null}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-path-settings-dialog"]],inputs:{syncPathSelected:"syncPathSelected",syncClientSelected:"syncClientSelected"},outputs:{mustRefresh:"mustRefresh"},decls:43,vars:35,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],[1,"ms-2"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[2,"margin-top","8px","margin-bottom","6px"],["customClass","tab-dialog",3,"heading"],["direction","start","size","large",3,"showPaths","syncPath"],[1,"d-flex","align-items-center","mb-2"],[1,"d-flex","flex-row","col-12","px-0"],[1,"form-select","form-select-sm","me-1",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"value"],["type","text",1,"form-control","form-select-sm","me-1",3,"ngModelChange","ngModel","disabled","placeholder"],["l10nTranslate","","type","button",1,"btn","btn-xs","btn-secondary","me-1",3,"click","disabled"],["l10nTranslate","","type","button",1,"btn","btn-xs","btn-secondary"],[1,"my-1"],[1,"d-flex","mb-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger","me-2",3,"click","disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","submit","l10nTranslate","",3,"click","disabled"],["l10nTranslate","","type","button",1,"btn","btn-xs","btn-secondary",3,"click"],["type","text",1,"form-control","form-control-sm","me-1",3,"ngModelChange","ngModel"],["data-dismiss","modal","type","button",1,"btn","btn-xs","btn-danger",3,"click"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4),l()(),r(5,"button",4),_("click",function(){return a.layout.closeDialog()}),l()(),r(6,"div",5)(7,"tabset",6),f(8,"hr",7),r(9,"tab",8),T(10,"translate"),f(11,"app-sync-path-settings",9),l(),r(12,"tab",8),T(13,"translate"),r(14,"div",10)(15,"div",11)(16,"select",12),d1("ngModelChange",function(u){return p1(a.currentFilterType,u)||(a.currentFilterType=u),u}),h(17,J7,4,2),r(18,"option",13),m(19,"The files starting"),l(),r(20,"option",13),m(21,"The files containing"),l(),r(22,"option",13),m(23,"The files ending"),l(),r(24,"option",13),m(25,"Expert (Regexp)"),l()(),r(26,"input",14),T(27,"translate"),d1("ngModelChange",function(u){return p1(a.currentFilter,u)||(a.currentFilter=u),u}),l(),r(28,"button",15),_("click",function(){return a.addFilter()}),m(29,"Add"),l(),h(30,e9,2,0,"button",16),h(31,t9,2,0,"button",16),l()(),f(32,"hr",17),D(33,i9,4,2,"div",18,A1),l()()(),r(35,"div",19)(36,"button",20),_("click",function(){return a.confirmDeletion=!0}),m(37," Remove "),l(),h(38,n9,2,0,"button",21),r(39,"button",22),_("click",function(){return a.onCancel()}),m(40,"Cancel"),l(),r(41,"button",23),_("click",function(){return a.onSubmit()}),m(42),l()()),o&2&&(s(2),d("icon",a.icons.faRotate),s(2),v(a.syncPath.settings.name),s(3),d("justified",!0),s(2),d("heading",z(10,26,"Settings",a.locale.language)),s(2),d("showPaths",!0)("syncPath",a.syncPath),s(),d("heading",z(13,29,"Filters",a.locale.language)),s(4),m1("ngModel",a.currentFilterType),s(),C(a.store.isElectronApp()?17:-1),s(),d("value",a.SYNC_PATH_FILTER_TYPE.START),s(2),d("value",a.SYNC_PATH_FILTER_TYPE.IN),s(2),d("value",a.SYNC_PATH_FILTER_TYPE.END),s(2),d("value",a.SYNC_PATH_FILTER_TYPE.EXPERT),s(2),m1("ngModel",a.currentFilter),d("disabled",a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FILE||a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FOLDER)("placeholder",z(27,32,a.filterTypePlaceholder[a.currentFilterType],a.locale.language)),s(2),d("disabled",!a.currentFilter),s(2),C(a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FILE?30:-1),s(),C(a.currentFilterType===a.SYNC_PATH_FILTER_TYPE.FOLDER?31:-1),s(2),R(a.syncPath.settings.filters),s(3),d("disabled",a.confirmDeletion),s(2),C(a.store.isElectronApp()?38:-1),s(3),M(I("btn btn-sm ",a.confirmDeletion?"btn-danger":"btn-primary")),d("disabled",!a.syncPath.settings.name),s(),A(" ",a.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[Ao,No,Hn,g1,ie,ne,O1,te,_1,C1,N,F,X],encapsulation:2});let i=n;return i})();function o9(i,n){if(i&1&&(r(0,"span",0),m(1),l()),i&2){let e=c();s(),v(e.s.settings.scheduler.unit)}}function a9(i,n){if(i&1&&(r(0,"span")(1,"span"),m(2),l(),r(3,"span",0),m(4),l()()),i&2){let e=c();s(2),A("",e.s.settings.scheduler.value,"\xA0"),s(2),v(e.s.settings.scheduler.unit+"s")}}var Qr=(()=>{let n=class n{constructor(){this.store=x(Y),this.SYNC_PATH_SCHEDULER_UNIT=Wi,this.CLIENT_SCHEDULER_STATE=$i}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-path-scheduler"]],inputs:{s:"s"},decls:3,vars:3,consts:[["l10nTranslate",""]],template:function(o,a){o&1&&(r(0,"span"),h(1,o9,2,1,"span",0)(2,a9,5,2,"span"),l()),o&2&&(M(a.s.settings.scheduler.unit!==a.SYNC_PATH_SCHEDULER_UNIT.DISABLED?a.store.clientScheduler()===a.CLIENT_SCHEDULER_STATE.DISABLED?"text-warning text-failed":"text-success":"text-danger"),s(),C(a.s.settings.scheduler.unit===a.SYNC_PATH_SCHEDULER_UNIT.DISABLED?1:2))},dependencies:[F],encapsulation:2});let i=n;return i})();var r9=["SyncPathContextMenu"],s9=["MainContextMenu"],Xr=(i,n)=>n.key,l9=(i,n)=>n.id;function c9(i,n){if(i&1){let e=b();r(0,"button",8),T(1,"translate"),_("click",function(){g(e);let o=c();return S(o.doSync(!1))}),f(2,"fa-icon",7),l()}if(i&2){let e=c();d("tooltip",z(1,2,"Stop synchronization",e.locale.language)),s(2),d("icon",e.icons.faStop)}}function m9(i,n){if(i&1){let e=b();r(0,"button",9),T(1,"translate"),_("click",function(){g(e);let o=c();return S(o.doSync(!0))}),f(2,"fa-icon",7),l()}if(i&2){let e=c();d("disabled",!e.syncPathSelected||!e.syncPathSelected.settings.enabled)("tooltip",z(1,3,"Synchronize",e.locale.language)),s(2),d("icon",e.icons.faPlay)}}function p9(i,n){if(i&1){let e=b();r(0,"button",8),T(1,"translate"),_("click",function(){g(e);let o=c();return S(o.doAllSyncs(!1))}),f(2,"fa-icon",7),l()}if(i&2){let e=c();d("tooltip",z(1,2,"Stop synchronizations",e.locale.language)),s(2),d("icon",e.icons.faStop)}}function d9(i,n){if(i&1){let e=b();r(0,"ul",27)(1,"li",28)(2,"a",29),_("click",function(){g(e);let o=c(2);return S(o.doAllSyncs(!0,!1))}),r(3,"span",30),f(4,"fa-icon",7),m(5," Sequentially "),l()()(),r(6,"li",28)(7,"a",29),_("click",function(){g(e);let o=c(2);return S(o.doAllSyncs(!0))}),r(8,"span",30),f(9,"fa-icon",7),m(10," Asynchronously "),l()()()()}if(i&2){let e=c(2);s(4),d("icon",e.icons.faArrowsSpin),s(5),d("icon",e.icons.faShuffle)}}function f9(i,n){if(i&1&&(r(0,"div",12),T(1,"translate"),r(2,"div",13)(3,"button",17),f(4,"fa-icon",7),l(),V(5,d9,11,2,"ul",15),l()()),i&2){let e=c();d("tooltip",z(1,2,"Synchronize all",e.locale.language)),s(4),d("icon",e.icons.faForward)}}function u9(i,n){if(i&1&&f(0,"fa-icon",7),i&2){let e=c();d("icon",e.icons.faCalendarXmark)}}function _9(i,n){if(i&1&&f(0,"fa-icon",7),i&2){let e=c();d("icon",e.icons.faCalendarCheck)}}function h9(i,n){if(i&1){let e=b();r(0,"li",28)(1,"a",29),_("click",function(){g(e);let o=c(2);return S(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))}),r(2,"span",30),f(3,"fa-icon",7),m(4," Disable "),l()()()}if(i&2){let e=c(2);s(3),d("icon",e.icons.faCalendarXmark)}}function C9(i,n){if(i&1){let e=b();r(0,"ul",27),h(1,h9,5,1,"li",28),r(2,"li",28)(3,"a",29),_("click",function(){g(e);let o=c();return S(o.setScheduler(o.CLIENT_SCHEDULER_STATE.SEQ))}),r(4,"span",30),f(5,"fa-icon",7),m(6," Sequentially "),l()()(),r(7,"li",28)(8,"a",29),_("click",function(){g(e);let o=c();return S(o.setScheduler(o.CLIENT_SCHEDULER_STATE.ASYNC))}),r(9,"span",30),f(10,"fa-icon",7),m(11," Asynchronously "),l()()()()}if(i&2){let e=c();s(),C(e.store.clientScheduler()!==e.CLIENT_SCHEDULER_STATE.DISABLED?1:-1),s(4),d("icon",e.icons.faArrowsSpin),s(5),d("icon",e.icons.faShuffle)}}function g9(i,n){if(i&1){let e=b();r(0,"ul",27)(1,"li",28)(2,"a",29),_("click",function(){g(e);let o=c();return S(o.goToPath())}),r(3,"span",30),f(4,"fa-icon",7),m(5," Client "),l()()(),r(6,"li",28)(7,"a",29),_("click",function(){g(e);let o=c();return S(o.goToPath(!1))}),r(8,"span",30),f(9,"fa-icon",7),m(10," Server "),l()()()()}if(i&2){let e=c();s(4),d("icon",e.icons.CLIENT),s(5),d("icon",e.icons.SERVER)}}function S9(i,n){if(i&1&&f(0,"fa-icon",7),i&2){let e=c(3);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function x9(i,n){if(i&1){let e=b();r(0,"th",32),_("click",function(){g(e);let o=c().$implicit,a=c();return S(a.sortBy(o.key))}),m(1),h(2,S9,1,1,"fa-icon",7),l()}if(i&2){let e=c().$implicit,t=c();M(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function v9(i,n){if(i&1&&h(0,x9,3,10,"th",31),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function y9(i,n){if(i&1&&(r(0,"span",41),m(1),l()),i&2){let e=c(4).$implicit;s(),v(e._nbTasks)}}function b9(i,n){if(i&1&&(r(0,"span",42),T(1,"translate"),f(2,"fa-icon",44),l()),i&2){let e=c(4).$implicit,t=c();d("tooltip",z(1,2,e.mainError,t.locale.language)),s(2),d("icon",t.icons.faExclamationTriangle)}}function T9(i,n){if(i&1){let e=b();r(0,"span",45),_("click",function(){g(e);let o=c(4).$implicit,a=c();return S(a.showErrors(o))}),f(1,"fa-icon",46),r(2,"span"),m(3),l()()}if(i&2){let e=c(4).$implicit,t=c();s(),d("icon",t.icons.faExclamationTriangle),s(2),v(e.lastErrors.length)}}function w9(i,n){if(i&1&&(r(0,"div",35),f(1,"img",39),r(2,"span"),m(3),l(),r(4,"span",40),h(5,y9,2,1,"span",41),h(6,b9,3,5,"span",42),h(7,T9,4,2,"span",43),l()()),i&2){let e=c(3).$implicit;s(),d("src",e.mimeUrl,Q),s(2),v(e.settings.name),s(2),C(e.nbSyncTasks?5:-1),s(),C(e.mainError?6:-1),s(),C(e.lastErrors.length?7:-1)}}function z9(i,n){if(i&1&&f(0,"app-sync-path-direction-icon",36),i&2){let e=c(3).$implicit;d("syncPath",e)}}function M9(i,n){if(i&1&&(r(0,"span",30),m(1),l()),i&2){let e=c(3).$implicit,t=c();s(),v(e.settings.mode===t.SYNC_PATH_MODE.BOTH?e.settings.conflictMode:e.settings.mode?t.SYNC_PATH_CONFLICT_MODE.REMOTE:t.SYNC_PATH_CONFLICT_MODE.LOCAL)}}function E9(i,n){if(i&1&&(r(0,"span",30),m(1),l()),i&2){let e=c(3).$implicit;s(),v(e.settings.diffMode)}}function P9(i,n){if(i&1&&f(0,"app-sync-path-scheduler",37),i&2){let e=c(3).$implicit;d("s",e)}}function A9(i,n){if(i&1&&m(0),i&2){let e=c(3).$implicit;A(" ",e.settings.filters.length," ")}}function N9(i,n){if(i&1&&(m(0),T(1,"amTimeAgo")),i&2){let e=c(4).$implicit;A(" ",z(1,1,e.settings.lastSync,!0)," ")}}function L9(i,n){if(i&1&&(m(0),T(1,"translate")),i&2){let e=c(5);A(" ",z(1,1,"never",e.locale.language)," ")}}function k9(i,n){if(i&1&&(r(0,"div"),h(1,N9,2,4)(2,L9,2,4),l()),i&2){let e=c(3).$implicit;M(I("sync-newly-",e.newly)),s(),C(e.newly?1:2)}}function F9(i,n){if(i&1&&(r(0,"td"),h(1,w9,8,5,"div",35)(2,z9,1,1,"app-sync-path-direction-icon",36)(3,M9,2,1,"span",30)(4,E9,2,1,"span",30)(5,P9,1,1,"app-sync-path-scheduler",37)(6,A9,1,1)(7,k9,3,4,"div",38),l()),i&2){let e,t=c().$implicit,o=c().$implicit;M(Qe("",t.value.class," ",t.value.newly?"sync-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),s(),C((e=t.key)==="name"?1:e==="mode"?2:e==="conflictMode"?3:e==="diffMode"?4:e==="scheduler"?5:e==="filters"?6:e==="lastSync"?7:-1)}}function D9(i,n){if(i&1&&h(0,F9,8,9,"td",34),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function R9(i,n){if(i&1){let e=b();r(0,"tr",33),_("click",function(){let o=g(e).$implicit,a=c();return S(a.onSelect(o))})("contextmenu",function(o){let a=g(e).$implicit,p=c();return S(p.onSyncPathContextMenu(o,a))})("dblclick",function(){g(e);let o=c();return S(o.openSettingsDialog())}),D(1,D9,1,1,null,null,Xr),T(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c();U("selected",t.syncPathSelected&&t.syncPathSelected.id===e.id),s(),R(z(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function I9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Synchronize"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faStop)}}function O9(i,n){if(i&1){let e=b();V(0,I9,3,1,"ng-template",24),_("execute",function(){g(e);let o=c();return S(o.doSync(!1))})}}function V9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Synchronize"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faPlay)}}function B9(i,n){if(i&1){let e=b();V(0,V9,3,1,"ng-template",24),_("execute",function(){g(e);let o=c();return S(o.doSync(!0))})}}function U9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Simulate"),l()),i&2){let e=c();s(),d("icon",e.icons.faFlask)}}function H9(i,n){}function $9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Go to"),l()),i&2){let e=c();s(),d("icon",e.icons.faMapMarkerAlt)}}function G9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Edit"),l()),i&2){let e=c();s(),d("icon",e.icons.faPencilAlt)}}function W9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Sequentially"),l()),i&2){let e=c();s(),d("icon",e.icons.faArrowsSpin)}}function q9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Asynchronously"),l()),i&2){let e=c();s(),d("icon",e.icons.faShuffle)}}function Y9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Client"),l()),i&2){let e=c();s(),d("icon",e.icons.CLIENT)}}function j9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Server"),l()),i&2){let e=c();s(),d("icon",e.icons.SERVER)}}function K9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Disabled"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faCalendarXmark)}}function Q9(i,n){if(i&1){let e=b();V(0,K9,3,1,"ng-template",24),_("execute",function(){g(e);let o=c();return S(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))})}}function X9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Sequentially"),l()),i&2){let e=c();s(),d("icon",e.icons.faArrowsSpin)}}function Z9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Asynchronously"),l()),i&2){let e=c();s(),d("icon",e.icons.faShuffle)}}function J9(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Stop synchronizations"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faStop)}}function em(i,n){if(i&1){let e=b();V(0,J9,3,1,"ng-template",24),_("execute",function(){g(e);let o=c();return S(o.doAllSyncs(!1))})}}function tm(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Synchronize"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faForward)}}function im(i,n){if(i&1&&V(0,tm,3,1,"ng-template",26),i&2){c();let e=S1(53);d("subMenu",e)}}function nm(i,n){if(i&1&&f(0,"fa-icon",7),i&2){let e=c(2);d("icon",e.icons.faCalendarXmark)}}function om(i,n){if(i&1&&f(0,"fa-icon",7),i&2){let e=c(2);d("icon",e.icons.faCalendarCheck)}}function am(i,n){if(i&1&&(r(0,"span",30),h(1,nm,1,1,"fa-icon",7)(2,om,1,1,"fa-icon",7),m(3," Scheduler "),l()),i&2){let e=c();s(),C(e.store.clientScheduler()===e.CLIENT_SCHEDULER_STATE.DISABLED?1:2)}}function rm(i,n){}function sm(i,n){if(i&1&&(r(0,"span",30),f(1,"fa-icon",7),m(2,"Add"),l()),i&2){let e=c();s(),d("icon",e.icons.faPlus)}}var Zr=(()=>{let n=class n{constructor(){this.locale=x(q),this.syncsInProgress=[],this.syncPathSelected=null,this.allSyncsRunning=!1,this.store=x(Y),this.originalOrderKeyValue=re,this.icons={faCalendarXmark:M4,faCalendarCheck:W0,faArrowDown:Te,faArrowUp:ye,faArrowRotateRight:_t,faPlus:be,faPencilAlt:p4,faStop:Si,faPlay:y4,faForward:r4,faArrowsSpin:J0,faShuffle:I4,faMapMarkerAlt:i2,CLIENT:v1.CLIENT,SERVER:v1.SERVER,faInfoCircle:G4,faExclamationTriangle:N4,faFlask:zi},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},mode:{label:"Direction",width:8,textCenter:!0,class:"",show:!0,sortable:!0},conflictMode:{label:"Conflict",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},diffMode:{label:"Mode",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},scheduler:{label:"Scheduler",width:8,textCenter:!0,class:"",show:!0},filters:{label:"Filters",width:5,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},lastSync:{label:"Synced",width:10,textCenter:!0,class:"",newly:"newly",show:!0,sortable:!0}},this.SYNC_PATH_MODE=Ae,this.CLIENT_SCHEDULER_STATE=$i,this.SYNC_PATH_CONFLICT_MODE=gt,this.router=x(i1),this.layout=x(L),this.syncService=x(b1),this.sortSettings={default:[{prop:"settings.name",type:"string"}],name:[{prop:"settings.name",type:"string"}],diffMode:[{prop:"settings.diffMode",type:"string"}],conflictMode:[{prop:"settings.conflictMode",type:"string"}],mode:[{prop:"settings.mode",type:"string"}],filters:[{prop:"settings.filters",type:"length"}],lastSync:[{prop:"lastSync",type:"date"}]},this.sortTable=new $e(this.constructor.name,this.sortSettings),this.subscriptions=[],this.focusOnPathId=null,this.focusOnPathSettings=!1,this.layout.setBreadcrumbIcon(v1.SYNC),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.PATHS}/${Be.SYNCS}`,splicing:2,translating:!0,sameLink:!0}),Gt(()=>{this.onSelect(this.store.clientSyncPaths().find(t=>t.id===this.syncPathSelected?.id))}),this.subscriptions.push(this.store.clientSyncsWithErrors.subscribe(t=>this.onSyncErrors(t))),this.subscriptions.push(this.store.clientSyncs.subscribe(t=>this.onSync(t))),this.subscriptions.push(this.store.clientSyncTask.subscribe(t=>this.onSyncTask(t))),this.checkRouteState()}ngOnInit(){if(this.focusOnPathId){let t=this.store.clientSyncPaths().findIndex(o=>o.id===this.focusOnPathId);t>-1&&(this.onSelect(this.store.clientSyncPaths()[t]),this.autoResize.scrollIntoView(Math.max(t,1)*35-35),this.focusOnPathSettings&&setTimeout(()=>this.openSettingsDialog(),500))}}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe()}onSelect(t=null){this.syncPathSelected=t}onSync(t){this.syncsInProgress=t;for(let o of this.store.clientSyncPaths())this.syncsInProgress.find(a=>a.syncPathId===o.id)?o.inSync||o.setStatus(!0):(o.inSync&&(o.settings.lastSync=new Date),o.setStatus(!1));this.allSyncsRunning&&!this.syncsInProgress.length&&(this.allSyncsRunning=!1)}onSyncErrors(t){for(let o of this.store.clientSyncPaths()){let a=t.find(u=>u.syncPathId===o.id),p=a?a.mainError:null;o.mainError!==p&&(o.mainError=p,o.setStatus(!1)),o.lastErrors=a?a.lastErrors:[]}}onSyncTask(t){let o=this.store.clientSyncPaths().find(a=>a.id===t.syncPathId);o&&(o.nbSyncTasks=t.nbTasks)}onRefresh(){this.onSelect(),this.syncService.refreshPaths().catch(console.error)}doSync(t){this.syncService.doSync(t,[this.syncPathSelected.id],!1)}doAllSyncs(t,o=!0){let a=[];t&&(this.allSyncsRunning=t,a=this.store.clientSyncPaths().filter(p=>p.settings.enabled&&!p.inSync).map(p=>p.id)),this.syncService.doSync(t,a,!1,o)}setScheduler(t){t!==this.store.clientScheduler()&&this.syncService.setClientScheduler(t)}openReportDialog(){this.layout.openDialog(Kr,"xl",{id:this.syncPathSelected.id,initialState:{syncPath:this.syncPathSelected}})}openSettingsDialog(){this.layout.openDialog($n,"md",{initialState:{syncPathSelected:this.syncPathSelected}})}goToPath(t=!0){this.syncService.goToPath(this.syncPathSelected,t)}addToSync(){this.router.navigate([B.BASE,B.WIZARD]).catch(console.error)}sortBy(t,o=!0,a){this.store.clientSyncPaths.set(this.sortTable.sortBy(t,o,a||this.store.clientSyncPaths()))}onSyncPathContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.syncPathContextMenu)}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}showErrors(t){this.router.navigate([B.BASE,B.TRANSFERS],{state:{id:t.id}}).catch(console.error)}checkRouteState(){let t=this.router.getCurrentNavigation()?.extras.state;t?.id&&(this.focusOnPathId=t.id,this.focusOnPathSettings=t.withSettings)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-paths"]],viewQuery:function(o,a){if(o&1&&(s1(t1,7),s1(V1,7),s1(r9,7),s1(s9,7)),o&2){let p;l1(p=c1())&&(a.autoResize=p.first),l1(p=c1())&&(a.inputFilter=p.first),l1(p=c1())&&(a.syncPathContextMenu=p.first),l1(p=c1())&&(a.mainContextMenu=p.first)}},decls:72,vars:55,consts:[["SyncPathContextMenu",""],["SyncAllContextMenu",""],["SyncGoToContextMenu",""],["SyncSchedulerContextMenu",""],["MainContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"disabled","tooltip"],["container","body",3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["dropdownToggle","","type","button"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],["appAutoResize","",3,"contextmenu","resizeOffset"],["tabindex","-1"],[3,"selected"],["contextMenuItem",""],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["contextMenuItem","",3,"subMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"click","contextmenu","dblclick"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[3,"syncPath"],[3,"s"],[3,"class"],["alt","","draggable","false","height","35",3,"src"],[1,"d-flex","align-items-center","ms-auto"],[1,"badge","rounded-pill","bg-maroon"],["placement","right",1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"tooltip"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1"],[1,"m-0",3,"icon"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"click"],[1,"me-1",3,"icon"]],template:function(o,a){if(o&1){let p=b();r(0,"div",5)(1,"button",6),T(2,"translate"),_("click",function(){return g(p),S(a.onRefresh())}),f(3,"fa-icon",7),l(),r(4,"button",8),T(5,"translate"),_("click",function(){return g(p),S(a.addToSync())}),f(6,"fa-icon",7),l(),r(7,"button",9),T(8,"translate"),_("click",function(){return g(p),S(a.openSettingsDialog())}),f(9,"fa-icon",7),l(),r(10,"button",9),T(11,"translate"),_("click",function(){return g(p),S(a.openReportDialog())}),f(12,"fa-icon",7),l(),h(13,c9,3,5,"button",10)(14,m9,3,6,"button",11),h(15,p9,3,5,"button",10)(16,f9,6,5,"div",12),r(17,"div",12),T(18,"translate"),T(19,"translate"),r(20,"div",13)(21,"button",14),h(22,u9,1,1,"fa-icon",7)(23,_9,1,1,"fa-icon",7),l(),V(24,C9,12,3,"ul",15),l()(),r(25,"div",12),T(26,"translate"),r(27,"div",16)(28,"button",17),f(29,"fa-icon",7),l(),V(30,g9,11,2,"ul",15),l()(),f(31,"app-input-filter",18),l(),r(32,"table",19)(33,"thead")(34,"tr"),D(35,v9,1,1,null,null,Xr),T(37,"keyvalue"),l()()(),r(38,"div",20),_("contextmenu",function(y){return g(p),S(a.onContextMenu(y))}),r(39,"table",19)(40,"tbody",21),D(41,R9,4,5,"tr",22,l9),T(43,"searchFilter"),l()()(),r(44,"context-menu",null,0),h(46,O9,1,0,null,23)(47,B9,1,0,null,23),V(48,U9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.openReportDialog())}),V(49,H9,0,0,"ng-template",25)(50,$9,3,1,"ng-template",26)(51,G9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.openSettingsDialog())}),l(),r(52,"context-menu",null,1),V(54,W9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.doAllSyncs(!0,!1))}),V(55,q9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.doAllSyncs(!0))}),l(),r(56,"context-menu",null,2),V(58,Y9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.goToPath())}),V(59,j9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.goToPath(!1))}),l(),r(60,"context-menu",null,3),h(62,Q9,1,0,null,23),V(63,X9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.setScheduler(a.CLIENT_SCHEDULER_STATE.SEQ))}),V(64,Z9,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.setScheduler(a.CLIENT_SCHEDULER_STATE.ASYNC))}),l(),r(65,"context-menu",null,4),h(67,em,1,0,null,23)(68,im,1,1,null,26),V(69,am,4,1,"ng-template",26)(70,rm,0,0,"ng-template",25)(71,sm,3,1,"ng-template",24),_("execute",function(){return g(p),S(a.addToSync())}),l()}if(o&2){let p=S1(57),u=S1(61);s(),d("tooltip",z(2,28,"Refresh",a.locale.language)),s(2),d("icon",a.icons.faArrowRotateRight),s(),d("tooltip",z(5,31,"Add",a.locale.language)),s(2),d("icon",a.icons.faPlus),s(),d("disabled",!a.syncPathSelected)("tooltip",z(8,34,"Edit",a.locale.language)),s(2),d("icon",a.icons.faPencilAlt),s(),d("disabled",!a.syncPathSelected||!a.syncPathSelected.settings.enabled)("tooltip",z(11,37,"Simulate",a.locale.language)),s(2),d("icon",a.icons.faFlask),s(),C(a.syncPathSelected&&a.syncPathSelected.inSync?13:14),s(2),C(a.allSyncsRunning?15:16),s(2),d("tooltip",z(18,40,"Scheduler",a.locale.language)+": "+z(19,43,a.store.clientScheduler(),a.locale.language)),s(4),M(I("btn btn-sm ",a.store.clientScheduler()===a.CLIENT_SCHEDULER_STATE.DISABLED?"btn-warning":"btn-success"," dropdown-toggle")),s(),C(a.store.clientScheduler()===a.CLIENT_SCHEDULER_STATE.DISABLED?22:23),s(3),d("tooltip",z(26,46,"Go to",a.locale.language)),s(2),d("isDisabled",!a.syncPathSelected),s(2),d("icon",a.icons.faMapMarkerAlt),s(6),R(z(37,49,a.tableHeaders,a.originalOrderKeyValue)),s(3),d("resizeOffset",105),s(3),R(z(43,52,a.store.clientSyncPaths(),a.inputFilter.search())),s(5),C(a.syncPathSelected&&a.syncPathSelected.inSync?46:47),s(3),d("divider",!0),s(),d("subMenu",p),s(12),C(a.store.clientScheduler()!==a.CLIENT_SCHEDULER_STATE.DISABLED?62:-1),s(5),C(a.allSyncsRunning?67:68),s(2),d("subMenu",u),s(),d("divider",!0)}},dependencies:[w1,Ge,qe,We,V1,t1,a2,o2,n2,z2,N,F,Qr,X,He,B1,ee],encapsulation:2});let i=n;return i})();function lm(i,n){if(i&1&&(r(0,"span",6),m(1,"Events from"),l(),m(2,"\xA0"),r(3,"b"),m(4),l()),i&2){let e=c();s(4),v(e.syncPath.settings.name)}}function cm(i,n){i&1&&(r(0,"span",6),m(1,"All events"),l())}var Jr=(()=>{let n=class n{constructor(){this.syncPath=null,this.wasDeleted=new h1,this.layout=x(L),this.icons={faTrashCan:q1},this.syncService=x(b1)}doClear(){this.syncService.deleteTransfers(this.syncPath?.id).then(()=>{this.wasDeleted.emit(),this.layout.closeDialog()})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-transfers-delete-dialog"]],inputs:{syncPath:"syncPath"},outputs:{wasDeleted:"wasDeleted"},decls:18,vars:2,consts:[[1,"modal-header"],["translate","",1,"modal-title"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["l10nTranslate",""],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","submit","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Clear events"),l()(),r(5,"button",4),_("click",function(){return a.layout.closeDialog()}),l()(),r(6,"div",5),h(7,lm,5,1)(8,cm,2,0,"span",6),r(9,"span"),m(10,"\xA0"),l(),r(11,"span",6),m(12,"will be cleared"),l()(),r(13,"div",7)(14,"button",8),_("click",function(){return a.layout.closeDialog()}),m(15,"Cancel"),l(),r(16,"button",9),_("click",function(){return a.doClear()}),m(17,"Confirm"),l()()),o&2&&(s(2),d("icon",a.icons.faTrashCan),s(5),C(a.syncPath?7:8))},dependencies:[F,N],encapsulation:2});let i=n;return i})();var e5=(i,n)=>n.id,t5=(i,n)=>n.key;function mm(i,n){if(i&1&&(r(0,"option",4),m(1),l()),i&2){let e=n.$implicit;d("ngValue",e),s(),v(e.settings.name)}}function pm(i,n){if(i&1&&f(0,"fa-icon",14),i&2){let e=c(3);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function dm(i,n){if(i&1){let e=b();r(0,"th",23),_("click",function(){g(e);let o=c().$implicit,a=c();return S(a.sortBy(o.key))}),m(1),h(2,pm,1,1,"fa-icon",14),l()}if(i&2){let e=c().$implicit,t=c();M(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function fm(i,n){if(i&1&&h(0,dm,3,10,"th",22),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function um(i,n){if(i&1&&(r(0,"span",26),f(1,"fa-icon",14)(2,"fa-icon",27),r(3,"span",28),m(4),l()()),i&2){let e=c(3).$implicit;s(),M(e.ok?e.sideIconClass:"circle-error-icon-sm"),d("icon",e.sideIcon),s(),U("text-danger",!e.ok),d("icon",e.actionIcon),s(),U("text-danger",!e.ok),s(),v(e.actionText)}}function _m(i,n){if(i&1&&(r(0,"span",26)(1,"span",29),m(2),l()()),i&2){let e=c(3).$implicit;s(2),v(e.syncPathName)}}function hm(i,n){if(i&1&&(r(0,"span"),m(1),l(),r(2,"span")(3,"b",33),m(4,"Source"),l(),m(5),l()),i&2){let e=c(4).$implicit;M(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),v(e.fileDst),s(),M(I("",e.selected?"overflow-wrap-and-whitespace":"truncate"," fs-xxxs")),s(3),A(":\xA0",e.file)}}function Cm(i,n){if(i&1&&(r(0,"span"),m(1),l()),i&2){let e=c(4).$implicit;M(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),v(e.file)}}function gm(i,n){if(i&1&&(r(0,"span"),m(1),l()),i&2){let e=c(4).$implicit;M(I("",e.selected?"overflow-wrap-and-whitespace":"truncate"," text-danger fs-xxxs")),s(),v(e.error)}}function Sm(i,n){if(i&1){let e=b();r(0,"div",26)(1,"img",30),_("error",function(){g(e);let o=c(3).$implicit;return S(o.fallBackMimeUrl())}),l(),r(2,"span",31),h(3,hm,6,7)(4,Cm,2,3,"span",32),h(5,gm,2,4,"span",32),l()()}if(i&2){let e=c(3).$implicit;s(),d("src",e.mimeUrl,Q),s(2),C(e.fileDst?3:4),s(2),C(e.ok?-1:5)}}function xm(i,n){if(i&1){let e=b();r(0,"div",34),_("mouseenter",function(){g(e);let o=c(3).$implicit;return S(o.hovered=!0)})("mouseleave",function(){g(e);let o=c(3).$implicit;return S(o.hovered=!1)}),r(1,"span"),m(2),l()()}if(i&2){let e=c(3).$implicit;s(2),v(e.hovered?e.timestamp:e.hTimeAgo)}}function vm(i,n){if(i&1&&(r(0,"td"),h(1,um,5,9,"span",26)(2,_m,3,1,"span",26)(3,Sm,6,3,"div",26)(4,xm,3,1,"div"),l()),i&2){let e,t=c().$implicit,o=c().$implicit;M(Qe("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),s(),C((e=t.key)==="action"?1:e==="sync"?2:e==="file"?3:e==="date"?4:-1)}}function ym(i,n){if(i&1&&h(0,vm,5,9,"td",25),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function bm(i,n){if(i&1){let e=b();r(0,"tr",24),_("click",function(){let o=g(e).$implicit,a=c();return S(a.onSelect(o))}),D(1,ym,1,1,null,null,t5),T(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c();U("selected",e.selected),s(),R(z(3,2,t.tableHeaders,t.originalOrderKeyValue))}}var i5=(()=>{let n=class n{constructor(){if(this.locale=x(q),this.action=null,this.syncPathSelected=null,this.transfers=[],this.store=x(Y),this.originalOrderKeyValue=re,this.tableHeaders={action:{label:"Action",width:15,textCenter:!1,class:"",show:!0,sortable:!0},sync:{label:"Synchronization",width:15,textCenter:!1,class:"",show:!0,sortable:!0},file:{label:"File",width:55,textCenter:!1,class:"",show:!0,sortable:!0},date:{label:"Date",width:15,textCenter:!0,class:"",newly:"newly",show:!0,sortable:!0}},this.icons={faRedo:O4,faTrashCan:q1,faArrowDown:Te,faArrowUp:ye},this.router=x(i1),this.layout=x(L),this.syncService=x(b1),this.sortSettings={default:[{prop:"timestamp",type:"date"}],action:[{prop:"actionText",type:"string"}],sync:[{prop:"syncPathName",type:"string"}],file:[{prop:"file",type:"string"}],date:[{prop:"timestamp",type:"date"}]},this.sortTable=new $e(this.constructor.name,this.sortSettings),this.focusOnSyncPathErrorsId=null,this.search=null,this.query=null,this.layout.setBreadcrumbIcon(v1.TRANSFERS),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.TRANSFERS}/${Be.TRANSFERS}`,splicing:2,translating:!0,sameLink:!0}),Gt(()=>{this.doSearch(this.inputFilter.search())}),this.checkRouteState(),this.focusOnSyncPathErrorsId){let t=this.store.clientSyncPaths().find(o=>o.id===this.focusOnSyncPathErrorsId);t?(this.syncPathSelected=t,this.onSelectAction("ERROR")):this.refresh()}else this.refresh()}doSearch(t){this.search=t,this.doQueryRefresh()}refresh(){this.onSelect(),this.syncService.getTransfers(this.syncPathSelected?.id,this.query).then(t=>{this.transfers=t.map(o=>new T2(o)),this.scrollView?.scrollInto(-1)})}onSelectPath(t){this.syncPathSelected=t,this.tableHeaders.sync.show=!this.syncPathSelected,this.refresh()}onSelectAction(t){this.action=t,this.doQueryRefresh()}onSelect(t){for(let o of this.transfers.filter(a=>a.selected))o.selected=!1;t&&(t.selected=!0)}openClearDialog(){this.layout.openDialog(Jr,"md",{initialState:{syncPath:this.syncPathSelected||null}}).content.wasDeleted.pipe(M1(1)).subscribe(()=>this.refresh())}sortBy(t,o=!0,a){this.transfers=this.sortTable.sortBy(t,o,a||this.transfers)}doQueryRefresh(){this.search&&this.action?this.action==="ERROR"?this.query=`(?=.*${this.search})(?=.*"ok":"false")`:this.query=`(?=.*${this.search})(?=.*"action":"${this.action}")`:this.action?this.query=this.action==="ERROR"?'"ok":false':`"action":"${this.action}"`:this.search?this.query=this.search:this.query=null,this.refresh()}checkRouteState(){let t=this.router.getCurrentNavigation()?.extras.state;t?.id&&(this.focusOnSyncPathErrorsId=t.id)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-transfers"]],viewQuery:function(o,a){if(o&1&&(s1(tt,5),s1(V1,7)),o&2){let p;l1(p=c1())&&(a.scrollView=p.first),l1(p=c1())&&(a.inputFilter=p.first)}},decls:41,vars:20,consts:[[1,"app-top-menu"],[1,"btn-group","btn-group-sm"],[1,"form-select","form-select-sm","font-size-xs",2,"min-width","210px",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"ngValue"],[3,"ngValue"],[1,"form-select","form-select-sm","font-size-xs","ms-1",2,"min-width","170px",3,"ngModelChange","ngModel"],["l10nTranslate","","value","NEW|MKFILE|MKDIR"],["l10nTranslate","","value","DIFF"],["l10nTranslate","","value","MOVE"],["l10nTranslate","","value","COPY"],["l10nTranslate","","value","RM|RMDIR"],["l10nTranslate","","value","ERROR"],[1,"d-flex","ms-auto"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon"],["placement","bottom","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[1,"d-none","d-sm-block"],[1,"app-table"],[3,"bufferAmount","items","resizeOffset"],[1,"app-table","mb-3"],["tabindex","-1"],[3,"selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"click"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],["size","sm",1,"circle-gray-icon-sm",3,"icon"],["l10nTranslate","",1,"fs-xxxs"],[1,"fs-xxs","ms-1"],["alt","","width","24",1,"me-2",3,"error","src"],[1,"d-flex","flex-column","fs-xxs"],[3,"class"],["l10nTranslate",""],[3,"mouseenter","mouseleave"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"select",2),_("ngModelChange",function(u){return a.onSelectPath(u)}),r(3,"option",3),m(4,"All syncs"),l(),D(5,mm,2,2,"option",4,e5),l(),r(7,"select",5),_("ngModelChange",function(u){return a.onSelectAction(u)}),r(8,"option",3),m(9,"All events"),l(),r(10,"option",6),m(11,"Added"),l(),r(12,"option",7),m(13,"Modified"),l(),r(14,"option",8),m(15,"Moved"),l(),r(16,"option",9),m(17,"Copied"),l(),r(18,"option",10),m(19,"Removed"),l(),r(20,"option",11),m(21,"Error"),l()()(),r(22,"div",12)(23,"button",13),T(24,"translate"),_("click",function(){return a.refresh()}),f(25,"fa-icon",14),l(),r(26,"button",15),T(27,"translate"),_("click",function(){return a.openClearDialog()}),f(28,"fa-icon",14),l(),f(29,"app-input-filter",16),l()(),r(30,"table",17)(31,"thead")(32,"tr"),D(33,fm,1,1,null,null,t5),T(35,"keyvalue"),l()()(),r(36,"app-virtual-scroll",18)(37,"table",19)(38,"tbody",20),D(39,bm,4,5,"tr",21,e5),l()()()),o&2&&(s(2),d("ngModel",a.syncPathSelected),s(),d("ngValue",null),s(2),R(a.store.clientSyncPaths()),s(2),d("ngModel",a.action),s(),d("ngValue",null),s(15),d("tooltip",z(24,11,"Refresh",a.locale.language)),s(2),d("icon",a.icons.faRedo),s(),d("tooltip",z(27,14,"Clear events",a.locale.language)),s(2),d("icon",a.icons.faTrashCan),s(5),R(z(35,17,a.tableHeaders,a.originalOrderKeyValue)),s(3),d("bufferAmount",5)("items",a.transfers)("resizeOffset",105),s(3),R(a.scrollView==null?null:a.scrollView.viewPortItems))},dependencies:[g1,ie,ne,te,_1,C1,F,w1,tt,N,V1,X,ee],encapsulation:2});let i=n;return i})();function Tm(i,n){if(i&1&&(r(0,"div",16)(1,"span",3),m(2),l(),r(3,"span",17),m(4),l()()),i&2){let e=c(2);s(2),v(e.infoMsg),s(2),A(":\xA0",e.syncService.wizard.localPath.origin)}}function wm(i,n){if(i&1){let e=b();r(0,"div",5)(1,"fa-icon",13),_("click",function(){g(e);let o=c();return S(o.onReset())}),l(),f(2,"img",14),r(3,"div",15),m(4),l(),h(5,Tm,5,2,"div",16),l()}if(i&2){let e=c();s(),d("icon",e.icons.faTimesCircle),s(),d("src",e.syncService.wizard.localPath.mimeUrl,Q),s(2),v(e.syncService.wizard.localPath.path),s(),C(e.infoMsg?5:-1)}}function zm(i,n){if(i&1){let e=b();r(0,"div",18),_("dragleave",function(o){g(e);let a=c();return S(a.dragLeave(o))})("dragover",function(o){g(e);let a=c();return S(a.dragOver(o))})("drop",function(o){g(e);let a=c();return S(a.drop(o))}),r(1,"div",19)(2,"span",20),m(3,"Drop folder here"),l()()()}}var n5=(()=>{let n=class n{constructor(){this.pathIsValid=!1,this.infoMsg=null,this.syncService=x(b1),this.icons={faTimesCircle:l4,faArrowCircleRight:Pi},this.router=x(i1),this.renderer=x(Ie),this.store=x(Y),this.layout=x(L),this.layout.setBreadcrumbIcon(v1.WIZARD),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.WIZARD}/${B.WIZARD_CLIENT}/${Be.WIZARD_CLIENT}`,splicing:3,translating:!0,sameLink:!0}),this.syncService.wizard.localPath&&this.checkSelection();let t=this.router.getCurrentNavigation()?.extras.state;t?.file&&this.syncService.addFileToRemotePath(t.file)}dragOver(t){return t.preventDefault(),t.dataTransfer.items[0].type?!1:(t.dataTransfer.dropEffect="copy",t.stopPropagation(),t.target.classList.contains("dropzone")&&this.renderer.addClass(t.target,"active"),!0)}dragLeave(t){t.preventDefault(),t.target.classList.contains("dropzone")&&this.renderer.removeClass(t.target,"active")}drop(t){t.preventDefault(),t.stopPropagation();let o=t.dataTransfer.items[0].webkitGetAsEntry();return o&&o.isDirectory?(this.syncService.wizard.localPath={name:o.name,path:this.syncService.getFilePath(t.dataTransfer.files[0]),mimeUrl:U1(Ce),origin:null},this.checkSelection(),!0):!1}onSelect(){this.syncService.showOpenDialog({properties:[w2.DIRECTORY,w2.CREATE_DIRECTORY],defaultPath:""}).then(t=>{t.canceled||(this.syncService.wizard.localPath={name:t.filePaths[0].split("\\").pop().split("/").pop(),path:t.filePaths[0],mimeUrl:U1(Ce),origin:null},this.checkSelection())})}onReset(){this.syncService.wizard.localPath=null,this.pathIsValid=!1,this.infoMsg=null}onNext(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_SERVER]).catch(console.error)}onCancel(){this.router.navigate([B.BASE,B.PATHS]).catch(console.error),this.syncService.resetWizard()}checkSelection(){let t=this.store.clientSyncPaths().find(o=>new RegExp(`^${o.settings.localPath}((\\/.*)+|\\/?)$`).test(this.syncService.wizard.localPath.path));t?(this.pathIsValid=!1,this.syncService.wizard.localPath.mimeUrl=U1(`${Ce}_sync`),this.syncService.wizard.localPath.origin=t.settings.localPath,this.infoMsg="The parent directory is already synced"):(this.infoMsg=null,this.pathIsValid=!0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-wizard-client"]],decls:22,vars:4,consts:[[1,"wizard"],[1,"d-flex","flex-column","text-center","fs-sm"],["l10nTranslate","",1,"mb-2"],["l10nTranslate",""],[1,"d-flex","flex-column","h-100"],[1,"d-flex","flex-column","my-auto","fs-sm"],[1,"area"],[1,"d-flex","flex-column","mt-4"],[1,"d-flex","align-items-start"],["type","button","l10nTranslate","",1,"btn","btn-secondary","me-auto",3,"click"],[3,"icon"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary","ms-auto",3,"click","disabled"],["size","2x",1,"position-absolute","align-self-center","cursor-pointer",2,"margin-left","85px",3,"click","icon"],["alt","","height","96",1,"align-self-center","mb-2",3,"src"],[1,"align-self-center","mt-2","font-size-md","word-break-all","fw-500"],[1,"align-self-center","text-warning","mt-4"],[1,"fw-bold","ms-1"],[1,"area",3,"dragleave","dragover","drop"],["l10nTranslate","",1,"dropzone"],[1,"d-flex","flex-column","justify-content-center","align-self-center"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3,"This wizard will help you synchronize a directory on your computer with a Sync-in directory."),l(),r(4,"div")(5,"div",3),m(6,"To begin, select a folder on your computer."),l(),r(7,"div",3),m(8,'You can drag the folder into the area below or click on the "Select" button.'),l()()(),r(9,"div",4),h(10,wm,6,4,"div",5)(11,zm,4,0,"div",6),l(),r(12,"div",7)(13,"div",8)(14,"button",9),_("click",function(){return a.onCancel()}),f(15,"fa-icon",10),m(16," Cancel "),l(),r(17,"button",11),_("click",function(){return a.onSelect()}),m(18,"Select a folder"),l(),r(19,"button",12),_("click",function(){return a.onNext()}),f(20,"fa-icon",10),m(21," Next "),l()()()()),o&2&&(s(10),C(a.syncService.wizard.localPath?10:11),s(5),d("icon",a.icons.faTimesCircle),s(4),d("disabled",!a.pathIsValid),s(),d("icon",a.icons.faArrowCircleRight))},dependencies:[N,F],encapsulation:2});let i=n;return i})();var Mm=()=>({standalone:!0}),Em=(i,n)=>n.id;function Pm(i,n){if(i&1&&f(0,"fa-icon",25),i&2){let e=c(2);M(I("circle-",e.selectedPath.iconClass,"-icon")),d("icon",e.selectedPath.icon)}}function Am(i,n){if(i&1&&f(0,"img",23),i&2){let e=c(2);d("src",e.selectedPath.mimeUrl,Q)}}function Nm(i,n){if(i&1&&(h(0,Pm,1,4,"fa-icon",22)(1,Am,1,1,"img",23),r(2,"span",24),m(3),l()),i&2){let e=c();C(e.selectedPath.icon?0:1),s(3),v(e.selectedPath.name)}}function Lm(i,n){i&1&&(r(0,"span",3),m(1,"Please select the server directory to sync, if it doesn't exist you can create it."),l())}function km(i,n){if(i&1&&(r(0,"span",3),m(1),l()),i&2){let e=c();s(),v(e.infoMsg)}}function Fm(i,n){if(i&1&&(r(0,"th",13),m(1),l()),i&2){let e=c();s(),v(e.currentShowedPath)}}function Dm(i,n){i&1&&(r(0,"th",3),m(1,"Double click to browse directories"),l())}function Rm(i,n){if(i&1&&f(0,"fa-icon",25),i&2){let e=c().$implicit;M(I("circle-",e.iconClass,"-icon")),d("icon",e.icon)}}function Im(i,n){if(i&1&&f(0,"img",23),i&2){let e=c().$implicit;d("src",e.mimeUrl,Q)}}function Om(i,n){if(i&1){let e=b();r(0,"tr",26),_("click",function(){let o=g(e).$implicit,a=c();return S(a.onSelect(o))})("dblclick",function(){let o=g(e).$implicit,a=c();return S(a.browse(o.path))}),r(1,"td")(2,"div",27),h(3,Rm,1,4,"fa-icon",22)(4,Im,1,1,"img",23),r(5,"span",28),m(6),l()()()()}if(i&2){let e=n.$implicit;U("selected",e.selected),s(3),C(e.icon?3:4),s(3),v(e.name)}}var o5=(()=>{let n=class n{constructor(){this.locale=x(q),this.icons={faArrowCircleLeft:d4,faArrowCircleRight:Pi,faFolderPlus:L4},this.infoMsg=null,this.canCreateDir=!1,this.router=x(i1),this.store=x(Y),this.userService=x(r1),this.filesService=x(E1),this.syncService=x(b1),this.layout=x(L),this.rootPaths=[this.userService.userHavePermission(Xe.PERSONAL_SPACE)?new ot({id:0,name:this.layout.translateString(Ue.PERSONAL_FILES),path:`${O.FILES}/${O.PERSONAL}`,icon:o1.PERSONAL,hasChildren:!0,enabled:!0,iconClass:"primary"}):null,this.userService.userHavePermission(Xe.SPACES)?new ot({id:-1,name:this.layout.translateString(Ue.SPACES),path:O.SPACES,icon:o1.SPACES,hasChildren:!0,enabled:!0,iconClass:"primary"}):null,this.userService.userHavePermission(Xe.SHARES)?new ot({id:-2,name:this.layout.translateString(Ue.SHARES),path:O.SHARES,icon:o1.SHARES,hasChildren:!0,enabled:!0,iconClass:"purple"}):null].filter(Boolean),this.currentPaths=ii([...this.rootPaths]),this.syncService.wizard.remotePath&&this.browse(this.syncService.wizard.remotePath.path.split("/").slice(0,-1).join("/"),this.syncService.wizard.remotePath.name).catch(t=>{console.error(t),this.currentPath="",this.onBack()}),this.layout.setBreadcrumbIcon(v1.WIZARD),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.WIZARD}/${B.WIZARD_SERVER}/${Be.WIZARD_SERVER}`,splicing:3,translating:!0,sameLink:!0})}browse(t,o=null){return K1(this,null,function*(){if(this.currentPath=t||"",this.setCurrentPaths((yield this.filesService.getTreeNode(t)).map(a=>new ot(a))),this.setCurrentShowedPath(),this.canCreateDir=this.currentPath.length?Rn(`${this.currentPath}/canCreate`,!0):!1,o){let a=this.currentPaths().findIndex(p=>p.name===o);a>-1&&(this.onSelect(this.currentPaths()[a]),this.autoResize.scrollIntoView(Math.max(a,1)*30-30))}else this.onSelect(),this.autoResize.scrollTop()})}onBack(){let t=this.currentPath.split("/");if(t.length===2&&t[0]===O.FILES&&t[1]===O.PERSONAL||t.length<=1)this.currentPath="",this.onSelect(),this.initRootPaths(),this.setCurrentShowedPath(),this.canCreateDir=!1;else{let o=t.length===2&&t[0]===O.FILES?[O.SPACES]:t.slice(0,-1);this.browse(o.join("/")).catch(console.error)}}addDirectory(){this.filesService.make("directory",this.newDirectoryName,this.currentPath,!0).subscribe({next:()=>{this.browse(this.currentPath,this.newDirectoryName).then(()=>this.newDirectoryName="").catch(console.error)},error:t=>this.setInfoMsg(t.error.message)})}onSelect(t){if(this.setInfoMsg(null),this.currentPaths().forEach(o=>o.selected=!1),!t){this.selectPath();return}t.selected=!0,t.isSynchronizable&&(t.enabled?t.isAlreadySynced?(this.setInfoMsg("This directory is already synced"),this.selectPath()):(t.isWriteable||this.setInfoMsg("This directory is read-only, you will not be able to modify it"),this.selectPath(t)):(this.setInfoMsg("This directory is not accessible"),this.selectPath()))}onNext(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_SETTINGS]).catch(console.error)}onPrevious(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_CLIENT]).catch(console.error)}setServerPath(t){this.syncService.wizard.remotePath=t}setCurrentPaths(t){for(let o of this.store.clientSyncPaths()){let a=new RegExp(`^${o.settings.remotePath}((\\/.*)+|\\/?)$`);for(let p of t)a.test(p.serverPath)&&p.setAlreadySynced()}this.currentPaths.set(t)}initRootPaths(){this.currentPaths.set([...this.rootPaths])}setCurrentShowedPath(){this.currentShowedPath=this.syncService.translateServerPath(this.currentPath)}selectPath(t=null){this.selectedPath=t,this.setServerPath(t)}setInfoMsg(t,o=!1){this.infoMsg=t,o&&setTimeout(()=>this.infoMsg=null,6e3)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-wizard-server"]],viewQuery:function(o,a){if(o&1&&s1(t1,7),o&2){let p;l1(p=c1())&&(a.autoResize=p.first)}},decls:36,vars:29,consts:[[1,"wizard"],[1,"my-2"],[1,"d-flex","align-items-center","justify-content-center","fs-sm",2,"min-height","40px"],["l10nTranslate",""],[1,"app-top-menu","px-0","bg-transparent"],["type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],[3,"icon"],[1,"text-warning","mx-auto","fs-sm"],[1,"row","align-items-center"],[1,"input-group"],["type","button",1,"btn","btn-sm","btn-secondary","input-group-text",3,"click","hidden","disabled","tooltip"],["type","text",1,"form-control","form-control-sm","me-1",3,"keyup.enter","ngModelChange","ngModel","hidden","ngModelOptions","placeholder"],[1,"app-table","wizard-nav-header"],[1,"text-truncate"],["appAutoResize","",1,"wizard-nav-content",3,"resizeOffset","useMaxHeight"],[1,"app-table"],["tabindex","-1"],[3,"selected"],[1,"mt-auto"],[1,"d-flex","align-items-start"],["type","button","l10nTranslate","",1,"btn","btn-secondary","me-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary","ms-auto",3,"click","disabled"],[2,"width","32px","height","32px","font-size","16px",3,"icon","class"],["alt","","height","30",3,"src"],[1,"text-truncate","fw-500","ms-2"],[2,"width","32px","height","32px","font-size","16px",3,"icon"],[3,"click","dblclick"],[1,"d-flex","align-items-center"],[1,"ms-1"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),h(3,Nm,4,2)(4,Lm,2,0,"span",3),l(),r(5,"div",4)(6,"button",5),T(7,"translate"),_("click",function(){return a.onBack()}),f(8,"fa-icon",6),l(),r(9,"div",7),h(10,km,2,1,"span",3),l(),r(11,"form",8)(12,"div",9)(13,"button",10),T(14,"translate"),_("click",function(){return a.addDirectory()}),f(15,"fa-icon",6),l(),r(16,"input",11),T(17,"translate"),_("keyup.enter",function(){return a.addDirectory()}),d1("ngModelChange",function(u){return p1(a.newDirectoryName,u)||(a.newDirectoryName=u),u}),l()()()(),r(18,"table",12)(19,"thead")(20,"tr"),h(21,Fm,2,1,"th",13)(22,Dm,2,0,"th",3),l()()(),r(23,"div",14)(24,"table",15)(25,"tbody",16),D(26,Om,7,4,"tr",17,Em),l()()()(),r(28,"div",18)(29,"div",19)(30,"button",20),_("click",function(){return a.onPrevious()}),f(31,"fa-icon",6),m(32," Previous "),l(),r(33,"button",21),_("click",function(){return a.onNext()}),f(34,"fa-icon",6),m(35," Next "),l()()()()),o&2&&(s(3),C(a.selectedPath?3:4),s(3),d("disabled",!a.currentPath)("tooltip",z(7,19,"Back",a.locale.language)),s(2),d("icon",a.icons.faArrowCircleLeft),s(2),C(a.infoMsg?10:-1),s(3),d("hidden",!a.canCreateDir)("disabled",!a.newDirectoryName)("tooltip",z(14,22,"Add",a.locale.language)),s(2),d("icon",a.icons.faFolderPlus),s(),m1("ngModel",a.newDirectoryName),d("hidden",!a.canCreateDir)("ngModelOptions",Ee(28,Mm))("placeholder",z(17,25,"New folder",a.locale.language)),s(5),C(a.currentPath?21:22),s(2),d("resizeOffset",230)("useMaxHeight",!1),s(3),R(a.currentPaths()),s(5),d("icon",a.icons.faArrowCircleLeft),s(2),d("disabled",!a.selectedPath),s(),d("icon",a.icons.faArrowCircleRight))},dependencies:[N,F,t1,g1,ct,O1,_1,lt,C1,F0,mt,w1,X],encapsulation:2});let i=n;return i})();function Vm(i,n){if(i&1&&f(0,"fa-icon",24),i&2){let e=c();M(I("circle-",e.syncService.wizard.remotePath.iconClass,"-icon")),d("icon",e.syncService.wizard.remotePath.icon)}}function Bm(i,n){if(i&1&&f(0,"img",7),i&2){let e=c();d("src",e.syncService.wizard.remotePath.mimeUrl,Q)}}function Um(i,n){if(i&1&&(r(0,"div",18),m(1),l()),i&2){let e=c();s(),v(e.error)}}function Hm(i,n){i&1&&(r(0,"span",26),m(1,"and from"),l())}function $m(i,n){i&1&&(r(0,"span",28),m(1,"to"),l())}function Gm(i,n){i&1&&(r(0,"span",26),m(1,"(Two-Way)"),l())}function Wm(i,n){i&1&&(r(0,"span",26),m(1,"(One-Way)"),l())}function qm(i,n){i&1&&(r(0,"span",28),m(1,"the most recent files will be kept"),l())}function Ym(i,n){if(i&1&&(r(0,"span",26),m(1,"the files in"),l(),r(2,"span",29),m(3),l(),r(4,"span",26),m(5,"will be preferred"),l()),i&2){let e=c(3);s(3),v(e.syncPath.settings.conflictMode===e.SYNC_PATH_CONFLICT_MODE.LOCAL?e.syncService.wizard.localPath.name:e.syncService.wizard.remotePath.name)}}function jm(i,n){if(i&1&&(r(0,"div")(1,"span",26),m(2,"In case of conflict,"),l(),r(3,"span"),m(4,"\xA0"),l(),h(5,qm,2,0,"span",28)(6,Ym,6,1),l()),i&2){let e=c(2);s(5),C(e.syncPath.settings.conflictMode===e.SYNC_PATH_CONFLICT_MODE.RECENT?5:6)}}function Km(i,n){if(i&1&&(r(0,"div")(1,"span",26),m(2,"All files created or modified in"),l(),r(3,"span",30),m(4),l(),r(5,"span",26),m(6,"will be ignored and deleted"),l()()),i&2){let e=c(2);s(4),v(e.syncPath.settings.mode===e.SYNC_PATH_MODE.DOWNLOAD?e.syncService.wizard.localPath.name:e.syncService.wizard.remotePath.name)}}function Qm(i,n){if(i&1&&(r(0,"div",25)(1,"span",26),m(2,"The data will be synchronized from"),l(),r(3,"span",27),m(4),l(),h(5,Hm,2,0,"span",26)(6,$m,2,0,"span",28),r(7,"span",27),m(8),l(),h(9,Gm,2,0,"span",26)(10,Wm,2,0,"span",26),l(),f(11,"br"),r(12,"div",25),h(13,jm,7,1,"div")(14,Km,7,1,"div"),l()),i&2){let e=c();s(4),v(e.syncPath.settings.mode===e.SYNC_PATH_MODE.DOWNLOAD?"the server folder":"the client folder"),s(),C(e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH?5:6),s(3),v(e.syncPath.settings.mode===e.SYNC_PATH_MODE.DOWNLOAD?"the client folder":"the server folder"),s(),C(e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH?9:10),s(4),C(e.syncPath.settings.mode===e.SYNC_PATH_MODE.BOTH?13:14)}}var a5=(()=>{let n=class n{constructor(){this.syncService=x(b1),this.SYNC_PATH_CONFLICT_MODE=gt,this.SYNC_PATH_MODE=Ae,this.icons={CLIENT:v1.CLIENT,SERVER:v1.SERVER},this.translatedRemotePath=this.syncService.translateServerPath(this.syncService.wizard.remotePath.serverPath),this.error=null,this.router=x(i1),this.layout=x(L),this.syncPath=new je({settings:{name:this.syncService.wizard.localPath.name,localPath:this.syncService.wizard.localPath.path,remotePath:this.syncService.wizard.remotePath.serverPath,enabled:this.syncService.wizard.settings.enabled,mode:this.syncService.wizard.remotePath.isWriteable?this.syncService.wizard.settings.mode:Ae.DOWNLOAD,conflictMode:this.syncService.wizard.settings.conflictMode,diffMode:this.syncService.wizard.settings.diffMode,scheduler:this.syncService.wizard.settings.scheduler,permissions:this.syncService.wizard.remotePath.permissions}}),this.layout.setBreadcrumbIcon(v1.WIZARD),this.layout.setBreadcrumbNav({url:`/${B.BASE}/${B.WIZARD}/${B.WIZARD_SETTINGS}/${Be.WIZARD_SETTINGS}`,splicing:3,translating:!0,sameLink:!0})}onPrevious(){this.router.navigate([B.BASE,B.WIZARD,B.WIZARD_SERVER]).catch(console.error)}onSubmit(){return K1(this,null,function*(){let t=yield this.syncService.addPath(this.syncPath.settings);typeof t=="string"?this.error=t:(yield this.syncService.refreshPaths(),this.router.navigate([B.BASE,B.PATHS],{state:{id:t.id,withSettings:!1}}).catch(console.error),this.syncService.resetWizard())})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-wizard-settings"]],decls:38,vars:12,consts:[[1,"wizard","fs-sm"],[1,"d-flex","flex-row","justify-content-center","mb-3"],[1,"d-flex","flex-column","align-items-end"],[1,"fw-bold","mb-1","me-1"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["placement","left",1,"cursor-pointer",3,"tooltip"],["alt","","height","35",3,"src"],[1,"position-absolute","text-truncate","pe-2",2,"top","110px"],[1,"d-flex","align-items-end","mb-2","mx-5"],[3,"syncPath"],[1,"d-flex","flex-column","align-items-start"],[1,"fw-bold","mb-1","ms-1"],["placement","right",1,"cursor-pointer",3,"tooltip"],[2,"width","32px","height","32px","font-size","16px",3,"icon","class"],[1,"position-absolute","text-truncate","ps-2",2,"top","110px"],[1,"mt-auto"],[1,"mb-auto"],["l10nTranslate","",1,"text-center","text-warning"],[1,"d-flex","align-items-start"],["translate","","type","button",1,"btn","btn-sm","btn-secondary","me-auto",3,"click"],[1,"fas","fa-arrow-circle-left","fa-fw"],["translate","","type","button",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click","disabled"],[1,"fas","fa-check-circle","fa-fw"],[2,"width","32px","height","32px","font-size","16px",3,"icon"],[1,"text-center"],["l10nTranslate",""],["l10nTranslate","",1,"mx-1"],["l10nTranslate","",1,"fw-bold"],[1,"fw-bold","mx-1"],["l10nTranslate","",1,"fw-bold","mx-1"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",2)(4,"div",3),f(5,"fa-icon",4),r(6,"span",5),m(7,"Client"),l()(),r(8,"div",6),f(9,"img",7),l(),r(10,"div",8),m(11),l()()(),r(12,"div",9),f(13,"app-sync-path-direction-icon",10),l(),r(14,"div",11)(15,"div",11)(16,"div",12),f(17,"fa-icon",4),r(18,"span",5),m(19,"Server"),l()(),r(20,"div",13),h(21,Vm,1,4,"fa-icon",14)(22,Bm,1,1,"img",7),l(),r(23,"div",15),m(24),l()()()(),f(25,"hr",16)(26,"app-sync-path-settings",10)(27,"hr",17),h(28,Um,2,1,"div",18)(29,Qm,15,5),r(30,"div",16)(31,"div",19)(32,"button",20),_("click",function(){return a.onPrevious()}),f(33,"i",21),m(34," Previous "),l(),r(35,"button",22),_("click",function(){return a.onSubmit()}),f(36,"i",23),m(37," Done "),l()()()()),o&2&&(s(5),d("icon",a.icons.CLIENT),s(3),d("tooltip",a.syncService.wizard.localPath.path),s(),d("src",a.syncService.wizard.localPath.mimeUrl,Q),s(2),v(a.syncService.wizard.localPath.name),s(2),d("syncPath",a.syncPath),s(4),d("icon",a.icons.SERVER),s(3),d("tooltip",a.translatedRemotePath),s(),C(a.syncService.wizard.remotePath.icon?21:22),s(3),v(a.syncService.wizard.remotePath.name),s(2),d("syncPath",a.syncPath),s(2),C(a.error?28:29),s(7),d("disabled",!a.syncPath.settings.name))},dependencies:[F,N,w1,z2,Hn],encapsulation:2});let i=n;return i})();var r5=()=>x(r1).userHavePermission(Xe.DESKTOP_APP),s5=()=>{let i=x(r1);return i.userHavePermission(Xe.DESKTOP_APP_SYNC)&&!!i.user.clientId},l5=()=>{let i=x(b1),n=!!(i.wizard.localPath&&i.wizard.remotePath);return n||x(i1).navigate([B.BASE,B.WIZARD,i.wizard.localPath?B.WIZARD_SERVER:B.WIZARD_CLIENT]).catch(console.error),n},c5=()=>{let n=!!x(b1).wizard.localPath;return n||x(i1).navigate([B.BASE,B.WIZARD,B.WIZARD_CLIENT]).catch(console.error),n};var m5=()=>x(b1).refreshPaths();var p5=[{path:B.BASE,pathMatch:"prefix",canActivate:[s5],resolve:[m5],children:[{path:"",pathMatch:"full",redirectTo:B.PATHS},{path:B.PATHS,pathMatch:"full",component:Zr},{path:B.TRANSFERS,pathMatch:"full",component:i5},{path:B.WIZARD,pathMatch:"full",redirectTo:`${B.WIZARD}/${B.WIZARD_CLIENT}`},{path:`${B.WIZARD}/${B.WIZARD_CLIENT}`,pathMatch:"full",component:n5},{path:`${B.WIZARD}/${B.WIZARD_SERVER}`,canActivate:[c5],pathMatch:"full",component:o5},{path:`${B.WIZARD}/${B.WIZARD_SETTINGS}`,canActivate:[l5],pathMatch:"full",component:a5}]}];function Xm(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();d("icon",e.icons.faSpinner)}}var d5=(()=>{let n=class n{constructor(){this.wasDeleted=new h1,this.layout=x(L),this.icons={faSpinner:ae,faTrashCan:q1},this.submitted=!1,this.syncService=x(b1)}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.syncService.deleteClient(this.client.id).subscribe({next:()=>{this.layout.sendNotification("info","Client deleted",this.client.info.node),this.wasDeleted.emit(),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Unable to delete client",t.error.message),this.submitted=!1}}))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-client-delete-dialog"]],hostBindings:function(o,a){o&1&&_("keyup.enter",function(){return a.onEnter()},Re)},inputs:{client:"client"},outputs:{wasDeleted:"wasDeleted"},decls:21,vars:6,consts:[[1,"modal-header"],["translate","",1,"modal-title"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["size","lg",1,"me-2",3,"icon","fixedWidth"],["l10nTranslate","",1,"ms-1"],["translate",""],[1,"modal-footer"],["data-dismiss","modal","l10nTranslate","","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Client"),l(),h(5,Xm,1,1,"fa-icon",4),l(),r(6,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),r(7,"div",6)(8,"div")(9,"b"),f(10,"fa-icon",7),m(11),l(),r(12,"span",8),m(13,"will be removed"),l()(),r(14,"small",9),m(15,"The client will no longer have permission to access your account and will no longer be able to synchronize."),l()(),r(16,"div",10)(17,"button",11),_("click",function(){return a.layout.closeDialog()}),m(18,"Cancel"),l(),r(19,"button",12),_("click",function(){return a.onSubmit()}),m(20,"Confirm"),l()()),o&2&&(s(2),d("icon",a.icons.faTrashCan),s(3),C(a.submitted?5:-1),s(5),d("icon",a.client.icon)("fixedWidth",!1),s(),v(a.client.info.node),s(8),d("disabled",a.submitted))},dependencies:[N,F],encapsulation:2,changeDetection:0});let i=n;return i})();var f5=(i,n)=>n.id;function Zm(i,n){if(i&1&&(f(0,"fa-icon",13),T(1,"translate")),i&2){let e=c(2);d("icon",e.icons.faCircle)("tooltip",z(1,2,"This client",e.locale.language))}}function Jm(i,n){if(i&1&&(m(0),T(1,"amTimeAgo")),i&2){let e=c().$implicit;A(" ",z(1,1,e.settings.lastSync,!0)," ")}}function ep(i,n){if(i&1&&(m(0),T(1,"translate")),i&2){let e=c(3);A(" ",z(1,1,"never",e.locale.language)," ")}}function tp(i,n){if(i&1){let e=b();r(0,"div",20),_("click",function(){let o=g(e).$implicit,a=c(2);return S(a.onSelectPath(o))})("dblclick",function(){g(e);let o=c(2);return S(o.onEditPath())}),r(1,"div",21),f(2,"img",22),r(3,"div",23)(4,"span",24),m(5),l(),r(6,"div"),f(7,"fa-icon",25),r(8,"span",26)(9,"span"),m(10),l()()()()(),r(11,"div",27),f(12,"fa-icon",2),m(13),T(14,"amTimeAgo"),l(),r(15,"div"),f(16,"fa-icon",2),h(17,Jm,2,4)(18,ep,2,4),l()()}if(i&2){let e=n.$implicit,t=c(2);U("selected",t.selectedPath&&t.selectedPath.id===e.id),s(2),d("src",e.mimeUrl,Q),s(3),v(e.settings.name),s(),M(I("d-flex align-items-center text-",e.iconClass)),s(),d("icon",e.icon),s(3),v(e.showedPath),s(2),d("icon",t.icons.faPlusCircle),s(),A(" ",z(14,16,e.createdAt,!0)," "),s(2),M(I("badge rounded-pill sync-newly-",e.newly)),s(),d("icon",t.icons.faRotate),s(),C(e.newly?17:18)}}function ip(i,n){if(i&1){let e=b();r(0,"div",8),_("click",function(){let o=g(e).$implicit,a=c();return S(a.onSelectClient(o))}),r(1,"div",9)(2,"div",10)(3,"div",11),f(4,"fa-icon",2),r(5,"div",12),m(6),l(),h(7,Zm,2,5,"fa-icon",13),l(),r(8,"div"),f(9,"fa-icon",2),r(10,"div")(11,"span",14),m(12),l(),m(13),T(14,"amTimeAgo"),l()(),r(15,"div",11),f(16,"fa-icon",15),r(17,"div"),m(18),l()(),r(19,"div",11),f(20,"fa-icon",2),r(21,"div"),m(22),l()(),r(23,"div",11),f(24,"fa-icon",2),r(25,"div",16),m(26),l(),r(27,"div",17),m(28),l()(),r(29,"div",11),f(30,"fa-icon",2),r(31,"div"),m(32),l()(),r(33,"div",11),f(34,"fa-icon",2),r(35,"div"),m(36),T(37,"amDateFormat"),T(38,"amDateFormat"),l()()()(),r(39,"div",18),D(40,tp,19,19,"div",19,f5),l()()}if(i&2){let e=n.$implicit,t=c();s(),U("selected",t.selected&&t.selected.id===e.id),s(3),d("icon",t.icons.CLIENT),s(2),v(e.info.node),s(),C(e.isCurrentClient?7:-1),s(),M(I("d-flex align-items-center ",e.expiration.reached?"fw-bold text-danger":e.expiration.approaching?"fw-bold text-warning":"")),s(),d("icon",t.icons.faKey),s(3),v(e.expiration.reached?"The access has expired":"The access expires"),s(),A("\xA0",J(14,25,e.expiration.value)," "),s(3),d("icon",e.icon),s(2),Q1("",e.osName," ",e.info.osRelease),s(2),d("icon",t.icons.faCircleUser),s(2),v(e.info.user),s(2),d("icon",t.icons.faCodeBranch),s(2),v(e.info.type),s(2),v(e.info.version),s(2),d("icon",t.icons.faAt),s(2),Q1("",e.currentIp,"\xA0-\xA0",e.lastIp),s(2),d("icon",t.icons.faClock),s(2),Q1("",z(37,27,e.currentAccess,"L HH:mm:ss"),"\xA0-\xA0",z(38,30,e.lastAccess,"L HH:mm:ss")),s(4),R(e.paths)}}var u5=(()=>{let n=class n{constructor(){this.locale=x(q),this.icons={faArrowRotateRight:_t,faTrashCan:q1,CLIENT:v1.CLIENT,faCircle:h4,faCircleUser:x4,faCodeBranch:e4,faAt:j0,faClock:yi,faRotate:ve,faPlusCircle:_4,faMapMarkerAlt:i2,faPen:Jt,faKey:oe},this.loading=!1,this.clients=[],this.router=x(i1),this.layout=x(L),this.syncService=x(b1),this.layout.setBreadcrumbIcon(he.CLIENTS),this.layout.setBreadcrumbNav({url:`/${x1.BASE}/${x1.CLIENTS}/${Ze.CLIENTS}`,splicing:2,translating:!0,sameLink:!0});let t=this.router.getCurrentNavigation()?.extras.state;t?.clientId&&(this.focusOnSelectId=t.clientId,this.focusOnSelectPathId=t.pathId),this.loadClients()}loadClients(){this.loading=!0,this.onSelectClient(),this.onSelectPath(),this.syncService.getClients().subscribe({next:t=>{Po(t,"id",!1),this.clients=t,this.focusOnSelectId&&this.onSelectClient(this.clients.find(o=>o.id===this.focusOnSelectId)),this.focusOnSelectPathId&&this.selected&&(this.onSelectPath(this.selected.paths.find(o=>o.id===this.focusOnSelectPathId)),this.focusOnSelectPathId=null)},error:t=>{console.error(t),this.loading=!1,this.layout.sendNotification("error","Clients",t.error.message)}})}onSelectClient(t){this.selected=t||null}onSelectPath(t){this.selectedPath=t||null}onDeleteClient(){this.layout.openDialog(d5,"md",{initialState:{client:this.selected}}).content.wasDeleted.pipe(M1(1)).subscribe(()=>this.loadClients())}gotoPath(t){this.syncService.goToPath(t,!1)}onEditPath(){this.selected.isCurrentClient?this.router.navigate([B.BASE,B.PATHS],{state:{id:this.selectedPath.id,withSettings:!0}}).catch(console.error):this.layout.openDialog($n,"md",{initialState:{syncPathSelected:this.selectedPath,syncClientSelected:this.selected}}).content.mustRefresh.pipe(M1(1)).subscribe(()=>{this.focusOnSelectId=this.selected.id,this.focusOnSelectPathId=this.selectedPath.id,this.loadClients()})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sync-clients"]],decls:16,vars:23,consts:[[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],["placement","auto","type","button",1,"btn","btn-sm","btn-secondary","ms-auto","me-1",3,"click","disabled","tooltip"],["placement","auto","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],["appAutoResize","",1,"app-sync-clients"],[1,"d-flex"],[1,"d-flex",3,"click"],[1,"left-panel","app-div-hovered","col-md-5","col-lg-4","col-sm-12"],[1,"left-panel-content","p-2"],[1,"d-flex","align-items-center"],[1,"me-auto","fw-semibold"],[1,"text-light-green","cursor-pointer",3,"icon","tooltip"],["l10nTranslate",""],[1,"osIcon",3,"icon"],[1,"me-2"],[1,"badge","rounded-pill","bg-primary"],[1,"right-panel","d-none","d-md-flex","d-lg-flex","col-md-7","col-lg-8","p-0"],[1,"d-flex","align-items-center","cursor-pointer","app-div-hovered","py-1","ps-2","pe-4",3,"selected"],[1,"d-flex","align-items-center","cursor-pointer","app-div-hovered","py-1","ps-2","pe-4",3,"click","dblclick"],[1,"d-flex","align-items-center","text-truncate","px-2","py-1","me-auto"],["alt","","draggable","false","height","30",3,"src"],[1,"d-flex","flex-column","text-truncate","ms-2",2,"height","34px"],[1,"fs-xxs","text-truncate","user-select-none"],[1,"me-1",3,"icon"],[1,"fs-xxxs","text-truncate","user-select-none"],[1,"badge","rounded-pill","bg-dark","me-1"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"button",1),T(2,"translate"),_("click",function(){return a.loadClients()}),f(3,"fa-icon",2),l(),r(4,"button",3),T(5,"translate"),_("click",function(){return a.onDeleteClient()}),f(6,"fa-icon",2),l(),r(7,"button",4),T(8,"translate"),_("click",function(){return a.gotoPath(a.selectedPath)}),f(9,"fa-icon",2),l(),r(10,"button",5),T(11,"translate"),_("click",function(){return a.onEditPath()}),f(12,"fa-icon",2),l()(),r(13,"div",6),D(14,ip,42,33,"div",7,f5),l()),o&2&&(s(),d("tooltip",z(2,11,"Refresh",a.locale.language)),s(2),d("icon",a.icons.faArrowRotateRight),s(),d("disabled",!a.selected)("tooltip",z(5,14,"Remove",a.locale.language)),s(2),d("icon",a.icons.faTrashCan),s(),d("disabled",!a.selectedPath)("tooltip",z(8,17,"Go to",a.locale.language)),s(2),d("icon",a.icons.faMapMarkerAlt),s(),d("disabled",!a.selectedPath)("tooltip",z(11,20,"Edit",a.locale.language)),s(2),d("icon",a.icons.faPen),s(2),R(a.clients))},dependencies:[w1,N,t1,F,X,L1,B1],styles:[`.app-sync-clients[_ngcontent-%COMP%]{font-size:.7rem;display:flex;flex-direction:column;flex:1 1 auto!important}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer;border-right:solid 1px;border-bottom:solid 1px}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .left-panel-content[_ngcontent-%COMP%] .osIcon[_ngcontent-%COMP%]{font-size:1.2rem;margin-right:.4rem;margin-left:-2px}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .left-panel-content[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]:first-child:not(.osIcon){font-size:1rem;margin-right:.4rem}.app-sync-clients[_ngcontent-%COMP%] .left-panel[_ngcontent-%COMP%] .left-panel-content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:26px}.app-sync-clients[_ngcontent-%COMP%] .right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-bottom:solid 1px}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
`]});let i=n;return i})();var bt="webdav",Ke={SERVER:no,WEBDAV:bt,PERSONAL:Ct.PERSONAL,SPACES:Ct.SPACES,SHARES:Ct.SHARES,TRASH:Ct.TRASH},wM={[Ke.SERVER]:{route:"/",spaceRepository:null},[Ke.WEBDAV]:{route:`/${bt}`,spaceRepository:null},[Ke.PERSONAL]:{route:`/${bt}/${Ke.PERSONAL}`,spaceRepository:[Ft.FILES,Ct.PERSONAL]},[Ke.SPACES]:{route:`/${bt}/${Ke.SPACES}`,spaceRepository:[Ft.FILES]},[Ke.SHARES]:{route:`/${bt}/${Ke.SHARES}`,spaceRepository:[Ft.SHARES]},[Ke.TRASH]:{route:`/${bt}/${Ke.TRASH}`,spaceRepository:[Ft.TRASH]}};function np(i,n){if(i&1&&(r(0,"li",8),m(1),l()),i&2){let e=n.$implicit;s(),v(e)}}function op(i,n){if(i&1){let e=b();r(0,"p",5),m(1," Keep these codes in a safe place. They will allow you to access your account if you lose access to your two-factor authentication. "),l(),r(2,"p",6),m(3," These recovery codes are for one-time use only and will only be displayed here once. "),l(),r(4,"ul",7),D(5,np,2,1,"li",8,A1),l(),r(7,"div",9)(8,"button",10),_("click",function(){g(e);let o=c();return S(o.downloadRecoveryCodes())}),m(9,"Download"),l(),r(10,"button",11),_("click",function(){g(e);let o=c();return S(o.clipBoardRecoveryCodes())}),m(11,"Copy"),l(),r(12,"button",12),_("click",function(){g(e);let o=c();return S(o.onClose(!0))}),m(13,"Close"),l()()}if(i&2){let e=c();s(5),R(e.recoveryCodes)}}function ap(i,n){if(i&1&&(r(0,"div",14),m(1),l()),i&2){let e=c(2);s(),v(e.hasError)}}function rp(i,n){i&1&&(r(0,"span",3),m(1,"Scan this QR code using your authenticator app."),l(),r(2,"small",28),m(3,"\xA0"),r(4,"i",3),m(5,"(Such as FreeOTP, Proton Authenticator etc.)"),l()())}function sp(i,n){if(i&1){let e=b();r(0,"div",13),h(1,ap,2,1,"div",14)(2,rp,6,0),l(),r(3,"div",15),f(4,"img",16),l(),r(5,"div",17)(6,"div",18),m(7,"Or enter this secret manually"),l(),r(8,"div"),f(9,"fa-icon",19),r(10,"strong",20),_("click",function(){g(e);let o=c();return S(o.clipBoardSecret())}),m(11),l()()(),f(12,"hr",21),r(13,"form",22),_("ngSubmit",function(){g(e);let o=c();return S(o.onSubmit())}),r(14,"div",23),m(15,"Enter your password"),l(),r(16,"div",24)(17,"app-input-password",25),_("passwordChange",function(o){g(e);let a=c();return S(a.twoFaForm.controls.password.setValue(o))}),l()(),r(18,"div",23),m(19,"Valid with your TOTP code"),l(),r(20,"div",24),f(21,"input",26),l(),r(22,"div",9)(23,"button",27),m(24,"Confirm"),l(),r(25,"button",12),_("click",function(){g(e);let o=c();return S(o.onClose())}),m(26,"Cancel"),l()()()}if(i&2){let e=c();s(),C(e.hasError?1:2),s(3),d("src",e.qrDataUrl,Q),s(5),d("icon",e.icons.faCopy),s(2),v(e.secret),s(2),d("formGroup",e.twoFaForm),s(4),d("password",e.twoFaForm.value.password)("focus",!0)("centered",!0),s(4),d("maxlength",e.twoFaCodelength),s(2),d("disabled",e.twoFaForm.invalid||e.submitted)}}var _5=(()=>{let n=class n{constructor(){this.isValid=new h1,this.wasEnabled=!1,this.submitted=!1,this.hasError=null,this.icons={faKey:oe,faLock:ft,faCopy:ut},this.twoFaCodelength=jt,this.locale=x(q),this.layout=x(L),this.userService=x(r1),this.clipBoardService=x(f2),this.fb=x(Xt),this.twoFaForm=this.fb.group({totpCode:this.fb.control("",[_e.required,_e.pattern(new RegExp(`^\\d{${jt}}$`))]),password:this.fb.control("")})}onClose(t=!1){this.layout.closeDialog(),this.isValid.emit(t)}onSubmit(){this.submitted=!0,this.userService.enable2Fa({code:this.twoFaForm.value.totpCode,password:this.twoFaForm.value.password}).subscribe({next:t=>{t.success?(this.wasEnabled=!0,this.recoveryCodes=t.recoveryCodes,this.isValid.emit(!0)):this.hasError="Invalid code",setTimeout(()=>this.submitted=!1,1e3)},error:t=>{this.hasError=t.error?t.error.message:t,setTimeout(()=>this.submitted=!1,1e3)}})}clipBoardSecret(){this.clipBoardService.copyFromContent(this.secret),this.layout.sendNotification("info","Two-factor Authentication","Secret copied")}clipBoardRecoveryCodes(){this.clipBoardService.copyFromContent(this.recoveryCodes.join(`
|
|
8
|
+
`)),this.layout.sendNotification("info","Two-factor Authentication","Recovery codes copied")}downloadRecoveryCodes(){let t=this.recoveryCodes.join(`
|
|
9
|
+
`),o=new Blob([t],{type:"text/plain;charset=utf-8"}),a=URL.createObjectURL(o);Hi(a,"sync-in.recovery-codes.txt"),URL.revokeObjectURL(a)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-auth-2fa-enable-dialog"]],inputs:{qrDataUrl:"qrDataUrl",secret:"secret"},outputs:{isValid:"isValid"},decls:8,vars:2,consts:[[1,"modal-header","align-items-center","justify-content-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"modal-body","modal-auth-verify-2fa"],["l10nTranslate","",1,"text-align-center"],["l10nTranslate","",1,"text-align-center","font-italic","text-warning"],[1,"list-group","text-align-center","my-3"],[1,"list-group-item","font-monospace"],[1,"d-grid","gap-2"],["type","button","l10nTranslate","",1,"btn","btn-primary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],[1,"d-flex","flex-column","text-align-center","justify-content-center","align-items-center","fs-xs","mt-2","mb-4",2,"height","45px"],["l10nTranslate","",1,"text-danger"],[1,"text-center","my-3"],["alt","QR Code",1,"img-fluid","border","p-2","rounded",2,"max-width","150px",3,"src"],[1,"text-muted","small","text-center","mb-3"],["l10nTranslate","",1,"mb-2"],[3,"icon"],["role","button",1,"ms-1","font-monospace","link-primary",3,"click"],[2,"border-width","2px"],[3,"ngSubmit","formGroup"],["l10nTranslate","",1,"text-align-center","mb-3"],[1,"mb-3"],["id","password","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022",3,"passwordChange","password","focus","centered"],["type","text","formControlName","totpCode","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022","inputmode","numeric","autocomplete","one-time-code","name","totp",1,"form-control","text-center","fs-4",3,"maxlength"],["type","submit","l10nTranslate","",1,"btn","btn-primary",3,"disabled"],[1,"text-muted"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Two-Factor Authentication"),l()()(),r(5,"div",4),h(6,op,14,0)(7,sp,27,10),l()),o&2&&(s(2),d("icon",a.icons.faLock),s(4),C(a.wasEnabled?6:7))},dependencies:[N,F,mt,ct,O1,_1,lt,di,Kt,Qt,Yi],encapsulation:2});let i=n;return i})();var Gn=(function(i){return i.WEBDAV="webdav",i})(Gn||{});var lp=i=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:i,showWeekNumbers:!1}),cp=(i,n)=>n.name;function mp(i,n){if(i&1&&(r(0,"option",19),m(1),l()),i&2){let e=n.$implicit;d("value",e),s(),v(e)}}function pp(i,n){if(i&1&&(r(0,"div",22),m(1),l()),i&2){let e=c(3);s(),A(" ",e.hasError," ")}}function dp(i,n){i&1&&(r(0,"div",23),m(1," This password will only be shown once after it is generated "),l())}function fp(i,n){i&1&&f(0,"hr",24)}function up(i,n){if(i&1&&(h(0,pp,2,1,"div",22)(1,dp,2,0,"div",23),h(2,fp,1,0,"hr",24)),i&2){let e=c(2);C(e.hasError?0:1),s(2),C(e.appPasswords.length?2:-1)}}function _p(i,n){if(i&1){let e=b();r(0,"div",11)(1,"div",12),m(2,"Generate a new app password"),l(),r(3,"div",13)(4,"form",14),_("ngSubmit",function(){g(e);let o=c();return S(o.genAppPassword())}),r(5,"div",15),f(6,"input",16),T(7,"translate"),r(8,"div",17),m(9,"Application"),l(),r(10,"select",18),D(11,mp,2,2,"option",19,A1),l(),f(13,"input",20),T(14,"translate"),r(15,"button",21),m(16," Generate "),l()()()()(),h(17,up,3,2)}if(i&2){let e=c();s(4),d("formGroup",e.appPasswordForm),s(2),U("is-invalid",e.appPasswordForm.controls.name.invalid),d("placeholder",z(7,8,"Password name",e.locale.language)),s(5),R(e.availableApps),s(2),d("placeholder",z(14,11,"Never expires",e.locale.language))("bsConfig",I1(14,lp,e.minDate)),s(2),d("disabled",e.appPasswordForm.invalid||e.submitted),s(2),C(e.generatedPassword?-1:17)}}function hp(i,n){if(i&1&&(r(0,"div",26)(1,"strong",3),m(2,"Expiration"),l(),m(3),l()),i&2){let e=c(2);s(3),A(":\xA0",e.generatedPassword.expiration," ")}}function Cp(i,n){i&1&&f(0,"hr",24)}function gp(i,n){if(i&1){let e=b();r(0,"div",25)(1,"div",26)(2,"strong",3),m(3,"Password name"),l(),m(4),l(),r(5,"div",26)(6,"strong",3),m(7,"Application"),l(),m(8),T(9,"translate"),l(),h(10,hp,4,1,"div",26),r(11,"div",26)(12,"strong",3),m(13,"Generated password"),l(),m(14,":\xA0 "),r(15,"span",27),_("click",function(){g(e);let o=c();return S(o.clipBoardPassword())}),f(16,"fa-icon",9),r(17,"span"),m(18),l()()()(),h(19,Cp,1,0,"hr",24)}if(i&2){let e=c();s(4),A(":\xA0",e.generatedPassword.name," "),s(4),A(":\xA0",z(9,6,e.generatedPassword.app,e.locale.language)," "),s(2),C(e.generatedPassword.expiration?10:-1),s(6),d("icon",e.icons.faCopy),s(2),v(e.generatedPassword.password),s(),C(e.appPasswords.length?19:-1)}}function Sp(i,n){if(i&1&&(r(0,"div"),m(1),T(2,"amDateFormat"),l()),i&2){let e=c().$implicit;s(),v(J(2,1,e.lastAccess))}}function xp(i,n){if(i&1&&(r(0,"div"),m(1),l()),i&2){let e=c().$implicit;s(),v(e.lastIp)}}function vp(i,n){if(i&1){let e=b();r(0,"tr")(1,"td"),m(2),l(),r(3,"td"),m(4),T(5,"translate"),l(),r(6,"td",30)(7,"div",31)(8,"div"),m(9),T(10,"amDateFormat"),l(),h(11,Sp,3,3,"div"),l()(),r(12,"td",30)(13,"div",31)(14,"div"),m(15),l(),h(16,xp,2,1,"div"),l()(),r(17,"td",30),m(18),T(19,"amDateFormat"),T(20,"translate"),l(),r(21,"td",30),m(22),T(23,"amDateFormat"),l(),r(24,"td")(25,"button",32),_("click",function(){let o=g(e).$implicit,a=c(2);return S(a.deleteAppPassword(o.name))}),m(26,"Delete"),l()()()}if(i&2){let e=n.$implicit,t=c(2);s(2),v(e.name),s(2),v(z(5,8,e.app,t.locale.language)),s(5),v(e.currentAccess?J(10,11,e.currentAccess):"-"),s(2),C(e.lastAccess?11:-1),s(4),v(e.currentIp||"-"),s(),C(e.lastIp?16:-1),s(2),v(e.expiration?z(19,13,e.expiration,"L"):z(20,16,"never",t.locale.language)),s(4),v(J(23,19,e.createdAt))}}function yp(i,n){if(i&1&&(r(0,"table",6)(1,"thead")(2,"tr")(3,"th",28),m(4,"Name"),l(),r(5,"th",28),m(6,"Application"),l(),r(7,"th",28),m(8,"Access"),l(),r(9,"th",28),m(10,"IP"),l(),r(11,"th",28),m(12,"Expiration"),l(),r(13,"th",28),m(14,"Created"),l(),r(15,"th",28),m(16,"Action"),l()()(),r(17,"tbody",29),D(18,vp,27,21,"tr",null,cp),l()()),i&2){let e=c();s(18),R(e.appPasswords)}}var h5=(()=>{let n=class n{constructor(){this.appPasswords=[],this.nbAppPasswords=new h1,this.locale=x(q),this.availableApps=Object.values(Gn),this.allowGeneration=!1,this.minDate=oo(),this.submitted=!1,this.icons={faKey:oe,faCopy:ut,faPlus:be},this.fb=x(Xt),this.appPasswordForm=this.fb.group({name:this.fb.control("",[_e.required]),app:this.fb.control(Gn.WEBDAV,[_e.required]),expiration:this.fb.control(null)}),this.layout=x(L),this.userService=x(r1),this.clipBoardService=x(f2),this.minDate.setDate(this.minDate.getDate()+1),this.appPasswordForm.controls.name.valueChanges.pipe(J1(Boolean)).subscribe(t=>{this.hasError=void 0,this.appPasswordForm.controls.name.setValue(ao(t),{emitEvent:!1})})}ngOnInit(){this.appPasswords.length===0&&(this.allowGeneration=!0)}onClose(){this.layout.closeDialog()}deleteAppPassword(t){this.userService.deleteAppPassword(t).subscribe({next:()=>{this.appPasswords=this.appPasswords.filter(o=>o.name!==t),this.nbAppPasswords.emit(this.appPasswords.length)},error:o=>this.layout.sendNotification("error","Application Passwords","Unable to revoke",o)})}genAppPassword(){return K1(this,null,function*(){for(let o of this.appPasswords)if(o.name===this.appPasswordForm.value.name){this.hasError="This name is already used";return}let t=yield this.userService.auth2FaVerifyDialog();t!==!1&&this.userService.generateAppPassword(this.appPasswordForm.value,t).subscribe({next:o=>{this.appPasswordForm.patchValue({name:"",expiration:null}),this.appPasswords.unshift(o),this.generatedPassword=o,this.nbAppPasswords.emit(this.appPasswords.length)},error:o=>this.layout.sendNotification("error","Application Passwords","Unable to generate",o)})})}clipBoardPassword(){this.clipBoardService.copyFromContent(this.generatedPassword.password),this.layout.sendNotification("info","Generated password","Copied")}onAllowGenerationChange(){this.generatedPassword?(this.generatedPassword=null,this.allowGeneration=!0):this.allowGeneration=!this.allowGeneration}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-auth-manage-app-passwords"]],inputs:{appPasswords:"appPasswords"},outputs:{nbAppPasswords:"nbAppPasswords"},decls:17,vars:7,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-auto",3,"click"],[1,"modal-body"],[1,"table","table-striped","table-hover","align-middle","text-center","no-select"],[1,"modal-footer"],["role","button","type","button","btnCheckbox","","l10nTranslate","",1,"btn","btn-sm","btn-outline-success","me-auto",3,"ngModelChange","ngModel"],[3,"icon"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"d-flex","flex-fill","flex-column"],["l10nTranslate","",1,"fw-500","mb-3"],[1,"d-flex","flex-column","align-items-start"],[1,"w-100",3,"ngSubmit","formGroup"],[1,"input-group","input-group-sm","flex-nowrap"],["appAutofocus","","name","name","formControlName","name","type","text","required","",1,"flex-grow-1","form-control","form-control-sm","pe-0",3,"placeholder"],["l10nTranslate","",1,"input-group-text"],["formControlName","app",1,"form-select","form-select-sm",2,"max-width","150px"],["l10nTranslate","",3,"value"],["bsDatepicker","","id","expiration","formControlName","expiration","placement","bottom","type","text",1,"form-control","form-control-sm",2,"max-width","120px",3,"placeholder","bsConfig"],["type","submit","l10nTranslate","",1,"btn","btn-xs","btn-primary",3,"disabled"],["l10nTranslate","",1,"alert","alert-danger","text-center","my-3"],["l10nTranslate","",1,"alert","alert-secondary","text-center","my-3"],[1,"mb-1","mt-4"],[1,"d-flex","flex-column","alert","alert-success","text-center","my-3"],[1,"d-flex"],["role","button",1,"font-monospace","fw-bold","link-body-emphasis",3,"click"],["scope","col","l10nTranslate",""],[1,"table-group-divider"],[1,"fs-xxxs"],[1,"d-flex","flex-column","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-outline-danger",3,"click"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Manage app passwords"),l()(),r(5,"button",4),_("click",function(){return a.onClose()}),l()(),r(6,"div",5),h(7,_p,18,16),h(8,gp,20,9),h(9,yp,20,0,"table",6),l(),r(10,"div",7)(11,"button",8),_("ngModelChange",function(){return a.onAllowGenerationChange()}),f(12,"fa-icon",9)(13,"fa-icon",9),m(14," Password "),l(),r(15,"button",10),_("click",function(){return a.onClose()}),m(16,"Close"),l()()),o&2&&(s(2),d("icon",a.icons.faKey),s(5),C(a.allowGeneration&&!a.generatedPassword?7:-1),s(),C(a.generatedPassword?8:-1),s(),C(a.appPasswords.length?9:-1),s(2),d("ngModel",a.allowGeneration),s(),d("icon",a.icons.faPlus),s(),d("icon",a.icons.faKey))},dependencies:[N,F,g1,ct,ie,ne,O1,te,_1,lt,pi,C1,we,$0,G0,mt,Kt,Qt,c2,L1,X],encapsulation:2});let i=n;return i})();function bp(i,n){if(i&1&&(r(0,"option",14),m(1),T(2,"translate"),T(3,"capitalize"),l()),i&2){let e=n.$implicit,t=c(2);d("ngValue",t.allOnlineStatus.indexOf(e)),s(),v(J(3,5,z(2,2,e,t.locale.language)))}}function Tp(i,n){if(i&1&&(r(0,"span",35),f(1,"fa-icon",39),r(2,"span",40),m(3,"Administrator"),l()()),i&2){let e=c(3);s(),d("icon",e.icons.faKey)}}function wp(i,n){if(i&1&&(r(0,"span",41),m(1),l()),i&2){let e=n.$implicit;s(),v(e)}}function zp(i,n){if(i&1&&D(0,wp,2,1,"span",41,A1),i&2){let e=c(3);R(e.user.applications)}}function Mp(i,n){if(i&1&&(r(0,"li",29)(1,"span",28),m(2,"Permissions"),l(),h(3,Tp,4,1,"span",35)(4,zp,2,0),l(),r(5,"li",36)(6,"span",28),m(7,"Storage Space"),l(),r(8,"span",37),f(9,"app-storage-usage",38),l()()),i&2){let e=c(2);s(3),C(e.user.isAdmin?3:4),s(6),d("item",e.user)}}function Ep(i,n){if(i&1){let e=b();r(0,"div",3)(1,"div",16)(2,"div",9)(3,"div",17)(4,"div",18)(5,"div",19),f(6,"img",20)(7,"span"),l()(),r(8,"div",21)(9,"div",22),m(10),l(),r(11,"div",23),m(12),l(),r(13,"div",24),m(14),T(15,"translate"),T(16,"amTimeAgo"),l(),r(17,"select",25),d1("ngModelChange",function(o){g(e);let a=c();return p1(a.user.onlineStatus,o)||(a.user.onlineStatus=o),S(o)}),_("ngModelChange",function(o){g(e);let a=c();return S(a.setOnlineStatus(o))}),D(18,bp,4,7,"option",14,A1),l()()(),r(20,"ul",26)(21,"li",27)(22,"span",28),m(23,"Login"),l(),r(24,"span"),m(25),l()(),r(26,"li",29)(27,"span",28),m(28,"IP Addresses"),l(),r(29,"span",30),m(30),l(),r(31,"span",31),m(32),l()(),r(33,"li",29)(34,"span",28),m(35,"Connections"),l(),r(36,"span",30),m(37),T(38,"amDateFormat"),l(),r(39,"span",31),m(40),T(41,"amDateFormat"),l()(),h(42,Mp,10,2),r(43,"li",27)(44,"span",32),m(45,"WebDAV"),l(),r(46,"span",33),_("click",function(){g(e);let o=c();return S(o.clipBoardLink())}),f(47,"fa-icon",34),m(48),l()()()()()()}if(i&2){let e=c();s(6),d("src",e.userAvatar,Q),s(),M(I("avatar-",e.allOnlineStatus[e.user.onlineStatus])),s(3),v(e.user.fullName),s(2),v(e.user.email),s(2),Q1("",z(15,17,"Member since",e.locale.language)," ",z(16,20,e.user.createdAt,!0)),s(3),m1("ngModel",e.user.onlineStatus),s(),R(e.allOnlineStatus),s(7),v(e.user.login),s(5),v(e.user.currentIp),s(2),v(e.user.lastIp),s(5),v(J(38,23,e.user.currentAccess)),s(3),v(J(41,25,e.user.lastAccess)),s(2),C(e.user.isUser?42:-1),s(5),d("icon",e.icons.faCopy),s(),A(" ",e.webdavUrl," ")}}function Pp(i,n){if(i&1&&f(0,"app-password-strength-bar",8),i&2){let e=c();d("passwordToCheck",e.newPassword)}}function Ap(i,n){if(i&1){let e=b();r(0,"div",10)(1,"span",11),m(2,"Avatar"),l(),r(3,"div",12)(4,"button",42),_("click",function(){g(e);let o=c();return S(o.genAvatar())}),m(5,"Generate"),l(),r(6,"button",43)(7,"span",40),m(8,"Import"),l(),r(9,"input",44),_("change",function(o){g(e);let a=c();return S(a.uploadAvatar(o))}),l()()()()}}function Np(i,n){if(i&1&&(r(0,"option",14),m(1),l()),i&2){let e=n.$implicit,t=c();d("ngValue",e),s(),v(t.i18nLanguageText[e])}}function Lp(i,n){if(i&1&&(r(0,"option",15),m(1),l()),i&2){let e=n.$implicit,t=c();d("ngValue",t.allNotifications.indexOf(e)),s(),v(e)}}function kp(i,n){if(i&1){let e=b();r(0,"button",58),_("click",function(){g(e);let o=c(2);return S(o.disable2Fa())}),m(1," Disable "),l()}if(i&2){let e=c(2);d("disabled",!e.store.server().twoFaEnabled)}}function Fp(i,n){if(i&1&&(r(0,"span",40),m(1,"Manage"),l(),m(2,"\xA0"),r(3,"span"),m(4),l()),i&2){let e=c(2);s(4),A("(",e.user.appPasswords,")")}}function Dp(i,n){i&1&&(r(0,"span",40),m(1,"Generate"),l())}function Rp(i,n){if(i&1){let e=b();r(0,"div",10)(1,"span",45),m(2,"Full-text search"),l(),r(3,"div",12)(4,"div",46)(5,"input",47),_("ngModelChange",function(o){g(e);let a=c();return S(a.updateStorageIndexing(o))}),l(),r(6,"label",48)(7,"span",40),m(8),r(9,"span",40),m(10,"for personal files"),l()()()()()(),r(11,"div",10)(12,"span",45),m(13,"Password"),l(),r(14,"div",12)(15,"div",22)(16,"app-input-password",49),d1("passwordChange",function(o){g(e);let a=c();return p1(a.oldPassword,o)||(a.oldPassword=o),S(o)}),l()(),r(17,"div",22)(18,"app-input-password",50),d1("passwordChange",function(o){g(e);let a=c();return p1(a.newPassword,o)||(a.newPassword=o),S(o)}),l()(),r(19,"button",51),_("click",function(){g(e);let o=c();return S(o.submitPassword())}),m(20," Update "),l()()(),r(21,"div",10)(22,"span",52),m(23,"Security"),l(),r(24,"div",12)(25,"div",53),m(26,"Two-Factor Authentication"),l(),r(27,"button",54),_("click",function(){g(e);let o=c();return S(o.enable2Fa())}),m(28),l(),h(29,kp,2,1,"button",55),r(30,"div",56),m(31,"Application Passwords"),l(),r(32,"button",57),_("click",function(){g(e);let o=c();return S(o.manageAppPasswords())}),h(33,Fp,5,1)(34,Dp,2,0,"span",40),l()()()}if(i&2){let e=c();s(5),d("ngModel",e.user.storageIndexing),s(3),A("",e.user.storageIndexing?"enabled":"disabled","\xA0"),s(8),m1("password",e.oldPassword),s(2),m1("password",e.newPassword),d("disabled",!(e.oldPassword!=null&&e.oldPassword.length))("isRequired",!!(e.oldPassword!=null&&e.oldPassword.length))("passwordMinLength",e.passwordMinLength)("showGenerator",!0),s(),d("disabled",!e.newPassword||!e.oldPassword||e.newPassword.length<e.passwordMinLength),s(8),d("disabled",!e.store.server().twoFaEnabled),s(),A(" ",e.user.twoFaEnabled?"Reset":"Enable"," "),s(),C(e.user.twoFaEnabled?29:-1),s(4),C(e.user.appPasswords>0?33:34)}}var C5=(()=>{let n=class n{constructor(){this.locale=x(q),this.i18nLanguageText=Y4,this.allNotifications=Object.values(W4),this.allOnlineStatus=ht,this.passwordMinLength=8,this.icons={faCopy:ut,faKey:oe},this.userAvatar=null,this.webdavUrl=`${window.location.origin}/${bt}`,this.store=x(Y),this.l10nTranslationService=x(I0),this.layout=x(L),this.languages=this.layout.getLanguages(!0),this.userService=x(r1),this.clipBoardService=x(f2),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t)),this.layout.setBreadcrumbIcon(he.ACCOUNT),this.layout.setBreadcrumbNav({url:`/${x1.BASE}/${x1.ACCOUNT}/${Ze.ACCOUNT}`,splicing:2,translating:!0,sameLink:!0})}get language(){return this.user?.language||o3}set language(t){t===o3&&(t=null),this.userService.changeLanguage({language:t}).subscribe({next:()=>this.updateLanguage(t),error:()=>this.layout.sendNotification("error","Configuration","Unable to update language")})}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}setOnlineStatus(t){this.userService.changeOnlineStatus(t)}genAvatar(){this.userService.genAvatar()}uploadAvatar(t){this.userService.uploadAvatar(t.target.files[0])}submitPassword(){return K1(this,null,function*(){if(!this.oldPassword){this.layout.sendNotification("error","Configuration","Current password missing !");return}if(!this.newPassword){this.layout.sendNotification("error","Configuration","New password missing !");return}if(this.newPassword.length<8){this.layout.sendNotification("warning","Configuration","New password must have 8 characters minimum");return}let t=yield this.userService.auth2FaVerifyDialog();t!==!1&&this.userService.changePassword({oldPassword:this.oldPassword,newPassword:this.newPassword},t).subscribe({next:()=>{this.oldPassword="",this.newPassword="",this.layout.sendNotification("info","Configuration","Password has been updated")},error:o=>{this.oldPassword="",o.status===403?this.layout.sendNotification("error","Configuration","Unable to update password",o):this.layout.sendNotification("warning","Configuration","Current password does not match")}})})}updateNotification(t){this.userService.changeNotification({notification:t}).subscribe({next:()=>{this.user.notification=t,this.layout.sendNotification("info","Configuration","Notification preference updated")},error:o=>this.layout.sendNotification("error","Configuration","Unable to update notification preference",o)})}updateStorageIndexing(t){this.userService.changeStorageIndexing({storageIndexing:t}).subscribe({next:()=>{this.user.storageIndexing=t,this.layout.sendNotification("info","Configuration","Full-text search preference updated")},error:o=>this.layout.sendNotification("error","Configuration","Unable to update full-text search preference",o)})}clipBoardLink(){this.clipBoardService.copyFromContent(this.webdavUrl),this.layout.sendNotification("info","Link copied",this.webdavUrl)}enable2Fa(){return K1(this,null,function*(){this.userService.init2Fa().subscribe({next:t=>{this.layout.openDialog(_5,"xs",{initialState:{qrDataUrl:t.qrDataUrl,secret:t.secret}},{keyboard:!1}).content.isValid.pipe(J1(a=>a),M1(1)).subscribe(()=>{this.layout.sendNotification("success","Configuration","Two-Factor Authentication is enabled"),this.store.user.next(Se(P1({},this.store.user.getValue()),{twoFaEnabled:!0}))})},error:t=>this.layout.sendNotification("error","Configuration","Two-Factor Authentication",t)})})}disable2Fa(){return K1(this,null,function*(){let t=yield this.userService.auth2FaVerifyDialog(!0);t&&this.userService.disable2Fa({code:t.get(L0),password:t.get(k0)}).subscribe({next:()=>{this.layout.sendNotification("success","Configuration","Two-Factor Authentication is disabled"),this.store.user.next(Se(P1({},this.store.user.getValue()),{twoFaEnabled:!1}))},error:o=>{this.layout.sendNotification("error","Configuration","Two-Factor Authentication",o)}})})}manageAppPasswords(){return K1(this,null,function*(){let t=yield this.userService.auth2FaVerifyDialog();t!==!1&&this.userService.listAppPasswords(t).subscribe({next:o=>{this.layout.openDialog(h5,"md",{initialState:{appPasswords:o}}).content.nbAppPasswords.subscribe(p=>{this.store.user.next(Se(P1({},this.store.user.getValue()),{appPasswords:p}))})},error:o=>this.layout.sendNotification("error","Configuration","Unable to get app passwords",o)})})}updateLanguage(t){this.user.language=t,this.layout.setLanguage(t).then(()=>this.layout.sendNotification("info","Configuration","Language updated"))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-account"]],decls:28,vars:7,consts:[["appAutoResize","",1,"profile-page",3,"resizeOffset"],[1,"container-fluid"],[1,"row"],[1,"col-lg-6","col-sm-12","p-2"],[1,"box","box-primary","box-solid","mb-0"],[1,"d-flex","box-header","align-items-center"],["l10nTranslate","",1,"box-title","me-5"],[1,"fs-xxxs"],[3,"passwordToCheck"],[1,"box-body"],[1,"row","mb-3"],["l10nTranslate","",1,"col-4","align-self-start"],[1,"col-auto"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel"],[3,"ngValue"],["l10nTranslate","",3,"ngValue"],[1,"box","box-primary","mb-0"],[1,"user-header"],[1,"d-flex","flex-column","justify-content-center","me-2"],[1,"avatar-xl"],["alt","",1,"avatar-img","profile-user-img",3,"src"],[1,"user-details"],[1,"mb-1"],[1,"fs-xxs","text-nowrap"],[1,"text-muted","fs-xxs"],[1,"form-select","form-select-sm","my-auto","mt-2",3,"ngModelChange","ngModel"],[1,"list-group","my-2"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],["l10nTranslate","",1,"me-auto","pe-4"],[1,"list-group-item","d-flex","align-items-center","justify-content-end","flex-wrap"],[1,"badge","bg-warning","rounded-pill","my-1"],[1,"badge","bg-secondary-alt","rounded-pill","ms-1","my-1"],[1,"me-auto","pe-4"],[1,"text-primary","text-end","cursor-pointer",3,"click"],[3,"icon"],[1,"badge","bg-gray-dark","rounded-pill","ms-1","my-1"],[1,"list-group-item","d-flex","align-items-center"],[1,"col-5"],[3,"item"],[1,"me-1",3,"icon"],["l10nTranslate",""],["l10nTranslate","",1,"badge","bg-gray-dark","rounded-pill","ms-1","my-1"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-success","me-1",3,"click"],["type","button",1,"btn-file-upload","btn","btn-xs","btn-secondary"],["accept","image/*","name","file","role","button","type","file",3,"change"],["l10nTranslate","",1,"col-4","text-nowrap","align-self-start"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchFullText","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchFullText",1,"form-check-label","mb-0","ms-2"],["placeholder","current password",3,"passwordChange","password"],["placeholder","new password",3,"passwordChange","password","disabled","isRequired","passwordMinLength","showGenerator"],["type","button","l10nTranslate","",1,"d-flex","btn","btn-xs","btn-primary","text-nowrap",3,"click","disabled"],["l10nTranslate","",1,"col-4","align-self-start","text-nowrap"],["l10nTranslate","",1,"fw-500","mb-2"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-danger","ms-2",3,"disabled"],["l10nTranslate","",1,"fw-500","mt-3","mb-2"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary","me-1",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-danger","ms-2",3,"click","disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),h(3,Ep,49,27,"div",3),r(4,"div",3)(5,"div",4)(6,"div",5)(7,"h3",6),m(8,"Configuration"),l(),r(9,"span",7),h(10,Pp,1,1,"app-password-strength-bar",8),l()(),r(11,"div",9),h(12,Ap,10,0,"div",10),r(13,"div",10)(14,"span",11),m(15,"Language"),l(),r(16,"div",12)(17,"select",13),d1("ngModelChange",function(u){return p1(a.language,u)||(a.language=u),u}),D(18,Np,2,2,"option",14,A1),l()()(),r(20,"div",10)(21,"span",11),m(22,"Notification"),l(),r(23,"div",12)(24,"select",13),_("ngModelChange",function(u){return a.updateNotification(u)}),D(25,Lp,2,2,"option",15,A1),l()()(),h(27,Rp,35,13),l()()()()()()),o&2&&(d("resizeOffset",40),s(3),C(a.user?3:-1),s(7),C(a.newPassword?10:-1),s(2),C(a.user.isUser?12:-1),s(5),m1("ngModel",a.language),s(),R(a.languages),s(6),d("ngModel",a.user==null?null:a.user.notification),s(),R(a.allNotifications),s(2),C(a.user.isUser?27:-1))},dependencies:[t1,g1,ie,ne,st,te,_1,C1,Lo,F,N,Mo,Yi,p2,X,L1,B1],encapsulation:2});let i=n;return i})();var j2=(function(i){return i.WIN="win",i.MAC="mac",i.LINUX="linux",i.NODE="node",i})(j2||{});function Ip(i,n){if(i&1&&(r(0,"div",1)(1,"span")(2,"span",3),m(3,"Repository"),l(),m(4,":\xA0"),r(5,"span",4),m(6),l()(),r(7,"span",5),m(8,"Version:\xA0"),r(9,"b"),m(10),l()(),r(11,"span"),m(12),T(13,"amDateFormat"),l()()),i&2){let e=c();s(6),v(e.store.appStoreManifest().repository),s(4),v(e.store.appStoreManifest().version),s(2),v(z(13,3,e.store.appStoreManifest().date,"L"))}}function Op(i,n){if(i&1&&(f(0,"fa-icon",15),r(1,"h5",16),m(2,"Windows"),l()),i&2){let e=c(3);d("icon",e.icons.faWindows)}}function Vp(i,n){if(i&1&&(f(0,"fa-icon",15),r(1,"h5",16),m(2,"Mac"),l()),i&2){let e=c(3);d("icon",e.icons.faApple)}}function Bp(i,n){if(i&1&&(f(0,"fa-icon",15),r(1,"h5",16),m(2,"Linux"),l()),i&2){let e=c(3);d("icon",e.icons.faLinux)}}function Up(i,n){if(i&1&&(f(0,"fa-icon",15),r(1,"h5",16),m(2,"Command Line"),l()),i&2){let e=c(3);d("icon",e.icons.faTerminal)}}function Hp(i,n){if(i&1){let e=b();r(0,"div",17)(1,"span",3),m(2,"System requirements"),l(),r(3,"span"),m(4,":\xA0Node.js 22+"),l()(),r(5,"a",18),_("click",function(){g(e);let o=c().$implicit,a=c(2);return S(a.download(o,!0))}),r(6,"span",3),m(7,"Download tar.gz version"),l(),m(8,"\xA0 "),l()}}function $p(i,n){if(i&1){let e=b();r(0,"div",17)(1,"span",3),m(2,"System requirements"),l(),r(3,"span"),m(4),l()(),r(5,"a",18),_("click",function(){g(e);let o=c().$implicit,a=c(2);return S(a.download(o,!0))}),m(6),l()}if(i&2){let e=c().$implicit,t=c(2);s(4),A(":\xA0",e===t.APP_STORE_OS.MAC?"Intel 64bit":"64bit"),s(2),v(e===t.APP_STORE_OS.MAC?"Download Apple Silicon ARM64 version":"Download ARM64 version")}}function Gp(i,n){if(i&1){let e=b();r(0,"div",10)(1,"div",11)(2,"div",12),h(3,Op,3,1)(4,Vp,3,1)(5,Bp,3,1)(6,Up,3,1),r(7,"a",13),_("click",function(){let o=g(e).$implicit,a=c(2);return S(a.download(o))}),f(8,"fa-icon",14),r(9,"span",3),m(10,"Download"),l()(),r(11,"div"),h(12,Hp,9,0)(13,$p,7,2),l()()()()}if(i&2){let e,t=n.$implicit,o=c(2);s(3),C((e=t)===o.APP_STORE_OS.WIN?3:e===o.APP_STORE_OS.MAC?4:e===o.APP_STORE_OS.LINUX?5:e===o.APP_STORE_OS.NODE?6:-1),s(5),d("icon",o.icons.faDownload),s(4),C(t===o.APP_STORE_OS.NODE?12:13)}}function Wp(i,n){if(i&1&&(r(0,"div",2)(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),D(5,Gp,14,3,"div",10,A1),l()()()()()),i&2){let e=c();d("resizeOffset",80),s(5),R(e.APP_STORE_PLATFORM_LIST)}}var g5=(()=>{let n=class n{constructor(){this.store=x(Y),this.icons={faWindows:Ln,faApple:kn,faLinux:Fn,faDownload:e2,faTerminal:u4},this.APP_STORE_OS=j2,this.APP_STORE_PLATFORM_LIST=Object.values(j2),this.layout=x(L),this.userService=x(r1),this.userService.checkAppStoreAvailability(),this.layout.setBreadcrumbIcon(he.APPS),this.layout.setBreadcrumbNav({url:`/${x1.BASE}/${x1.APPS}/${Ze.APPS}`,splicing:2,translating:!0,sameLink:!0})}download(t,o=!1){let a=this.store.appStoreManifest().platform[t].find(p=>t===j2.NODE?p.ext==="tar.gz"===o:p.arch==="arm64"===o);Hi(a.url)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-applications"]],decls:3,vars:2,consts:[[1,"app-top-menu","px-4"],[1,"d-flex","flex-fill","align-items-center","fs-xs"],["appAutoResize","",1,"d-flex","flex-column","fs-sm","bg-theme",2,"height","100%",3,"resizeOffset"],["l10nTranslate",""],["l10nTranslate","",1,"fw-bold"],[1,"mx-auto"],[1,"d-flex"],[1,"col-12","p-4"],[1,"container","p-0"],[1,"row"],[1,"col-md-4"],[1,"card","text-bg-light","text-center","mb-3"],[1,"card-body"],[1,"btn","btn-sm","btn-primary","mt-3","mb-2",3,"click"],[1,"me-2",3,"icon"],["size","3x",2,"height","36px",3,"icon"],[1,"card-title","mt-3","mb-2"],[1,"small","text-muted","mb-1"],["role","button","l10nTranslate","",1,"small",3,"click"]],template:function(o,a){o&1&&(r(0,"div",0),h(1,Ip,14,6,"div",1),l(),h(2,Wp,7,1,"div",2)),o&2&&(s(),C(a.store.appStoreManifest()?1:-1),s(),C(a.store.appStoreManifest()?2:-1))},dependencies:[N,F,t1,L1],encapsulation:2});let i=n;return i})();var S5=(()=>{let n=class n{constructor(){this.currentMemberIds=[],this.hasChanges=new h1,this.layout=x(L),this.newMembers=[],this.submitted=!1,this.icons={faUserPlus:f4},this.userService=x(r1)}searchMembers(t){let o={search:t,onlyUsers:!0,usersRole:this.parentGroup.type===Nt.USER?L2.USER:void 0,ignoreUserIds:[...this.currentMemberIds,...this.newMembers.map(a=>a.id)]};return this.userService.searchMembers(o)}onSubmit(){this.submitted=!0,this.userService.addUsersToGroup(this.parentGroup.id,this.newMembers.map(t=>t.id)).subscribe({next:()=>{this.hasChanges.emit(!0),this.layout.sendNotification("success","Add members",this.parentGroup.name),this.layout.closeDialog()},error:t=>{this.submitted=!1,this.layout.sendNotification("error","Add members",this.parentGroup.name,t)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-group-add-users-dialog"]],inputs:{parentGroup:"parentGroup",currentMemberIds:"currentMemberIds"},outputs:{hasChanges:"hasChanges"},decls:16,vars:7,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span"),m(4),l()(),r(5,"h4",3)(6,"span",4),m(7,"Add members"),l()(),r(8,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),r(9,"div",6)(10,"app-user-search",7),d1("membersChange",function(u){return p1(a.newMembers,u)||(a.newMembers=u),u}),l()(),r(11,"div",8)(12,"button",9),_("click",function(){return a.layout.closeDialog()}),m(13,"Cancel"),l(),r(14,"button",10),_("click",function(){return a.onSubmit()}),m(15," Confirm "),l()()),o&2&&(s(2),d("icon",a.icons.faUserPlus),s(2),v(a.parentGroup.name),s(6),m1("members",a.newMembers),d("withPermissions",!1)("customPlaceholder","Type to search for users to add")("searchFunction",a.searchMembers.bind(a)),s(4),d("disabled",a.submitted||!a.newMembers.length))},dependencies:[N,F,ko],encapsulation:2});let i=n;return i})();function qp(i,n){if(i&1&&f(0,"img",9),i&2){let e=c();d("src",e.member.avatarUrl,Q)}}function Yp(i,n){if(i&1&&f(0,"fa-icon",16),i&2){let e=c();M(e.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",e.icons.GROUPS)}}function jp(i,n){if(i&1&&(r(0,"div",7)(1,"span",17),m(2,"from the group"),l(),r(3,"span",11),m(4),T(5,"capitalize"),l()()),i&2){let e=c();s(4),v(J(5,1,e.parentGroup.name))}}function Kp(i,n){i&1&&(r(0,"small",12),m(1,"Only the group will be deleted, the members will no longer be part of it."),l())}var x5=(()=>{let n=class n{constructor(){this.wasDeleted=new h1,this.submitted=!1,this.icons={GROUPS:he.GROUPS,faMinus:ui,faUserMinus:k4},this.layout=x(L),this.userService=x(r1)}onSubmit(){this.submitted=!0;let t=this.member.isUser?"Remove from group":"Delete group";(this.member.isUser?this.userService.removeUserFromGroup(this.parentGroup.id,this.member.id):this.userService.deletePersonalGroup(this.member.id)).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success",t,this.member.name),this.onClose()},error:a=>{this.submitted=!1,this.layout.sendNotification("error",t,this.member.name,a)}})}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-group-delete-dialog"]],inputs:{parentGroup:"parentGroup",member:"member"},outputs:{wasDeleted:"wasDeleted"},decls:26,vars:10,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"fw-bold","me-1"],["translate",""],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"icon"],["translate","",1,"mx-1"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span"),m(4),l()(),r(5,"h4",3)(6,"span",4),m(7),l()(),r(8,"button",5),_("click",function(){return a.onClose()}),l()(),r(9,"div",6)(10,"div",7)(11,"div",8),h(12,qp,1,1,"img",9)(13,Yp,1,3,"fa-icon",10),l(),r(14,"span",11),m(15),T(16,"capitalize"),l(),r(17,"span",12),m(18,"will be removed"),l(),h(19,jp,6,3,"div",7),l(),h(20,Kp,2,0,"small",12),l(),r(21,"div",13)(22,"button",14),_("click",function(){return a.onClose()}),m(23,"Cancel"),l(),r(24,"button",15),_("click",function(){return a.onSubmit()}),m(25," Remove "),l()()),o&2&&(s(2),d("icon",a.member.isUser?a.icons.faUserMinus:a.icons.faMinus),s(2),v(a.member.name),s(3),v(a.member.isUser?"Remove from group":"Delete group"),s(5),C(a.member.isUser?12:13),s(3),v(J(16,8,a.member.name)),s(4),C(a.member.isUser?19:-1),s(),C(a.member.isGroup?20:-1),s(4),d("disabled",a.submitted))},dependencies:[N,F,p2],encapsulation:2});let i=n;return i})();var v5=(()=>{let n=class n{constructor(){this.layout=x(L),this.submitted=!1,this.isManager=!1,this.USER_GROUP_ROLE=At,this.icons={faUserPen:c4,faKey:oe},this.userService=x(r1)}ngOnInit(){this.isManager=this.user.isGroupManager}onSubmit(){if(this.submitted=!0,this.user.isGroupManager===this.isManager){this.layout.closeDialog();return}let t=this.isManager?At.MANAGER:At.MEMBER;this.userService.updateUserFromPersonalGroup(this.parentGroup.id,this.user.id,{role:t}).subscribe({next:()=>{this.user.setGroupRole(t),this.layout.sendNotification("success","Edit user",this.user.name),this.layout.closeDialog()},error:o=>{this.submitted=!1,this.layout.sendNotification("error","Edit user",this.user.name,o)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-personal-group-edit-user-dialog"]],inputs:{parentGroup:"parentGroup",user:"user"},decls:25,vars:5,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],[1,"ms-1",3,"icon"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span"),m(4),l()(),r(5,"h4",3)(6,"span",4),m(7,"Edit user"),l()(),r(8,"button",5),_("click",function(){return a.layout.closeDialog()}),l()(),r(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"label",10)(14,"input",11),d1("ngModelChange",function(u){return p1(a.isManager,u)||(a.isManager=u),u}),l(),r(15,"span",4),m(16,"Set as group manager"),l(),f(17,"fa-icon",12),l()()()(),r(18,"small",4),m(19,"As a manager, the user will be able to manage the group and its members."),l()(),r(20,"div",13)(21,"button",14),_("click",function(){return a.layout.closeDialog()}),m(22,"Cancel"),l(),r(23,"button",15),_("click",function(){return a.onSubmit()}),m(24," Confirm "),l()()),o&2&&(s(2),d("icon",a.icons.faUserPen),s(2),v(a.user.name),s(10),m1("ngModel",a.isManager),s(3),d("icon",a.icons.faKey),s(6),d("disabled",a.submitted))},dependencies:[N,F,g1,st,_1,C1],encapsulation:2});let i=n;return i})();var y5=(()=>{let n=class n{constructor(){this.wasLeft=new h1,this.submitted=!1,this.icons={GROUPS:he.GROUPS,faRightFromBracket:Ni},this.layout=x(L),this.userService=x(r1)}onClose(){this.wasLeft.emit(!1),this.layout.closeDialog()}onSubmit(){this.submitted=!0,this.userService.leavePersonalGroup(this.member.id).subscribe({next:()=>{this.wasLeft.emit(!0),this.layout.sendNotification("success","The group was left",this.member.name),this.onClose()},error:t=>{this.submitted=!1,this.layout.sendNotification("error","The group was not left",this.member.name,t)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-personal-group-leave-dialog"]],inputs:{member:"member"},outputs:{wasLeft:"wasLeft"},decls:19,vars:6,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-auto",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],[3,"icon"],[1,"fw-bold","me-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),r(3,"span",3),m(4,"Leave group"),l()(),r(5,"button",4),_("click",function(){return a.onClose()}),l()(),r(6,"div",5)(7,"div",6)(8,"div",7),f(9,"fa-icon",8),l(),r(10,"span",9),m(11),l(),r(12,"span",3),m(13,"will be left, you will no longer be a member of this group"),l()()(),r(14,"div",10)(15,"button",11),_("click",function(){return a.onClose()}),m(16,"Cancel"),l(),r(17,"button",12),_("click",function(){return a.onSubmit()}),m(18," Confirm "),l()()),o&2&&(s(2),d("icon",a.icons.faRightFromBracket),s(7),M(a.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",a.icons.GROUPS),s(2),v(a.member.name),s(6),d("disabled",a.submitted))},dependencies:[N,F],encapsulation:2});let i=n;return i})();var Qp=["MainContextMenu"],Xp=["TargetContextMenu"],b5=(i,n)=>n.key,Zp=(i,n)=>n.mid;function Jp(i,n){if(i&1){let e=b();r(0,"ul",19)(1,"li",20)(2,"a",21),_("click",function(){g(e);let o=c(2);return S(o.browse(o.selected))}),r(3,"span",22),f(4,"fa-icon",6),m(5,"See members"),l()()(),r(6,"li",20)(7,"a",21),_("click",function(){g(e);let o=c(2);return S(o.openLeaveGroupDialog())}),r(8,"span",22),f(9,"fa-icon",6),m(10,"Leave group"),l()()()()}if(i&2){let e=c(2);s(2),U("disabled",!e.selected),s(2),d("icon",e.icons.faUsersRectangle),s(3),U("disabled",!e.selected||!e.selected.isPersonalGroup),s(2),d("icon",e.icons.faRightFromBracket)}}function ed(i,n){if(i&1&&(r(0,"div",7)(1,"button",17),f(2,"fa-icon",6),l(),V(3,Jp,11,6,"ul",18),l()),i&2){let e=c();s(),U("disabled",!e.selected),s(),d("icon",e.icons.faEllipsis)}}function td(i,n){if(i&1&&f(0,"fa-icon",25),i&2){let e=c(3);d("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function id(i,n){if(i&1){let e=b();r(0,"th",24),_("click",function(){g(e);let o=c().$implicit,a=c();return S(a.sortBy(o.key))}),m(1),h(2,td,1,2,"fa-icon",25),l()}if(i&2){let e=c().$implicit,t=c();M(e.value.class),n1("width",e.value.width,"%"),U("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),C(t.sortTable.sortParam.column===e.key?2:-1)}}function nd(i,n){if(i&1&&h(0,id,3,10,"th",23),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function od(i,n){if(i&1&&f(0,"img",29),i&2){let e=c(4).$implicit;d("src",e.avatarUrl,Q)}}function ad(i,n){if(i&1&&f(0,"fa-icon",6),i&2){let e=c(4).$implicit,t=c();M(e.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),d("icon",t.icons.GROUPS)}}function rd(i,n){if(i&1&&f(0,"fa-icon",33),i&2){let e=c(5);d("icon",e.icons.faKey)}}function sd(i,n){if(i&1&&(r(0,"div",28),h(1,od,1,1,"img",29)(2,ad,1,3,"fa-icon",30),r(3,"div",31)(4,"span",32),m(5),h(6,rd,1,1,"fa-icon",33),l(),r(7,"span",34),m(8),l()()()),i&2){let e=c(3).$implicit;s(),C(e.isUser?1:2),s(4),A(" ",e.name," "),s(),C(e.isUser&&e.isGroupManager?6:-1),s(2),v(e.description)}}function ld(i,n){if(i&1&&(r(0,"span",22),m(1),l()),i&2){let e=c(4).$implicit;s(),v(e.type)}}function cd(i,n){if(i&1&&(r(0,"span",22),m(1),l()),i&2){let e=c(4).$implicit;s(),v(e.isGroupManager?"Manager":"Member")}}function md(i,n){if(i&1&&h(0,ld,2,1,"span",22)(1,cd,2,1,"span",22),i&2){let e=c(3).$implicit;C(e.isGroup?0:1)}}function pd(i,n){if(i&1&&(r(0,"span",22),m(1),l()),i&2){let e=c(3).$implicit;s(),v(e.isGroupManager?"Manager":"Member")}}function dd(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"joinCounts"),l()),i&2){let e=c(4).$implicit;s(),v(J(2,1,e.counts))}}function fd(i,n){if(i&1&&h(0,dd,3,3,"span"),i&2){let e=c(3).$implicit;C(e.isGroup?0:-1)}}function ud(i,n){if(i&1&&(m(0),T(1,"amTimeAgo")),i&2){let e=c(3).$implicit;A(" ",z(1,1,e.createdAt,!0)," ")}}function _d(i,n){if(i&1&&(m(0),T(1,"amTimeAgo")),i&2){let e=c(3).$implicit;A(" ",J(1,1,e.createdAt)," ")}}function hd(i,n){if(i&1&&(m(0),T(1,"amTimeAgo")),i&2){let e=c(3).$implicit;A(" ",J(1,1,e.modifiedAt)," ")}}function Cd(i,n){if(i&1&&(r(0,"td"),h(1,sd,9,4,"div",28)(2,md,2,1)(3,pd,2,1,"span",22)(4,fd,1,1)(5,ud,2,4)(6,_d,2,3)(7,hd,2,3),l()),i&2){let e,t=c().$implicit,o=c().$implicit;M(Qe("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),n1("width",t.value.width,"%"),U("text-align-center",t.value.textCenter),s(),C((e=t.key)==="name"?1:e==="type"?2:e==="role"?3:e==="members"?4:e==="memberSince"?5:e==="createdAt"?6:e==="modifiedAt"?7:-1)}}function gd(i,n){if(i&1&&h(0,Cd,8,9,"td",27),i&2){let e=n.$implicit;C(e.value.show?0:-1)}}function Sd(i,n){if(i&1){let e=b();r(0,"tr",26),_("click",function(){let o=g(e).$implicit,a=c();return S(a.onSelect(o))})("contextmenu",function(o){let a=g(e).$implicit,p=c();return S(p.onTargetContextMenu(o,a))})("appTap",function(){let o=g(e).$implicit,a=c();return S(a.browse(o))}),D(1,gd,1,1,null,null,b5),T(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c();U("selected",e.mid===(t.selected==null?null:t.selected.mid)),s(),R(z(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function xd(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",6),m(2),l()),i&2){let e=c(2);s(),d("icon",e.icons.faPlus),s(),A(" ",e.allowedAction.addGroup?"Personal group":"Add members")}}function vd(i,n){if(i&1){let e=b();V(0,xd,3,2,"ng-template",16),_("execute",function(){g(e);let o=c();return S(o.openDialog(!0))})}}function yd(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",6),m(2,"Refresh"),l()),i&2){let e=c();s(),d("icon",e.icons.faArrowRotateRight)}}function bd(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",6),m(2,"See members"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faUsersRectangle)}}function Td(i,n){if(i&1){let e=b();V(0,bd,3,1,"ng-template",16),_("execute",function(){g(e);let o=c();return S(o.browse(o.selected))})}}function wd(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",6),m(2),l()),i&2){let e=c(2);s(),d("icon",e.icons.faPen),s(),A(" ",e.allowedAction.editGroup?"Edit group":"Edit user")}}function zd(i,n){if(i&1){let e=b();V(0,wd,3,2,"ng-template",16),_("execute",function(){g(e);let o=c();return S(o.openDialog())})}}function Md(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",6),m(2),l()),i&2){let e=c(2);s(),d("icon",e.icons.faMinus),s(),A(" ",e.allowedAction.removeGroup?"Delete group":"Remove from group")}}function Ed(i,n){if(i&1){let e=b();V(0,Md,3,2,"ng-template",16),_("execute",function(){g(e);let o=c();return S(o.openDialog(!1,!0))})}}function Pd(i,n){if(i&1&&(r(0,"span",22),f(1,"fa-icon",6),m(2,"Leave group"),l()),i&2){let e=c(2);s(),d("icon",e.icons.faRightFromBracket)}}function Ad(i,n){if(i&1){let e=b();V(0,Pd,3,1,"ng-template",16),_("execute",function(){g(e);let o=c();return S(o.openLeaveGroupDialog())})}}var T5=(()=>{let n=class n{constructor(){this.locale=x(q),this.originalOrderKeyValue=re,this.icons={GROUPS:he.GROUPS,faRotate:ve,faPlus:be,faMinus:ui,faPen:Jt,faArrowDown:Te,faArrowUp:ye,faKey:oe,faArrowRotateRight:_t,faRightFromBracket:Ni,faUsersRectangle:K0,faEllipsis:hi},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},type:{label:"Type",width:10,textCenter:!0,class:"",show:!0,sortable:!0},role:{label:"Role",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!1,sortable:!0},members:{label:"Members",width:10,class:"",textCenter:!0,show:!0},memberSince:{label:"Member since",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!1,sortable:!0},createdAt:{label:"Created",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},modifiedAt:{label:"Modified",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.isCurrentGroupManager=!1,this.allowedAction={addGroup:!1,addUsers:!1,removeUser:!1,removeGroup:!1,editUser:!1,editGroup:!1,leaveGroup:!1},this.loading=!1,this.selected=null,this.members=[],this.router=x(i1),this.activatedRoute=x(ci),this.layout=x(L),this.userService=x(r1),this.canCreatePersonalGroup=this.userService.userHavePermission(Xe.PERSONAL_GROUPS_ADMIN),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],type:[{prop:"type",type:"string"}],role:[{prop:"isGroupManager",type:"number"}],createdAt:[{prop:"createdAt",type:"date"}],modifiedAt:[{prop:"modifiedAt",type:"date"}]},this.sortTable=new $e(this.constructor.name,this.sortSettings),this.activatedRoute.data.subscribe(t=>this.setEnv(t.routes)),this.activatedRoute.queryParams.subscribe(t=>this.focusOnSelect=t.select),this.layout.setBreadcrumbIcon(he.GROUPS)}setEnv(t){let o;t.length?(o=t[t.length-1].path,this.layout.setBreadcrumbNav({url:`/${x1.BASE}/${x1.GROUPS}/${Ze.GROUPS}${s2(t)}`,splicing:2,translating:!0,sameLink:!0,mutateLevel:{1:{setUrl:!0}}})):this.layout.setBreadcrumbNav({url:`/${x1.BASE}/${x1.GROUPS}/${Ze.GROUPS}`,splicing:2,translating:!0,sameLink:!0}),this.loadGroups(o)}refresh(){this.loadGroups(this.currentGroup?.name)}loadGroups(t){this.loading=!0,this.onSelect(),this.userService.browseGroup(t).subscribe({next:o=>{this.tableHeaders.members.show=!t,this.tableHeaders.role.show=!t,this.tableHeaders.modifiedAt.show=!t,this.tableHeaders.createdAt.show=!t,this.tableHeaders.memberSince.show=!!t,this.currentGroup=o.parentGroup,this.isCurrentGroupManager=this.currentGroup?.role===At.MANAGER,this.sortBy(this.sortTable.sortParam.column,!1,o.members),this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1),this.loading=!1},error:o=>{this.members=[],this.layout.sendNotification("error","Groups",o.error.message),this.onSelect(),this.loading=!1}})}browse(t){t.isGroup&&this.router.navigate([t.name],{relativeTo:this.activatedRoute}).catch(console.error)}onSelect(t=null){this.selected=t,this.selected?this.allowedAction={addGroup:!this.currentGroup&&this.canCreatePersonalGroup,addUsers:!!this.currentGroup&&this.isCurrentGroupManager,removeUser:!!this.currentGroup&&this.selected.isUser&&this.isCurrentGroupManager,removeGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isGroupManager&&this.selected.isPersonalGroup,editUser:!!this.currentGroup&&this.selected.isUser&&this.isCurrentGroupManager&&this.currentGroup.type===Nt.PERSONAL,editGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isGroupManager&&this.selected.isPersonalGroup,leaveGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isPersonalGroup}:this.allowedAction={addGroup:!this.currentGroup&&this.canCreatePersonalGroup,addUsers:!!this.currentGroup&&this.isCurrentGroupManager,removeUser:!1,removeGroup:!1,editUser:!1,editGroup:!1,leaveGroup:!1}}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.targetContextMenu)}sortBy(t,o=!0,a){this.members=this.sortTable.sortBy(t,o,a||this.members)}openDialog(t=!1,o=!1){t?this.currentGroup?this.layout.openDialog(S5,"md",{initialState:{parentGroup:this.currentGroup,currentMemberIds:this.members.filter(p=>p.isUser).map(p=>p.id)}}).content.hasChanges.pipe(J1(p=>p),M1(1)).subscribe(()=>this.refresh()):this.layout.openDialog(m3,"md").content.groupChange.pipe(M1(1)).subscribe(p=>{let[u,y]=p;u==="add"&&(y.setGroupRole(At.MANAGER),y.counts={users:1},this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(y)),this.onSelect(y))}):o?this.layout.openDialog(x5,"md",{initialState:{parentGroup:this.currentGroup,member:this.selected}}).content.wasDeleted.pipe(J1(p=>p),M1(1)).subscribe(()=>{this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(p=>this.selected.mid!==p.mid)),this.onSelect()}):this.selected.isGroup?this.layout.openDialog(m3,"md",{initialState:{originalGroup:this.selected}}).content.groupChange.pipe(M1(1)).subscribe(p=>{let[u,y]=p;u==="update"&&(this.selected=Object.assign(this.selected,{name:y.name,description:y.description,modifiedAt:y.modifiedAt}))}):this.layout.openDialog(v5,"md",{initialState:{parentGroup:this.currentGroup,user:this.selected}})}openLeaveGroupDialog(){this.layout.openDialog(y5,"md",{initialState:{member:this.selected}}).content.wasLeft.pipe(M1(1)).subscribe(o=>{o&&(this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(a=>a.id!==this.selected.id)),this.onSelect())})}focusOn(t){let o=this.members.find(a=>a.name===t);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-groups"]],viewQuery:function(o,a){if(o&1&&(s1(tt,5),s1(V1,7),s1(Qp,7),s1(Xp,7)),o&2){let p;l1(p=c1())&&(a.scrollView=p.first),l1(p=c1())&&(a.inputFilter=p.first),l1(p=c1())&&(a.mainContextMenu=p.first),l1(p=c1())&&(a.targetContextMenu=p.first)}},decls:41,vars:43,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem",""],["contextMenuItem","",3,"execute"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"d-flex","flex-column"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(o,a){if(o&1){let p=b();r(0,"div",2)(1,"button",3),T(2,"translate"),_("click",function(){return g(p),S(a.refresh())}),f(3,"fa-icon",4),l(),r(4,"button",5),T(5,"translate"),_("click",function(){return g(p),S(a.openDialog(!0))}),f(6,"fa-icon",6),l(),r(7,"button",5),T(8,"translate"),_("click",function(){return g(p),S(a.openDialog(!1,!0))}),f(9,"fa-icon",6),l(),r(10,"button",5),T(11,"translate"),_("click",function(){return g(p),S(a.openDialog())}),f(12,"fa-icon",6),l(),h(13,ed,4,3,"div",7),f(14,"app-input-filter",8),l(),r(15,"table",9)(16,"thead")(17,"tr"),D(18,nd,1,1,null,null,b5),T(20,"keyvalue"),l()()(),r(21,"app-virtual-scroll",10),T(22,"searchFilter"),_("contextmenu",function(y){return g(p),S(a.onContextMenu(y))}),r(23,"table",9)(24,"tbody",11),D(25,Sd,4,5,"tr",12,Zp),l()()(),r(27,"div",13)(28,"span",14),m(29),T(30,"translate"),l()(),r(31,"context-menu",null,0),h(33,vd,1,0,null,15),V(34,yd,3,1,"ng-template",16),_("execute",function(){return g(p),S(a.refresh())}),l(),r(35,"context-menu",null,1),h(37,Td,1,0,null,15),h(38,zd,1,0,null,15),h(39,Ed,1,0,null,15),h(40,Ad,1,0,null,15),l()}o&2&&(s(),d("tooltip",z(2,22,"Refresh",a.locale.language)),s(2),d("icon",a.icons.faRotate)("animation",a.loading?"spin":null),s(),d("disabled",!a.allowedAction.addGroup&&!a.allowedAction.addUsers)("tooltip",z(5,25,a.allowedAction.addGroup?"New personal group":"Add members",a.locale.language)),s(2),d("icon",a.icons.faPlus),s(),d("disabled",!a.allowedAction.removeGroup&&!a.allowedAction.removeUser)("tooltip",z(8,28,a.allowedAction.removeGroup?"Delete group":"Remove from group",a.locale.language)),s(2),d("icon",a.icons.faMinus),s(),d("disabled",!a.allowedAction.editGroup&&!a.allowedAction.editUser)("tooltip",z(11,31,a.allowedAction.editGroup?"Edit group":"Edit user",a.locale.language)),s(2),d("icon",a.icons.faPen),s(),C(a.currentGroup?-1:13),s(5),R(z(20,34,a.tableHeaders,a.originalOrderKeyValue)),s(3),d("bufferAmount",5)("items",z(22,37,a.members,a.inputFilter.search())),s(4),R(a.scrollView==null?null:a.scrollView.viewPortItems),s(4),Q1("",a.members.length," ",z(30,40,"groups",a.locale.language)),s(4),C(a.allowedAction.addGroup||a.allowedAction.addUsers?33:-1),s(4),C(a.selected!=null&&a.selected.isGroup?37:-1),s(),C(a.allowedAction.editGroup||a.allowedAction.editUser?38:-1),s(),C(a.allowedAction.removeGroup||a.allowedAction.removeUser?39:-1),s(),C(a.allowedAction.leaveGroup?40:-1))},dependencies:[a2,o2,n2,N,F,V1,tt,w1,Ge,qe,We,m2,ee,X,He,d2,B1],encapsulation:2});let i=n;return i})();var w5=()=>!x(r1).user.isLink,z5=()=>x(r1).user.isUser;var M5=[{path:x1.BASE,pathMatch:"prefix",canActivate:[w5],children:[{path:x1.ACCOUNT,component:C5},{path:x1.CLIENTS,canActivate:[r5],component:u5},{path:x1.GROUPS,children:[{path:"**",resolve:{routes:G2},component:T5}]},{path:x1.GUESTS,canActivate:[z5],loadComponent:()=>import("./chunk-373XVRXW.js").then(i=>i.UserGuestsComponent)},{path:x1.APPS,component:g5},{path:"**",redirectTo:x1.ACCOUNT}]}];var W3=(i,n)=>x(Ne).checkUserAuthAndLoad(n.url),E5=()=>x(Ne).isLogged()?(x(i1).navigate([]).catch(console.error),!1):!0;function Nd(i,n){if(i&1&&(r(0,"span",17),f(1,"fa-icon",18),l(),f(2,"input",19),T(3,"translate")),i&2){let e=c(2);s(),d("icon",e.icons.faKey),s(),d("placeholder",z(3,2,"Recovery code",e.locale.language))}}function Ld(i,n){if(i&1&&(r(0,"span",17),f(1,"fa-icon",18),l(),f(2,"input",20),T(3,"translate")),i&2){let e=c(2);s(),d("icon",e.icons.faQrcode),s(),d("placeholder",z(3,3,"Authentication code",e.locale.language))("maxlength",e.twoFaCodelength)}}function kd(i,n){if(i&1){let e=b();r(0,"p",7),m(1),l(),r(2,"form",8),_("ngSubmit",function(){g(e);let o=c();return S(o.onSubmit2Fa())}),r(3,"div",9),h(4,Nd,4,5)(5,Ld,4,6),l(),r(6,"div",10)(7,"div",11)(8,"label",12),f(9,"input",13),r(10,"span",7),m(11,"Use a recovery code"),l()()()(),r(12,"div",14)(13,"button",15),_("click",function(){g(e);let o=c();return S(o.onCancel2Fa())}),m(14,"Cancel"),l(),r(15,"button",16),m(16," Confirm "),l()()()}if(i&2){let e=c();M(I("fs-sm mb-3 ",e.hasError?"text-danger":"text-white-50")),s(),v(e.hasError||"Two-Factor Authentication"),s(),d("formGroup",e.twoFaForm),s(2),C(e.twoFaForm.value.isRecoveryCode?4:5),s(11),d("disabled",e.twoFaForm.value.isRecoveryCode?e.twoFaForm.controls.recoveryCode.invalid:e.twoFaForm.controls.totpCode.invalid||e.submitted)}}function Fd(i,n){if(i&1){let e=b();r(0,"form",8),_("ngSubmit",function(){g(e);let o=c();return S(o.onSubmit())}),r(1,"p",7),m(2),l(),r(3,"div",21)(4,"span",17),f(5,"fa-icon",18),l(),f(6,"input",22),T(7,"translate"),l(),r(8,"div",23)(9,"span",17),f(10,"fa-icon",18),l(),f(11,"input",24),T(12,"translate"),l(),r(13,"div",25)(14,"button",26),m(15,"Sign in"),l()()()}if(i&2){let e=c();d("formGroup",e.loginForm),s(),M(I("fs-sm mb-3 ",e.hasError?"text-danger":"text-white-50")),s(),v(e.hasError||"Sign-in to your account"),s(3),d("icon",e.icons.faUserAlt),s(),d("placeholder",z(7,10,"Login or Email",e.locale.language)),s(4),d("icon",e.icons.faLock),s(),d("placeholder",z(12,13,"Password",e.locale.language)),s(3),d("disabled",e.loginForm.invalid||e.submitted)}}var P5=(()=>{let n=class n{constructor(){this.locale=x(q),this.icons={faLock:ft,faUserAlt:ki,faKey:oe,faQrcode:$4},this.twoFaCodelength=jt,this.logoUrl=Ji,this.hasError=null,this.submitted=!1,this.twoFaVerify=!1,this.fb=x(Xt),this.loginForm=this.fb.group({username:this.fb.control("",[_e.required]),password:this.fb.control("",[_e.required])}),this.twoFaForm=this.fb.group({totpCode:this.fb.control("",[_e.required,_e.pattern(new RegExp(`^\\d{${jt}}$`))]),recoveryCode:this.fb.control("",[_e.required,_e.minLength(8)]),isRecoveryCode:this.fb.control(!1)}),this.router=x(i1),this.auth=x(Ne)}onSubmit(){this.submitted=!0,this.auth.login(this.loginForm.value.username,this.loginForm.value.password).pipe(Z2(()=>setTimeout(()=>this.submitted=!1,1500))).subscribe({next:t=>this.isLogged(t),error:t=>this.isLogged({success:!1,message:t.error?t.error.message:t})})}onSubmit2Fa(){this.submitted=!0;let t={code:this.twoFaForm.value.isRecoveryCode?this.twoFaForm.value.recoveryCode:this.twoFaForm.value.totpCode,isRecoveryCode:this.twoFaForm.value.isRecoveryCode};this.auth.loginWith2Fa(t).subscribe({next:o=>this.is2FaVerified(o),error:o=>this.is2FaVerified({success:!1,message:o.error?o.error.message:o})})}onCancel2Fa(){this.auth.logout(),this.twoFaForm.patchValue({totpCode:"",recoveryCode:""}),this.twoFaVerify=!1,this.submitted=!1,this.hasError=null}is2FaVerified(t){t.success?(this.auth.initUserFromResponse(t),this.isLogged({success:!0,message:t.message})):(this.hasError=t.message||"Unable to verify code",this.submitted=!1),this.twoFaForm.patchValue({totpCode:"",recoveryCode:""})}isLogged(t){t.success?(this.hasError=null,t.twoFaEnabled?this.twoFaVerify=!0:this.auth.returnUrl?this.router.navigateByUrl(this.auth.returnUrl).then(()=>{this.auth.returnUrl=null,this.loginForm.reset()}):this.router.navigate([et.BASE]).then(()=>this.loginForm.reset())):(this.hasError=t.message||"Server connection error",this.submitted=!1),this.loginForm.patchValue({password:""})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-auth"]],decls:8,vars:3,consts:[[1,"app-auth"],[1,"background"],[1,"content"],[1,"header"],["alt","","height","65","width","240",3,"ngSrc","priority"],[1,"body"],[3,"formGroup"],["l10nTranslate",""],[3,"ngSubmit","formGroup"],[1,"input-group","mt-2","mb-4"],[1,"d-flex","text-white-50","fs-xs"],[1,"form-check","form-switch","form-check-inline"],["for","useRecovery",1,"form-check-label"],["formControlName","isRecoveryCode","id","useRecovery","type","checkbox",1,"form-check-input"],[1,"d-flex","mt-4"],["type","button","l10nTranslate","",1,"btn","btn-secondary","px-4","w-50","me-3",3,"click"],["type","submit","l10nTranslate","",1,"btn","btn-primary","px-4","w-50",3,"disabled"],[1,"input-group-text"],[3,"icon"],["appAutofocus","","type","password","formControlName","recoveryCode",1,"form-control",3,"placeholder"],["appAutofocus","","type","text","formControlName","totpCode","inputmode","numeric","autocomplete","one-time-code",1,"form-control",3,"placeholder","maxlength"],[1,"input-group","my-2"],["appAutofocus","","formControlName","username","type","text",1,"form-control",3,"placeholder"],[1,"input-group","mb-4"],["formControlName","password","type","password",1,"form-control",3,"placeholder"],[1,"d-flex"],["type","submit","l10nTranslate","",1,"btn","btn-primary","px-4","w-100",3,"disabled"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),f(4,"img",4),l(),r(5,"div",5),h(6,kd,17,7)(7,Fd,16,16,"form",6),l()()()()),o&2&&(s(4),d("ngSrc",a.logoUrl)("priority",!0),s(2),C(a.twoFaVerify?6:7))},dependencies:[we,mt,ct,O1,st,_1,lt,di,Kt,Qt,N,F,li,X],encapsulation:2});let i=n;return i})();var A5=[{path:c3.BASE,canActivate:[E5],children:[{path:c3.LOGIN,component:P5}]}];var Dd=()=>({matrixParams:"ignored",queryParams:"ignored",paths:"exact",fragment:"ignored"});function Rd(i,n){if(i&1&&f(0,"fa-icon",2),i&2){let e=c(2);d("icon",e.icons.faChevronRight)("fixedWidth",!1)}}function Id(i,n){if(i&1&&f(0,"fa-icon",5),i&2){let e=c(2);d("icon",e.breadcrumbIcon)}}function Od(i,n){if(i&1&&(h(0,Rd,1,2,"fa-icon",2),r(1,"li",3)(2,"a",4),h(3,Id,1,1,"fa-icon",5),r(4,"span"),m(5),l()()()),i&2){let e=n.$implicit,t=n.$index,o=c();C(t!==0?0:-1),s(),d("routerLinkActiveOptions",Ee(5,Dd)),s(),d("routerLink",e.link),s(),C(t===0&&o.breadcrumbIcon?3:-1),s(2),v(e.title)}}var N5=(()=>{let n=class n{constructor(){this.icons={faChevronRight:s4},this.breadcrumbIcon=T4,this.levels=[],this.layout=x(L),this.subscriptions=[],this.subscriptions.push(this.layout.breadcrumbNav.subscribe(t=>this.updateNav(t))),this.subscriptions.push(this.layout.breadcrumbIcon.subscribe(t=>this.breadcrumbIcon=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}updateNav(t){let o=t.splicing||1,a=t.translating||!1,p=t.sameLink||!1,u=t.firstLink||null,y=t.mutateLevel||null,w=t.url.split("/").slice(1);if(this.levels=[],w.length>=1&&w[0]){let k=`/${w.splice(0,o).join("/")}`;this.levels.push({link:u||k,title:""});for(let{index:P,item:j}of w.filter(G=>G!=="").map((G,W)=>({index:W,item:G}))){let G=j.split("?")[0];if((!p||y&&y[P]&&y[P].setUrl)&&(k+="/"+G),y&&y[P]){if(y[P].hide)continue;y[P].setTitle&&(G=y[P].translateTitle?this.layout.translateString(y[P].setTitle):y[P].setTitle)}else a&&(G=this.layout.translateString(G));this.levels.push({link:k,title:G})}}else this.levels.push({link:["/"],title:""})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-breadcrumb"]],decls:4,vars:0,consts:[[1,"breadcrumb"],[1,"breadcrumb-content"],[3,"icon","fixedWidth"],["routerLinkActive","active",3,"routerLinkActiveOptions"],[3,"routerLink"],[3,"icon"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1),D(2,Od,6,6,null,null,A1),l()()),o&2&&(s(2),R(a.levels))},dependencies:[Yt,z0,N],encapsulation:2});let i=n;return i})();function Vd(i,n){if(i&1&&f(0,"img",8),i&2){let e=c();d("src",e.userAvatar,Q)("width",28)("height",28)}}var L5=(()=>{let n=class n{constructor(){this.allOnlineStatus=ht,this.icons={faAngleLeft:xi,faAngleRight:Ai},this.userAvatar=null,this.location=x(ai),this.layout=x(L),this.store=x(Y),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}openSidebarUser(){this.layout.showRSideBarTab(y1.PROFILE)}navigateTo(t){t==="back"?this.location.back():this.location.forward()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-navbar"]],decls:13,vars:6,consts:[[1,"main-header"],[1,"navbar","navbar-content"],["role","button",1,"d-sm-none","navbar-button",3,"click"],[3,"icon"],[1,"navbar-breadcrumb"],[1,"navbar-right-side"],[1,"menu",3,"click"],[1,"avatar"],["alt","",1,"avatar-img","bg-gray-light-important",3,"src","width","height"]],template:function(o,a){o&1&&(r(0,"header",0)(1,"nav",1)(2,"a",2),_("click",function(){return a.navigateTo("back")}),f(3,"fa-icon",3),l(),r(4,"a",2),_("click",function(){return a.navigateTo("next")}),f(5,"fa-icon",3),l(),r(6,"div",4),f(7,"app-breadcrumb"),l(),r(8,"div",5)(9,"div",6),_("click",function(){return a.openSidebarUser()}),r(10,"div",7),h(11,Vd,1,3,"img",8),f(12,"span"),l()()()()()),o&2&&(s(3),d("icon",a.icons.faAngleLeft),s(2),d("icon",a.icons.faAngleRight),s(6),C(a.userAvatar?11:-1),s(),M(I("avatar-",a.allOnlineStatus[a.user==null?null:a.user.onlineStatus])))},dependencies:[N5,N],encapsulation:2});let i=n;return i})();var Bd=["sidebar"],Ud=(i,n)=>({menu:i,previousLevel:n}),Hd=i=>({menu:i}),$d=i=>({menu:i,isMenuIcon:!0}),Gd=(i,n)=>({mainMenu:i,menu:n}),qn=i=>({menu:i,isMenuIcon:!1}),K2=(i,n)=>n.title;function Wd(i,n){if(i&1&&F1(0,18),i&2){let e=c(),t=e.$implicit,o=e.$index,a=c(),p=S1(27);d("ngTemplateOutlet",p)("ngTemplateOutletContext",xe(2,Ud,t,o===0?0:a.appsMenu.submenus[o-1].level))}}function qd(i,n){if(i&1&&h(0,Wd,1,5,"ng-container",18),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function Yd(i,n){if(i&1){let e=b();r(0,"a",8),_("click",function(){g(e);let o=c();return S(o.logOut())})("mouseenter",function(){g(e);let o=c();return S(o.onHoverIconsMenu(!0,{title:"logout"}))})("mouseleave",function(){g(e);let o=c();return S(o.onHoverIconsMenu(!1,{title:"logout"}))}),f(1,"fa-icon",19),l()}if(i&2){let e=c();s(),d("icon",e.icons.faUserSecret)}}function jd(i,n){if(i&1&&F1(0,18),i&2){let e=c().$implicit;c();let t=S1(29);d("ngTemplateOutlet",t)("ngTemplateOutletContext",I1(2,Hd,e))}}function Kd(i,n){if(i&1&&h(0,jd,1,4,"ng-container",18),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function Qd(i,n){i&1&&F1(0)}function Xd(i,n){if(i&1){let e=b();r(0,"div",20),_("click",function(){g(e);let o=c();return S(o.checkComponentRoute())}),V(1,Qd,1,0,"ng-container",21),l()}if(i&2){let e=c();d("resizeOffset",40),s(),d("ngComponentOutlet",e.currentMenu.component)}}function Zd(i,n){if(i&1&&(r(0,"span",23),m(1),l()),i&2){let e=c().menu;s(),v(e.title)}}function Jd(i,n){if(i&1&&(r(0,"span"),m(1),l()),i&2){let e=c(2).menu;M(I("badge bg-",e.count.level," rounded-pill")),s(),v(n)}}function ef(i,n){if(i&1&&(r(0,"span"),h(1,Jd,2,4,"span",24),T(2,"async"),l()),i&2){let e,t=c(),o=t.menu,a=t.isMenuIcon;M(a?"menu-badge-icon":"menu-badge"),s(),C((e=J(2,3,o.count.value))?1:-1,e)}}function tf(i,n){if(i&1&&(f(0,"fa-icon",22),h(1,Zd,2,1,"span",23),h(2,ef,3,5,"span",24)),i&2){let e=n.menu,t=n.isMenuIcon;d("icon",e.icon)("animation",e.iconAnimated?"spin":null),s(),C(t?-1:1),s(),C(e.count?2:-1)}}function nf(i,n){if(i&1&&F1(0,18),i&2){let e=c().$implicit,t=c(2).menu;c();let o=S1(31);d("ngTemplateOutlet",o)("ngTemplateOutletContext",xe(2,Gd,t,e))}}function of(i,n){if(i&1&&h(0,nf,1,5,"ng-container",18),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function af(i,n){i&1&&F1(0)}function rf(i,n){if(i&1){let e=b();r(0,"div",20),_("click",function(){g(e);let o=c(2).menu,a=c();return S(a.checkComponentRoute(o))}),V(1,af,1,0,"ng-container",21),l()}if(i&2){let e=c(3);d("resizeOffset",40),s(),d("ngComponentOutlet",e.currentMenu.component)}}function sf(i,n){if(i&1&&(r(0,"div"),D(1,of,1,1,null,null,K2),h(3,rf,2,2,"div",16),l()),i&2){let e=c().menu,t=c();M(I("menu-mini ",e.level<9?"align-self-start":"align-self-end")),s(),R(e.submenus),s(2),C(t.currentMenu.component?3:-1)}}function lf(i,n){if(i&1){let e=b();r(0,"a",25),_("mouseenter",function(){let o=g(e).menu,a=c();return S(a.onHoverIconsMenu(!0,o))})("mouseleave",function(){let o=g(e).menu,a=c();return S(a.onHoverIconsMenu(!1,o))})("click",function(){let o=g(e).menu,a=c();return S(a.checkMenuContext(o))}),F1(1,18),h(2,sf,4,4,"div",24),l()}if(i&2){let e=n.menu,t=n.previousLevel;c();let o=S1(25);U("mt-auto",t<9&&e.level>9)("active",e.isActive),s(),d("ngTemplateOutlet",o)("ngTemplateOutletContext",I1(7,$d,e)),s(),C(e.miniOpened?2:-1)}}function cf(i,n){if(i&1&&(r(0,"div",28)(1,"a",26),F1(2,18),l()()),i&2){let e=c().$implicit,t=c(2).menu;c();let o=S1(25);M(t.isActive?"collapse-show":"collapse-hide"),U("active",e.isActive),s(),d("routerLink",e.link),s(),d("ngTemplateOutlet",o)("ngTemplateOutletContext",I1(7,qn,e))}}function mf(i,n){if(i&1&&h(0,cf,3,9,"div",27),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function pf(i,n){if(i&1&&D(0,mf,1,1,null,null,K2),i&2){let e=c().menu;R(e.submenus)}}function df(i,n){if(i&1&&(r(0,"div",7)(1,"a",26),F1(2,18),l()(),h(3,pf,2,0)),i&2){let e=n.menu;c();let t=S1(25);U("active",e.isActive),s(),d("routerLink",e.link),s(),d("ngTemplateOutlet",t)("ngTemplateOutletContext",I1(6,qn,e)),s(),C(e.submenus!=null&&e.submenus.length?3:-1)}}function ff(i,n){if(i&1){let e=b();r(0,"a",29),_("click",function(o){g(e);let a=c().$implicit,p=c(2).mainMenu,u=c();return S(u.onMiniMenuNavigate(o,[a.link],p))}),F1(1,18),l()}if(i&2){let e=c().$implicit;c(3);let t=S1(25);U("active",e.isActive),s(),d("ngTemplateOutlet",t)("ngTemplateOutletContext",I1(4,qn,e))}}function uf(i,n){if(i&1&&h(0,ff,2,6,"a",30),i&2){let e=n.$implicit;C(e.hide?-1:0)}}function _f(i,n){if(i&1&&D(0,uf,1,1,null,null,K2),i&2){let e=c().menu;R(e.submenus)}}function hf(i,n){if(i&1){let e=b();r(0,"a",29),_("click",function(o){let a=g(e),p=a.mainMenu,u=a.menu,y=c();return S(y.onMiniMenuNavigate(o,[u.link],p))}),F1(1,18),l(),h(2,_f,2,0)}if(i&2){let e=n.menu;c();let t=S1(25);U("active",e.isActive),s(),d("ngTemplateOutlet",t)("ngTemplateOutletContext",I1(5,qn,e)),s(),C(e.submenus!=null&&e.submenus.length?2:-1)}}var k5=(()=>{let n=class n{constructor(){this.store=x(Y),this.icons={faAngleLeft:xi,faAngleRight:Ai,faUserSecret:Oi},this.logoIconUrl=Oo,this.leftSideBarIsOpen=!1,this.appsMenu=eo,this.router=x(i1),this.renderer=x(Ie),this.location=x(ai),this.authService=x(Ne),this.layout=x(L),this.userService=x(r1),this.subscriptions=[],this.menuAppsHovered=!1,this.menuIconsHovered=!1,this.menuAppsHoveredTimeout=null,this.menuIconsStopPropagation=!1,this.appName=Z4,this.appVersion=J4,this.appsMenu.submenus=[yo,Sr,_o,q4,to],Eo("number",this.appsMenu.submenus,"level",!0),this.subscriptions.push(this.store.user.pipe(J1(t=>!!t)).subscribe(()=>this.loadMenus())),this.subscriptions.push(this.layout.leftSideBarIsOpen.subscribe(t=>this.leftSideBarIsOpen=t)),this.subscriptions.push(this.router.events.pipe(J1(t=>t instanceof w0)).subscribe(t=>this.updateUrl(t.urlAfterRedirects)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}loadMenus(){this.userService.setMenusVisibility(this.appsMenu.submenus),this.updateUrl(this.router.url)}logOut(){this.authService.logout(!0)}navigateTo(t){t==="back"?this.location.back():this.location.forward()}toggleSideBar(){for(let t of this.appsMenu.submenus)t.miniOpened=!1;this.leftSideBarIsOpen&&this.renderer.removeStyle(this.sidebar.nativeElement,"z-index"),this.layout.toggleLSideBar()}checkMenuContext(t){!this.leftSideBarIsOpen&&this.layout.isSmallerScreen()&&t.submenus?.length?this.onHoverIconsMenu(!t.miniOpened,t):this.navigateToUrl([t.link])}onMiniMenuNavigate(t,o,a=null){t.stopPropagation(),this.navigateToUrl(o,a)}checkComponentRoute(t){this.currentMenu.link!==this.currentUrl&&this.router.navigate([this.currentMenu.link]).catch(console.error),t&&(t.miniOpened=!1)}onHoverAppsMenu(t){this.leftSideBarIsOpen&&(this.menuAppsHovered=t,t?this.menuAppsHoveredTimeout=setTimeout(()=>this.setActiveMenu(),5e3):(clearTimeout(this.menuAppsHoveredTimeout),this.checkHoveredMenu()))}onHoverIconsMenu(t,o,a=!1){if(!(this.leftSideBarIsOpen&&this.menuIconsStopPropagation))if((t&&o.submenus?.length||o.component)&&(this.currentMenu=o),this.leftSideBarIsOpen||a)this.menuIconsHovered=t,t?this.updateDynamicTitle(o.title):this.checkHoveredMenu();else{t?this.renderer.setStyle(this.sidebar.nativeElement,"z-index","1030"):this.renderer.removeStyle(this.sidebar.nativeElement,"z-index");for(let p of this.appsMenu.submenus.filter(u=>u.title!==o.title))p.miniOpened=!1;o.miniOpened=!!t}}checkHoveredMenu(){setTimeout(()=>{!this.menuIconsHovered&&!this.menuAppsHovered&&this.setActiveMenu()},50)}navigateToUrl(t,o=null){this.router.navigate(t).then(()=>{o&&o.miniOpened&&(o.miniOpened=!1)})}updateUrl(t){this.currentUrl=t.substring(1);for(let o of this.appsMenu.submenus)if(o.isActive=!!(!o.hide&&(o.link===this.currentUrl||o.matchLink&&o.matchLink.test(this.currentUrl))),o.isActive&&(this.currentMenu=o),o.submenus?.length){for(let a of o.submenus)if(a.isActive=o.isActive&&(a.link===this.currentUrl||!!a.matchLink&&a.matchLink.test(this.currentUrl)),a.submenus?.length)for(let p of a.submenus)p.isActive=this.currentUrl.startsWith(p.link)}this.currentMenu??=this.appsMenu.submenus[0],this.updateDynamicTitle(),this.menuIconsStopPropagation=!0,setTimeout(()=>this.menuIconsStopPropagation=!1,500)}setActiveMenu(){let t=this.appsMenu.submenus.find(o=>o.isActive);t&&(this.currentMenu=t,this.updateDynamicTitle(this.currentMenu.title))}updateDynamicTitle(t){this.dynamicTitle=this.layout.translateString(t!==void 0?t:this.currentMenu?this.currentMenu.title:this.appsMenu.title)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sidebar-left"]],viewQuery:function(o,a){if(o&1&&s1(Bd,7),o&2){let p;l1(p=c1())&&(a.sidebar=p.first)}},decls:32,vars:7,consts:[["sidebar",""],["MenuTemplate",""],["sidebarMenuIcons",""],["MenuApps",""],["MiniMenuApps",""],[1,"left-sidebar"],[1,"sidebar-apps-icons"],[1,"menu"],[3,"click","mouseenter","mouseleave"],[1,"logo-container"],["alt","",3,"src"],[1,"sidebar-apps-menus",3,"mouseenter","mouseleave"],[1,"menu-title",3,"mouseenter"],[1,"sidebar-title"],["role","button",1,"sidebar-btn",3,"click","icon"],[1,"menus-group"],["appAutoResize","",3,"resizeOffset"],[1,"sidebar-apps-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"icon"],["appAutoResize","",3,"click","resizeOffset"],[4,"ngComponentOutlet"],[3,"icon","animation"],["l10nTranslate",""],[3,"class"],[3,"mouseenter","mouseleave","click"],[3,"routerLink"],[1,"menu","submenu",3,"active","class"],[1,"menu","submenu"],[3,"click"],[3,"active"]],template:function(o,a){if(o&1){let p=b();r(0,"aside",5,0)(2,"div",6)(3,"div",7)(4,"a",8),_("click",function(){return g(p),S(a.toggleSideBar())})("mouseenter",function(){return g(p),S(a.onHoverIconsMenu(!0,{title:a.appName},!0))})("mouseleave",function(){return g(p),S(a.onHoverIconsMenu(!1,{title:a.appName},!0))}),r(5,"div",9),f(6,"img",10),l()(),D(7,qd,1,1,null,null,K2),h(9,Yd,2,1,"a"),l()(),r(10,"div",11),_("mouseenter",function(){return g(p),S(a.onHoverAppsMenu(!0))})("mouseleave",function(){return g(p),S(a.onHoverAppsMenu(!1))}),r(11,"div",12),_("mouseenter",function(){return g(p),S(a.onHoverAppsMenu(!1))}),r(12,"a")(13,"span",13),m(14),l(),r(15,"fa-icon",14),_("click",function(){return g(p),S(a.navigateTo("back"))}),l(),r(16,"fa-icon",14),_("click",function(){return g(p),S(a.navigateTo("next"))}),l()()(),r(17,"div",15),D(18,Kd,1,1,null,null,K2),h(20,Xd,2,2,"div",16),l(),r(21,"div",17)(22,"span"),m(23),l()()()(),V(24,tf,3,4,"ng-template",null,1,ue)(26,lf,3,9,"ng-template",null,2,ue)(28,df,4,8,"ng-template",null,3,ue)(30,hf,3,7,"ng-template",null,4,ue)}o&2&&(s(6),d("src",a.logoIconUrl,Q),s(),R(a.appsMenu.submenus),s(2),C(a.store.userImpersonate()?9:-1),s(5),v(a.dynamicTitle),s(),d("icon",a.icons.faAngleLeft),s(),d("icon",a.icons.faAngleRight),s(2),R(a.currentMenu.submenus),s(2),C(a.leftSideBarIsOpen&&a.currentMenu.component?20:-1),s(3),v(a.appVersion))},dependencies:[Yt,N,t1,F,ri,Wt,si],encapsulation:2});let i=n;return i})();var Cf=i=>({nb:i}),gf=(i,n)=>({nba:i,nb:n}),Sf=(i,n)=>n.id;function xf(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"translate"),l()),i&2){let e=c();s(),v(fe(2,1,e.nbTotalTasks===0?"no_task":e.nbTotalTasks>1?"nb_tasks":"one_task",e.locale.language,I1(5,Cf,e.nbTotalTasks)))}}function vf(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"translate"),l()),i&2){let e=c();s(),A("",fe(2,1,e.nbActiveTasks>1?"nb_active_tasks":"one_active_task",e.locale.language,xe(5,gf,e.nbActiveTasks,e.nbTotalTasks))," ")}}function yf(i,n){if(i&1){let e=b();r(0,"button",5),_("click",function(){g(e);let o=c();return S(o.removeTasks())}),f(1,"fa-icon",6),l()}if(i&2){let e=c();s(),d("icon",e.icons.faTrashAlt)}}function bf(i,n){i&1&&f(0,"div",1)}function Tf(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"translate"),l()),i&2){let e=c().$implicit,t=c();s(),A("\xA0:\xA0",z(2,1,e.result,t.locale.language))}}function wf(i,n){if(i&1&&(r(0,"span"),m(1),T(2,"toBytes"),l()),i&2){let e=c().$implicit;s(),A("",z(2,1,e.props.size,2),"\xA0\u2022\xA0")}}function zf(i,n){if(i&1&&(f(0,"fa-icon",6),r(1,"span"),m(2),l()),i&2){let e=c().$implicit,t=c();d("icon",t.icons.faFolderClosed),s(2),A("\xA0",e.props.directories,"\xA0\u2022\xA0")}}function Mf(i,n){if(i&1&&(f(0,"fa-icon",6),r(1,"span"),m(2),l()),i&2){let e=c().$implicit,t=c();d("icon",t.icons.faFile),s(2),A("\xA0",e.props.files,"\xA0\u2022\xA0")}}function Ef(i,n){if(i&1){let e=b();r(0,"div",4)(1,"div",7),T(2,"translate"),_("click",function(){let o=g(e).$implicit,a=c();return S(a.goToFile(o))}),r(3,"span"),f(4,"fa-icon",8),r(5,"b"),f(6,"fa-icon",9),l(),r(7,"span"),m(8),l(),h(9,Tf,3,4,"span"),l(),r(10,"div",10)(11,"progressbar",11)(12,"span",12),h(13,wf,3,4,"span"),h(14,zf,3,2),h(15,Mf,3,2),f(16,"fa-icon",6),r(17,"span"),m(18),T(19,"amTimeAgo"),l()()()()()()}if(i&2){let e=n.$implicit,t=c();s(),d("tooltip",z(2,18,e.result,t.locale.language)),s(2),U("text-gray-dark",e.status<2)("text-danger",e.status>=2),s(),d("icon",t.iconsStatus[e.status])("animation",e.status===0?"spin-pulse":null),s(2),d("icon",t.iconsOperation[e.type]),s(2),v(e.name),s(),C(e.status===2?9:-1),s(2),d("max",100)("value",e.status>0?100:e.props.progress||100)("type",e.status<1?"warning":e.status===2?"danger":null),s(2),C(e.props.size?13:-1),s(),C(e.props.directories?14:-1),s(),C(e.props.files?15:-1),s(),d("icon",t.icons.faClock),s(2),A("\xA0",z(19,21,e.startedAt,!0))}}var F5=(()=>{let n=class n{constructor(){this.locale=x(q),this.icons={faTrashAlt:pt,faFlag:A4,faClock:jo,faFile:Ko,faFolderClosed:ta},this.iconsStatus=[ae,Li,Q0],this.iconsOperation={[H1.DELETE]:Qo,[H1.MOVE]:dt,[H1.COPY]:Ti,[H1.DOWNLOAD]:t2,[H1.UPLOAD]:Y0,[H1.COMPRESS]:d3,[H1.DECOMPRESS]:d3},this.nbActiveTasks=0,this.nbEndedTasks=0,this.nbTotalTasks=0,this.tasks=[],this.router=x(i1),this.store=x(Y),this.filesService=x(E1),this.filesTasksService=x(nn),this.subscriptions=[],this.subscriptions.push(this.store.filesActiveTasks.subscribe(t=>this.updateTasks(t,!0))),this.subscriptions.push(this.store.filesEndedTasks.subscribe(t=>this.updateTasks(t,!1)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}updateTasks(t,o=!1){o?(this.tasks=[...t,...this.store.filesEndedTasks.getValue()],this.nbActiveTasks=t.length,this.nbEndedTasks=this.store.filesEndedTasks.getValue().length):(this.tasks=[...this.store.filesActiveTasks.getValue(),...t],this.nbEndedTasks=t.length,this.nbActiveTasks=this.store.filesActiveTasks.getValue().length),this.nbTotalTasks=this.nbActiveTasks+this.nbEndedTasks}removeTasks(){this.filesTasksService.removeAll()}goToFile(t){if(t.status===1){if(t.type===H1.COMPRESS&&t.props.compressInDirectory===!1){this.filesService.downloadTaskArchive(t.id);return}else if(t.type===H1.DELETE){if(t.path.startsWith(O.FILES))t.path=t.path.replace(O.FILES,O.TRASH);else if(t.path.startsWith(O.SHARES))return}this.router.navigate([`${O.SPACES}/${t.path}`],{queryParams:{select:t.name}}).catch(console.error)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-files-tasks"]],decls:10,vars:2,consts:[[1,"sidebar-component-title","justify-content-between"],[2,"width","35px"],[1,"btn","btn-xs","btn-secondary"],["appAutoResize",""],[1,"task-list"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["placement","bottom",1,"px-2","py-1","text-truncate",3,"click","tooltip"],[3,"icon","animation"],[1,"me-1",3,"icon"],[1,"fs-xxxs"],[1,"custom-progress-bar","position-relative",3,"max","value","type"],[1,"d-flex","align-items-center","justify-content-center","position-absolute","mx-1","w-100"]],template:function(o,a){if(o&1&&(r(0,"div",0),f(1,"div",1),r(2,"div"),h(3,xf,3,7,"span")(4,vf,3,8,"span"),l(),h(5,yf,2,1,"button",2)(6,bf,1,0,"div",1),l(),r(7,"div",3),D(8,Ef,20,24,"div",4,Sf),l()),o&2){let p;s(3),C((p=a.nbActiveTasks)===0?3:4),s(2),C(a.nbTotalTasks?5:6),s(3),R(a.tasks)}},dependencies:[N,t1,Zt,w1,zo,X,B1,ji],encapsulation:2});let i=n;return i})();var Pf=["notificationsHtml"],Af=(i,n)=>n.id;function Nf(i,n){if(i&1&&(r(0,"span",4),m(1),l()),i&2){let e=c();s(),A("(",e.store.notifications().length,")")}}function Lf(i,n){if(i&1){let e=b();r(0,"button",8),_("click",function(){g(e);let o=c();return S(o.removeAll())}),f(1,"fa-icon",9),l()}if(i&2){let e=c();s(),d("icon",e.icons.faTrashAlt)}}function kf(i,n){i&1&&f(0,"div",2)}function Ff(i,n){if(i&1&&(r(0,"b",3),m(1),l()),i&2){let e=c().$implicit;s(),v(e.fromUser.fullName)}}function Df(i,n){if(i&1&&(r(0,"b"),m(1),l()),i&2){let e=c().$implicit;s(),v(e.fromUser.fullName)}}function Rf(i,n){if(i&1&&(r(0,"span"),m(1),l()),i&2){let e=c().$implicit;s(),A("\xA0",e.mainElement)}}function If(i,n){if(i&1){let e=b();r(0,"div",10,0)(2,"div",11),f(3,"app-user-avatar",12),r(4,"div",13),h(5,Ff,2,1,"b",3)(6,Df,2,1,"b"),l(),r(7,"div",14)(8,"i",15),_("click",function(){let o=g(e).$implicit,a=c();return S(a.remove(o))}),f(9,"fa-icon",9),l()()(),r(10,"div",16)(11,"div")(12,"span",3),m(13),l(),m(14,":\xA0"),r(15,"b",17),_("click",function(){let o=g(e).$implicit,a=c();return S(a.goto(o))}),m(16),l()(),r(17,"div",18)(18,"div"),m(19),T(20,"amTimeAgo"),l(),r(21,"div",19),f(22,"fa-icon",9),h(23,Rf,2,1,"span"),l()()()()}if(i&2){let e=n.$implicit,t=c();U("newly-1",e.soonRead),s(3),d("user",e.fromUser)("width",24)("height",24)("unknownUserAsInfo",e.fromUser.id===-1),s(2),C(e.fromUser.id===-1?5:6),s(4),d("icon",t.icons.faTimes),s(4),v(e.content.event),s(3),v(e.content.element),s(),U("text-muted",!e.soonRead),s(2),v(J(20,15,e.createdAt)),s(3),d("icon",e.appIcon),s(),C(e.mainElement?23:-1)}}var D5=(()=>{let n=class n{constructor(){this.store=x(Y),this.icons={faCheck:Li,faTimes:Ve,faMagnifyingGlass:gi,faTrashAlt:pt,faCircleInfo:Vi},this.router=x(i1),this.layout=x(L),this.notificationsService=x(bo),Gt(()=>{this.store.unreadNotifications(),setTimeout(()=>this.observeUnreadNotifications(),0)})}ngAfterViewInit(){this.observer=new IntersectionObserver(t=>{t.forEach(o=>{if(o.isIntersecting){let a=o.target,p=this.notificationsHtml.toArray().findIndex(u=>u.nativeElement===a);if(p!==-1){let u=this.store.notifications()[p];u&&!u.wasRead&&(u.wasRead=!0,u.soonRead=!0,this.observer.unobserve(a),setTimeout(()=>this.wasRead(u),2e3))}}})},{threshold:.5})}removeAll(){this.notificationsService.deleteNotification().subscribe({next:()=>this.store.notifications.set([]),error:t=>this.layout.sendNotification("error","Notifications","Unable to delete",t)})}remove(t){this.notificationsService.deleteNotification(t.id).subscribe({next:()=>this.store.notifications.update(o=>o.filter(a=>t.id!==a.id)),error:o=>this.layout.sendNotification("error","Notifications","Unable to delete",o)})}goto(t){let o=t.content.app===go.SYNC?t.content.element.split("/").at(-1):t.content.element;this.router.navigate([O.SPACES,...t.content.url.split("/")],{queryParams:{select:o}}).catch(console.error)}observeUnreadNotifications(){this.notificationsHtml&&this.notificationsHtml.forEach((t,o)=>{let a=this.store.notifications()[o];a&&!a.wasRead&&this.observer.observe(t.nativeElement)})}wasRead(t){this.notificationsService.wasReadNotification(t.id).subscribe({next:()=>{this.store.notifications.update(o=>{let a=[...o],p=a.find(u=>u.id===t.id);return p&&(p.soonRead=!1,p.wasRead=!0),a})},error:o=>this.layout.sendNotification("error","Notifications","Mark as read",o)})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-notifications"]],viewQuery:function(o,a){if(o&1&&s1(Pf,5),o&2){let p;l1(p=c1())&&(a.notificationsHtml=p)}},decls:11,vars:2,consts:[["notificationsHtml",""],[1,"sidebar-component-title","justify-content-between"],[2,"width","35px"],["l10nTranslate",""],[1,"ps-1"],[1,"btn","btn-xs","btn-secondary"],["appAutoResize","",1,"fs-xxs","p-2"],[1,"mb-1","app-small-card","rounded","no-select",3,"newly-1"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],[1,"mb-1","app-small-card","rounded","no-select"],[1,"d-flex","px-2","pt-2","pb-1"],[3,"user","width","height","unknownUserAsInfo"],[1,"align-self-center","ms-1"],[1,"ms-auto","align-self-center",2,"font-size","14px"],["role","button",3,"click"],[1,"pb-2","px-2"],[1,"cursor-pointer","btn-link",3,"click"],[1,"d-flex","fs-xxxs","pt-1"],[1,"ms-auto"]],template:function(o,a){o&1&&(r(0,"div",1),f(1,"div",2),r(2,"span")(3,"span",3),m(4,"Notifications"),l(),h(5,Nf,2,1,"span",4),l(),h(6,Lf,2,1,"button",5)(7,kf,1,0,"div",2),l(),r(8,"div",6),D(9,If,24,17,"div",7,Af),l()),o&2&&(s(5),C(a.store.notifications().length?5:-1),s(),C(a.store.notifications().length?6:7),s(3),R(a.store.notifications()))},dependencies:[F,t1,N,ze,B1],encapsulation:2});let i=n;return i})();var Of=(i,n)=>n.id;function Vf(i,n){if(i&1&&(r(0,"div",3)(1,"div",4),f(2,"img",5)(3,"span"),r(4,"div",6)(5,"span",7),m(6),l(),r(7,"span",8),m(8),l()()()()),i&2){let e=n.$implicit,t=c();s(2),d("src",e.avatarUrl,Q),s(),M(I("avatar-",t.allOnlineStatus[e==null?null:e.onlineStatus])),s(3),v(e.fullName),s(2),v(e.email)}}var R5=(()=>{let n=class n{constructor(){this.allOnlineStatus=ht,this.store=x(Y),this.onlineUsers=N1(()=>this.store.onlineUsers().filter(t=>t.onlineStatus!==Bi.OFFLINE))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-onlines"]],decls:6,vars:0,consts:[[1,"sidebar-component-title"],["l10nTranslate",""],["appAutoResize",""],[1,"app-onlines-content"],[1,"d-flex","align-items-center","align-self-center","avatar"],["alt","",1,"avatar-img",3,"src"],[1,"d-flex","flex-column","ms-2"],["draggable","false",1,"no-pointer-events","fs-xs"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"span",1),m(2,"Online users"),l()(),r(3,"div",2),D(4,Vf,9,6,"div",3,Of),l()),o&2&&(s(4),R(a.onlineUsers()))},dependencies:[t1,F],encapsulation:2});let i=n;return i})();function Bf(i,n){if(i&1){let e=b();r(0,"button",22),_("click",function(){g(e);let o=c();return S(o.collapseRSideBar())}),f(1,"fa-icon",5),l()}if(i&2){let e=c();d("routerLink",e.USER_PATH.BASE),s(),d("icon",e.icons.faUserAlt)}}function Uf(i,n){if(i&1){let e=b();r(0,"button",23),_("click",function(){g(e);let o=c();return S(o.collapseRSideBar())}),f(1,"fa-icon",5),l()}if(i&2){let e=c();s(),d("icon",e.icons.faCog)}}function Hf(i,n){if(i&1){let e=b();r(0,"button",4),_("click",function(){g(e);let o=c();return S(o.logOut())}),f(1,"fa-icon",5),l()}if(i&2){let e=c();s(),d("icon",e.store.userImpersonate()?e.icons.faUserSecret:e.icons.faPowerOff)}}function $f(i,n){i&1&&(r(0,"div",13),m(1,"Guest Link"),l())}function Gf(i,n){if(i&1&&(r(0,"div"),m(1),l(),r(2,"div",24),m(3),l()),i&2){let e=c();s(),v(e.user==null?null:e.user.fullName),s(2),v(e.user==null?null:e.user.email)}}function Wf(i,n){if(i&1&&(r(0,"option",15),m(1),T(2,"translate"),T(3,"capitalize"),l()),i&2){let e=n.$implicit,t=c();d("ngValue",t.allOnlineStatus.indexOf(e)),s(),v(J(3,5,z(2,2,e,t.locale.language)))}}var I5=(()=>{let n=class n{constructor(){this.logoDarkUrl=Ji,this.logoUrl=Vo,this.store=x(Y),this.locale=x(q),this.USER_PATH=x1,this.allOnlineStatus=ht,this.appBaseUrl=`${F2.WEBSITE}`,this.icons={faUserAlt:ki,faCircleHalfStroke:a4,faCog:v4,faPowerOff:Z0,faUserSecret:Oi},this.userAvatar=null,this.layout=x(L),this.themeLight=r2,this.authService=x(Ne),this.userService=x(r1),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t)),this.appBaseUrl=this.layout.getCurrentLanguage()==="fr"?`${F2.WEBSITE}/fr/`:`${F2.WEBSITE}/`}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}collapseRSideBar(){this.layout.toggleRSideBar(!1)}setOnlineStatus(t){this.userService.changeOnlineStatus(t)}toggleTheme(){this.layout.toggleTheme()}logOut(){this.authService.logout(),this.layout.toggleRSideBar(!1)}openLink(t){switch(t){case"website":this.layout.openUrl(this.appBaseUrl);break;case"versions":this.layout.openUrl(F2.RELEASES);break;default:this.layout.openUrl(`${this.appBaseUrl}${t}`)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-user-profile"]],decls:39,vars:11,consts:[[1,"d-flex","flex-column","100vh"],[1,"sidebar-component-title"],[1,"d-flex","flex-fill","justify-content-between"],["type","button",1,"btn","btn-xs","btn-secondary",3,"routerLink"],["type","button",1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["type","button","routerLink","/admin",1,"btn","btn-xs","btn-secondary"],["type","button",1,"btn","btn-xs","btn-secondary"],[1,"user-header"],[1,"d-flex","flex-column","justify-content-center","me-2"],[1,"avatar-lg"],["alt","",1,"avatar-img",3,"src"],[1,"user-details"],["l10nTranslate",""],[1,"form-select","form-select-sm","mt-1",3,"ngModelChange","ngModel"],[3,"ngValue"],[1,"d-none","d-md-block","hide-on-small-height","position-absolute","w-100","fs-xs",2,"bottom","46px"],[1,"d-flex","flex-column","mx-3"],[1,"mb-1"],["alt","","height","26",3,"src"],["l10nTranslate","",1,"link-primary","cursor-pointer",3,"click"],[1,"link-primary","cursor-pointer",3,"click"],["type","button",1,"btn","btn-xs","btn-secondary",3,"click","routerLink"],["type","button","routerLink","/admin",1,"btn","btn-xs","btn-secondary",3,"click"],[1,"small"]],template:function(o,a){o&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),h(3,Bf,2,2,"button",3),r(4,"button",4),_("click",function(){return a.toggleTheme()}),f(5,"fa-icon",5),l(),h(6,Uf,2,1,"button",6),h(7,Hf,2,1,"button",7),l()(),r(8,"div",8)(9,"div",9)(10,"div",10),f(11,"img",11)(12,"span"),l()(),r(13,"div",12),h(14,$f,2,0,"div",13)(15,Gf,4,2),r(16,"select",14),_("ngModelChange",function(u){return a.setOnlineStatus(u)}),D(17,Wf,4,7,"option",15,A1),l()()(),r(19,"div",16),f(20,"hr"),r(21,"div",17)(22,"div",18),f(23,"img",19),l(),r(24,"div")(25,"a",20),_("click",function(){return a.openLink("website")}),m(26,"Website"),l(),r(27,"span"),m(28,"\xA0|\xA0"),l(),r(29,"a",20),_("click",function(){return a.openLink("docs")}),m(30,"Documentation"),l(),r(31,"span"),m(32,"\xA0|\xA0"),l(),r(33,"a",20),_("click",function(){return a.openLink("versions")}),m(34,"Versions"),l(),r(35,"span"),m(36,"\xA0|\xA0"),l(),r(37,"a",21),_("click",function(){return a.openLink("support")}),m(38," \u{1F49B}"),l()()()()()),o&2&&(s(3),C(a.user!=null&&a.user.isLink?-1:3),s(2),d("icon",a.icons.faCircleHalfStroke),s(),C(a.user!=null&&a.user.isAdmin?6:-1),s(),C(!a.store.isElectronApp()||a.store.isElectronApp()&&a.store.userImpersonate()?7:-1),s(4),d("src",a.userAvatar,Q),s(),M(I("avatar-",a.allOnlineStatus[a.user==null?null:a.user.onlineStatus])),s(2),C(a.user!=null&&a.user.isLink?14:15),s(2),d("ngModel",a.user==null?null:a.user.onlineStatus),s(),R(a.allOnlineStatus),s(6),d("src",a.layout.switchTheme.getValue()===a.themeLight?a.logoUrl:a.logoDarkUrl,Q))},dependencies:[g1,ie,ne,te,_1,C1,Yt,N,F,p2,X],styles:["@media (max-height: 300px){.hide-on-small-height[_ngcontent-%COMP%]{display:none!important}}"]});let i=n;return i})();var qf=(i,n)=>n.id;function Yf(i,n){if(i&1){let e=b();r(0,"button",5),_("click",function(){g(e);let o=c();return S(o.onCloseAll())}),f(1,"fa-icon",6),l()}if(i&2){let e=c();s(),d("icon",e.icons.faXmark)}}function jf(i,n){if(i&1){let e=b();r(0,"div",7),_("click",function(){let o=g(e).$implicit,a=c();return S(a.onMaximize(o))}),r(1,"div",8),f(2,"img",9),r(3,"div",10),m(4),l(),r(5,"button",11),_("click",function(o){let a=g(e).$implicit,p=c();return S(p.onClose(o,a))}),f(6,"fa-icon",6),l()()()}if(i&2){let e=n.$implicit,t=c();s(2),d("ngSrc",e.element.mimeUrl),s(2),v(e.element.name),s(2),d("icon",t.icons.faTimes)}}var O5=(()=>{let n=class n{constructor(){this.icons={faXmark:Fi,faTimes:Ve},this.windows=[],this.layout=x(L),this.subscription=null,this.subscription=this.layout.minimizedWindows.subscribe(t=>this.setWindows(t))}ngOnDestroy(){this.subscription.unsubscribe()}onMaximize(t){this.layout.restoreDialog(t.id)}onClose(t,o){t.preventDefault(),t.stopPropagation(),this.layout.closeDialog(null,o.id),this.layout.minimizedWindows.getValue().length||this.layout.toggleRSideBar(!1)}onCloseAll(){this.layout.closeDialog(null,null,!0),this.layout.minimizedWindows.next([]),this.layout.toggleRSideBar(!1)}setWindows(t){t.length||this.layout.hideRSideBarTab(y1.WINDOWS),this.windows=t}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-windows"]],decls:7,vars:1,consts:[[1,"sidebar-component-title"],[1,"btn","btn-sm","btn-secondary"],["l10nTranslate",""],["appAutoResize","",1,"sidebar-item"],[1,"sidebar-item-container"],[1,"btn","btn-sm","btn-secondary",3,"click"],[3,"icon"],[1,"sidebar-item-container",3,"click"],[1,"sidebar-item-content"],["alt","","width","28","height","28",3,"ngSrc"],[1,"text-truncate","fs-xxs","ms-2"],[1,"btn","btn-xs","btn-danger","ms-auto",3,"click"]],template:function(o,a){o&1&&(r(0,"div",0),h(1,Yf,2,1,"button",1),r(2,"span",2),m(3,"Windows Manager"),l()(),r(4,"div",3),D(5,jf,7,3,"div",4,qf),l()),o&2&&(s(),C(a.windows.length?1:-1),s(4),R(a.windows))},dependencies:[t1,N,F,li],encapsulation:2});let i=n;return i})();var V5=(i,n)=>n.label,Kf=(i,n)=>n.name;function Qf(i,n){if(i&1&&(r(0,"div",5)(1,"div",6),m(2),l()()),i&2){let e=c().$implicit;s(2),v(e.title)}}function Xf(i,n){i&1&&F1(0)}function Zf(i,n){if(i&1&&(r(0,"div",7),V(1,Xf,1,0,"ng-container",8),l()),i&2){let e=c().$implicit;s(),d("ngComponentOutlet",e)}}function Jf(i,n){if(i&1&&h(0,Zf,2,1,"div",7),i&2){let e=c(2).$implicit;C(e.active||e.loadComponent?0:-1)}}function eu(i,n){if(i&1&&D(0,Jf,1,1,null,null,Kf),i&2){let e=c().$implicit;R(e.components)}}function tu(i,n){if(i&1&&(r(0,"div"),h(1,Qf,3,1,"div",5),h(2,eu,2,0),l()),i&2){let e=n.$implicit,t=c();M(e.active?"d-block":"d-none"),s(),C(e.title?1:-1),s(),C(t.showComponents||e.loadComponent?2:-1)}}function iu(i,n){if(i&1&&(r(0,"a",4),f(1,"fa-icon",9),l()),i&2){let e=c();s(),d("icon",e.icons.faWifi)}}function nu(i,n){if(i&1&&(r(0,"span",13)(1,"span"),m(2),l()()),i&2){let e=c(2).$implicit;s(),M(I("badge bg-",e.count.level," rounded-pill")),s(),v(n)}}function ou(i,n){if(i&1){let e=b();r(0,"a",11),_("click",function(){g(e);let o=c().$implicit,a=c();return S(a.setTabVisible(o.label))}),f(1,"fa-icon",12),h(2,nu,3,4,"span",13),T(3,"async"),l()}if(i&2){let e,t=c().$implicit,o=c();U("mt-auto",t.firstOfLasts)("active",o.visible&&t.active),s(),d("icon",t.icon),s(),C((e=J(3,6,t.count&&t.count.value))?2:-1,e)}}function au(i,n){if(i&1&&(h(0,ou,4,8,"a",10),T(1,"async")),i&2){let e=n.$implicit;C(e.icon&&(!e.showOnCount||e.showOnCount&&e.count&&J(1,1,e.count.value))?0:-1)}}var B5=(()=>{let n=class n{constructor(){this.visible=!1,this.showComponents=!1,this.tabs=[],this.theme=r2,this.networkIsOnline=!0,this.icons={faWifi:B4},this.layout=x(L),this.store=x(Y),this.subscriptions=[],this.showDelay=null,this.currentMenu=null,this.firstsTabs=[{label:y1.PROFILE,components:[I5],icon:null,title:null,active:!1},{label:y1.ONLINES,components:[R5],icon:Xo,title:null,count:{value:Pt(N1(()=>this.store.onlineUsers().filter(t=>t.onlineStatus!==Bi.OFFLINE).length)),level:"success"},showOnCount:!0,active:!1},{label:y1.NOTIFICATIONS,components:[D5],icon:Yo,title:null,count:{value:Pt(N1(()=>this.store.unreadNotifications().length)),level:"warning"},active:!1},{label:y1.TASKS,components:[F5],icon:Jo,title:null,count:{value:J3([this.store.filesActiveTasks.pipe(de(t=>t.length)),this.store.clientSyncTasksCount]).pipe(de(([t,o])=>t+o)),level:"maroon"},active:!1}],this.lastsTabs=[{label:y1.WINDOWS,components:[O5],icon:ea,title:null,count:{value:this.layout.minimizedWindows.pipe(de(t=>t.length)),level:"maroon"},showOnCount:!0,firstOfLasts:!0,active:!1}],this.tabs=[...this.firstsTabs,...this.lastsTabs],this.subscriptions.push(this.layout.rightSideBarIsOpen.subscribe(t=>this.setVisible(t))),this.subscriptions.push(this.layout.rightSideBarSetTabs.subscribe(t=>this.setTabs(t))),this.subscriptions.push(this.layout.rightSideBarOpenAndShowTab.subscribe(t=>this.setTabVisible(t))),this.subscriptions.push(this.layout.rightSideBarSelectTab.subscribe(t=>this.selectTab(t))),this.subscriptions.push(this.layout.switchTheme.subscribe(t=>this.theme=t)),this.subscriptions.push(this.layout.networkIsOnline.subscribe(t=>this.networkIsOnline=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}setTabVisible(t){this.visible?t&&t!==this.layout.currentRightSideBarTab?this.selectTab(t):this.layout.toggleRSideBar(!1):(this.selectTab(t),this.layout.toggleRSideBar(!0))}setVisible(t){t?(clearTimeout(this.showDelay),this.showComponents=t):this.showDelay=setTimeout(()=>this.showComponents=t,500),this.visible=t}setTabs(t){t.name!==this.currentMenu&&(this.tabs=[...this.firstsTabs,...t.tabs?t.tabs:[],...this.lastsTabs],this.currentMenu=t.name,t.name===null&&!this.tabs.find(o=>o.active)&&this.layout.toggleRSideBar(!1))}selectTab(t){if(t){let o=!1;for(let a of this.tabs)a.active=a.label==t,a.active&&(o=!0,this.layout.currentRightSideBarTab=t);o||(this.tabs[0].active=!0)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-sidebar-right"]],decls:9,vars:6,consts:[[3,"class"],[1,"control-sidebar-menu"],[1,"sidebar-apps-icons"],[1,"menu"],[1,"bg-warning"],[1,"sidebar-title"],["l10nTranslate",""],[1,"sidebar-component-content"],[4,"ngComponentOutlet"],[1,"text-white",3,"icon"],[3,"mt-auto","active"],[3,"click"],[3,"icon"],[1,"menu-badge"]],template:function(o,a){o&1&&(r(0,"aside"),D(1,tu,3,4,"div",0,V5),l(),r(3,"div",1)(4,"div",2)(5,"div",3),h(6,iu,2,1,"a",4),D(7,au,2,3,null,null,V5),l()()()),o&2&&(M(I("control-sidebar control-sidebar-",a.theme)),U("control-sidebar-open",a.visible),s(),R(a.tabs),s(5),C(a.networkIsOnline?-1:6),s(),R(a.tabs))},dependencies:[N,F,ri,si],encapsulation:2});let i=n;return i})();var U5=(()=>{let n=class n{constructor(){this.themeMode=r2,this.document=x(ti),this.layout=x(L),this.renderer=x(Ie),this.rightSideBarClass="control-sidebar-open",this.leftSideBarCollapsedClass="sidebar-collapse",this.leftSideBarOpenedClass="sidebar-open",this.isSmallerThanMediumScreen=!1,this.subscriptions=[],this.subscriptions.push(this.layout.switchTheme.subscribe(t=>this.setTheme(t))),this.subscriptions.push(this.layout.toggleRightSideBar.subscribe(t=>this.toggleRightSideBar(t))),this.subscriptions.push(this.layout.toggleLeftSideBar.subscribe(t=>this.toggleLeftSideBar(t)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onResize(){this.layout.resizeEvent.next(),this.isSmallerThanMediumScreen!==this.layout.isSmallerMediumScreen()&&(this.isSmallerThanMediumScreen=!this.isSmallerThanMediumScreen,this.checkLeftSideBarCollapse())}toggleLeftSideBar(t){t===1?(this.openLeftSideBar(),this.layout.leftSideBarIsOpen.next(!0)):t===2?(this.collapseLeftSideBar(),this.layout.leftSideBarIsOpen.next(!1)):this.document.body.classList.contains(this.leftSideBarOpenedClass)?(this.collapseLeftSideBar(),this.layout.saveLeftSideBarIsOpen.next(!1),this.layout.leftSideBarIsOpen.next(!1)):(this.openLeftSideBar(),this.layout.saveLeftSideBarIsOpen.next(!0),this.layout.leftSideBarIsOpen.next(!0))}toggleRightSideBar(t){t?this.renderer.addClass(this.document.body,this.rightSideBarClass):this.renderer.removeClass(this.document.body,this.rightSideBarClass)}openLeftSideBar(){this.renderer.removeClass(this.document.body,this.leftSideBarCollapsedClass),this.renderer.addClass(this.document.body,this.leftSideBarOpenedClass)}collapseLeftSideBar(){this.renderer.removeClass(this.document.body,this.leftSideBarOpenedClass),this.renderer.addClass(this.document.body,this.leftSideBarCollapsedClass)}checkLeftSideBarCollapse(){this.isSmallerThanMediumScreen?this.toggleLeftSideBar(2):this.toggleLeftSideBar(this.layout.saveLeftSideBarIsOpen.getValue()?1:2)}setTheme(t){this.renderer.removeClass(this.document.body,this.themeMode),this.themeMode=t,this.renderer.addClass(this.document.body,this.themeMode)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=E({type:n,selectors:[["app-layout"]],hostBindings:function(o,a){o&1&&_("resize",function(){return a.onResize()},ni)},decls:8,vars:0,consts:[[1,"app-main"],[1,"wrapper"],[1,"content-wrapper"],[1,"content-container"]],template:function(o,a){o&1&&(r(0,"body",0)(1,"div",1),f(2,"app-navbar")(3,"app-sidebar-left"),r(4,"div",2)(5,"div",3),f(6,"router-outlet"),l()(),f(7,"app-sidebar-right"),l()())},dependencies:[qt,L5,k5,B5],encapsulation:2});let i=n;return i})();var H5=[{path:Ui.BASE,component:U5,canActivate:[W3],canActivateChild:[W3],children:[...gr,...vr,...Gr,...M5,...p5,...pr]},...A5,...fr,{path:"**",redirectTo:et.BASE}];var $5=(()=>{let n=class n{constructor(){this.injector=x(o0),this.auth=null,this.isRefreshingToken=!1,this.waitForRefreshToken=new X3(!1),this.retryCount=3,this.retryWaitMilliSeconds=2e3}intercept(t,o){let a=lo(t.url);return a&&(t=t.clone({url:a})),o.handle(t).pipe(X2(p=>p.status===401?this.handleAuthorizationError(t,o,p):p.status===0?this.handleRetries(t,o,p):$t(()=>p)))}handleAuthorizationError(t,o,a){return this.auth||(this.auth=this.injector.get(Ne)),console.debug("AuthInterceptor:",t.url,a.status),[N0,P0,A0].indexOf(t.url)===-1?this.isRefreshingToken?(console.debug("AuthInterceptor: wait for refresh token"),this.waitForRefreshToken.pipe(J1(p=>!p),M1(1),E2(()=>o.handle(this.auth.checkCSRF(t))))):(console.debug("AuthInterceptor: refreshing token"),this.isRefreshingToken=!0,this.waitForRefreshToken.next(!0),this.auth.refreshToken().pipe(E2(()=>(this.waitForRefreshToken.next(!1),o.handle(this.auth.checkCSRF(t)))),Z2(()=>this.isRefreshingToken=!1))):$t(()=>a)}handleRetries(t,o,a){return o.handle(t).pipe(i0(p=>p.pipe(e0((u,y)=>y<this.retryCount&&u.status==0?M2(u):$t(()=>u)),t0(this.retryWaitMilliSeconds))))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=W1({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function G5(){return Object.assign(new fi,{adaptivePosition:!1,triggers:"hover",delay:500})}var W5={url:"",options:{autoConnect:!1,reconnection:!0,forceNew:!1,transports:["websocket"]}};var q5={providers:[p0({eventCoalescing:!0}),{provide:f0,useClass:u0},{provide:v0,useClass:$5,multi:!0},M0(H5),y0(b0(),T0({cookieName:i3,headerName:i3})),O0(j4,P1({storage:K4,translationLoader:Q4},d0()?{missingTranslationHandler:X4}:{})),V0(),cr(),H0({positionClass:"toast-bottom-right",preventDuplicates:!1,timeOut:7e3}),{provide:fi,useFactory:G5},B0,n0(U0.forRoot(W5))]};g0(da,q5).catch(console.error);
|