@sync-in/server 1.7.0 → 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 +164 -58
- package/environment/environment.dist.yaml +6 -3
- 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 +2 -2
- package/server/authentication/auth.config.js.map +1 -1
- package/server/authentication/guards/auth-basic.strategy.js +2 -2
- package/server/authentication/guards/auth-basic.strategy.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-PTGDOWV3.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-DJYJ66UF.js → chunk-HAS5ZOTR.js} +1 -1
- package/static/chunk-HNQRZALS.js +1 -0
- package/static/chunk-JPT5WEAT.js +1 -0
- package/static/{chunk-QNJFQVYI.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-EVIE5F2U.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-SIPE37PA.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-3GFGJYMK.js +0 -1
- package/static/chunk-4YGJGZZZ.js +0 -1
- package/static/chunk-5K7HEX3C.js +0 -27
- package/static/chunk-5KLMS6A4.js +0 -1
- package/static/chunk-ATP3BFHV.js +0 -562
- package/static/chunk-BB4G55KE.js +0 -1
- package/static/chunk-EWKSX76T.js +0 -1
- package/static/chunk-FHLACA7V.js +0 -1
- package/static/chunk-GCATNU55.js +0 -1
- package/static/chunk-GYODPCIE.js +0 -1
- package/static/chunk-HZTFYLM5.js +0 -1
- package/static/chunk-JSUKJT6Z.js +0 -1
- package/static/chunk-JXZCNFW7.js +0 -1
- package/static/chunk-LTGFCQR7.js +0 -1
- package/static/chunk-LV3PYKWO.js +0 -1
- package/static/chunk-N2WFNW6M.js +0 -7
- package/static/chunk-ORMRCEGT.js +0 -1
- package/static/chunk-OUTBJSMW.js +0 -1
- package/static/chunk-RS2PX32L.js +0 -1
- package/static/chunk-RSSWH3S2.js +0 -1
- package/static/chunk-RTRJ3KFH.js +0 -1
- package/static/chunk-TKTCBDOG.js +0 -1
- package/static/chunk-V6K2N46L.js +0 -1
- package/static/chunk-XLCCZSQL.js +0 -4
- package/static/chunk-YPEH66GG.js +0 -1
- package/static/chunk-YPOIUQ57.js +0 -1
- package/static/chunk-ZKCFO2OA.js +0 -4
- package/static/main-MZ7HWZXO.js +0 -9
- package/static/scripts-VZVAP2P4.js +0 -30
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{a as Hr}from"./chunk-JSWCNGXJ.js";import{c as Mr,e as zr,f as Ir}from"./chunk-UEQCWMXD.js";import{a as Dr}from"./chunk-TPYBFZS5.js";import{a as Ar,b as Nr,c as Or,d as Tr,e as Pr,h as Lr}from"./chunk-X5XGK6T7.js";import{c as wr}from"./chunk-H6NE33VX.js";import{b as Fr,c as Ei,d as Vr,e as Mi}from"./chunk-V3AT2BKP.js";import{a as kr,d as Jt,g as Ot}from"./chunk-VKK5BSLX.js";import{a as xi,c as qe,d as Rr,h as ct,m as Nt}from"./chunk-3XVM35O2.js";import{d as Xn}from"./chunk-UJPPR4MX.js";import{m as Si,p as _i}from"./chunk-HNQRZALS.js";import{$a as on,Aa as mr,Ba as gr,Bb as xr,C as lt,Ca as vr,Ib as Ci,Ja as br,Jb as ee,Kb as Dt,Ma as Mt,Oa as wt,Pa as yr,kb as Cr,m as tr,mb as Ue,nb as At,ob as le,pb as $e,rb as Sr,ya as hr,yb as H,zb as _r}from"./chunk-GUGNR5TF.js";import{$ as Gn,$a as y,$b as ot,Ab as I,B as T,Bb as ke,Bc as Yn,C as Gt,Cc as je,Cd as er,Db as b,Dd as ye,Eb as qn,Fb as f,Fc as at,Gb as Wt,Gf as dr,Ha as ze,Hb as Kt,Hd as ir,Ia as $n,Ib as rt,If as ur,Jb as Me,Jc as be,Je as or,Kb as J,L as vt,Lb as Z,Ma as Ji,Mb as Yt,Na as l,Nb as j,Ob as V,Pa as P,Pb as Fe,Pc as Qt,Qa as Ut,Qb as p,Rb as R,Rc as Ge,Re as ar,Rf as fr,Sa as Zi,Sb as re,Ub as Re,Va as bt,Vb as Ve,Wa as me,Wb as He,Wf as pr,X as jn,Xa as en,Xc as gi,Yb as Be,Yc as Qn,Zc as Jn,_b as st,_c as vi,_e as lr,ab as ge,ac as yt,bb as Ee,bf as yi,c as Hn,ca as Un,cb as tn,cc as Wn,cd as St,da as Q,dc as hi,dg as Ce,ea as he,eb as L,ec as ve,f as Bt,fc as mi,fg as Er,gc as Ct,hd as _t,ia as h,ic as Xt,kb as M,ke as nr,kf as cr,lb as w,na as S,oa as _,ob as nn,pb as rn,pe as rr,qb as u,rb as c,rd as bi,sb as d,sc as sn,se as sr,tb as m,tc as Kn,u as Qi,ub as $t,v as jt,vb as qt,vd as xt,w as Bn,wa as tt,wb as pi,wd as Zn,xb as it,xd as Et,yb as nt,za as ae,zb as Ie}from"./chunk-C36MW4ME.js";import{a as oe,b as Ze,j as et}from"./chunk-N3U6637P.js";var _l={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Co={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},xl=Co;var El={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var wi={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var Ml={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var wl={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var Al={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var Dl={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var Nl={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var Ol={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var Br={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var jr=(()=>{let e=class e{transform(t,n=0,s=void 0){return wt(t,n,s)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=tn({name:"pathSlice",type:e,pure:!0});let i=e;return i})();var dn=function(i,e){return dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])},dn(i,e)};function Zr(i,e){dn(i,e);function r(){this.constructor=i}i.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var te=function(){return te=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},te.apply(this,arguments)};function es(i,e){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var t=r.call(i),n,s=[],o;try{for(;(e===void 0||e-- >0)&&!(n=t.next()).done;)s.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(r=t.return)&&r.call(t)}finally{if(o)throw o.error}}return s}function un(){for(var i=[],e=0;e<arguments.length;e++)i=i.concat(es(arguments[e]));return i}var So="An invariant failed, however the error is obfuscated because this is an production build.",Ni=[];Object.freeze(Ni);var vn={};Object.freeze(vn);var _o={};function fn(){return typeof window<"u"?window:typeof global<"u"?global:_o}function ie(){return++v.mobxGuid}function F(i){throw ei(!1,i),"X"}function ei(i,e){if(!i)throw new Error("[mobx] "+(e||So))}var Gr=[];function De(i,e){return!1}function bn(i){var e=!1;return function(){if(!e)return e=!0,i.apply(this,arguments)}}var Ur=function(){};function xo(i){var e=[];return i.forEach(function(r){e.indexOf(r)===-1&&e.push(r)}),e}function yn(i){return i!==null&&typeof i=="object"}function zt(i){if(i===null||typeof i!="object")return!1;var e=Object.getPrototypeOf(i);return e===Object.prototype||e===null}function Eo(i){return It(i)||mt(i)?i:Array.isArray(i)?new Map(i):zt(i)?new Map(Object.entries(i)):F("Cannot convert to map from '"+i+"'")}function Mo(i,e){for(var r=0;r<e.length;r++)pt(i,e[r],i[e[r]])}function pt(i,e,r){Object.defineProperty(i,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function ri(i,e,r){Object.defineProperty(i,e,{enumerable:!1,writable:!1,configurable:!0,value:r})}function Xe(i,e){var r="isMobX"+i;return e.prototype[r]=!0,function(t){return yn(t)&&t[r]===!0}}function wo(i,e){return typeof i=="number"&&typeof e=="number"&&isNaN(i)&&isNaN(e)}function It(i){return fn().Map!==void 0&&i instanceof fn().Map}function si(i){return i instanceof Set}function Pt(i){for(var e=[];;){var r=i.next();if(r.done)break;e.push(r.value)}return e}function ts(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function is(i){return i===null?null:typeof i=="object"?""+i:i}function Cn(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Sn(i,e){ri(i,Cn(),e)}function ti(i){return i[Cn()]=Ao,i}function _n(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function Ao(){return this}var Ii=(function(){function i(e){e===void 0&&(e="Atom@"+ie()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=O.NOT_TRACKING}return i.prototype.onBecomeUnobserved=function(){},i.prototype.onBecomeObserved=function(){},i.prototype.reportObserved=function(){return gs(this)},i.prototype.reportChanged=function(){Ne(),Xo(this),Oe()},i.prototype.toString=function(){return this.name},i})(),xn=Xe("Atom",Ii);function Do(i,e,r){e===void 0&&(e=Ur),r===void 0&&(r=Ur);var t=new Ii(i);return la(t,e),Ss(t,r),t}function ns(i,e){return i===e}function No(i,e){return An(i,e)}function Oo(i,e){return An(i,e,1)}function To(i,e){return wo(i,e)||ns(i,e)}var Lt={identity:ns,structural:No,default:To,shallow:Oo},Po={},Lo={};function zo(i,e){var r=e?Po:Lo;return r[i]||(r[i]={configurable:!0,enumerable:e,get:function(){return ut(this),this[i]},set:function(t){ut(this),this[i]=t}})}function ut(i){if(i.__mobxDidRunLazyInitializers!==!0){var e=i.__mobxDecorators;if(e){pt(i,"__mobxDidRunLazyInitializers",!0);for(var r in e){var t=e[r];t.propertyCreator(i,t.prop,t.descriptor,t.decoratorTarget,t.decoratorArguments)}}}}function rs(i,e){return function(){var t,n=function(o,a,g,C){if(C===!0)return e(o,a,g,o,t),null;if(!Object.prototype.hasOwnProperty.call(o,"__mobxDecorators")){var k=o.__mobxDecorators;pt(o,"__mobxDecorators",te({},k))}return o.__mobxDecorators[a]={prop:a,propertyCreator:e,descriptor:g,decoratorTarget:o,decoratorArguments:t},zo(a,i)};return Io(arguments)?(t=Ni,n.apply(null,arguments)):(t=Array.prototype.slice.call(arguments),n)}}function Io(i){return(i.length===2||i.length===3)&&typeof i[1]=="string"||i.length===4&&i[3]===!0}function oi(i,e,r){return Es(i)?i:Array.isArray(i)?A.array(i,{name:r}):zt(i)?A.object(i,void 0,{name:r}):It(i)?A.map(i,{name:r}):si(i)?A.set(i,{name:r}):i}function ko(i,e,r){return i==null||ni(i)||Vi(i)||mt(i)||Ft(i)?i:Array.isArray(i)?A.array(i,{name:r,deep:!1}):zt(i)?A.object(i,void 0,{name:r,deep:!1}):It(i)?A.map(i,{name:r,deep:!1}):si(i)?A.set(i,{name:r,deep:!1}):F(!1)}function ii(i){return i}function Fo(i,e,r){return An(i,e)?e:i}function ki(i){var e=rs(!0,function(t,n,s,o,a){var g=s?s.initializer?s.initializer.call(t):s.value:void 0;_a(t,n,g,i)}),r=(typeof process<"u"&&process.env,e);return r.enhancer=i,r}var ss={deep:!0,name:void 0,defaultDecorator:void 0},Ro={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(ss);Object.freeze(Ro);function Tt(i){return i==null?ss:typeof i=="string"?{name:i,deep:!0}:i}function Ai(i){return i.defaultDecorator?i.defaultDecorator.enhancer:i.deep===!1?ii:oi}var En=ki(oi),Vo=ki(ko),os=ki(ii),Ho=ki(Fo);function Bo(i,e,r){if(typeof arguments[1]=="string")return En.apply(null,arguments);if(Es(i))return i;var t=zt(i)?A.object(i,e,r):Array.isArray(i)?A.array(i,e):It(i)?A.map(i,e):si(i)?A.set(i,e):i;if(t!==i)return t;F(!1)}var $r={box:function(i,e){arguments.length>2&&we("box");var r=Tt(e);return new Ke(i,Ai(r),r.name,!0,r.equals)},shallowBox:function(i,e){return arguments.length>2&&we("shallowBox"),De("observable.shallowBox","observable.box(value, { deep: false })"),A.box(i,{name:e,deep:!1})},array:function(i,e){arguments.length>2&&we("array");var r=Tt(e);return new Pe(i,Ai(r),r.name)},shallowArray:function(i,e){return arguments.length>2&&we("shallowArray"),De("observable.shallowArray","observable.array(values, { deep: false })"),A.array(i,{name:e,deep:!1})},map:function(i,e){arguments.length>2&&we("map");var r=Tt(e);return new Hi(i,Ai(r),r.name)},shallowMap:function(i,e){return arguments.length>2&&we("shallowMap"),De("observable.shallowMap","observable.map(values, { deep: false })"),A.map(i,{name:e,deep:!1})},set:function(i,e){arguments.length>2&&we("set");var r=Tt(e);return new Bi(i,Ai(r),r.name)},object:function(i,e,r){typeof arguments[1]=="string"&&we("object");var t=Tt(r);return ca({},i,e,t)},shallowObject:function(i,e){return typeof arguments[1]=="string"&&we("shallowObject"),De("observable.shallowObject","observable.object(values, {}, { deep: false })"),A.object(i,{},{name:e,deep:!1})},ref:os,shallow:Vo,deep:En,struct:Ho},A=Bo;Object.keys($r).forEach(function(i){return A[i]=$r[i]});function we(i){F("Expected one or two arguments to observable."+i+". Did you accidentally try to use observable."+i+" as decorator?")}var Oi=rs(!1,function(i,e,r,t,n){var s=r.get,o=r.set,a=n[0]||{};xa(i,e,te({get:s,set:o},a))}),jo=Oi({equals:Lt.structural}),U=function(e,r,t){if(typeof r=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return Oi.apply(null,arguments);var n=typeof r=="object"?r:{};return n.get=e,n.set=typeof r=="function"?r:n.set,n.name=n.name||e.name||"",new Ye(n)};U.struct=jo;var O=(function(i){return i[i.NOT_TRACKING=-1]="NOT_TRACKING",i[i.UP_TO_DATE=0]="UP_TO_DATE",i[i.POSSIBLY_STALE=1]="POSSIBLY_STALE",i[i.STALE=2]="STALE",i})(O||{}),Se=(function(i){return i[i.NONE=0]="NONE",i[i.LOG=1]="LOG",i[i.BREAK=2]="BREAK",i})(Se||{}),Ti=(function(){function i(e){this.cause=e}return i})();function Zt(i){return i instanceof Ti}function pn(i){switch(i.dependenciesState){case O.UP_TO_DATE:return!1;case O.NOT_TRACKING:case O.STALE:return!0;case O.POSSIBLY_STALE:{for(var e=kt(),r=i.observing,t=r.length,n=0;n<t;n++){var s=r[n];if(Ri(s)){if(v.disableErrorBoundaries)s.get();else try{s.get()}catch{return We(e),!0}if(i.dependenciesState===O.STALE)return We(e),!0}}return us(i),We(e),!1}}}function Fi(i){var e=i.observers.length>0;v.computationDepth>0&&e&&F(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&F(!1)}function as(i,e,r){var t=cs(!0);us(i),i.newObserving=new Array(i.observing.length+100),i.unboundDepsCount=0,i.runId=++v.runId;var n=v.trackingDerivation;v.trackingDerivation=i;var s;if(v.disableErrorBoundaries===!0)s=e.call(r);else try{s=e.call(r)}catch(o){s=new Ti(o)}return v.trackingDerivation=n,Go(i),i.observing.length===0&&void 0,ds(t),s}function Go(i){for(var e=i.observing,r=i.observing=i.newObserving,t=O.UP_TO_DATE,n=0,s=i.unboundDepsCount,o=0;o<s;o++){var a=r[o];a.diffValue===0&&(a.diffValue=1,n!==o&&(r[n]=a),n++),a.dependenciesState>t&&(t=a.dependenciesState)}for(r.length=n,i.newObserving=null,s=e.length;s--;){var a=e[s];a.diffValue===0&&hs(a,i),a.diffValue=0}for(;n--;){var a=r[n];a.diffValue===1&&(a.diffValue=0,Yo(a,i))}t!==O.UP_TO_DATE&&(i.dependenciesState=t,i.onBecomeStale())}function hn(i){var e=i.observing;i.observing=[];for(var r=e.length;r--;)hs(e[r],i);i.dependenciesState=O.NOT_TRACKING}function ls(i){var e=kt(),r=i();return We(e),r}function kt(){var i=v.trackingDerivation;return v.trackingDerivation=null,i}function We(i){v.trackingDerivation=i}function cs(i){var e=v.allowStateReads;return v.allowStateReads=i,e}function ds(i){v.allowStateReads=i}function us(i){if(i.dependenciesState!==O.UP_TO_DATE){i.dependenciesState=O.UP_TO_DATE;for(var e=i.observing,r=e.length;r--;)e[r].lowestObserverState=O.UP_TO_DATE}}var Pi=0,Uo=1;function dt(i,e){var r=function(){return $o(i,e,this,arguments)};return r.isMobxAction=!0,r}function $o(i,e,r,t){var n=qo(i,r,t);try{return e.apply(r,t)}catch(s){throw n.error=s,s}finally{Wo(n)}}function qo(i,e,r){var t=K()&&!!i,n=0;if(t){n=Date.now();var s=r&&r.length||0,o=new Array(s);if(s>0)for(var a=0;a<s;a++)o[a]=r[a];ce({type:"action",name:i,object:e,arguments:o})}var g=kt();Ne();var C=fs(!0),k=cs(!0),ne={prevDerivation:g,prevAllowStateChanges:C,prevAllowStateReads:k,notifySpy:t,startTime:n,actionId:Uo++,parentActionId:Pi};return Pi=ne.actionId,ne}function Wo(i){Pi!==i.actionId&&F("invalid action stack. did you forget to finish an action?"),Pi=i.parentActionId,i.error!==void 0&&(v.suppressReactionErrors=!0),ps(i.prevAllowStateChanges),ds(i.prevAllowStateReads),Oe(),We(i.prevDerivation),i.notifySpy&&de({time:Date.now()-i.startTime}),v.suppressReactionErrors=!1}function fs(i){var e=v.allowStateChanges;return v.allowStateChanges=i,e}function ps(i){v.allowStateChanges=i}var Ke=(function(i){Zr(e,i);function e(r,t,n,s,o){n===void 0&&(n="ObservableValue@"+ie()),s===void 0&&(s=!0),o===void 0&&(o=Lt.default);var a=i.call(this,n)||this;return a.enhancer=t,a.name=n,a.equals=o,a.hasUnreportedChange=!1,a.value=t(r,void 0,n),s&&K()&&ft({type:"create",name:a.name,newValue:""+a.value}),a}return e.prototype.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},e.prototype.set=function(r){var t=this.value;if(r=this.prepareNewValue(r),r!==v.UNCHANGED){var n=K();n&&ce({type:"update",name:this.name,newValue:r,oldValue:t}),this.setNewValue(r),n&&de()}},e.prototype.prepareNewValue=function(r){if(Fi(this),_e(this)){var t=xe(this,{object:this,type:"update",newValue:r});if(!t)return v.UNCHANGED;r=t.newValue}return r=this.enhancer(r,this.value,this.name),this.equals(this.value,r)?v.UNCHANGED:r},e.prototype.setNewValue=function(r){var t=this.value;this.value=r,this.reportChanged(),ue(this)&&fe(this,{type:"update",object:this,newValue:r,oldValue:t})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(r){return li(this,r)},e.prototype.observe=function(r,t){return t&&r({object:this,type:"update",newValue:this.value,oldValue:void 0}),ci(this,r)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return is(this.get())},e})(Ii);Ke.prototype[ts()]=Ke.prototype.valueOf;var zl=Xe("ObservableValue",Ke),Ye=(function(){function i(e){this.dependenciesState=O.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=O.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ie(),this.value=new Ti(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Se.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+ie(),e.set&&(this.setter=dt(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?Lt.structural:Lt.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return i.prototype.onBecomeStale=function(){Jo(this)},i.prototype.onBecomeUnobserved=function(){},i.prototype.onBecomeObserved=function(){},i.prototype.get=function(){this.isComputing&&F("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?pn(this)&&(this.warnAboutUntrackedRead(),Ne(),this.value=this.computeValue(!1),Oe()):(gs(this),pn(this)&&this.trackAndCompute()&&Qo(this));var e=this.value;if(Zt(e))throw e.cause;return e},i.prototype.peek=function(){var e=this.computeValue(!1);if(Zt(e))throw e.cause;return e},i.prototype.set=function(e){if(this.setter){ei(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else ei(!1,!1)},i.prototype.trackAndCompute=function(){K()&&ft({object:this.scope,type:"compute",name:this.name});var e=this.value,r=this.dependenciesState===O.NOT_TRACKING,t=this.computeValue(!0),n=r||Zt(e)||Zt(t)||!this.equals(e,t);return n&&(this.value=t),n},i.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var r;if(e)r=as(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)r=this.derivation.call(this.scope);else try{r=this.derivation.call(this.scope)}catch(t){r=new Ti(t)}return v.computationDepth--,this.isComputing=!1,r},i.prototype.suspend=function(){this.keepAlive||(hn(this),this.value=void 0)},i.prototype.observe=function(e,r){var t=this,n=!0,s=void 0;return ai(function(){var o=t.get();if(!n||r){var a=kt();e({type:"update",object:t,newValue:o,oldValue:s}),We(a)}n=!1,s=o})},i.prototype.warnAboutUntrackedRead=function(){},i.prototype.toJSON=function(){return this.get()},i.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},i.prototype.valueOf=function(){return is(this.get())},i})();Ye.prototype[ts()]=Ye.prototype.valueOf;var Ri=Xe("ComputedValue",Ye);var an=(function(){function i(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return i})(),ln=!0,Ko=!1,v=(function(){var i=fn();return i.__mobxInstanceCount>0&&!i.__mobxGlobals&&(ln=!1),i.__mobxGlobals&&i.__mobxGlobals.version!==new an().version&&(ln=!1),ln?i.__mobxGlobals?(i.__mobxInstanceCount+=1,i.__mobxGlobals.UNCHANGED||(i.__mobxGlobals.UNCHANGED={}),i.__mobxGlobals):(i.__mobxInstanceCount=1,i.__mobxGlobals=new an):(setTimeout(function(){Ko||F("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new an)})();function Yo(i,e){var r=i.observers.length;r&&(i.observersIndexes[e.__mapid]=r),i.observers[r]=e,i.lowestObserverState>e.dependenciesState&&(i.lowestObserverState=e.dependenciesState)}function hs(i,e){if(i.observers.length===1)i.observers.length=0,ms(i);else{var r=i.observers,t=i.observersIndexes,n=r.pop();if(n!==e){var s=t[e.__mapid]||0;s?t[n.__mapid]=s:delete t[n.__mapid],r[s]=n}delete t[e.__mapid]}}function ms(i){i.isPendingUnobservation===!1&&(i.isPendingUnobservation=!0,v.pendingUnobservations.push(i))}function Ne(){v.inBatch++}function Oe(){if(--v.inBatch===0){ys();for(var i=v.pendingUnobservations,e=0;e<i.length;e++){var r=i[e];r.isPendingUnobservation=!1,r.observers.length===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof Ye&&r.suspend())}v.pendingUnobservations=[]}}function gs(i){var e=v.trackingDerivation;return e!==null?(e.runId!==i.lastAccessedBy&&(i.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=i,i.isBeingObserved||(i.isBeingObserved=!0,i.onBecomeObserved())),!0):(i.observers.length===0&&v.inBatch>0&&ms(i),!1)}function Xo(i){if(i.lowestObserverState!==O.STALE){i.lowestObserverState=O.STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.UP_TO_DATE&&(t.isTracing!==Se.NONE&&vs(t,i),t.onBecomeStale()),t.dependenciesState=O.STALE}}}function Qo(i){if(i.lowestObserverState!==O.STALE){i.lowestObserverState=O.STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.POSSIBLY_STALE?t.dependenciesState=O.STALE:t.dependenciesState===O.UP_TO_DATE&&(i.lowestObserverState=O.UP_TO_DATE)}}}function Jo(i){if(i.lowestObserverState===O.UP_TO_DATE){i.lowestObserverState=O.POSSIBLY_STALE;for(var e=i.observers,r=e.length;r--;){var t=e[r];t.dependenciesState===O.UP_TO_DATE&&(t.dependenciesState=O.POSSIBLY_STALE,t.isTracing!==Se.NONE&&vs(t,i),t.onBecomeStale())}}}function vs(i,e){if(console.log("[mobx.trace] '"+i.name+"' is invalidated due to a change in: '"+e.name+"'"),i.isTracing===Se.BREAK){var r=[];bs(da(i),r,1),new Function(`debugger;
|
|
2
|
+
/*
|
|
3
|
+
Tracing '`+i.name+`'
|
|
4
|
+
|
|
5
|
+
You are entering this break point because derivation '`+i.name+"' is being traced and '"+e.name+`' is now forcing it to update.
|
|
6
|
+
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|
7
|
+
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|
8
|
+
|
|
9
|
+
`+(i instanceof Ye?i.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|
10
|
+
|
|
11
|
+
The dependencies for this derivation are:
|
|
12
|
+
|
|
13
|
+
`+r.join(`
|
|
14
|
+
`)+`
|
|
15
|
+
*/
|
|
16
|
+
`)()}}function bs(i,e,r){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(r).join(" ")+i.name),i.dependencies&&i.dependencies.forEach(function(t){return bs(t,e,r+1)})}var Li=(function(){function i(e,r,t,n){e===void 0&&(e="Reaction@"+ie()),n===void 0&&(n=!1),this.name=e,this.onInvalidate=r,this.errorHandler=t,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=O.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+ie(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Se.NONE}return i.prototype.onBecomeStale=function(){this.schedule()},i.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,v.pendingReactions.push(this),ys())},i.prototype.isScheduled=function(){return this._isScheduled},i.prototype.runReaction=function(){if(!this.isDisposed){if(Ne(),this._isScheduled=!1,pn(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&K()&&ft({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}Oe()}},i.prototype.track=function(e){Ne();var r=K(),t;r&&(t=Date.now(),ce({name:this.name,type:"reaction"})),this._isRunning=!0;var n=as(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&hn(this),Zt(n)&&this.reportExceptionInDerivation(n.cause),r&&de({time:Date.now()-t}),Oe()},i.prototype.reportExceptionInDerivation=function(e){var r=this;if(this.errorHandler){this.errorHandler(e,this);return}if(v.disableErrorBoundaries)throw e;var t="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";v.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(t,e),K()&&ft({type:"error",name:this.name,message:t,error:""+e}),v.globalReactionErrorHandlers.forEach(function(n){return n(e,r)})},i.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ne(),hn(this),Oe()))},i.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},i.prototype.toString=function(){return"Reaction["+this.name+"]"},i.prototype.trace=function(e){e===void 0&&(e=!1),fa(this,e)},i})();var qr=100,Zo=function(i){return i()};function ys(){v.inBatch>0||v.isRunningReactions||Zo(ea)}function ea(){v.isRunningReactions=!0;for(var i=v.pendingReactions,e=0;i.length>0;){++e===qr&&(console.error("Reaction doesn't converge to a stable state after "+qr+" iterations."+(" Probably there is a cycle in the reactive function: "+i[0])),i.splice(0));for(var r=i.splice(0),t=0,n=r.length;t<n;t++)r[t].runReaction()}v.isRunningReactions=!1}var zi=Xe("Reaction",Li);function K(){return!!v.spyListeners.length}function ft(i){if(v.spyListeners.length)for(var e=v.spyListeners,r=0,t=e.length;r<t;r++)e[r](i)}function ce(i){var e=te({},i,{spyReportStart:!0});ft(e)}var ta={spyReportEnd:!0};function de(i){ft(i?te({},i,{spyReportEnd:!0}):ta)}function ia(i){return v.spyListeners.push(i),bn(function(){v.spyListeners=v.spyListeners.filter(function(e){return e!==i})})}function na(){F(!1)}function Wr(i){return function(e,r,t){if(t){if(t.value)return{value:dt(i,t.value),enumerable:!1,configurable:!0,writable:!0};var n=t.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return dt(i,n.call(this))}}}return ra(i).apply(this,arguments)}}function ra(i){return function(e,r,t){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(n){pt(this,r,D(i,n))}})}}function sa(i,e,r,t){return t===!0?(cn(i,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return cn(this,e,r.value||r.initializer.call(this)),this[e]},set:na}:{enumerable:!1,configurable:!0,set:function(n){cn(this,e,n)},get:function(){}}}var D=function(e,r,t,n){if(arguments.length===1&&typeof e=="function")return dt(e.name||"<unnamed action>",e);if(arguments.length===2&&typeof r=="function")return dt(e,r);if(arguments.length===1&&typeof e=="string")return Wr(e);if(n===!0)e[r]=dt(e.name||r,t.value);else return Wr(r).apply(null,arguments)};D.bound=sa;function cn(i,e,r){pt(i,e,dt(e,r.bind(i)))}function ai(i,e){e===void 0&&(e=vn);var r=e&&e.name||i.name||"Autorun@"+ie(),t=!e.scheduler&&!e.delay,n;if(t)n=new Li(r,function(){this.track(a)},e.onError,e.requiresObservable);else{var s=Cs(e),o=!1;n=new Li(r,function(){o||(o=!0,s(function(){o=!1,n.isDisposed||n.track(a)}))},e.onError,e.requiresObservable)}function a(){i(n)}return n.schedule(),n.getDisposer()}var oa=function(i){return i()};function Cs(i){return i.scheduler?i.scheduler:i.delay?function(e){return setTimeout(e,i.delay)}:oa}function ht(i,e,r){r===void 0&&(r=vn),typeof r=="boolean"&&(r={fireImmediately:r},De("Using fireImmediately as argument is deprecated. Use '{ fireImmediately: true }' instead"));var t=r.name||"Reaction@"+ie(),n=D(t,r.onError?aa(r.onError,e):e),s=!r.scheduler&&!r.delay,o=Cs(r),a=!0,g=!1,C,k=r.compareStructural?Lt.structural:r.equals||Lt.default,ne=new Li(t,function(){a||s?Je():g||(g=!0,o(Je))},r.onError,r.requiresObservable);function Je(){if(g=!1,!ne.isDisposed){var Rn=!1;ne.track(function(){var Vn=i(ne);Rn=a||!k(C,Vn),C=Vn}),a&&r.fireImmediately&&n(C,ne),!a&&Rn===!0&&n(C,ne),a&&(a=!1)}}return ne.schedule(),ne.getDisposer()}function aa(i,e){return function(){try{return e.apply(this,arguments)}catch(r){i.call(this,r)}}}function la(i,e,r){return _s("onBecomeObserved",i,e,r)}function Ss(i,e,r){return _s("onBecomeUnobserved",i,e,r)}function _s(i,e,r,t){var n=typeof t=="function"?Te(e,r):Te(e),s=typeof t=="function"?t:r,o=n[i];return typeof o!="function"?F(!1):(n[i]=function(){o.call(this),s.call(this)},function(){n[i]=o})}function ca(i,e,r,t){if(0&&r)for(var n in r);t=Tt(t);var s=t.defaultDecorator||(t.deep===!1?os:En);ut(i),wn(i,t.name,s.enhancer),Ne();try{for(var n in e){var o=Object.getOwnPropertyDescriptor(e,n),a=r&&n in r?r[n]:o.get?Oi:s,g=a(i,n,o,!0);g&&Object.defineProperty(i,n,g)}}finally{Oe()}return i}function da(i,e){return xs(Te(i,e))}function xs(i){var e={name:i.name};return i.observing&&i.observing.length>0&&(e.dependencies=xo(i.observing).map(xs)),e}function ua(i,e){if(i==null)return!1;if(e!==void 0){if(ni(i)){var r=i.$mobx;return r.values&&!!r.values[e]}return!1}return ni(i)||!!i.$mobx||xn(i)||zi(i)||Ri(i)}function Es(i){return arguments.length!==1&&F(!1),ua(i)}function fa(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];var r=!1;typeof i[i.length-1]=="boolean"&&(r=i.pop());var t=pa(i);if(!t)return F(!1);t.isTracing===Se.NONE&&console.log("[mobx.trace] '"+t.name+"' tracing enabled"),t.isTracing=r?Se.BREAK:Se.LOG}function pa(i){switch(i.length){case 0:return v.trackingDerivation;case 1:return Te(i[0]);case 2:return Te(i[0],i[1])}}function Ae(i,e){e===void 0&&(e=void 0),Ne();try{return i.apply(e)}finally{Oe()}}function _e(i){return i.interceptors!==void 0&&i.interceptors.length>0}function li(i,e){var r=i.interceptors||(i.interceptors=[]);return r.push(e),bn(function(){var t=r.indexOf(e);t!==-1&&r.splice(t,1)})}function xe(i,e){var r=kt();try{var t=i.interceptors;if(t)for(var n=0,s=t.length;n<s&&(e=t[n](e),ei(!e||e.type,"Intercept handlers should return nothing or a change object"),!!e);n++);return e}finally{We(r)}}function ue(i){return i.changeListeners!==void 0&&i.changeListeners.length>0}function ci(i,e){var r=i.changeListeners||(i.changeListeners=[]);return r.push(e),bn(function(){var t=r.indexOf(e);t!==-1&&r.splice(t,1)})}function fe(i,e){var r=kt(),t=i.changeListeners;if(t){t=t.slice();for(var n=0,s=t.length;n<s;n++)t[n](e);We(r)}}var ha=1e4,ma=(function(){var i=!1,e={};return Object.defineProperty(e,"0",{set:function(){i=!0}}),Object.create(e)[0]=1,i===!1})(),mn=0,Mn=(function(){function i(){}return i})();function ga(i,e){typeof Object.setPrototypeOf<"u"?Object.setPrototypeOf(i.prototype,e):typeof i.prototype.__proto__<"u"?i.prototype.__proto__=e:i.prototype=e}ga(Mn,Array.prototype);Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(i){Object.defineProperty(Mn.prototype,i,{configurable:!0,writable:!0,value:Array.prototype[i]})});var Ms=(function(){function i(e,r,t,n){this.array=t,this.owned=n,this.values=[],this.lastKnownLength=0,this.atom=new Ii(e||"ObservableArray@"+ie()),this.enhancer=function(s,o){return r(s,o,e+"[..]")}}return i.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},i.prototype.dehanceValues=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},i.prototype.intercept=function(e){return li(this,e)},i.prototype.observe=function(e,r){return r===void 0&&(r=!1),r&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),ci(this,e)},i.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},i.prototype.setArrayLength=function(e){if(typeof e!="number"||e<0)throw new Error("[mobx.array] Out of range: "+e);var r=this.values.length;if(e!==r)if(e>r){for(var t=new Array(e-r),n=0;n<e-r;n++)t[n]=void 0;this.spliceWithArray(r,0,t)}else this.spliceWithArray(e,r-e)},i.prototype.updateArrayLength=function(e,r){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=r,r>0&&e+r+1>mn&&As(e+r+1)},i.prototype.spliceWithArray=function(e,r,t){var n=this;Fi(this.atom);var s=this.values.length;if(e===void 0?e=0:e>s?e=s:e<0&&(e=Math.max(0,s+e)),arguments.length===1?r=s-e:r==null?r=0:r=Math.max(0,Math.min(r,s-e)),t===void 0&&(t=Ni),_e(this)){var o=xe(this,{object:this.array,type:"splice",index:e,removedCount:r,added:t});if(!o)return Ni;r=o.removedCount,t=o.added}t=t.length===0?t:t.map(function(C){return n.enhancer(C,void 0)});var a=t.length-r;this.updateArrayLength(s,a);var g=this.spliceItemsIntoValues(e,r,t);return(r!==0||t.length!==0)&&this.notifyArraySplice(e,t,g),this.dehanceValues(g)},i.prototype.spliceItemsIntoValues=function(e,r,t){var n;if(t.length<ha)return(n=this.values).splice.apply(n,un([e,r],t));var s=this.values.slice(e,e+r);return this.values=this.values.slice(0,e).concat(t,this.values.slice(e+r)),s},i.prototype.notifyArrayChildUpdate=function(e,r,t){var n=!this.owned&&K(),s=ue(this),o=s||n?{object:this.array,type:"update",index:e,newValue:r,oldValue:t}:null;n&&ce(te({},o,{name:this.atom.name})),this.atom.reportChanged(),s&&fe(this,o),n&&de()},i.prototype.notifyArraySplice=function(e,r,t){var n=!this.owned&&K(),s=ue(this),o=s||n?{object:this.array,type:"splice",index:e,removed:t,added:r,removedCount:t.length,addedCount:r.length}:null;n&&ce(te({},o,{name:this.atom.name})),this.atom.reportChanged(),s&&fe(this,o),n&&de()},i})(),Pe=(function(i){Zr(e,i);function e(r,t,n,s){n===void 0&&(n="ObservableArray@"+ie()),s===void 0&&(s=!1);var o=i.call(this)||this,a=new Ms(n,t,o,s);if(ri(o,"$mobx",a),r&&r.length){var g=fs(!0);o.spliceWithArray(0,0,r),ps(g)}return ma&&Object.defineProperty(a.array,"0",va),o}return e.prototype.intercept=function(r){return this.$mobx.intercept(r)},e.prototype.observe=function(r,t){return t===void 0&&(t=!1),this.$mobx.observe(r,t)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),r.map(function(n){return Vi(n)?n.peek():n}))},e.prototype.replace=function(r){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,r)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},e.prototype.find=function(r,t,n){n===void 0&&(n=0),arguments.length===3&&De("The array.find fromIndex argument to find will not be supported anymore in the next major");var s=this.findIndex.apply(this,arguments);return s===-1?void 0:this.get(s)},e.prototype.findIndex=function(r,t,n){n===void 0&&(n=0),arguments.length===3&&De("The array.findIndex fromIndex argument to find will not be supported anymore in the next major");for(var s=this.peek(),o=s.length,a=n;a<o;a++)if(r.call(t,s[a],a,this))return a;return-1},e.prototype.splice=function(r,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(r);case 2:return this.$mobx.spliceWithArray(r,t)}return this.$mobx.spliceWithArray(r,t,n)},e.prototype.spliceWithArray=function(r,t,n){return this.$mobx.spliceWithArray(r,t,n)},e.prototype.push=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,r),n.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,r),n.values.length},e.prototype.reverse=function(){var r=this.slice();return r.reverse.apply(r,arguments)},e.prototype.sort=function(r){var t=this.slice();return t.sort.apply(t,arguments)},e.prototype.remove=function(r){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(r);return t>-1?(this.splice(t,1),!0):!1},e.prototype.move=function(r,t){De("observableArray.move is deprecated, use .slice() & .replace() instead");function n(a){if(a<0)throw new Error("[mobx.array] Index out of bounds: "+a+" is negative");var g=this.$mobx.values.length;if(a>=g)throw new Error("[mobx.array] Index out of bounds: "+a+" is not smaller than "+g)}if(n.call(this,r),n.call(this,t),r!==t){var s=this.$mobx.values,o;r<t?o=un(s.slice(0,r),s.slice(r+1,t+1),[s[r]],s.slice(t+1)):o=un(s.slice(0,t),[s[r]],s.slice(t,r),s.slice(r+1)),this.replace(o)}},e.prototype.get=function(r){var t=this.$mobx;if(t){if(r<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[r]);console.warn("[mobx.array] Attempt to read an array index ("+r+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},e.prototype.set=function(r,t){var n=this.$mobx,s=n.values;if(r<s.length){Fi(n.atom);var o=s[r];if(_e(n)){var a=xe(n,{type:"update",object:this,index:r,newValue:t});if(!a)return;t=a.newValue}t=n.enhancer(t,o);var g=t!==o;g&&(s[r]=t,n.notifyArrayChildUpdate(r,t,o))}else if(r===s.length)n.spliceWithArray(r,0,[t]);else throw new Error("[mobx.array] Index out of bounds, "+r+" is larger than "+s.length)},e})(Mn);Sn(Pe.prototype,function(){this.$mobx.atom.reportObserved();var i=this,e=0;return ti({next:function(){return e<i.length?{value:i[e++],done:!1}:{done:!0,value:void 0}}})});Object.defineProperty(Pe.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(i){this.$mobx.setArrayLength(i)}});pt(Pe.prototype,_n(),"Array");["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(i){var e=Array.prototype[i];ei(typeof e=="function","Base function not defined on Array prototype: '"+i+"'"),pt(Pe.prototype,i,function(){return e.apply(this.peek(),arguments)})});Mo(Pe.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var va=ws(0);function ws(i){return{enumerable:!1,configurable:!1,get:function(){return this.get(i)},set:function(e){this.set(i,e)}}}function ba(i){Object.defineProperty(Pe.prototype,""+i,ws(i))}function As(i){for(var e=mn;e<i;e++)ba(e);mn=i}As(1e3);var ya=Xe("ObservableArrayAdministration",Ms);function Vi(i){return yn(i)&&ya(i.$mobx)}var Ca={},Hi=(function(){function i(e,r,t){if(r===void 0&&(r=oi),t===void 0&&(t="ObservableMap@"+ie()),this.enhancer=r,this.name=t,this.$mobx=Ca,this._keys=new Pe(void 0,ii,this.name+".keys()",!0),typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return i.prototype._has=function(e){return this._data.has(e)},i.prototype.has=function(e){var r=this;if(!v.trackingDerivation)return this._has(e);var t=this._hasMap.get(e);if(!t){var n=t=new Ke(this._has(e),ii,this.name+"."+Di(e)+"?",!1);this._hasMap.set(e,n),Ss(n,function(){return r._hasMap.delete(e)})}return t.get()},i.prototype.set=function(e,r){var t=this._has(e);if(_e(this)){var n=xe(this,{type:t?"update":"add",object:this,newValue:r,name:e});if(!n)return this;r=n.newValue}return t?this._updateValue(e,r):this._addValue(e,r),this},i.prototype.delete=function(e){var r=this;if(_e(this)){var t=xe(this,{type:"delete",object:this,name:e});if(!t)return!1}if(this._has(e)){var n=K(),s=ue(this),t=s||n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return n&&ce(te({},t,{name:this.name,key:e})),Ae(function(){r._keys.remove(e),r._updateHasMapEntry(e,!1);var a=r._data.get(e);a.setNewValue(void 0),r._data.delete(e)}),s&&fe(this,t),n&&de(),!0}return!1},i.prototype._updateHasMapEntry=function(e,r){var t=this._hasMap.get(e);t&&t.setNewValue(r)},i.prototype._updateValue=function(e,r){var t=this._data.get(e);if(r=t.prepareNewValue(r),r!==v.UNCHANGED){var n=K(),s=ue(this),o=s||n?{type:"update",object:this,oldValue:t.value,name:e,newValue:r}:null;n&&ce(te({},o,{name:this.name,key:e})),t.setNewValue(r),s&&fe(this,o),n&&de()}},i.prototype._addValue=function(e,r){var t=this;Ae(function(){var a=new Ke(r,t.enhancer,t.name+"."+Di(e),!1);t._data.set(e,a),r=a.value,t._updateHasMapEntry(e,!0),t._keys.push(e)});var n=K(),s=ue(this),o=s||n?{type:"add",object:this,name:e,newValue:r}:null;n&&ce(te({},o,{name:this.name,key:e})),s&&fe(this,o),n&&de()},i.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},i.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},i.prototype.keys=function(){return this._keys[Cn()]()},i.prototype.values=function(){var e=this,r=0;return ti({next:function(){return r<e._keys.length?{value:e.get(e._keys[r++]),done:!1}:{value:void 0,done:!0}}})},i.prototype.entries=function(){var e=this,r=0;return ti({next:function(){if(r<e._keys.length){var t=e._keys[r++];return{value:[t,e.get(t)],done:!1}}return{done:!0}}})},i.prototype.forEach=function(e,r){var t=this;this._keys.forEach(function(n){return e.call(r,t.get(n),n,t)})},i.prototype.merge=function(e){var r=this;return mt(e)&&(e=e.toJS()),Ae(function(){zt(e)?Object.keys(e).forEach(function(t){return r.set(t,e[t])}):Array.isArray(e)?e.forEach(function(t){var n=es(t,2),s=n[0],o=n[1];return r.set(s,o)}):It(e)?e.constructor!==Map?F("Cannot initialize from classes that inherit from Map: "+e.constructor.name):e.forEach(function(t,n){return r.set(n,t)}):e!=null&&F("Cannot initialize map from "+e)}),this},i.prototype.clear=function(){var e=this;Ae(function(){ls(function(){e._keys.slice().forEach(function(r){return e.delete(r)})})})},i.prototype.replace=function(e){var r=this;return Ae(function(){for(var t=Eo(e),n=r._keys,s=Array.from(t.keys()),o=!1,a=0;a<n.length;a++){var g=n[a];n.length===s.length&&g!==s[a]&&(o=!0),t.has(g)||(o=!0,r.delete(g))}t.forEach(function(C,k){r._data.has(k)||(o=!0),r.set(k,C)}),o&&r._keys.replace(s)}),this},Object.defineProperty(i.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),i.prototype.toPOJO=function(){var e=this,r={};return this._keys.forEach(function(t){return r[typeof t=="symbol"?t:Di(t)]=e.get(t)}),r},i.prototype.toJS=function(){var e=this,r=new Map;return this._keys.forEach(function(t){return r.set(t,e.get(t))}),r},i.prototype.toJSON=function(){return this.toPOJO()},i.prototype.toString=function(){var e=this;return this.name+"[{ "+this._keys.map(function(r){return Di(r)+": "+(""+e.get(r))}).join(", ")+" }]"},i.prototype.observe=function(e,r){return ci(this,e)},i.prototype.intercept=function(e){return li(this,e)},i})();function Di(i){return i&&i.toString?i.toString():new String(i).toString()}Sn(Hi.prototype,function(){return this.entries()});ri(Hi.prototype,_n(),"Map");var mt=Xe("ObservableMap",Hi),Sa={},Bi=(function(){function i(e,r,t){if(r===void 0&&(r=oi),t===void 0&&(t="ObservableSet@"+ie()),this.name=t,this.$mobx=Sa,this._data=new Set,this._atom=Do(this.name),typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(n,s){return r(n,s,t)},e&&this.replace(e)}return i.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},i.prototype.clear=function(){var e=this;Ae(function(){ls(function(){e._data.forEach(function(r){e.delete(r)})})})},i.prototype.forEach=function(e,r){var t=this;this._data.forEach(function(n){e.call(r,n,n,t)})},Object.defineProperty(i.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),i.prototype.add=function(e){var r=this;if(Fi(this._atom),_e(this)){var t=xe(this,{type:"add",object:this,newValue:e});if(!t)return this}if(!this.has(e)){Ae(function(){r._data.add(r.enhancer(e,void 0)),r._atom.reportChanged()});var n=K(),s=ue(this),t=s||n?{type:"add",object:this,newValue:e}:null;s&&fe(this,t)}return this},i.prototype.delete=function(e){var r=this;if(_e(this)){var t=xe(this,{type:"delete",object:this,oldValue:e});if(!t)return!1}if(this.has(e)){var n=K(),s=ue(this),t=s||n?{type:"delete",object:this,oldValue:e}:null;return Ae(function(){r._atom.reportChanged(),r._data.delete(e)}),s&&fe(this,t),!0}return!1},i.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},i.prototype.entries=function(){var e=0,r=Pt(this.keys()),t=Pt(this.values());return ti({next:function(){var n=e;return e+=1,n<t.length?{value:[r[n],t[n]],done:!1}:{done:!0}}})},i.prototype.keys=function(){return this.values()},i.prototype.values=function(){this._atom.reportObserved();var e=this,r=0,t;return this._data.values!==void 0?t=Pt(this._data.values()):(t=[],this._data.forEach(function(n){return t.push(n)})),ti({next:function(){return r<t.length?{value:e.dehanceValue(t[r++]),done:!1}:{done:!0}}})},i.prototype.replace=function(e){var r=this;return Ft(e)&&(e=e.toJS()),Ae(function(){Array.isArray(e)?(r.clear(),e.forEach(function(t){return r.add(t)})):si(e)?(r.clear(),e.forEach(function(t){return r.add(t)})):e!=null&&F("Cannot initialize set from "+e)}),this},i.prototype.observe=function(e,r){return ci(this,e)},i.prototype.intercept=function(e){return li(this,e)},i.prototype.toJS=function(){return new Set(this)},i.prototype.toString=function(){return this.name+"[ "+Pt(this.keys()).join(", ")+" ]"},i})();Sn(Bi.prototype,function(){return this.values()});ri(Bi.prototype,_n(),"Set");var Ft=Xe("ObservableSet",Bi),Ds=(function(){function i(e,r,t){this.target=e,this.name=r,this.defaultEnhancer=t,this.values={}}return i.prototype.read=function(e,r){if(!(this.target!==e&&(this.illegalAccess(e,r),!this.values[r])))return this.values[r].get()},i.prototype.write=function(e,r,t){var n=this.target;n!==e&&this.illegalAccess(e,r);var s=this.values[r];if(s instanceof Ye){s.set(t);return}if(_e(this)){var o=xe(this,{type:"update",object:n,name:r,newValue:t});if(!o)return;t=o.newValue}if(t=s.prepareNewValue(t),t!==v.UNCHANGED){var a=ue(this),g=K(),o=a||g?{type:"update",object:n,oldValue:s.value,name:r,newValue:t}:null;g&&ce(te({},o,{name:this.name,key:r})),s.setNewValue(t),a&&fe(this,o),g&&de()}},i.prototype.remove=function(e){if(this.values[e]){var r=this.target;if(_e(this)){var t=xe(this,{object:r,name:e,type:"remove"});if(!t)return}try{Ne();var n=ue(this),s=K(),o=this.values[e].get();this.keys&&this.keys.remove(e),delete this.values[e],delete this.target[e];var t=n||s?{type:"remove",object:r,oldValue:o,name:e}:null;s&&ce(te({},t,{name:this.name,key:e})),n&&fe(this,t),s&&de()}finally{Oe()}}},i.prototype.illegalAccess=function(e,r){console.warn("Property '"+r+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},i.prototype.observe=function(e,r){return ci(this,e)},i.prototype.intercept=function(e){return li(this,e)},i.prototype.getKeys=function(){var e=this;return this.keys===void 0&&(this.keys=new Pe(Object.keys(this.values).filter(function(r){return e.values[r]instanceof Ke}),ii,"keys("+this.name+")",!0)),this.keys.slice()},i})();function wn(i,e,r){e===void 0&&(e=""),r===void 0&&(r=oi);var t=i.$mobx;return t||(zt(i)||(e=(i.constructor.name||"ObservableObject")+"@"+ie()),e||(e="ObservableObject@"+ie()),t=new Ds(i,e,r),ri(i,"$mobx",t),t)}function _a(i,e,r,t){var n=wn(i);if(_e(n)){var s=xe(n,{object:i,name:e,type:"add",newValue:r});if(!s)return;r=s.newValue}var o=n.values[e]=new Ke(r,t,n.name+"."+e,!1);r=o.value,Object.defineProperty(i,e,Ea(e)),n.keys&&n.keys.push(e),wa(n,i,e,r)}function xa(i,e,r){var t=wn(i);r.name=t.name+"."+e,r.context=i,t.values[e]=new Ye(r),Object.defineProperty(i,e,Ma(e))}var Kr=Object.create(null),Yr=Object.create(null);function Ea(i){return Kr[i]||(Kr[i]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,i)},set:function(e){this.$mobx.write(this,i,e)}})}function Xr(i){var e=i.$mobx;return e||(ut(i),i.$mobx)}function Ma(i){return Yr[i]||(Yr[i]={configurable:v.computedConfigurable,enumerable:!1,get:function(){return Xr(this).read(this,i)},set:function(e){Xr(this).write(this,i,e)}})}function wa(i,e,r,t){var n=ue(i),s=K(),o=n||s?{type:"add",object:e,name:r,newValue:t}:null;s&&ce(te({},o,{name:i.name,key:r})),n&&fe(i,o),s&&de()}var Aa=Xe("ObservableObjectAdministration",Ds);function ni(i){return yn(i)?(ut(i),Aa(i.$mobx)):!1}function Te(i,e){if(typeof i=="object"&&i!==null){if(Vi(i))return e!==void 0&&F(!1),i.$mobx.atom;if(Ft(i))return i.$mobx;if(mt(i)){var r=i;if(e===void 0)return Te(r._keys);var t=r._data.get(e)||r._hasMap.get(e);return t||F(!1),t}if(ut(i),e&&!i.$mobx&&i[e],ni(i)){if(!e)return F(!1);var t=i.$mobx.values[e];return t||F(!1),t}if(xn(i)||Ri(i)||zi(i))return i}else if(typeof i=="function"&&zi(i.$mobx))return i.$mobx;return F(!1)}function Ns(i,e){if(i||F("Expecting some object"),e!==void 0)return Ns(Te(i,e));if(xn(i)||Ri(i)||zi(i)||mt(i)||Ft(i))return i;if(ut(i),i.$mobx)return i.$mobx;F(!1)}function Da(i,e){var r;return e!==void 0?r=Te(i,e):ni(i)||mt(i)||Ft(i)?r=Ns(i):r=Te(i),r.name}var Qr=Object.prototype.toString;function An(i,e,r){return r===void 0&&(r=-1),gn(i,e,r)}function gn(i,e,r,t,n){if(i===e)return i!==0||1/i===1/e;if(i==null||e==null)return!1;if(i!==i)return e!==e;var s=typeof i;if(s!=="function"&&s!=="object"&&typeof e!="object")return!1;i=Jr(i),e=Jr(e);var o=Qr.call(i);if(o!==Qr.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+i==""+e;case"[object Number]":return+i!=+i?+e!=+e:+i==0?1/+i===1/e:+i==+e;case"[object Date]":case"[object Boolean]":return+i==+e;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(i)===Symbol.valueOf.call(e)}var a=o==="[object Array]";if(!a){if(typeof i!="object"||typeof e!="object")return!1;var g=i.constructor,C=e.constructor;if(g!==C&&!(typeof g=="function"&&g instanceof g&&typeof C=="function"&&C instanceof C)&&"constructor"in i&&"constructor"in e)return!1}if(r===0)return!1;r<0&&(r=-1),t=t||[],n=n||[];for(var k=t.length;k--;)if(t[k]===i)return n[k]===e;if(t.push(i),n.push(e),a){if(k=i.length,k!==e.length)return!1;for(;k--;)if(!gn(i[k],e[k],r-1,t,n))return!1}else{var ne=Object.keys(i),Je=void 0;if(k=ne.length,Object.keys(e).length!==k)return!1;for(;k--;)if(Je=ne[k],!(Na(e,Je)&&gn(i[Je],e[Je],r-1,t,n)))return!1}return t.pop(),n.pop(),!0}function Jr(i){return Vi(i)?i.peek():It(i)||mt(i)||si(i)||Ft(i)?Pt(i.entries()):i}function Na(i,e){return Object.prototype.hasOwnProperty.call(i,e)}(function(){function i(){}if(i.name!=="testCodeMinification"&&!1)var e})();var Oa="$mobx";typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:ia,extras:{getDebugName:Da},$mobx:Oa});var Ta=i=>({$implicit:i});function Pa(i,e){i&1&&(c(0,"span"),p(1,"loading..."),d())}var La=["*"],Vt=()=>({dontDetach:!0});function za(i,e){if(i&1&&(it(0),c(1,"div"),Kt(2),d(),nt()),i&2){let r=f();l(),j("height",r.getTotalHeight())}}function Ia(i,e){if(i&1){let r=I();it(0),c(1,"input",1),b("click",function(n){S(r);let s=f();return _(s.node.mouseAction("checkboxClick",n))}),d(),nt()}if(i&2){let r=f();l(),u("checked",r.node.isSelected)("indeterminate",r.node.isPartiallySelected)}}function ka(i,e){if(i&1){let r=I();c(0,"span",3),b("click",function(n){S(r);let s=f(2);return _(s.node.mouseAction("expanderClick",n))}),m(1,"span",4),d()}if(i&2){let r=f(2);V("toggle-children-wrapper-expanded",r.node.isExpanded)("toggle-children-wrapper-collapsed",r.node.isCollapsed)}}function Fa(i,e){i&1&&m(0,"span",5)}function Ra(i,e){if(i&1&&(it(0),L(1,ka,2,4,"span",1)(2,Fa,1,0,"span",2),nt()),i&2){let r=f();l(),u("ngIf",r.node.hasChildren),l(),u("ngIf",!r.node.hasChildren)}}var Va=(i,e,r)=>({$implicit:i,node:e,index:r});function Ha(i,e){if(i&1&&(c(0,"span"),p(1),d()),i&2){let r=f();l(),R(r.node.displayField)}}var ks=(i,e,r,t)=>({$implicit:i,node:e,index:r,templates:t});function Ba(i,e){if(i&1&&m(0,"tree-node-checkbox",4),i&2){let r=f(2);u("node",r.node)}}function ja(i,e){if(i&1){let r=I();c(0,"div",2),L(1,Ba,1,1,"tree-node-checkbox",3),m(2,"tree-node-expander",4),c(3,"div",5),b("click",function(n){S(r);let s=f();return _(s.node.mouseAction("click",n))})("dblclick",function(n){S(r);let s=f();return _(s.node.mouseAction("dblClick",n))})("mouseover",function(n){S(r);let s=f();return _(s.node.mouseAction("mouseOver",n))})("mouseout",function(n){S(r);let s=f();return _(s.node.mouseAction("mouseOut",n))})("contextmenu",function(n){S(r);let s=f();return _(s.node.mouseAction("contextMenu",n))})("treeDrop",function(n){S(r);let s=f();return _(s.node.onDrop(n))})("treeDropDragOver",function(n){S(r);let s=f();return _(s.node.mouseAction("dragOver",n))})("treeDropDragLeave",function(n){S(r);let s=f();return _(s.node.mouseAction("dragLeave",n))})("treeDropDragEnter",function(n){S(r);let s=f();return _(s.node.mouseAction("dragEnter",n))}),m(4,"tree-node-content",6),d()()}if(i&2){let r=f();j("padding-left",r.node.getNodePadding()),l(),u("ngIf",r.node.options.useCheckbox),l(),u("node",r.node),l(),V("node-content-wrapper-active",r.node.isActive)("node-content-wrapper-focused",r.node.isFocused),u("treeAllowDrop",r.node.allowDrop)("allowDragoverStyling",r.node.allowDragoverStyling())("treeDrag",r.node)("treeDragEnabled",r.node.allowDrag()),l(),u("node",r.node)("index",r.index)("template",r.templates.treeNodeTemplate)}}function Ga(i,e){if(i&1&&m(0,"tree-node-collection",4),i&2){let r=f(3);u("nodes",r.node.children)("templates",r.templates)("treeModel",r.node.treeModel)}}function Ua(i,e){if(i&1&&m(0,"tree-loading-component",5),i&2){let r=f(3);j("padding-left",r.node.getNodePadding()),u("template",r.templates.loadingTemplate)("node",r.node)}}function $a(i,e){if(i&1&&(c(0,"div"),L(1,Ga,1,3,"tree-node-collection",2)(2,Ua,1,4,"tree-loading-component",3),d()),i&2){let r=f(2);V("tree-children",!0)("tree-children-no-padding",r.node.options.levelPadding),l(),u("ngIf",r.node.children),l(),u("ngIf",!r.node.children)}}function qa(i,e){if(i&1&&(it(0),L(1,$a,3,6,"div",1),nt()),i&2){let r=f();l(),u("treeAnimateOpen",r.node.isExpanded)("treeAnimateOpenSpeed",r.node.options.animateSpeed)("treeAnimateOpenAcceleration",r.node.options.animateAcceleration)("treeAnimateOpenEnabled",r.node.options.animateExpand)}}function Wa(i,e){if(i&1&&m(0,"tree-node",2),i&2){let r=e.$implicit,t=e.index,n=f(2);u("node",r)("index",t)("templates",n.templates)}}function Ka(i,e){if(i&1&&(it(0),c(1,"div"),L(2,Wa,1,3,"tree-node",1),d(),nt()),i&2){let r=f();l(),j("margin-top",r.marginTop),l(),u("ngForOf",r.viewportNodes)("ngForTrackBy",r.trackNode)}}function Ya(i,e){if(i&1&&m(0,"tree-node-drop-slot",6),i&2){let r=f(3);u("dropIndex",r.node.index)("node",r.node.parent)}}function Xa(i,e){if(i&1&&(c(0,"div"),L(1,Ya,1,2,"tree-node-drop-slot",3),m(2,"tree-node-wrapper",4)(3,"tree-node-children",5)(4,"tree-node-drop-slot",6),d()),i&2){let r=f(2);Fe(r.node.getClass()),V("tree-node",!0)("tree-node-expanded",r.node.isExpanded&&r.node.hasChildren)("tree-node-collapsed",r.node.isCollapsed&&r.node.hasChildren)("tree-node-leaf",r.node.isLeaf)("tree-node-active",r.node.isActive)("tree-node-focused",r.node.isFocused),l(),u("ngIf",r.index===0),l(),u("node",r.node)("index",r.index)("templates",r.templates),l(),u("node",r.node)("templates",r.templates),l(),u("dropIndex",r.node.index+1)("node",r.node.parent)}}function Qa(i,e){if(i&1&&(it(0),L(1,Xa,5,22,"div",1),Ie(2,2),nt()),i&2){let r=f();l(),u("ngIf",!r.templates.treeNodeFullTemplate),l(),u("ngTemplateOutlet",r.templates.treeNodeFullTemplate)("ngTemplateOutletContext",hi(3,ks,r.node,r.node,r.index,r.templates))}}var Ja=["loadingTemplate"],Za=["treeNodeTemplate"],e1=["treeNodeWrapperTemplate"],t1=["treeNodeFullTemplate"],i1=["viewport"],n1=(i,e,r,t)=>({loadingTemplate:i,treeNodeTemplate:e,treeNodeWrapperTemplate:r,treeNodeFullTemplate:t});function r1(i,e){if(i&1&&m(0,"tree-node-collection",4),i&2){let r=f();u("nodes",r.treeModel.roots)("treeModel",r.treeModel)("templates",hi(3,n1,r.loadingTemplate,r.treeNodeTemplate,r.treeNodeWrapperTemplate,r.treeNodeFullTemplate))}}function s1(i,e){if(i&1&&m(0,"tree-node-drop-slot",5),i&2){let r=f();u("dropIndex",0)("node",r.treeModel.virtualRoot)}}var Ht=(()=>{let e=class e{constructor(){this.templateRef=h(Zi),this.viewContainer=h(en),this.templateBindings={}}ngOnInit(){this.view=this.viewContainer.createEmbeddedView(this.templateRef),this.dispose&&this.dispose(),this.shouldDetach()&&this.view.detach(),this.autoDetect(this.view)}shouldDetach(){return this.treeMobxAutorun&&this.treeMobxAutorun.detach}autoDetect(t){this.dispose=ai(()=>t.detectChanges())}ngOnDestroy(){this.dispose&&this.dispose()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=Ee({type:e,selectors:[["","treeMobxAutorun",""]],inputs:{treeMobxAutorun:"treeMobxAutorun"}});let i=e;return i})(),Y={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32,CONTEXT_MENU:32},B={TOGGLE_ACTIVE:(i,e,r)=>e&&e.toggleActivated(),TOGGLE_ACTIVE_MULTI:(i,e,r)=>e&&e.toggleActivated(!0),TOGGLE_SELECTED:(i,e,r)=>e&&e.toggleSelected(),ACTIVATE:(i,e,r)=>e.setIsActive(!0),DEACTIVATE:(i,e,r)=>e.setIsActive(!1),SELECT:(i,e,r)=>e.setIsSelected(!0),DESELECT:(i,e,r)=>e.setIsSelected(!1),FOCUS:(i,e,r)=>e.focus(),TOGGLE_EXPANDED:(i,e,r)=>e.hasChildren&&e.toggleExpanded(),EXPAND:(i,e,r)=>e.expand(),COLLAPSE:(i,e,r)=>e.collapse(),DRILL_DOWN:(i,e,r)=>i.focusDrillDown(),DRILL_UP:(i,e,r)=>i.focusDrillUp(),NEXT_NODE:(i,e,r)=>i.focusNextNode(),PREVIOUS_NODE:(i,e,r)=>i.focusPreviousNode(),MOVE_NODE:(i,e,r,{from:t,to:n})=>{r.ctrlKey?i.copyNode(t,n):i.moveNode(t,n)}},Rt={mouse:{click:B.TOGGLE_ACTIVE,dblClick:null,contextMenu:null,expanderClick:B.TOGGLE_EXPANDED,checkboxClick:B.TOGGLE_SELECTED,drop:B.MOVE_NODE},keys:{[Y.RIGHT]:B.DRILL_DOWN,[Y.LEFT]:B.DRILL_UP,[Y.DOWN]:B.NEXT_NODE,[Y.UP]:B.PREVIOUS_NODE,[Y.SPACE]:B.TOGGLE_ACTIVE,[Y.ENTER]:B.TOGGLE_ACTIVE}},Ui=class{get hasChildrenField(){return this.options.hasChildrenField||"hasChildren"}get childrenField(){return this.options.childrenField||"children"}get displayField(){return this.options.displayField||"name"}get idField(){return this.options.idField||"id"}get isExpandedField(){return this.options.isExpandedField||"isExpanded"}get getChildren(){return this.options.getChildren}get levelPadding(){return this.options.levelPadding||0}get useVirtualScroll(){return this.options.useVirtualScroll}get animateExpand(){return this.options.animateExpand}get animateSpeed(){return this.options.animateSpeed||1}get animateAcceleration(){return this.options.animateAcceleration||1.2}get scrollOnActivate(){return this.options.scrollOnActivate===void 0?!0:this.options.scrollOnActivate}get rtl(){return!!this.options.rtl}get rootId(){return this.options.rootId}get useCheckbox(){return this.options.useCheckbox}get useTriState(){return this.options.useTriState===void 0?!0:this.options.useTriState}get scrollContainer(){return this.options.scrollContainer}get allowDragoverStyling(){return this.options.allowDragoverStyling===void 0?!0:this.options.allowDragoverStyling}constructor(e={}){this.options=e,this.actionMapping={mouse:{click:this.options?.actionMapping?.mouse?.click??Rt.mouse.click,dblClick:this.options?.actionMapping?.mouse?.dblClick??Rt.mouse.dblClick,contextMenu:this.options?.actionMapping?.mouse?.contextMenu??Rt.mouse.contextMenu,expanderClick:this.options?.actionMapping?.mouse?.expanderClick??Rt.mouse.expanderClick,checkboxClick:this.options?.actionMapping?.mouse?.checkboxClick??Rt.mouse.checkboxClick,drop:this.options?.actionMapping?.mouse?.drop??Rt.mouse.drop,dragStart:this.options?.actionMapping?.mouse?.dragStart??void 0,drag:this.options?.actionMapping?.mouse?.drag??void 0,dragEnd:this.options?.actionMapping?.mouse?.dragEnd??void 0,dragOver:this.options?.actionMapping?.mouse?.dragOver??void 0,dragLeave:this.options?.actionMapping?.mouse?.dragLeave??void 0,dragEnter:this.options?.actionMapping?.mouse?.dragEnter??void 0,mouseOver:this.options?.actionMapping?.mouse?.mouseOver??void 0,mouseOut:this.options?.actionMapping?.mouse?.mouseOut??void 0},keys:{[Y.RIGHT]:B.DRILL_DOWN,[Y.LEFT]:B.DRILL_UP,[Y.DOWN]:B.NEXT_NODE,[Y.UP]:B.PREVIOUS_NODE,[Y.SPACE]:B.TOGGLE_ACTIVE,[Y.ENTER]:B.TOGGLE_ACTIVE}},this.options?.actionMapping?.keys&&(this.actionMapping.keys=oe(oe({},this.actionMapping.keys),this.options.actionMapping.keys)),e.rtl&&(this.actionMapping.keys[Y.RIGHT]=e.actionMapping?.keys[Y.RIGHT]||B.DRILL_UP,this.actionMapping.keys[Y.LEFT]=e.actionMapping?.keys[Y.LEFT]||B.DRILL_DOWN)}getNodeClone(e){if(this.options.getNodeClone)return this.options.getNodeClone(e);let r=Object.assign({},e.data);return r.id&&delete r.id,r}allowDrop(e,r,t){return this.options.allowDrop instanceof Function?this.options.allowDrop(e,r,t):this.options.allowDrop===void 0?!0:this.options.allowDrop}allowDrag(e){return this.options.allowDrag instanceof Function?this.options.allowDrag(e):this.options.allowDrag}nodeClass(e){return this.options.nodeClass?this.options.nodeClass(e):""}nodeHeight(e){if(e.data.virtual)return 0;let r=this.options.nodeHeight||22;return typeof r=="function"&&(r=r(e)),r+(e.index===0?2:1)*this.dropSlotHeight}get dropSlotHeight(){return typeof this.options.dropSlotHeight=="number"?this.options.dropSlotHeight:2}},$={toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",initialized:"initialized",updateData:"updateData",moveNode:"moveNode",copyNode:"copyNode",event:"event",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",stateChange:"stateChange"},X=function(i,e,r,t){var n=arguments.length,s=n<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,r):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,r,t);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},q=class i{get isHidden(){return this.treeModel.isHidden(this)}get isExpanded(){return this.treeModel.isExpanded(this)}get isActive(){return this.treeModel.isActive(this)}get isFocused(){return this.treeModel.isNodeFocused(this)}get isSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.some(e=>e.isSelected)}get isAllSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.every(e=>e.isAllSelected)}get isPartiallySelected(){return this.isSelected&&!this.isAllSelected}get level(){return this.parent?this.parent.level+1:0}get path(){return this.parent?[...this.parent.path,this.id]:[]}get elementRef(){throw`Element Ref is no longer supported since introducing virtual scroll
|
|
17
|
+
|
|
18
|
+
You may use a template to obtain a reference to the element`}get originalNode(){return this._originalNode}constructor(e,r,t,n){this.data=e,this.parent=r,this.treeModel=t,this.position=0,this.allowDrop=(s,o)=>this.options.allowDrop(s,{parent:this,index:0},o),this.allowDragoverStyling=()=>this.options.allowDragoverStyling,(this.id===void 0||this.id===null)&&(this.id=o1()),this.index=n,this.getField("children")&&this._initChildren(),this.autoLoadChildren()}get hasChildren(){return!!(this.getField("hasChildren")||this.children&&this.children.length>0)}get isCollapsed(){return!this.isExpanded}get isLeaf(){return!this.hasChildren}get isRoot(){return this.parent.data.virtual}get realParent(){return this.isRoot?null:this.parent}get options(){return this.treeModel.options}fireEvent(e){this.treeModel.fireEvent(e)}get displayField(){return this.getField("display")}get id(){return this.getField("id")}set id(e){this.setField("id",e)}getField(e){return this.data[this.options[`${e}Field`]]}setField(e,r){this.data[this.options[`${e}Field`]]=r}_findAdjacentSibling(e,r=!1){let t=this._getParentsChildren(r),n=t.indexOf(this);return t.length>n+e?t[n+e]:null}findNextSibling(e=!1){return this._findAdjacentSibling(1,e)}findPreviousSibling(e=!1){return this._findAdjacentSibling(-1,e)}getVisibleChildren(){return this.visibleChildren}get visibleChildren(){return(this.children||[]).filter(e=>!e.isHidden)}getFirstChild(e=!1){let r=e?this.visibleChildren:this.children;return r!=null&&r.length?r[0]:null}getLastChild(e=!1){let r=e?this.visibleChildren:this.children;return r!=null&&r.length?r[r.length-1]:null}findNextNode(e=!0,r=!1){return e&&this.isExpanded&&this.getFirstChild(r)||this.findNextSibling(r)||this.parent&&this.parent.findNextNode(!1,r)}findPreviousNode(e=!1){let r=this.findPreviousSibling(e);return r?r._getLastOpenDescendant(e):this.realParent}_getLastOpenDescendant(e=!1){let r=this.getLastChild(e);return this.isCollapsed||!r?this:r._getLastOpenDescendant(e)}_getParentsChildren(e=!1){return this.parent&&(e?this.parent.getVisibleChildren():this.parent.children)||[]}getIndexInParent(e=!1){return this._getParentsChildren(e).indexOf(this)}isDescendantOf(e){return this===e?!0:this.parent&&this.parent.isDescendantOf(e)}getNodePadding(){return this.options.levelPadding*(this.level-1)+"px"}getClass(){return[this.options.nodeClass(this),`tree-node-level-${this.level}`].join(" ")}onDrop(e){this.mouseAction("drop",e.event,{from:e.element,to:{parent:this,index:0,dropOnNode:!0}})}allowDrag(){return this.options.allowDrag(this)}loadNodeChildren(){return this.options.getChildren?Promise.resolve(this.options.getChildren(this)).then(e=>{e&&(this.setField("children",e),this._initChildren(),this.options.useTriState&&this.treeModel.isSelected(this)&&this.setIsSelected(!0),this.children.forEach(r=>{r.getField("isExpanded")&&r.hasChildren&&r.expand()}))}).then(()=>{this.fireEvent({eventName:$.loadNodeChildren,node:this})}):Promise.resolve()}expand(){return this.isExpanded||this.toggleExpanded(),this}collapse(){return this.isExpanded&&this.toggleExpanded(),this}doForAll(e){Promise.resolve(e(this)).then(()=>{this.children&&this.children.forEach(r=>r.doForAll(e))})}expandAll(){this.doForAll(e=>e.expand())}collapseAll(){this.doForAll(e=>e.collapse())}ensureVisible(){return this.realParent&&(this.realParent.expand(),this.realParent.ensureVisible()),this}toggleExpanded(){return this.setIsExpanded(!this.isExpanded),this}setIsExpanded(e){return this.hasChildren&&this.treeModel.setExpandedNode(this,e),this}autoLoadChildren(){this.handler=ht(()=>this.isExpanded,e=>{!this.children&&this.hasChildren&&e&&this.loadNodeChildren()},{fireImmediately:!0})}dispose(){this.children&&this.children.forEach(e=>e.dispose()),this.handler&&this.handler(),this.parent=null,this.children=null}setIsActive(e,r=!1){return this.treeModel.setActiveNode(this,e,r),e&&this.focus(this.options.scrollOnActivate),this}isSelectable(){return this.isLeaf||!this.children||!this.options.useTriState}setIsSelected(e){return this.isSelectable()?this.treeModel.setSelectedNode(this,e):this.visibleChildren.forEach(r=>r.setIsSelected(e)),this}toggleSelected(){return this.setIsSelected(!this.isSelected),this}toggleActivated(e=!1){return this.setIsActive(!this.isActive,e),this}setActiveAndVisible(e=!1){return this.setIsActive(!0,e).ensureVisible(),setTimeout(this.scrollIntoView.bind(this)),this}scrollIntoView(e=!1){this.treeModel.virtualScroll.scrollIntoView(this,e)}focus(e=!0){let r=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(this),e&&this.scrollIntoView(),r&&this.fireEvent({eventName:$.blur,node:r}),this.fireEvent({eventName:$.focus,node:this}),this}blur(){let e=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(null),e&&this.fireEvent({eventName:$.blur,node:this}),this}setIsHidden(e){this.treeModel.setIsHidden(this,e)}hide(){this.setIsHidden(!0)}show(){this.setIsHidden(!1)}mouseAction(e,r,t=null){this.treeModel.setFocus(!0);let s=this.options.actionMapping.mouse[e];s&&s(this.treeModel,this,r,t)}getSelfHeight(){return this.options.nodeHeight(this)}_initChildren(){this.children=this.getField("children").map((e,r)=>new i(e,this,this.treeModel,r))}};X([U],q.prototype,"isHidden",null);X([U],q.prototype,"isExpanded",null);X([U],q.prototype,"isActive",null);X([U],q.prototype,"isFocused",null);X([U],q.prototype,"isSelected",null);X([U],q.prototype,"isAllSelected",null);X([U],q.prototype,"isPartiallySelected",null);X([A],q.prototype,"children",void 0);X([A],q.prototype,"index",void 0);X([A],q.prototype,"position",void 0);X([A],q.prototype,"height",void 0);X([U],q.prototype,"level",null);X([U],q.prototype,"path",null);X([U],q.prototype,"visibleChildren",null);X([D],q.prototype,"setIsSelected",null);X([D],q.prototype,"_initChildren",null);function o1(){return Math.floor(Math.random()*1e13)}var N=function(i,e,r,t){var n=arguments.length,s=n<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,r):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,r,t);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},x=(()=>{let e=class e{constructor(){this.options=new Ui,this.eventNames=Object.keys($),this.expandedNodeIds={},this.selectedLeafNodeIds={},this.activeNodeIds={},this.hiddenNodeIds={},this.focusedNodeId=null,this.firstUpdate=!0,this.subscriptions=[]}fireEvent(t){t.treeModel=this,this.events[t.eventName].emit(t),this.events.event.emit(t)}subscribe(t,n){let s=this.events[t].subscribe(n);this.subscriptions.push(s)}getFocusedNode(){return this.focusedNode}getActiveNode(){return this.activeNodes[0]}getActiveNodes(){return this.activeNodes}getVisibleRoots(){return this.virtualRoot.visibleChildren}getFirstRoot(t=!1){let n=t?this.getVisibleRoots():this.roots;return n!=null&&n.length?n[0]:null}getLastRoot(t=!1){let n=t?this.getVisibleRoots():this.roots;return n!=null&&n.length?n[n.length-1]:null}get isFocused(){return e.focusedTree===this}isNodeFocused(t){return this.focusedNode===t}isEmptyTree(){return this.roots&&this.roots.length===0}get focusedNode(){return this.focusedNodeId?this.getNodeById(this.focusedNodeId):null}get expandedNodes(){return Object.keys(this.expandedNodeIds).filter(n=>this.expandedNodeIds[n]).map(n=>this.getNodeById(n)).filter(Boolean)}get activeNodes(){return Object.keys(this.activeNodeIds).filter(n=>this.activeNodeIds[n]).map(n=>this.getNodeById(n)).filter(Boolean)}get hiddenNodes(){return Object.keys(this.hiddenNodeIds).filter(n=>this.hiddenNodeIds[n]).map(n=>this.getNodeById(n)).filter(Boolean)}get selectedLeafNodes(){return Object.keys(this.selectedLeafNodeIds).filter(n=>this.selectedLeafNodeIds[n]).map(n=>this.getNodeById(n)).filter(Boolean)}getNodeByPath(t,n=null){if(!t)return null;if(n=n||this.virtualRoot,t.length===0)return n;if(!n.children)return null;let s=t.shift(),o=n.children.find(a=>a.id===s);return o?this.getNodeByPath(t,o):null}getNodeById(t){let n=t.toString();return this.getNodeBy(s=>s.id.toString()===n)}getNodeBy(t,n=null){if(n=n||this.virtualRoot,!n.children)return null;let s=n.children.find(t);if(s)return s;for(let o of n.children){let a=this.getNodeBy(t,o);if(a)return a}}isExpanded(t){return this.expandedNodeIds[t.id]}isHidden(t){return this.hiddenNodeIds[t.id]}isActive(t){return this.activeNodeIds[t.id]}isSelected(t){return this.selectedLeafNodeIds[t.id]}ngOnDestroy(){this.dispose(),this.unsubscribeAll()}dispose(){this.virtualRoot&&this.virtualRoot.dispose()}unsubscribeAll(){this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions=[]}setData({nodes:t,options:n=null,events:s=null}){n&&(this.options=new Ui(n)),s&&(this.events=s),t&&(this.nodes=t),this.update()}update(){let t={id:this.options.rootId,virtual:!0,[this.options.childrenField]:this.nodes};this.dispose(),this.virtualRoot=new q(t,null,this,0),this.roots=this.virtualRoot.children,this.firstUpdate?this.roots&&(this.firstUpdate=!1,this._calculateExpandedNodes()):this.fireEvent({eventName:$.updateData})}setFocusedNode(t){this.focusedNodeId=t?t.id:null}setFocus(t){e.focusedTree=t?this:null}doForAll(t){this.roots.forEach(n=>n.doForAll(t))}focusNextNode(){let t=this.getFocusedNode(),n=t?t.findNextNode(!0,!0):this.getFirstRoot(!0);n&&n.focus()}focusPreviousNode(){let t=this.getFocusedNode(),n=t?t.findPreviousNode(!0):this.getLastRoot(!0);n&&n.focus()}focusDrillDown(){let t=this.getFocusedNode();if(t&&t.isCollapsed&&t.hasChildren)t.toggleExpanded();else{let n=t?t.getFirstChild(!0):this.getFirstRoot(!0);n&&n.focus()}}focusDrillUp(){let t=this.getFocusedNode();if(t)if(t.isExpanded)t.toggleExpanded();else{let n=t.realParent;n&&n.focus()}}setActiveNode(t,n,s=!1){s?this._setActiveNodeMulti(t,n):this._setActiveNodeSingle(t,n),n?(t.focus(this.options.scrollOnActivate),this.fireEvent({eventName:$.activate,node:t}),this.fireEvent({eventName:$.nodeActivate,node:t})):(this.fireEvent({eventName:$.deactivate,node:t}),this.fireEvent({eventName:$.nodeDeactivate,node:t}))}setSelectedNode(t,n){this.selectedLeafNodeIds=Object.assign({},this.selectedLeafNodeIds,{[t.id]:n}),n?(t.focus(),this.fireEvent({eventName:$.select,node:t})):this.fireEvent({eventName:$.deselect,node:t})}setExpandedNode(t,n){this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[t.id]:n}),this.fireEvent({eventName:$.toggleExpanded,node:t,isExpanded:n})}expandAll(){this.roots.forEach(t=>t.expandAll())}collapseAll(){this.roots.forEach(t=>t.collapseAll())}setIsHidden(t,n){this.hiddenNodeIds=Object.assign({},this.hiddenNodeIds,{[t.id]:n})}setHiddenNodeIds(t){this.hiddenNodeIds=t.reduce((n,s)=>Object.assign(n,{[s]:!0}),{})}performKeyAction(t,n){let s=this.options.actionMapping.keys[n.keyCode];return s?(n.preventDefault(),s(this,t,n),!0):!1}filterNodes(t,n=!0){let s;if(!t)return this.clearFilter();if(t&&typeof t.valueOf()=="string")s=a=>a.displayField.toLowerCase().indexOf(t.toLowerCase())!==-1;else if(t&&typeof t=="function")s=t;else{console.error("Don't know what to do with filter",t),console.error("Should be either a string or function");return}let o={};this.roots.forEach(a=>this._filterNode(o,a,s,n)),this.hiddenNodeIds=o,this.fireEvent({eventName:$.changeFilter})}clearFilter(){this.hiddenNodeIds={},this.fireEvent({eventName:$.changeFilter})}moveNode(t,n){let s=t.getIndexInParent(),o=t.parent;if(!this.canMoveNode(t,n,s))return;let a=o.getField("children");n.parent.getField("children")||n.parent.setField("children",[]);let g=n.parent.getField("children"),C=a.splice(s,1)[0],k=o===n.parent&&n.index>s?n.index-1:n.index;g.splice(k,0,C),o.treeModel.update(),n.parent.treeModel!==o.treeModel&&n.parent.treeModel.update(),this.fireEvent({eventName:$.moveNode,node:C,to:{parent:n.parent.data,index:k},from:{parent:o.data,index:s}})}copyNode(t,n){let s=t.getIndexInParent();if(!this.canMoveNode(t,n,s))return;n.parent.getField("children")||n.parent.setField("children",[]);let o=n.parent.getField("children"),a=this.options.getNodeClone(t);o.splice(n.index,0,a),t.treeModel.update(),n.parent.treeModel!==t.treeModel&&n.parent.treeModel.update(),this.fireEvent({eventName:$.copyNode,node:a,to:{parent:n.parent.data,index:n.index}})}getState(){return{expandedNodeIds:this.expandedNodeIds,selectedLeafNodeIds:this.selectedLeafNodeIds,activeNodeIds:this.activeNodeIds,hiddenNodeIds:this.hiddenNodeIds,focusedNodeId:this.focusedNodeId}}setState(t){t&&Object.assign(this,{expandedNodeIds:t.expandedNodeIds||{},selectedLeafNodeIds:t.selectedLeafNodeIds||{},activeNodeIds:t.activeNodeIds||{},hiddenNodeIds:t.hiddenNodeIds||{},focusedNodeId:t.focusedNodeId})}subscribeToState(t){ai(()=>t(this.getState()))}canMoveNode(t,n,s=void 0){let o=s||t.getIndexInParent();return t.parent===n.parent&&s===n.index?!1:!n.parent.isDescendantOf(t)}calculateExpandedNodes(){this._calculateExpandedNodes()}_filterNode(t,n,s,o){let a=s(n);return n.children&&n.children.forEach(g=>{this._filterNode(t,g,s,o)&&(a=!0)}),a||(t[n.id]=!0),o&&a&&n.ensureVisible(),a}_calculateExpandedNodes(t=null){t=t||this.virtualRoot,t.data[this.options.isExpandedField]&&(this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[t.id]:!0})),t.children&&t.children.forEach(n=>this._calculateExpandedNodes(n))}_setActiveNodeSingle(t,n){this.activeNodes.filter(s=>s!==t).forEach(s=>{this.fireEvent({eventName:$.deactivate,node:s}),this.fireEvent({eventName:$.nodeDeactivate,node:s})}),n?this.activeNodeIds={[t.id]:!0}:this.activeNodeIds={}}_setActiveNodeMulti(t,n){this.activeNodeIds=Object.assign({},this.activeNodeIds,{[t.id]:n})}};e.focusedTree=null,e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac});let i=e;return i})();N([A],x.prototype,"roots",void 0);N([A],x.prototype,"expandedNodeIds",void 0);N([A],x.prototype,"selectedLeafNodeIds",void 0);N([A],x.prototype,"activeNodeIds",void 0);N([A],x.prototype,"hiddenNodeIds",void 0);N([A],x.prototype,"focusedNodeId",void 0);N([A],x.prototype,"virtualRoot",void 0);N([U],x.prototype,"focusedNode",null);N([U],x.prototype,"expandedNodes",null);N([U],x.prototype,"activeNodes",null);N([U],x.prototype,"hiddenNodes",null);N([U],x.prototype,"selectedLeafNodes",null);N([D],x.prototype,"setData",null);N([D],x.prototype,"update",null);N([D],x.prototype,"setFocusedNode",null);N([D],x.prototype,"setFocus",null);N([D],x.prototype,"doForAll",null);N([D],x.prototype,"focusNextNode",null);N([D],x.prototype,"focusPreviousNode",null);N([D],x.prototype,"focusDrillDown",null);N([D],x.prototype,"focusDrillUp",null);N([D],x.prototype,"setActiveNode",null);N([D],x.prototype,"setSelectedNode",null);N([D],x.prototype,"setExpandedNode",null);N([D],x.prototype,"expandAll",null);N([D],x.prototype,"collapseAll",null);N([D],x.prototype,"setIsHidden",null);N([D],x.prototype,"setHiddenNodeIds",null);N([D],x.prototype,"filterNodes",null);N([D],x.prototype,"clearFilter",null);N([D],x.prototype,"moveNode",null);N([D],x.prototype,"copyNode",null);N([D],x.prototype,"setState",null);var Dn=(()=>{let e=class e{constructor(){this._draggedElement=null}set(t){this._draggedElement=t}get(){return this._draggedElement}isDragging(){return!!this.get()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Le=function(i,e,r,t){var n=arguments.length,s=n<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,r):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,r,t);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},Os=500,ji=150,pe=(()=>{let e=class e{get y(){return this.yBlocks*ji}get totalHeight(){return this.treeModel.virtualRoot?this.treeModel.virtualRoot.height:0}constructor(){this.treeModel=h(x),this.yBlocks=0,this.x=0,this.viewportHeight=null,this.viewport=null;let t=this.treeModel;t.virtualScroll=this,this._dispose=[ai(()=>this.fixScroll())]}fireEvent(t){this.treeModel.fireEvent(t)}init(){let t=this.recalcPositions.bind(this);t(),this._dispose=[...this._dispose,ht(()=>this.treeModel.roots,t),ht(()=>this.treeModel.expandedNodeIds,t),ht(()=>this.treeModel.hiddenNodeIds,t)],this.treeModel.subscribe($.loadNodeChildren,t)}isEnabled(){return this.treeModel.options.useVirtualScroll}_setYBlocks(t){this.yBlocks=t}recalcPositions(){this.treeModel.virtualRoot.height=this._getPositionAfter(this.treeModel.getVisibleRoots(),0)}_getPositionAfter(t,n){let s=n;return t.forEach(o=>{o.position=s,s=this._getPositionAfterNode(o,s)}),s}_getPositionAfterNode(t,n){let s=t.getSelfHeight()+n;return t.children&&t.isExpanded&&(s=this._getPositionAfter(t.visibleChildren,s)),t.height=s-n,s}clear(){this._dispose.forEach(t=>t())}setViewport(t){Object.assign(this,{viewport:t,x:t.scrollLeft,yBlocks:Math.round(t.scrollTop/ji),viewportHeight:t.getBoundingClientRect?t.getBoundingClientRect().height:0})}scrollIntoView(t,n,s=!0){if(t.options.scrollContainer){let o=t.options.scrollContainer,a=o.getBoundingClientRect().height,g=o.getBoundingClientRect().top,C=this.viewport.getBoundingClientRect().top+t.position-g;(n||C<o.scrollTop||C+t.getSelfHeight()>o.scrollTop+a)&&(o.scrollTop=s?C-a/2:C)}else(n||t.position<this.y||t.position+t.getSelfHeight()>this.y+this.viewportHeight)&&this.viewport&&(this.viewport.scrollTop=s?t.position-this.viewportHeight/2:t.position,this._setYBlocks(Math.floor(this.viewport.scrollTop/ji)))}getViewportNodes(t){if(!t)return[];let n=t.filter(C=>!C.isHidden);if(!this.isEnabled())return n;if(!this.viewportHeight||!n.length)return[];let s=n.slice(-1)[0];if(!s.height&&s.position===0)return[];let o=Ts(n,C=>C.position+Os>this.y||C.position+C.height>this.y),a=Ts(n,C=>C.position-Os>this.y+this.viewportHeight,o),g=[];for(let C=o;C<=a;C++)g.push(n[C]);return g}fixScroll(){let t=Math.max(0,this.totalHeight-this.viewportHeight);this.y<0&&this._setYBlocks(0),this.y>t&&this._setYBlocks(t/ji)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac});let i=e;return i})();Le([A],pe.prototype,"yBlocks",void 0);Le([A],pe.prototype,"x",void 0);Le([A],pe.prototype,"viewportHeight",void 0);Le([U],pe.prototype,"y",null);Le([U],pe.prototype,"totalHeight",null);Le([D],pe.prototype,"_setYBlocks",null);Le([D],pe.prototype,"recalcPositions",null);Le([D],pe.prototype,"setViewport",null);Le([D],pe.prototype,"scrollIntoView",null);function Ts(i,e,r=0){let t=r,n=i.length-1;for(;t!==n;){let s=Math.floor((t+n)/2);e(i[s])?n=s:t===s?t=n:t=s}return t}var a1=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-loading-component"]],inputs:{template:"template",node:"node"},decls:2,vars:5,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,s){n&1&&(L(0,Pa,2,0,"span",0),Ie(1,1)),n&2&&(u("ngIf",!s.template),l(),u("ngTemplateOutlet",s.template)("ngTemplateOutletContext",yt(3,Ta,s.node)))},dependencies:[je,at],encapsulation:2});let i=e;return i})(),l1=(()=>{let e=class e{constructor(){this.elementRef=h(ae),this.virtualScroll=h(pe),this.setViewport=this.throttle(()=>{this.virtualScroll.setViewport(this.elementRef.nativeElement)},17),this.scrollEventHandler=this.setViewport.bind(this)}ngOnInit(){this.virtualScroll.init()}ngAfterViewInit(){setTimeout(()=>{this.setViewport(),this.virtualScroll.fireEvent({eventName:$.initialized})}),this.elementRef.nativeElement.addEventListener("scroll",this.scrollEventHandler)}ngOnDestroy(){this.virtualScroll.clear(),this.elementRef.nativeElement.removeEventListener("scroll",this.scrollEventHandler)}getTotalHeight(){return this.virtualScroll.isEnabled()&&this.virtualScroll.totalHeight+"px"||"auto"}throttle(t,n){let s=0;return function(){let o=Date.now();o-s>=n&&(t(),s=o)}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-viewport"]],features:[st([pe])],ngContentSelectors:La,decls:1,vars:2,consts:[[4,"treeMobxAutorun"]],template:function(n,s){n&1&&(Wt(),L(0,za,3,2,"ng-container",0)),n&2&&u("treeMobxAutorun",ot(1,Vt))},dependencies:[Ht],encapsulation:2});let i=e;return i})();function c1(...i){return D(...i)}var d1=Object.assign(c1,D);function u1(...i){return U(...i)}var f1=Object.assign(u1,U);function p1(...i){return A(...i)}var Ps=Object.assign(p1,A),Ls="is-dragging-over",zs="is-dragging-over-disabled",Fs=(()=>{let e=class e{set treeAllowDrop(t){t instanceof Function?this._allowDrop=t:this._allowDrop=(n,s)=>t}allowDrop(t){return this._allowDrop(this.treeDraggedElement.get(),t)}constructor(){this.el=h(ae),this.renderer=h(bt),this.treeDraggedElement=h(Dn),this.ngZone=h(Ut),this.allowDragoverStyling=!0,this.onDropCallback=new P,this.onDragOverCallback=new P,this.onDragLeaveCallback=new P,this.onDragEnterCallback=new P,this._allowDrop=(t,n)=>!0,this.dragOverEventHandler=this.onDragOver.bind(this),this.dragEnterEventHandler=this.onDragEnter.bind(this),this.dragLeaveEventHandler=this.onDragLeave.bind(this)}ngAfterViewInit(){let t=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{t.addEventListener("dragover",this.dragOverEventHandler),t.addEventListener("dragenter",this.dragEnterEventHandler),t.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){let t=this.el.nativeElement;t.removeEventListener("dragover",this.dragOverEventHandler),t.removeEventListener("dragenter",this.dragEnterEventHandler),t.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragOver(t){if(!this.allowDrop(t))return this.allowDragoverStyling?this.addDisabledClass():void 0;this.onDragOverCallback.emit({event:t,element:this.treeDraggedElement.get()}),t.preventDefault(),this.allowDragoverStyling&&this.addClass()}onDragEnter(t){this.allowDrop(t)&&(t.preventDefault(),this.onDragEnterCallback.emit({event:t,element:this.treeDraggedElement.get()}))}onDragLeave(t){if(!this.allowDrop(t))return this.allowDragoverStyling?this.removeDisabledClass():void 0;this.onDragLeaveCallback.emit({event:t,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass()}onDrop(t){this.allowDrop(t)&&(t.preventDefault(),this.onDropCallback.emit({event:t,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass(),this.treeDraggedElement.set(null))}addClass(){this.renderer.addClass(this.el.nativeElement,Ls)}removeClass(){this.renderer.removeClass(this.el.nativeElement,Ls)}addDisabledClass(){this.renderer.addClass(this.el.nativeElement,zs)}removeDisabledClass(){this.renderer.removeClass(this.el.nativeElement,zs)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=Ee({type:e,selectors:[["","treeDrop",""]],hostBindings:function(n,s){n&1&&b("drop",function(a){return s.onDrop(a)})},inputs:{allowDragoverStyling:"allowDragoverStyling",treeAllowDrop:"treeAllowDrop"},outputs:{onDropCallback:"treeDrop",onDragOverCallback:"treeDropDragOver",onDragLeaveCallback:"treeDropDragLeave",onDragEnterCallback:"treeDropDragEnter"}});let i=e;return i})(),Rs=(()=>{let e=class e{onDrop(t){this.node.mouseAction("drop",t.event,{from:t.element,to:{parent:this.node,index:this.dropIndex}})}allowDrop(t,n){return this.node.options.allowDrop(t,{parent:this.node,index:this.dropIndex},n)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["TreeNodeDropSlot"],["tree-node-drop-slot"]],inputs:{node:"node",dropIndex:"dropIndex"},decls:1,vars:2,consts:[[1,"node-drop-slot",3,"treeDrop","treeAllowDrop","allowDragoverStyling"]],template:function(n,s){n&1&&(c(0,"div",0),b("treeDrop",function(a){return s.onDrop(a)}),d()),n&2&&u("treeAllowDrop",s.allowDrop.bind(s))("allowDragoverStyling",!0)},dependencies:[Fs],encapsulation:2});let i=e;return i})(),h1=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-node-checkbox"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["type","checkbox",1,"tree-node-checkbox",3,"click","checked","indeterminate"]],template:function(n,s){n&1&&L(0,Ia,2,2,"ng-container",0),n&2&&u("treeMobxAutorun",ot(1,Vt))},dependencies:[Ht],encapsulation:2});let i=e;return i})(),Nn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-node-expander"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["class","toggle-children-wrapper",3,"toggle-children-wrapper-expanded","toggle-children-wrapper-collapsed","click",4,"ngIf"],["class","toggle-children-placeholder",4,"ngIf"],[1,"toggle-children-wrapper",3,"click"],[1,"toggle-children"],[1,"toggle-children-placeholder"]],template:function(n,s){n&1&&L(0,Ra,3,2,"ng-container",0),n&2&&u("treeMobxAutorun",ot(1,Vt))},dependencies:[Ht,je],encapsulation:2});let i=e;return i})();var m1=(()=>{let e=class e{constructor(){this.el=h(ae),this.renderer=h(bt),this.treeDraggedElement=h(Dn),this.ngZone=h(Ut),this.dragEventHandler=this.onDrag.bind(this)}ngAfterViewInit(){let t=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{t.addEventListener("drag",this.dragEventHandler)})}ngDoCheck(){this.renderer.setAttribute(this.el.nativeElement,"draggable",this.treeDragEnabled?"true":"false")}ngOnDestroy(){this.el.nativeElement.removeEventListener("drag",this.dragEventHandler)}onDragStart(t){t.dataTransfer.setData("text",t.target.id),this.treeDraggedElement.set(this.draggedElement),this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragStart",t)}onDrag(t){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("drag",t)}onDragEnd(){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragEnd"),this.treeDraggedElement.set(null)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=Ee({type:e,selectors:[["","treeDrag",""]],hostBindings:function(n,s){n&1&&b("dragstart",function(a){return s.onDragStart(a)})("dragend",function(){return s.onDragEnd()})},inputs:{draggedElement:[0,"treeDrag","draggedElement"],treeDragEnabled:"treeDragEnabled"}});let i=e;return i})(),On=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-node-content"]],inputs:{node:"node",index:"index",template:"template"},decls:2,vars:7,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,s){n&1&&(L(0,Ha,2,1,"span",0),Ie(1,1)),n&2&&(u("ngIf",!s.template),l(),u("ngTemplateOutlet",s.template)("ngTemplateOutletContext",Wn(3,Va,s.node,s.node,s.index)))},dependencies:[je,at],encapsulation:2});let i=e;return i})(),g1=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-node-wrapper"]],inputs:{node:"node",index:"index",templates:"templates"},decls:2,vars:8,consts:[["class","node-wrapper",3,"padding-left",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node-wrapper"],[3,"node",4,"ngIf"],[3,"node"],[1,"node-content-wrapper",3,"click","dblclick","mouseover","mouseout","contextmenu","treeDrop","treeDropDragOver","treeDropDragLeave","treeDropDragEnter","treeAllowDrop","allowDragoverStyling","treeDrag","treeDragEnabled"],[3,"node","index","template"]],template:function(n,s){n&1&&(L(0,ja,5,15,"div",0),Ie(1,1)),n&2&&(u("ngIf",!s.templates.treeNodeWrapperTemplate),l(),u("ngTemplateOutlet",s.templates.treeNodeWrapperTemplate)("ngTemplateOutletContext",hi(3,ks,s.node,s.node,s.index,s.templates)))},dependencies:[je,h1,Nn,m1,Fs,On,at],encapsulation:2});let i=e;return i})(),Is=1.005,v1=(()=>{let e=class e{constructor(){this.renderer=h(bt),this.templateRef=h(Zi),this.viewContainerRef=h(en)}set isOpen(t){t?(this._show(),this.isEnabled&&this._isOpen===!1&&this._animateOpen()):this.isEnabled?this._animateClose():this._hide(),this._isOpen=!!t}_show(){this.innerElement||(this.innerElement=this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0])}_hide(){this.viewContainerRef.clear(),this.innerElement=null}_animateOpen(){let t=this.animateSpeed,n=this.animateAcceleration,s=0;this.renderer.setStyle(this.innerElement,"max-height","0"),setTimeout(()=>{let o=setInterval(()=>{if(!this._isOpen||!this.innerElement)return clearInterval(o);s+=t;let a=Math.round(s);this.renderer.setStyle(this.innerElement,"max-height",`${a}px`);let g=this.innerElement.getBoundingClientRect?this.innerElement.getBoundingClientRect().height:0;t*=n,n*=Is,g<a&&(this.renderer.setStyle(this.innerElement,"max-height",null),clearInterval(o))},17)})}_animateClose(){if(!this.innerElement)return;let t=this.animateSpeed,n=this.animateAcceleration,s=this.innerElement.getBoundingClientRect().height,o=setInterval(()=>{if(this._isOpen||!this.innerElement)return clearInterval(o);s-=t,this.renderer.setStyle(this.innerElement,"max-height",`${s}px`),t*=n,n*=Is,s<=0&&(this.viewContainerRef.clear(),this.innerElement=null,clearInterval(o))},17)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=Ee({type:e,selectors:[["","treeAnimateOpen",""]],inputs:{animateSpeed:[0,"treeAnimateOpenSpeed","animateSpeed"],animateAcceleration:[0,"treeAnimateOpenAcceleration","animateAcceleration"],isEnabled:[0,"treeAnimateOpenEnabled","isEnabled"],isOpen:[0,"treeAnimateOpen","isOpen"]}});let i=e;return i})(),Gi=function(i,e,r,t){var n=arguments.length,s=n<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,r):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,r,t);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},b1=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-node-children"]],inputs:{node:"node",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"tree-children","tree-children-no-padding",4,"treeAnimateOpen","treeAnimateOpenSpeed","treeAnimateOpenAcceleration","treeAnimateOpenEnabled"],[3,"nodes","templates","treeModel",4,"ngIf"],["class","tree-node-loading",3,"padding-left","template","node",4,"ngIf"],[3,"nodes","templates","treeModel"],[1,"tree-node-loading",3,"template","node"]],template:function(n,s){n&1&&L(0,qa,2,4,"ng-container",0),n&2&&u("treeMobxAutorun",ot(1,Vt))},dependencies:()=>[Ht,v1,je,Vs,a1],encapsulation:2});let i=e;return i})(),Vs=(()=>{let e=class e{constructor(){this._dispose=[]}get nodes(){return this._nodes}set nodes(t){this.setNodes(t)}get marginTop(){let t=this.viewportNodes&&this.viewportNodes.length&&this.viewportNodes[0];return`${t&&t.parent?t.position-t.parent.position-t.parent.getSelfHeight():0}px`}setNodes(t){this._nodes=t}ngOnInit(){this.virtualScroll=this.treeModel.virtualScroll,this._dispose=[ht(()=>this.virtualScroll.getViewportNodes(this.nodes).map(t=>t.index),t=>{this.viewportNodes=t.map(n=>this.nodes[n])},{compareStructural:!0,fireImmediately:!0}),ht(()=>this.nodes,t=>{this.viewportNodes=this.virtualScroll.getViewportNodes(t)})]}ngOnDestroy(){this._dispose.forEach(t=>t())}trackNode(t,n){return n.id}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["tree-node-collection"]],inputs:{nodes:"nodes",treeModel:"treeModel",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"node","index","templates",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","index","templates"]],template:function(n,s){n&1&&L(0,Ka,3,4,"ng-container",0),n&2&&u("treeMobxAutorun",ot(1,Vt))},dependencies:()=>[Ht,Yn,y1],encapsulation:2});let i=e;return Gi([Ps],i.prototype,"_nodes",void 0),Gi([Ps],i.prototype,"viewportNodes",void 0),Gi([f1],i.prototype,"marginTop",null),Gi([d1],i.prototype,"setNodes",null),i})(),y1=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["TreeNode"],["tree-node"]],inputs:{node:"node",index:"index",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"class","tree-node","tree-node-expanded","tree-node-collapsed","tree-node-leaf","tree-node-active","tree-node-focused",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"dropIndex","node",4,"ngIf"],[3,"node","index","templates"],[3,"node","templates"],[3,"dropIndex","node"]],template:function(n,s){n&1&&L(0,Qa,3,8,"ng-container",0),n&2&&u("treeMobxAutorun",ot(1,Vt))},dependencies:[Ht,je,Rs,g1,b1,at],encapsulation:2});let i=e;return i})(),Hs=(()=>{let e=class e{set nodes(t){}set options(t){}set focused(t){this.treeModel.setFocus(t)}set state(t){this.treeModel.setState(t)}constructor(){this.treeModel=h(x),this.treeDraggedElement=h(Dn);let t=this.treeModel;t.eventNames.forEach(n=>this[n]=new P),t.subscribeToState(n=>this.stateChange.emit(n))}onKeydown(t){if(!this.treeModel.isFocused||["input","textarea"].includes(document.activeElement.tagName.toLowerCase()))return;let n=this.treeModel.getFocusedNode();this.treeModel.performKeyAction(n,t)}onMousedown(t){function n(s,o){return s?s.localName===o?!1:n(s.parentElement,o):!0}n(t.target,"tree-root")&&this.treeModel.setFocus(!1)}ngOnChanges(t){(t.options||t.nodes)&&this.treeModel.setData({options:t.options&&t.options.currentValue,nodes:t.nodes&&t.nodes.currentValue,events:this.pick(this,this.treeModel.eventNames)})}sizeChanged(){this.viewportComponent.setViewport()}pick(t,n){return n.reduce((s,o)=>(t&&t.hasOwnProperty(o)&&(s[o]=t[o]),s),{})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["Tree"],["tree-root"]],contentQueries:function(n,s,o){if(n&1&&(rt(o,Ja,5),rt(o,Za,5),rt(o,e1,5),rt(o,t1,5)),n&2){let a;J(a=Z())&&(s.loadingTemplate=a.first),J(a=Z())&&(s.treeNodeTemplate=a.first),J(a=Z())&&(s.treeNodeWrapperTemplate=a.first),J(a=Z())&&(s.treeNodeFullTemplate=a.first)}},viewQuery:function(n,s){if(n&1&&Me(i1,5),n&2){let o;J(o=Z())&&(s.viewportComponent=o.first)}},hostBindings:function(n,s){n&1&&b("keydown",function(a){return s.onKeydown(a)},Ji)("mousedown",function(a){return s.onMousedown(a)},Ji)},inputs:{nodes:"nodes",options:"options",focused:"focused",state:"state"},outputs:{toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",updateData:"updateData",initialized:"initialized",moveNode:"moveNode",copyNode:"copyNode",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",event:"event",stateChange:"stateChange"},features:[st([x]),tt],decls:5,vars:6,consts:[["viewport",""],[1,"angular-tree-component"],[3,"nodes","treeModel","templates",4,"ngIf"],["class","empty-tree-drop-slot",3,"dropIndex","node",4,"ngIf"],[3,"nodes","treeModel","templates"],[1,"empty-tree-drop-slot",3,"dropIndex","node"]],template:function(n,s){n&1&&(c(0,"tree-viewport",null,0)(2,"div",1),L(3,r1,1,8,"tree-node-collection",2)(4,s1,1,2,"tree-node-drop-slot",3),d()()),n&2&&(l(2),V("node-dragging",s.treeDraggedElement.isDragging())("angular-tree-component-rtl",s.treeModel.options.rtl),l(),u("ngIf",s.treeModel.roots),l(),u("ngIf",s.treeModel.isEmptyTree()))},dependencies:[l1,je,Vs,Rs],encapsulation:2});let i=e;return i})(),Bs=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ge({type:e}),e.\u0275inj=he({imports:[be]});let i=e;return i})();var E=(function(i){return i.MAKE="make",i.COPY="copy",i.MOVE="move",i.DELETE="delete",i.COMPRESS="compress",i.DECOMPRESS="decompress",i.DOWNLOAD="download",i.UPLOAD="upload",i.TOUCH="touch",i.THUMBNAIL="thumbnail",i})(E||{});var Jl=".selected",Zl="drag-over";var $i=(()=>{let e=class e{constructor(){this.overFlowX="hidden",this.resizeOffset=80,this.useMaxHeight=!0,this.elementRef=h(ae),this.renderer=h(bt),this.layout=h(H),this.renderer.setStyle(this.elementRef.nativeElement,"overflow-y","auto"),this.renderer.setStyle(this.elementRef.nativeElement,"scrollbar-width","thin"),this.resizeSubscription=this.layout.resizeEvent.pipe(jn(1)).subscribe(()=>this.onResize())}ngAfterViewInit(){this.renderer.setStyle(this.elementRef.nativeElement,"overflow-x",this.overFlowX),this.onResize()}ngOnDestroy(){this.resizeSubscription.unsubscribe()}scrollTop(){this.renderer.setProperty(this.elementRef.nativeElement,"scrollTop","0")}scrollIntoView(t=0){setTimeout(()=>this.elementRef.nativeElement.scrollTo({left:0,top:t,behavior:"smooth"}),50)}onResize(){this.renderer.setStyle(this.elementRef.nativeElement,this.useMaxHeight?"max-height":"height",`${window.innerHeight-this.resizeOffset-1}px`)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=Ee({type:e,selectors:[["","appAutoResize",""]],inputs:{overFlowX:"overFlowX",resizeOffset:"resizeOffset",useMaxHeight:"useMaxHeight"}});let i=e;return i})();var W={BASE:_r.BASE,OPERATION:"operation",TASK_OPERATION:"task/operation",TASKS:"tasks",TASKS_DOWNLOAD:"download",RECENTS:"recents",SEARCH:"search",ONLY_OFFICE:"onlyoffice",ONLY_OFFICE_SETTINGS:"settings",ONLY_OFFICE_DOCUMENT:"document",ONLY_OFFICE_CALLBACK:"callback",ONLY_OFFICE_STATUS:"status"},Pn=`${W.BASE}/${W.OPERATION}`,d0=`${Pn}/${E.THUMBNAIL}`,Ln=`${Pn}/${E.MAKE}`,u0=`${Pn}/${E.UPLOAD}`,zn=`${W.BASE}/${W.TASK_OPERATION}`,js=`${zn}/${E.DOWNLOAD}`,Gs=`${zn}/${E.COMPRESS}`,Us=`${zn}/${E.DECOMPRESS}`,di=`${W.BASE}/${W.TASKS}`,$s=`${W.BASE}/${W.TASKS}/${W.TASKS_DOWNLOAD}`,qs=`${W.BASE}/${W.RECENTS}`,Ws=`${W.BASE}/${W.SEARCH}`,qi=`${W.BASE}/${W.ONLY_OFFICE}`,Ks=`${qi}/${W.ONLY_OFFICE_SETTINGS}`,f0=`${qi}/${W.ONLY_OFFICE_DOCUMENT}`,p0=`${qi}/${W.ONLY_OFFICE_CALLBACK}`,Ys=`${qi}/${W.ONLY_OFFICE_STATUS}`;var S1=(i,e)=>et(null,null,function*(){return new Promise((r,t)=>{try{if(window.DocsAPI)return r(null);let n=document.getElementById(e);if(n){let s=setInterval(()=>{if(!n.getAttribute("loading")){if(clearInterval(s),window.DocsAPI)return r(null);let a=Xs(e,i,r,t);n.remove(),document.body.appendChild(a)}},500)}else{let s=Xs(e,i,r,t);document.body.appendChild(s)}}catch(n){console.error(n)}})}),Xs=(i,e,r,t)=>{let n=document.createElement("script");return n.id=i,n.type="text/javascript",n.src=e,n.async=!0,n.onload=()=>{n.removeAttribute("loading"),r(null)},n.onerror=s=>{n.removeAttribute("loading"),t(s)},n.setAttribute("loading",""),n},Qs=S1;var Js=(()=>{let e=class e{constructor(){this.loadError=new P,this.isFirstOnChanges=!0,this.onLoad=()=>{try{if(window.DocsAPI||this.onError(-3),window?.DocEditor?.instances[this.id]){console.log("Skip loading, instance already exists",this.id);return}window?.DocEditor?.instances||(window.DocEditor={instances:{}}),window.DocEditor.instances[this.id]=window.DocsAPI.DocEditor(this.id,JSON.parse(JSON.stringify(this.config)))}catch(t){console.error(t),this.onError(-1)}}}ngOnInit(){let t=this.documentServerUrl;t.endsWith("/")||(t+="/");let n=`${t}web-apps/apps/api/documents/api.js`;Qs(n,"onlyoffice-api-script").then(()=>this.onLoad()).catch(()=>{this.onError(-2)})}ngOnChanges(t){if(this.isFirstOnChanges){this.isFirstOnChanges=!1;return}if("config"in t&&window?.DocEditor?.instances[this.id]){window.DocEditor.instances[this.id].destroyEditor(),window.DocEditor.instances[this.id]=void 0,console.warn("Important props have been changed, reloading ..."),this.onLoad();return}}ngOnDestroy(){window?.DocEditor?.instances[this.id]&&(window.DocEditor.instances[this.id].destroyEditor(),window.DocEditor.instances[this.id]=void 0)}onError(t){let n;switch(t){case-2:n="Check the settings";break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error !",t=-1}this.loadError.emit(n)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-onlyoffice-document"]],inputs:{id:"id",documentServerUrl:"documentServerUrl",config:"config"},outputs:{loadError:"loadError"},features:[tt],decls:1,vars:1,consts:[[3,"id"]],template:function(n,s){n&1&&pi(0,"div",0),n&2&&ke("id",s.id)},encapsulation:2});let i=e;return i})();function _1(i,e){if(i&1){let r=I();c(0,"div")(1,"app-files-onlyoffice-document",1),b("loadError",function(n){S(r);let s=f();return _(s.loadError(n))}),d()()}if(i&2){let r=f();j("height",r.currentHeight,"px"),l(),u("id",r.docId)("documentServerUrl",r.documentConfig.documentServerUrl)("config",r.documentConfig.config)}}var Zs=(()=>{let e=class e{constructor(){this.documentConfig=null,this.http=h(Ge),this.layout=h(H),this.store=h(Ue)}ngOnInit(){this.docId=`viewer-doc-${this.file.id}`,this.http.get(`${Ks}/${this.file.path}`,{params:new Qt().set("mode",this.mode)}).subscribe({next:t=>{if(!t){this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document","Settings are missing");return}this.mode==="edit"&&t.config.editorConfig.mode!=="edit"?t.config.editorConfig.mode="view":t.config.editorConfig.mode=this.mode,this.mode==="edit"&&(this.file.lock={owner:`${hr} - ${this.store.user.getValue().fullName} (${this.store.user.getValue().email})`,ownerLogin:this.store.user.getValue().login,isExclusive:!1}),t.config.editorConfig.lang=this.layout.getCurrentLanguage(),t.config.editorConfig.region=this.layout.getCurrentLanguage(),this.documentConfig=t},error:t=>{this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document",t.error.message)}})}ngOnDestroy(){this.file.lock=null}loadError(t){this.layout.closeDialog(),this.layout.sendNotification("error","Unable to open document",t)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-viewer-document"]],inputs:{file:"file",currentHeight:"currentHeight",mode:"mode"},decls:1,vars:1,consts:[[3,"height"],[3,"loadError","id","documentServerUrl","config"]],template:function(n,s){n&1&&M(0,_1,2,5,"div",0),n&2&&w(s.documentConfig?0:-1)},dependencies:[Js],encapsulation:2});let i=e;return i})();var x1=["*"],se=(()=>{let e=class e{};e.VG_ENDED="ended",e.VG_PAUSED="paused",e.VG_PLAYING="playing",e.VG_LOADING="waiting",e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),fi=(()=>{let e=class e{constructor(){this.medias={},this.playerReadyEvent=new P(!0),this.isPlayerReady=!1}onPlayerReady(t){this.fsAPI=t,this.isPlayerReady=!0,this.playerReadyEvent.emit(this)}getDefaultMedia(){for(let t in this.medias)if(this.medias[t])return this.medias[t]}getMasterMedia(){let t;for(let n in this.medias)if(this.medias[n].vgMaster==="true"||this.medias[n].vgMaster===!0){t=this.medias[n];break}return t||this.getDefaultMedia()}isMasterDefined(){let t=!1;for(let n in this.medias)if(this.medias[n].vgMaster==="true"||this.medias[n].vgMaster===!0){t=!0;break}return t}getMediaById(t=null){let n=this.medias[t];return(!t||t==="*")&&(n=this),n}play(){for(let t in this.medias)this.medias[t]&&this.medias[t].play()}pause(){for(let t in this.medias)this.medias[t]&&this.medias[t].pause()}get duration(){return this.$$getAllProperties("duration")}set currentTime(t){this.$$setAllProperties("currentTime",t)}get currentTime(){return this.$$getAllProperties("currentTime")}set state(t){this.$$setAllProperties("state",t)}get state(){return this.$$getAllProperties("state")}set volume(t){this.$$setAllProperties("volume",t)}get volume(){return this.$$getAllProperties("volume")}set playbackRate(t){this.$$setAllProperties("playbackRate",t)}get playbackRate(){return this.$$getAllProperties("playbackRate")}get canPlay(){return this.$$getAllProperties("canPlay")}get canPlayThrough(){return this.$$getAllProperties("canPlayThrough")}get isMetadataLoaded(){return this.$$getAllProperties("isMetadataLoaded")}get isWaiting(){return this.$$getAllProperties("isWaiting")}get isCompleted(){return this.$$getAllProperties("isCompleted")}get isLive(){return this.$$getAllProperties("isLive")}get isMaster(){return this.$$getAllProperties("isMaster")}get time(){return this.$$getAllProperties("time")}get buffer(){return this.$$getAllProperties("buffer")}get buffered(){return this.$$getAllProperties("buffered")}get subscriptions(){return this.$$getAllProperties("subscriptions")}get textTracks(){return this.$$getAllProperties("textTracks")}seekTime(t,n=!1){for(let s in this.medias)this.medias[s]&&this.$$seek(this.medias[s],t,n)}$$seek(t,n,s=!1){let o,a=t.duration;s?(this.isMasterDefined()&&(a=this.getMasterMedia().duration),o=n*a/100):o=n,t.currentTime=o}addTextTrack(t,n,s){for(let o in this.medias)this.medias[o]&&this.$$addTextTrack(this.medias[o],t,n,s)}$$addTextTrack(t,n,s,o){t.addTextTrack(n,s,o)}$$getAllProperties(t){let n={},s;for(let a in this.medias)this.medias[a]&&(n[a]=this.medias[a]);switch(Object.keys(n).length){case 0:switch(t){case"state":s=se.VG_PAUSED;break;case"playbackRate":case"volume":s=1;break;case"time":s={current:0,total:0,left:0};break}break;case 1:let a=Object.keys(n)[0];s=n[a][t];break;default:let g=this.getMasterMedia();s=n[g.id][t]}return s}$$setAllProperties(t,n){for(let s in this.medias)this.medias[s]&&(this.medias[s][t]=n)}registerElement(t){this.videogularElement=t}registerMedia(t){this.medias[t.id]=t}unregisterMedia(t){delete this.medias[t.id]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),In=(()=>{let e=class e{constructor(){this.isHiddenSubject=new Bt,this.isHidden=this.isHiddenSubject.asObservable()}state(t){this.isHiddenSubject.next(t)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),ui=(()=>{let e=class e{static getZIndex(){let t=1,n,s=document.getElementsByTagName("*");for(let o=0,a=s.length;o<a;o++)n=parseInt(window.getComputedStyle(s[o])["z-index"],10),n>t&&(t=n+1);return t}static isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1}static isiOSDevice(){return(navigator.userAgent.match(/ip(hone|ad|od)/i)||e.isIpadOS())&&!navigator.userAgent.match(/(iemobile)[\/\s]?([\w\.]*)/i)}static isIpadOS(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}static isCordova(){return document.URL.indexOf("http://")===-1&&document.URL.indexOf("https://")===-1}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),kn=(()=>{let e=class e{constructor(){this.nativeFullscreen=!0,this.isFullscreen=!1,this.onChangeFullscreen=new P}init(t,n){this.videogularElement=t,this.medias=n;let s={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",onchange:"fullscreenchange",onerror:"fullscreenerror"},newWebkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},oldWebkit:{enabled:"webkitIsFullScreen",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullScreen",exit:"webkitCancelFullScreen",onchange:"webkitfullscreenchange",onerror:"webkitfullscreenerror"},moz:{enabled:"mozFullScreen",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",onchange:"mozfullscreenchange",onerror:"mozfullscreenerror"},ios:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitEnterFullscreen",exit:"webkitExitFullscreen",onchange:"webkitendfullscreen",onerror:"webkitfullscreenerror"},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",onchange:"MSFullscreenChange",onerror:"MSFullscreenError"}};for(let a in s)if(s[a].enabled in document){this.polyfill=s[a];break}if(ui.isiOSDevice()&&(this.polyfill=s.ios),this.isAvailable=this.polyfill!=null,this.polyfill==null)return;let o;switch(this.polyfill.onchange){case"mozfullscreenchange":o=document;break;case"webkitendfullscreen":o=this.medias.toArray()[0].elem;break;default:o=t}this.fsChangeSubscription=T(o,this.polyfill.onchange).subscribe(()=>{this.onFullscreenChange()})}onFullscreenChange(){this.isFullscreen=!!document[this.polyfill.element],this.onChangeFullscreen.emit(this.isFullscreen)}toggleFullscreen(t=null){return this.isFullscreen?this.exit():this.request(t)}request(t){return t||(t=this.videogularElement),this.isFullscreen=!0,this.onChangeFullscreen.emit(!0),this.isAvailable&&this.nativeFullscreen?ui.isMobileDevice()?((!this.polyfill.enabled&&t===this.videogularElement||ui.isiOSDevice())&&(t=this.medias.toArray()[0].elem),this.enterElementInFullScreen(t)):this.enterElementInFullScreen(this.videogularElement):Promise.resolve()}enterElementInFullScreen(t){return t[this.polyfill.request]()}exit(){return this.isFullscreen=!1,this.onChangeFullscreen.emit(!1),this.isAvailable&&this.nativeFullscreen?document[this.polyfill.exit]():Promise.resolve()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),z=(()=>{let e=class e{};e.VG_ABORT="abort",e.VG_CAN_PLAY="canplay",e.VG_CAN_PLAY_THROUGH="canplaythrough",e.VG_DURATION_CHANGE="durationchange",e.VG_EMPTIED="emptied",e.VG_ENCRYPTED="encrypted",e.VG_ENDED="ended",e.VG_ERROR="error",e.VG_LOADED_DATA="loadeddata",e.VG_LOADED_METADATA="loadedmetadata",e.VG_LOAD_START="loadstart",e.VG_PAUSE="pause",e.VG_PLAY="play",e.VG_PLAYING="playing",e.VG_PROGRESS="progress",e.VG_RATE_CHANGE="ratechange",e.VG_SEEK="seek",e.VG_SEEKED="seeked",e.VG_SEEKING="seeking",e.VG_STALLED="stalled",e.VG_SUSPEND="suspend",e.VG_TIME_UPDATE="timeupdate",e.VG_VOLUME_CHANGE="volumechange",e.VG_WAITING="waiting",e.VG_LOAD="load",e.VG_ENTER="enter",e.VG_EXIT="exit",e.VG_START_ADS="startads",e.VG_END_ADS="endads",e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Fn=(()=>{let e=class e{constructor(t,n){this.api=t,this.ref=n,this.state=se.VG_PAUSED,this.time={current:0,total:0,left:0},this.buffer={end:0},this.canPlay=!1,this.canPlayThrough=!1,this.isMetadataLoaded=!1,this.isWaiting=!1,this.isCompleted=!1,this.isLive=!1,this.isBufferDetected=!1,this.checkInterval=200,this.currentPlayPos=0,this.lastPlayPos=0,this.playAtferSync=!1,this.bufferDetected=new Bt}ngOnInit(){this.vgMedia.nodeName?this.elem=this.vgMedia:this.elem=this.vgMedia.elem,this.api.registerMedia(this),this.subscriptions={abort:T(this.elem,z.VG_ABORT),canPlay:T(this.elem,z.VG_CAN_PLAY),canPlayThrough:T(this.elem,z.VG_CAN_PLAY_THROUGH),durationChange:T(this.elem,z.VG_DURATION_CHANGE),emptied:T(this.elem,z.VG_EMPTIED),encrypted:T(this.elem,z.VG_ENCRYPTED),ended:T(this.elem,z.VG_ENDED),error:T(this.elem,z.VG_ERROR),loadedData:T(this.elem,z.VG_LOADED_DATA),loadedMetadata:T(this.elem,z.VG_LOADED_METADATA),loadStart:T(this.elem,z.VG_LOAD_START),pause:T(this.elem,z.VG_PAUSE),play:T(this.elem,z.VG_PLAY),playing:T(this.elem,z.VG_PLAYING),progress:T(this.elem,z.VG_PROGRESS),rateChange:T(this.elem,z.VG_RATE_CHANGE),seeked:T(this.elem,z.VG_SEEKED),seeking:T(this.elem,z.VG_SEEKING),stalled:T(this.elem,z.VG_STALLED),suspend:T(this.elem,z.VG_SUSPEND),timeUpdate:T(this.elem,z.VG_TIME_UPDATE),volumeChange:T(this.elem,z.VG_VOLUME_CHANGE),waiting:T(this.elem,z.VG_WAITING),startAds:T(window,z.VG_START_ADS),endAds:T(window,z.VG_END_ADS),mutation:new Hn(t=>{let n=new MutationObserver(s=>{t.next(s)});return n.observe(this.elem,{childList:!0,attributes:!0}),()=>{n.disconnect()}}),bufferDetected:this.bufferDetected},this.mutationObs=this.subscriptions.mutation.subscribe(this.onMutation.bind(this)),this.canPlayObs=this.subscriptions.canPlay.subscribe(this.onCanPlay.bind(this)),this.canPlayThroughObs=this.subscriptions.canPlayThrough.subscribe(this.onCanPlayThrough.bind(this)),this.loadedMetadataObs=this.subscriptions.loadedMetadata.subscribe(this.onLoadMetadata.bind(this)),this.waitingObs=this.subscriptions.waiting.subscribe(this.onWait.bind(this)),this.progressObs=this.subscriptions.progress.subscribe(this.onProgress.bind(this)),this.endedObs=this.subscriptions.ended.subscribe(this.onComplete.bind(this)),this.playingObs=this.subscriptions.playing.subscribe(this.onStartPlaying.bind(this)),this.playObs=this.subscriptions.play.subscribe(this.onPlay.bind(this)),this.pauseObs=this.subscriptions.pause.subscribe(this.onPause.bind(this)),this.timeUpdateObs=this.subscriptions.timeUpdate.subscribe(this.onTimeUpdate.bind(this)),this.volumeChangeObs=this.subscriptions.volumeChange.subscribe(this.onVolumeChange.bind(this)),this.errorObs=this.subscriptions.error.subscribe(this.onError.bind(this)),this.vgMaster&&this.api.playerReadyEvent.subscribe(()=>{this.prepareSync()})}prepareSync(){let t=[];for(let n in this.api.medias)this.api.medias[n]&&t.push(this.api.medias[n].subscriptions.canPlay);this.canPlayAllSubscription=Bn(t).pipe(jt((...n)=>{let s=a=>a?.target?a.target.readyState===4:!1;n.some(s)&&!this.syncSubscription&&(this.startSync(),this.syncSubscription.unsubscribe())})).subscribe()}startSync(){this.syncSubscription=Gt(0,1e3).subscribe(()=>{for(let t in this.api.medias)if(this.api.medias[t]!==this){let n=this.api.medias[t].currentTime-this.currentTime;n<-.3||n>.3?(this.playAtferSync=this.state===se.VG_PLAYING,this.pause(),this.api.medias[t].pause(),this.api.medias[t].currentTime=this.currentTime):this.playAtferSync&&(this.play(),this.api.medias[t].play(),this.playAtferSync=!1)}})}onMutation(t){for(let n=0,s=t.length;n<s;n++){let o=t[n];if(o.type==="attributes"&&o.attributeName==="src"){if(o.target.src&&o.target.src.length>0&&o.target.src.indexOf("blob:")<0){this.loadMedia();break}}else if(o.type==="childList"&&o.removedNodes.length&&o.removedNodes[0].nodeName.toLowerCase()==="source"){this.loadMedia();break}}}loadMedia(){this.vgMedia.pause(),this.vgMedia.currentTime=0,this.stopBufferCheck(),this.isBufferDetected=!0,this.bufferDetected.next(this.isBufferDetected),setTimeout(()=>this.vgMedia.load(),10)}play(){if(!(this.playPromise||this.state!==se.VG_PAUSED&&this.state!==se.VG_ENDED))return this.playPromise=this.vgMedia.play(),this.playPromise&&this.playPromise.then&&this.playPromise.catch&&this.playPromise.then(()=>{this.playPromise=null}).catch(()=>{this.playPromise=null}),this.playPromise}pause(){this.playPromise?this.playPromise.then(()=>{this.vgMedia.pause()}):this.vgMedia.pause()}get id(){let t;return this.vgMedia&&(t=this.vgMedia.id),t}get duration(){return this.vgMedia.duration===1/0?this.specifiedDuration:this.vgMedia.duration}set currentTime(t){this.vgMedia.currentTime=t}get currentTime(){return this.vgMedia.currentTime}set volume(t){this.vgMedia.volume=t}get volume(){return this.vgMedia.volume}set playbackRate(t){this.vgMedia.playbackRate=t}get playbackRate(){return this.vgMedia.playbackRate}get buffered(){return this.vgMedia.buffered}get textTracks(){return this.vgMedia.textTracks}onCanPlay(t){this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected),this.canPlay=!0,this.ref.detectChanges()}onCanPlayThrough(t){this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected),this.canPlayThrough=!0,this.ref.detectChanges()}onLoadMetadata(t){this.isMetadataLoaded=!0,this.time={current:0,left:0,total:this.duration*1e3},this.state=se.VG_PAUSED;let n=Math.round(this.time.total);this.isLive=n===1/0,this.ref.detectChanges()}onWait(t){this.isWaiting=!0,this.ref.detectChanges()}onComplete(t){this.isCompleted=!0,this.state=se.VG_ENDED,this.ref.detectChanges()}onStartPlaying(t){this.state=se.VG_PLAYING,this.ref.detectChanges()}onPlay(t){this.state=se.VG_PLAYING,this.vgMaster&&(!this.syncSubscription||this.syncSubscription.closed)&&this.startSync(),this.startBufferCheck(),this.ref.detectChanges()}onPause(t){this.state=se.VG_PAUSED,this.vgMaster&&(this.playAtferSync||this.syncSubscription.unsubscribe()),this.stopBufferCheck(),this.ref.detectChanges()}onTimeUpdate(t){let n=this.buffered.length-1;this.time={current:this.currentTime*1e3,total:this.time.total,left:(this.duration-this.currentTime)*1e3},n>=0&&(this.buffer={end:this.buffered.end(n)*1e3}),this.ref.detectChanges()}onProgress(t){let n=this.buffered.length-1;n>=0&&(this.buffer={end:this.buffered.end(n)*1e3}),this.ref.detectChanges()}onVolumeChange(t){this.ref.detectChanges()}onError(t){this.ref.detectChanges()}bufferCheck(){let t=1/this.checkInterval;this.currentPlayPos=this.currentTime,!this.isBufferDetected&&this.currentPlayPos<this.lastPlayPos+t&&(this.isBufferDetected=!0),this.isBufferDetected&&this.currentPlayPos>this.lastPlayPos+t&&(this.isBufferDetected=!1),this.bufferDetected.closed||this.bufferDetected.next(this.isBufferDetected),this.lastPlayPos=this.currentPlayPos}startBufferCheck(){this.checkBufferSubscription=Gt(0,this.checkInterval).subscribe(()=>{this.bufferCheck()})}stopBufferCheck(){this.checkBufferSubscription&&this.checkBufferSubscription.unsubscribe(),this.isBufferDetected=!1,this.bufferDetected.next(this.isBufferDetected)}seekTime(t,n=!1){let s,o=this.duration;n?s=t*o/100:s=t,this.currentTime=s}addTextTrack(t,n,s,o){let a=this.vgMedia.addTextTrack(t,n,s);return o&&(a.mode=o),a}ngOnDestroy(){this.vgMedia.src="",this.mutationObs?.unsubscribe(),this.canPlayObs?.unsubscribe(),this.canPlayThroughObs?.unsubscribe(),this.loadedMetadataObs?.unsubscribe(),this.waitingObs?.unsubscribe(),this.progressObs?.unsubscribe(),this.endedObs?.unsubscribe(),this.playingObs?.unsubscribe(),this.playObs?.unsubscribe(),this.pauseObs?.unsubscribe(),this.timeUpdateObs?.unsubscribe(),this.volumeChangeObs?.unsubscribe(),this.errorObs?.unsubscribe(),this.checkBufferSubscription?.unsubscribe(),this.syncSubscription?.unsubscribe(),this.bufferDetected?.complete(),this.bufferDetected?.unsubscribe(),this.api.unregisterMedia(this)}};e.\u0275fac=function(n){return new(n||e)(me(fi),me(sn))},e.\u0275dir=Ee({type:e,selectors:[["","vgMedia",""]],inputs:{vgMedia:"vgMedia",vgMaster:"vgMaster"},standalone:!1});let i=e;return i})(),eo=(()=>{let e=class e{constructor(t,n,s,o){this.api=n,this.fsAPI=s,this.controlsHidden=o,this.isFullscreen=!1,this.isNativeFullscreen=!1,this.areControlsHidden=!1,this.onPlayerReady=new P,this.onMediaReady=new P,this.subscriptions=[],this.elem=t.nativeElement,this.api.registerElement(this.elem)}ngAfterContentInit(){this.medias.toArray().forEach(t=>{this.api.registerMedia(t)}),this.fsAPI.init(this.elem,this.medias),this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this))),this.subscriptions.push(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this))),this.api.onPlayerReady(this.fsAPI),this.onPlayerReady.emit(this.api)}onChangeFullscreen(t){this.fsAPI.nativeFullscreen?this.isNativeFullscreen=t:(this.isFullscreen=t,this.zIndex=t?ui.getZIndex().toString():"auto")}onHideControls(t){this.areControlsHidden=t}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}};e.\u0275fac=function(n){return new(n||e)(me(ae),me(fi),me(kn),me(In))},e.\u0275cmp=y({type:e,selectors:[["vg-player"]],contentQueries:function(n,s,o){if(n&1&&rt(o,Fn,5),n&2){let a;J(a=Z())&&(s.medias=a)}},hostVars:8,hostBindings:function(n,s){n&2&&(j("z-index",s.zIndex),V("fullscreen",s.isFullscreen)("native-fullscreen",s.isNativeFullscreen)("controls-hidden",s.areControlsHidden))},outputs:{onPlayerReady:"onPlayerReady",onMediaReady:"onMediaReady"},standalone:!1,features:[st([fi,kn,In])],ngContentSelectors:x1,decls:1,vars:0,template:function(n,s){n&1&&(Wt(),Kt(0))},styles:[`vg-player{font-family:videogular;position:relative;display:flex;width:100%;height:100%;overflow:hidden;background-color:#000}vg-player.fullscreen{position:fixed;left:0;top:0}vg-player.native-fullscreen.controls-hidden{cursor:none}
|
|
19
|
+
`],encapsulation:2});let i=e;return i})(),E1=[fi,In,kn,ui,z,se];var Qe=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ge({type:e}),e.\u0275inj=he({providers:[...E1],imports:[be]});let i=e;return i})();var to=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ge({type:e}),e.\u0275inj=he({imports:[be,Qe]});let i=e;return i})();var io=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ge({type:e}),e.\u0275inj=he({imports:[be,Qe]});let i=e;return i})();var no=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=ge({type:e}),e.\u0275inj=he({imports:[be,Qe]});let i=e;return i})();var ro=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-viewer-media"]],inputs:{currentHeight:"currentHeight",fileUrl:"fileUrl"},decls:4,vars:4,consts:[["media",""],["preload","none","controls","",3,"vgMedia"],["type","video/webm",3,"src"]],template:function(n,s){if(n&1&&(c(0,"vg-player")(1,"video",1,0),m(3,"source",2),d()()),n&2){let o=Yt(2);j("height",s.currentHeight,"px"),l(),u("vgMedia",o),l(2),u("src",s.fileUrl,ze)}},dependencies:[Qe,Fn,eo,io,no,to],encapsulation:2,changeDetection:0});let i=e;return i})();var so=(()=>{let e=class e{constructor(){this.sanitizer=h(gi),this.pdfjsUrl=`${xi}/pdfjs/web/viewer.html?file=`}ngOnInit(){this.url=this.sanitizer.bypassSecurityTrustResourceUrl(`${this.pdfjsUrl}${encodeURIComponent(this.fileUrl)}`)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-viewer-pdf"]],inputs:{fileUrl:"fileUrl",currentHeight:"currentHeight"},decls:1,vars:3,consts:[[1,"app-viewer-iframe",3,"src"]],template:function(n,s){n&1&&pi(0,"iframe",0),n&2&&(j("height",s.currentHeight,"px"),ke("src",s.url,$n))},encapsulation:2,changeDetection:0});let i=e;return i})();var w1=["ref"];function oo(i){return i&&i.replace(/\r\n|\r/g,`
|
|
20
|
+
`)}var ao=(()=>{let e=class e{constructor(){this.className="",this.name="codemirror",this.autoFocus=!1,this.preserveScrollPosition=!1,this.cursorActivity=new P,this.focusChange=new P,this.scroll=new P,this.value="",this.disabled=!1,this.isFocused=!1,this._differs=h(Kn),this._ngZone=h(Ut),this.onChange=t=>{},this.onTouched=()=>{},this.codeMirror=CodeMirror||import("./chunk-SSFF27P2.js")}set options(t){this._options=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngAfterViewInit(){this.ref&&this._ngZone.runOutsideAngular(()=>{this.textArea=this.codeMirror.fromTextArea(this.ref.nativeElement,this._options),this.textArea.on("cursorActivity",t=>this._ngZone.run(()=>this.cursorActive(t))),this.textArea.on("scroll",this.scrollChanged.bind(this)),this.textArea.on("blur",()=>this._ngZone.run(()=>this.focusChanged(!1))),this.textArea.on("focus",()=>this._ngZone.run(()=>this.focusChanged(!0))),this.textArea.on("change",(t,n)=>this._ngZone.run(()=>this.codemirrorValueChanged(t,n))),this.textArea.setValue(this.value)})}ngDoCheck(){if(!this._differ)return;let t=this._differ.diff(this._options);t&&(t.forEachChangedItem(n=>this.setOptionIfChanged(n.key,n.currentValue)),t.forEachAddedItem(n=>this.setOptionIfChanged(n.key,n.currentValue)),t.forEachRemovedItem(n=>this.setOptionIfChanged(n.key,n.currentValue)))}ngOnDestroy(){this.textArea&&this.textArea.toTextArea()}codemirrorValueChanged(t,n){n.origin!=="setValue"&&(this.value=t.getValue(),this.onChange(this.value))}setOptionIfChanged(t,n){this.textArea&&this.textArea.setOption(t,n)}focusChanged(t){this.onTouched(),this.isFocused=t,this.focusChange.emit(t)}scrollChanged(t){this.scroll.emit(t.getScrollInfo())}cursorActive(t){this.cursorActivity.emit(t)}writeValue(t){if(t==null)return;if(!this.textArea){this.value=t;return}let n=this.textArea.getValue();if(t!==n&&oo(n)!==oo(t))if(this.value=t,this.preserveScrollPosition){let s=this.textArea.getScrollInfo();this.textArea.setValue(this.value),this.textArea.scrollTo(s.left,s.top)}else this.textArea.setValue(this.value)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this.setOptionIfChanged("readOnly",this.disabled)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["ngx-codemirror"]],viewQuery:function(n,s){if(n&1&&Me(w1,7),n&2){let o;J(o=Z())&&(s.ref=o.first)}},inputs:{className:"className",name:"name",autoFocus:"autoFocus",preserveScrollPosition:"preserveScrollPosition",options:"options"},outputs:{cursorActivity:"cursorActivity",focusChange:"focusChange",scroll:"scroll"},features:[st([{provide:Qn,useExisting:Un(()=>e),multi:!0}])],decls:3,vars:6,consts:[["ref",""],["autocomplete","off",3,"name"]],template:function(n,s){n&1&&($t(0,"textarea",1,0),p(2," "),qt()),n&2&&(Fe(Be("ngx-codemirror ",s.className)),V("ngx-codemirror--focused",s.isFocused),ke("name",s.name))},encapsulation:2,changeDetection:0});let i=e;return i})();var A1=["CodeMirror"],co=(()=>{let e=class e{constructor(){this.ready=!1,this.http=h(Ge),this.layout=h(H),this.options={lineNumbers:!1,readOnly:!0,theme:this.layout.switchTheme.getValue()===br?"material":"default",mode:"null"},this.maxSize=5242880,this.modeUrl=`${xi}/codemirror/mode/%N/%N.js`,this.mode=null}ngOnInit(){this.ref.codeMirror.modeURL=this.modeUrl;let t=this.ref.codeMirror.findModeByFileName(this.file.name);t?(this.mode=t.mode,this.http.get(this.file.dataUrl,{responseType:"text"}).subscribe(n=>this.content=n)):this.file.size<=this.maxSize?this.http.get(this.file.dataUrl,{responseType:"text"}).subscribe(n=>this.content=n):this.content=this.layout.translateString("This file contains binary data that can not be read")}ngAfterViewInit(){this.mode&&(this.ref.codeMirror.autoLoadMode(this.ref.textArea,this.mode),this.ref.textArea.setOption("mode",this.mode),this.options.lineNumbers=!0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-viewer-text"]],viewQuery:function(n,s){if(n&1&&Me(A1,7),n&2){let o;J(o=Z())&&(s.ref=o.first)}},inputs:{currentHeight:"currentHeight",file:"file"},decls:3,vars:4,consts:[["CodeMirror",""],[3,"ngModel","options"]],template:function(n,s){n&1&&(c(0,"div"),m(1,"ngx-codemirror",1,0),d()),n&2&&(j("height",s.currentHeight,"px"),l(),u("ngModel",s.content)("options",s.options))},dependencies:[ao,xt,St,_t],styles:[`.CodeMirror{height:100%;font-size:.7rem}
|
|
21
|
+
`],encapsulation:2});let i=e;return i})();function D1(i,e){if(i&1&&(c(0,"div",10),m(1,"img",11),d()),i&2){let r=f(2);j("height",r.currentHeight,"px"),l(),j("max-height",r.currentHeight,"px"),u("src",r.currentFile.dataUrl,ze)}}function N1(i,e){if(i&1&&m(0,"app-files-viewer-pdf",7),i&2){let r=f(2);u("currentHeight",r.currentHeight)("fileUrl",r.currentFile.dataUrl)}}function O1(i,e){if(i&1&&m(0,"app-files-viewer-media",7),i&2){let r=f(2);u("currentHeight",r.currentHeight)("fileUrl",r.currentFile.dataUrl)}}function T1(i,e){if(i&1&&m(0,"app-files-viewer-document",8),i&2){let r=f(2);u("currentHeight",r.currentHeight)("file",r.currentFile)("mode",r.mode)}}function P1(i,e){if(i&1&&m(0,"app-files-viewer-text",9),i&2){let r=f(2);u("currentHeight",r.currentHeight)("file",r.currentFile)}}function L1(i,e){if(i&1&&(c(0,"div",5),M(1,D1,2,5,"div",6)(2,N1,1,2,"app-files-viewer-pdf",7)(3,O1,1,2,"app-files-viewer-media",7)(4,T1,1,3,"app-files-viewer-document",8)(5,P1,1,2,"app-files-viewer-text",9),d()),i&2){let r,t=f();l(),w((r=t.shortMime)==="image"?1:r==="pdf"?2:r==="media"?3:r==="document"?4:5)}}var uo=(()=>{let e=class e{constructor(){this.layout=h(H),this.subscription=this.layout.resizeEvent.subscribe(()=>this.onResize()),this.offsetTop=42}ngOnInit(){this.onResize()}ngOnDestroy(){this.subscription.unsubscribe()}onClose(){this.layout.closeDialog(null,this.currentFile.id)}onMinimize(){this.layout.minimizeDialog(this.currentFile.id,{name:this.currentFile.name,mimeUrl:this.currentFile.mimeUrl})}onResize(){this.currentHeight=window.innerHeight-this.offsetTop}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-viewer-dialog"]],inputs:{currentFile:"currentFile",mode:"mode",shortMime:"shortMime"},decls:8,vars:2,consts:[[1,"modal-header"],[1,"modal-title"],[1,"fas","fa-eye"],["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"],[1,"d-flex","justify-content-center",3,"height"],[3,"currentHeight","fileUrl"],[3,"currentHeight","file","mode"],[3,"currentHeight","file"],[1,"d-flex","justify-content-center"],["alt","",1,"img-fluid","align-self-center",3,"src"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h4",1),m(2,"i",2),c(3,"span"),p(4),d()(),c(5,"button",3),b("click",function(){return s.onMinimize()}),d(),c(6,"button",4),b("click",function(){return s.onClose()}),d()(),M(7,L1,6,1,"div",5)),n&2&&(l(4),R(s.currentFile.name),l(3),w(s.currentFile?7:-1))},dependencies:[so,ro,co,Zs],encapsulation:2});let i=e;return i})();var Wi=class{constructor(e){Object.assign(this,e),this.mimeUrl=ct(this.mime),this.setInfos()}fallBackMimeUrl(){this.mimeUrl=Nt}setInfos(){let e=this.path.split("/")[0],r=this.path.split("/")[1]===$e.PERSONAL;this.showedPath=this.path.split("/").slice(r?2:1).join("/"),this.iconClass=e===le.SHARES?"purple":"primary",this.icon=e===le.SHARES?ee.SHARES:r?ee.PERSONAL:ee.SPACES}};var Ki=class{constructor(e){this.inTrash=!1,Object.assign(this,e),this.mimeUrl=ct(this.mime),this.iconClass=this.shareId?"purple":"primary",this.icon=this.shareId?ee.SHARES:this.spaceId?ee.SPACES:ee.PERSONAL,this.showedPath=this.path.split("/").slice(this.path.split("/")[1]===$e.PERSONAL?2:1).join("/"),this.inTrash=this.path.split("/")[0]===le.TRASH}fallBackMimeUrl(){this.mimeUrl=Nt}};var gt=(function(i){return i[i.PENDING=0]="PENDING",i[i.SUCCESS=1]="SUCCESS",i[i.ERROR=2]="ERROR",i})(gt||{}),Yi=class{constructor(e,r,t,n){this.props={},this.id=e,this.type=r,this.path=t,this.name=n,(r===E.COPY||r===E.MOVE||r===E.DOWNLOAD)&&(this.props={progress:1},r!==E.DOWNLOAD&&(this.props.src={name:n,path:t}))}};var fo=(()=>{let e=class e{constructor(){this.http=h(Ge),this.layout=h(H),this.store=h(Ue),this.onDone={[E.DELETE]:{fileEvent:{delete:!0},msg:{success:"Deletion done",failed:"Deletion failed"}},[E.MOVE]:{fileEvent:{delete:!0,reloadFocusOnDst:!0},msg:{success:"Move done",failed:"Move failed"}},[E.COPY]:{msg:{success:"Copy done",failed:"Copy failed"},fileEvent:{reload:!0,focus:!0}},[E.DOWNLOAD]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Download done",failed:"Download failed"}},[E.UPLOAD]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Upload done",failed:"Upload failed"}},[E.COMPRESS]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Compression done",failed:"Compression failed"}},[E.DECOMPRESS]:{fileEvent:{reload:!0,focus:!0},msg:{success:"Decompression done",failed:"Decompression failed"}}},this.watcher=null,this.watch=Gt(1e3,1e3).pipe(Gn(()=>this.doWatch())),this.loadAll()}addTask(t){t.status===gt.PENDING?(this.store.filesActiveTasks.next([t,...this.store.filesActiveTasks.getValue()]),this.startWatch()):this.store.filesEndedTasks.next([t,...this.store.filesEndedTasks.getValue()])}createUploadTask(t,n,s){let o=new Yi(yr(),E.UPLOAD,t,n);return o.status=gt.PENDING,o.startedAt=vr(null,!0),o.props={progress:1,size:0,totalSize:s},this.store.filesActiveTasks.next([o,...this.store.filesActiveTasks.getValue()]),this.layout.showRSideBarTab(Mt.TASKS,!0),o}removeAll(){this.http.delete(di).subscribe({next:()=>this.clearEndedTasks(),error:t=>console.error(t)})}remove(t){this.http.delete(`${di}/${t.id}`).subscribe({next:()=>this.deleteTask(t.id,!1),error:n=>console.error(n)})}updateTask(t){if(t.status===gt.PENDING){let n=this.findTask(t.id,!0);Object.assign(n,t)}else this.deleteTask(t.id,!0),this.addTask(t),this.taskDone(t)}loadAll(){this.http.get(di).subscribe({next:t=>t.forEach(n=>this.addTask(n)),error:t=>console.error(t)})}doWatch(){this.store.filesActiveTasks.getValue().length?this.fetchActiveTasks():this.stopWatch()}startWatch(){(!this.watcher||this.watcher.closed)&&(this.layout.showRSideBarTab(Mt.TASKS,!0),this.watcher=this.watch.subscribe())}stopWatch(){(this.watcher||!this.watcher.closed)&&(setTimeout(()=>this.layout.hideRSideBarTab(Mt.TASKS),3e3),this.watcher.unsubscribe())}fetchActiveTasks(){for(let t of this.store.filesActiveTasks.getValue().filter(n=>n.type!==E.UPLOAD))this.http.get(`${di}/${t.id}`).subscribe({next:n=>this.updateTask(n),error:n=>{n.status===404&&(t.result=n.error.message,t.status=gt.ERROR,this.updateTask(t)),console.warn(n)}})}findTask(t,n){return n?this.store.filesActiveTasks.getValue().find(s=>s.id===t):this.store.filesEndedTasks.getValue().find(s=>s.id===t)}deleteTask(t,n){n?this.store.filesActiveTasks.next(this.store.filesActiveTasks.getValue().filter(s=>s.id!==t)):this.store.filesEndedTasks.next(this.store.filesEndedTasks.getValue().filter(s=>s.id!==t))}taskDone(t){if(t.type in this.onDone){if(this.onDone[t.type].fileEvent){let n=Ze(oe({},this.onDone[t.type].fileEvent),{status:t.status});t.type===E.COPY||t.type===E.MOVE?(n.filePath=t.props.src.path,n.fileName=t.props.src.name,n.fileDstPath=t.path):(n.filePath=t.path,n.fileName=t.name,t.type===E.COMPRESS&&(n.archiveId=t.props.compressInDirectory===!1?t.id:null)),this.store.filesOnEvent.next(n)}t.status===gt.SUCCESS?t.type===E.DELETE?this.removeDeletedChildTasks(t):this.layout.sendNotification("info",this.onDone[t.type].msg.success,t.name):this.layout.sendNotification("error",this.onDone[t.type].msg.failed,t.name,{error:{message:t.result}})}}removeDeletedChildTasks(t){if(t.path.startsWith(le.SHARES))this.remove(t);else if(t.path.startsWith(le.TRASH)){for(let n of this.store.filesEndedTasks.getValue().filter(s=>s.id!==t.id&&s.type===E.DELETE&&s.path.startsWith(le.FILES))){let s=t.path.replace(le.TRASH,le.FILES);new RegExp(`^${zr(`${s}/${t.name}`)}(/|$)`).test(`${n.path}/${n.name}`)&&this.remove(n)}this.remove(t)}}clearEndedTasks(){this.store.filesEndedTasks.next([])}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var po=(()=>{let e=class e{constructor(){this.treeNodeSelected=null,this.treeCopyMoveOn=new Bt,this.clipboardAction="copyPaste",this.http=h(Ge),this.layout=h(H),this.store=h(Ue),this.sanitizer=h(gi),this.filesTasksService=h(fo)}getTreeNode(t,n=!1){return Qi(this.http.get(`${xr}/${t}`,{params:n?new Qt().set("showFiles",n):null}))}addToClipboard(t){if(t.length)if(!this.store.filesClipboard.getValue().length)this.layout.showRSideBarTab(Mt.CLIPBOARD,!0),this.store.filesClipboard.next(t);else{let n=t.filter(s=>this.store.filesClipboard.getValue().indexOf(s)===-1);n.length&&this.store.filesClipboard.next([...n,...this.store.filesClipboard.getValue()])}}removeFromClipboard(t){this.store.filesClipboard.next(this.store.filesClipboard.getValue().filter(n=>n.id!==t.id))}clearClipboard(){this.store.filesClipboard.next([])}onPasteClipboard(t){let n=t||this.clipboardAction;if(this.store.filesClipboard.getValue().length){let s=this.currentRoute;this.copyMove([...this.store.filesClipboard.getValue()],s,n==="copyPaste"?E.COPY:E.MOVE),this.clearClipboard()}}download(t){on(t.dataUrl)}copyMove(t,n,s){let o=s===E.MOVE;for(let a of t){o&&(a.isBeingDeleted=!0);let g={dstDirectory:n};this.http.request(s,a.taskUrl,{body:g}).subscribe({next:C=>this.filesTasksService.addTask(C),error:C=>{o&&(a.isBeingDeleted=!1),this.layout.sendNotification("error",s==="move"?"Move failed":"Copy failed",a.name,C)}})}}rename(t,n){if(!this.isValidName(n))return;let o={dstDirectory:t.path.split("/").slice(0,-1).join("/")||".",dstName:n};this.http.request(E.MOVE,t.dataUrl,{body:o}).subscribe({next:a=>{t.rename(a.name),t.isEditable=!1},error:a=>this.layout.sendNotification("error","Rename",t.name,a)})}delete(t){for(let n of t)n.isBeingDeleted=!0,this.http.delete(n.taskUrl).subscribe({next:s=>this.filesTasksService.addTask(s),error:s=>{n.isBeingDeleted=!1,this.layout.sendNotification("error","Deletion failed",n.name,s)}})}make(t,n,s=null,o=!1){if(!this.isValidName(n))return;s=s||this.currentRoute;let a={type:t};if(o)return this.http.post(`${Ln}/${s}/${n}`,a);this.http.post(`${Ln}/${s}/${n}`,a).subscribe({next:()=>this.store.filesOnEvent.next({filePath:s,fileName:n,focus:!0,reload:!0}),error:g=>this.layout.sendNotification("error","Creation failed",n,g)})}compress(t){let n=this.currentRoute;this.http.post(`${Gs}/${n}/${t.name}.${t.extension}`,t).subscribe({next:s=>this.filesTasksService.addTask(s),error:s=>this.layout.sendNotification("error","Compression failed",t.name,s)})}decompress(t){let n=this.currentRoute;this.http.post(`${Us}/${n}/${t.name}`,null).subscribe({next:s=>this.filesTasksService.addTask(s),error:s=>this.layout.sendNotification("error","Compression failed",t.name,s)})}downloadFromUrl(t,n){if(!this.isValidName(n))return;let s=this.currentRoute,o={url:t};this.http.post(`${js}/${s}/${n}`,o).subscribe({next:a=>this.filesTasksService.addTask(a),error:a=>this.layout.sendNotification("error","Download failed",t,a)})}downloadTaskArchive(t){on(`${$s}/${t}`)}loadRecents(t){this.http.get(qs,{params:new Qt().set("limit",t)}).pipe(jt(n=>n.map(s=>new Ki(s)))).subscribe({next:n=>{this.store.filesRecents.update(s=>[...n,...s.slice(t)])},error:n=>this.layout.sendNotification("error","Files","Unable to load",n)})}search(t){return this.http.request("search",Ws,{body:t}).pipe(jt(n=>n.map(s=>(s.content&&(s.content=this.sanitizer.bypassSecurityTrustHtml(s.content)),new Wi(s)))))}openViewerDialog(t,n){return et(this,null,function*(){this.http.head(n.dataUrl).subscribe({next:()=>et(this,null,function*(){let s;try{s=yield this.viewerHook(t,n)}catch{this.download(n);return}this.layout.openDialog(uo,"full",{id:n.id,initialState:{currentFile:n,mode:t,shortMime:s}})}),error:s=>{console.error(s.message),this.layout.sendNotification("error","Unable to open document",n?.name)}})})}viewerHook(t,n){return et(this,null,function*(){let s=yield this.getOnlyOfficeStatus();if(n.shortMime==="document"&&!s){if(n.mime.startsWith("text-"))return"text";throw new Error("Feature not enabled")}return n.shortMime==="pdf"&&t==="edit"&&s?"document":n.shortMime})}getOnlyOfficeStatus(){return et(this,null,function*(){if(this.store.filesOnlyOffice().enabled!==null)return this.store.filesOnlyOffice().enabled;try{let t=yield Qi(this.http.get(Ys));return this.store.filesOnlyOffice.set(t),t.enabled}catch{let t={enabled:!1};return this.store.filesOnlyOffice.set(t),t.enabled}})}isValidName(t){try{return gr(t),!0}catch(n){return this.layout.sendNotification("error","Rename",`${this.layout.translateString(n.message)} : ${mr}`),!1}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var z1=["tree"];function I1(i,e){if(i&1&&(c(0,"span",8),p(1),d()),i&2){let r=f(2);l(),R(r.errorMsg)}}function k1(i,e){i&1&&(c(0,"span",9),p(1,"Navigation Tree"),d())}function F1(i,e){if(i&1){let r=I();c(0,"div",3)(1,"button",6),b("click",function(){S(r);let n=f();return _(n.onRefresh())}),m(2,"fa-icon",7),d(),M(3,I1,2,1,"span",8)(4,k1,2,0,"span",9),d()}if(i&2){let r=f();l(2),u("icon",r.icons.faArrowRotateRight),l(),w(r.errorMsg?3:4)}}function R1(i,e){if(i&1&&(c(0,"span")(1,"span"),p(2),d()()),i&2){let r=f(2);l(2),R(r.store.filesSelection()[0].name)}}function V1(i,e){if(i&1&&(c(0,"span"),m(1,"fa-icon",18),d()),i&2){let r=f(2);l(),u("icon",r.icons.faQuestion)}}function H1(i,e){if(i&1&&(c(0,"span")(1,"span"),p(2),d(),p(3,"\xA0"),c(4,"span",9),p(5,"items"),d()()),i&2){let r=f(2);l(2),R(r.store.filesSelection().length)}}function B1(i,e){if(i&1){let r=I();c(0,"div",10)(1,"div",11)(2,"span",12)(3,"span",9),p(4,"Source"),d(),p(5,":"),d(),M(6,R1,3,1,"span")(7,V1,2,1,"span")(8,H1,6,1,"span"),d(),c(9,"div",13)(10,"span",12)(11,"span",9),p(12,"Destination"),d(),p(13,":"),d(),c(14,"span"),p(15),d()(),c(16,"div",14)(17,"button",15),b("click",function(){S(r);let n=f();return _(n.actionMove())}),m(18,"fa-icon",7),p(19," Move "),d(),c(20,"button",15),b("click",function(){S(r);let n=f();return _(n.actionCopy())}),m(21,"fa-icon",7),p(22," Copy "),d(),c(23,"button",16),b("click",function(){S(r);let n=f();return _(n.actionCancel())}),m(24,"fa-icon",7),p(25," Cancel "),d()()(),m(26,"hr",17)}if(i&2){let r,t=f();l(6),w((r=t.store.filesSelection().length)===1?6:r===0?7:8),l(9),R((t.selection==null?null:t.selection.data.name)||""),l(2),u("disabled",!t.selection||!t.store.filesSelection().length||!t.srcAllowed||!t.dstAllowed),l(),u("icon",t.icons.faArrowsAlt),l(2),u("disabled",!t.selection||!t.store.filesSelection().length||!t.dstAllowed),l(),u("icon",t.icons.faClone),l(3),u("icon",t.icons.faTimes)}}function j1(i,e){if(i&1){let r=I();c(0,"div",19),b("click",function(n){let s=S(r).$implicit;return _(s.mouseAction("click",n))})("appTap",function(n){let s=S(r).$implicit;return _(s.mouseAction("dblClick",n))}),m(1,"tree-node-expander",20),c(2,"div",21),m(3,"tree-node-content",22),d()()}if(i&2){let r=e.index,t=e.$implicit;j("padding-left",t.getNodePadding()),V("tree-selected",t.isActive)("tree-disabled",!t.data.enabled),l(),V("toggle-children-file",!t.data.isDir)("toggle-children-shared",t.data.inShare),u("node",t),l(),V("node-content-wrapper-active",t.isActive),l(),u("index",r)("node",t)}}function G1(i,e){if(i&1&&(c(0,"span"),m(1,"fa-icon",23),d()),i&2){let r=f();l(),u("icon",r.icons.faSpinner)}}var ho=(()=>{let e=class e{constructor(){this.selected=new P,this.showFiles=!1,this.allowShares=!0,this.allowSpaces=!0,this.enableCopyMove=!0,this.enableNavigateTo=!0,this.sideBarHeader=!0,this.resizeOffset=80,this.toggleNodesAtStartup=!1,this.store=h(Ue),this.icons={faArrowRotateRight:ur,faArrowsAlt:lr,faClone:nr,faTimes:cr,faFolder:or,faFile:wi,faQuestion:ir,faAnglesRight:fr,faSpinner:yi},this.options={actionMapping:{mouse:{click:(t,n,s)=>this.onSelect(t,n,s),dblClick:(t,n)=>this.onOpen(n),expanderClick:()=>null}},animateExpand:!1,levelPadding:10,useVirtualScroll:!1,nodeHeight:30,dropSlotHeight:0,allowDrag:!1,allowDrop:!1,getChildren:t=>this.getTreeNode(t)},this.srcAllowed=!0,this.dstAllowed=!0,this.errorMsg=null,this.layout=h(H),this.router=h(Xn),this.user=h(_i),this.filesService=h(po),this.copyMoveOnHeight=80,this.subscriptions=[],this.preventDblClick=!1,this._copyMoveOn=!1,this.enableCopyMove&&this.subscriptions.push(tr(this.store.filesSelection).subscribe(()=>this.checkAllowed(this.selection)))}get copyMoveOn(){return this._copyMoveOn}set copyMoveOn(t){this._copyMoveOn!==t&&(this._copyMoveOn=t,t?this.resizeOffset+=this.copyMoveOnHeight:this.resizeOffset-=this.copyMoveOnHeight,setTimeout(()=>this.layout.resizeEvent.next(),0))}get selection(){return this.filesService.treeNodeSelected}set selection(t){this.filesService.treeNodeSelected=t,t&&([0,-1,-2].indexOf(t.data.id)===-1?this.selected.emit(t.data):this.selected.emit(null))}ngOnInit(){this.enableCopyMove&&this.subscriptions.push(this.filesService.treeCopyMoveOn.subscribe(()=>this.onCopyMove())),this.initRoot(),setTimeout(()=>this.focusLastNode(),100)}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onRefresh(){this.tree.treeModel.activeNodes.length?this.tree.treeModel.activeNodes.forEach(t=>{t.loadNodeChildren().then(()=>this.tree.treeModel.update())}):(this.user.userHavePermission(lt.PERSONAL_SPACE)&&this.tree.treeModel.getNodeById(0).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.user.userHavePermission(lt.SPACES)&&this.tree.treeModel.getNodeById(-1).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.allowShares&&this.user.userHavePermission(lt.SHARES)&&this.tree.treeModel.getNodeById(-2).loadNodeChildren().then(()=>this.tree.treeModel.update()))}actionCancel(){this.copyMoveOn=!1,this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}actionCopy(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,E.COPY),this.copyMoveOn=!1}actionMove(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,E.MOVE),this.copyMoveOn=!1}initRoot(){if(this.nodes=[],this.user.userHavePermission(lt.PERSONAL_SPACE)){let t={id:0,name:this.layout.translateString(Ci.PERSONAL_FILES),path:`${Dt.FILES}/${$e.PERSONAL}`,isDir:!0,inShare:!1,mime:qe,quotaIsExceeded:this.store.user.getValue().quotaIsExceeded,enabled:!0,permissions:Sr,children:null,hasChildren:!0,isExpanded:!1};this.checkToggleNodeAtStartup(t,!0)}if(this.allowSpaces&&this.user.userHavePermission(lt.SPACES)){let t={id:-1,name:this.layout.translateString(Ci.SPACES),path:Dt.SPACES,isDir:!0,mime:qe,inShare:!1,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(t)}if(this.allowShares&&this.user.userHavePermission(lt.SHARES)){let t={id:-2,name:this.layout.translateString(Ci.SHARES),path:Dt.SHARES,isDir:!0,mime:qe,inShare:!0,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(t)}}checkToggleNodeAtStartup(t,n=!1){this.toggleNodesAtStartup?this.getTreeNode(t).then(s=>{t.children=s,n?this.nodes.unshift(t):this.nodes.push(t),this.tree.treeModel.update(),this.toggleExpand(this.tree,this.tree.treeModel.getNodeById(t.id),null)}):(n?this.nodes.unshift(t):this.nodes.push(t),this.tree.treeModel.update())}focusLastNode(){this.selection&&(this.selection=this.tree.treeModel.getNodeById(this.selection.data.id),this.selection&&B.ACTIVATE(this.tree,this.selection,null))}getTreeNode(t){return this.filesService.getTreeNode(t?.data?.path||t?.path||t,this.showFiles)}collapseChildren(t,n){for(let s of n)[0,-1,-2].indexOf(s.id)===-1&&s.id!==t.id&&(s.data.isExpanded=!1,s.collapse())}toggleExpand(t,n,s){B.TOGGLE_EXPANDED(t,n,s),n.data.isExpanded=!!n.data.isExpanded}onOpen(t){if(!this.copyMoveOn&&this.enableNavigateTo&&t.data.enabled){clearTimeout(this.preventTimer),this.preventDblClick=!0;let n=t.data.path.split("/");n[0]!==Dt.SPACES&&n.unshift(Dt.SPACES),this.router.navigate(n).catch(console.error)}}onSelect(t,n,s){if(!n.data.enabled){this.layout.sendNotification("warning",n.data.name,`${n.data.inShare?"Share":"Space"} is disabled`);return}B.ACTIVATE(t,n,s),this.preventTimer=setTimeout(()=>{this.checkAllowed(n),this.selection=n,this.preventDblClick||n.hasChildren&&(this.collapseChildren(n,n.parent.children),this.toggleExpand(t,n,s)),this.preventDblClick=!1},200)}checkAllowed(t){if(this.copyMoveOn){if(this.store.filesSelection().length)for(let n of this.store.filesSelection()){if(n.root?.alias){this.errorMsg="You can not move an anchored file",this.srcAllowed=!1,this.dstAllowed=!0;return}if(n.lock&&n.lock.ownerLogin!==this.store.user.getValue().login){this.errorMsg="You can not move a locked file",this.srcAllowed=!1,this.dstAllowed=!0;return}}if(t){if([-1,-2].indexOf(t.data.id)>-1){this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!1;return}else if(t.data.permissions.indexOf(At.ADD)===-1){this.errorMsg="You are not allowed to write here",this.srcAllowed=!0,this.dstAllowed=!1;return}else if(t.data.quotaIsExceeded){this.errorMsg="No more space available",this.srcAllowed=!0,this.dstAllowed=!1;return}}this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}}onCopyMove(){this.onRefresh(),this.copyMoveOn=!0,this.checkAllowed(this.selection)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-tree"]],viewQuery:function(n,s){if(n&1&&Me(z1,7),n&2){let o;J(o=Z())&&(s.tree=o.first)}},inputs:{showFiles:"showFiles",allowShares:"allowShares",allowSpaces:"allowSpaces",enableCopyMove:"enableCopyMove",enableNavigateTo:"enableNavigateTo",sideBarHeader:"sideBarHeader",resizeOffset:"resizeOffset",toggleNodesAtStartup:"toggleNodesAtStartup"},outputs:{selected:"selected"},decls:9,vars:7,consts:[["tree",""],["treeNodeWrapperTemplate",""],["loadingTemplate",""],[1,"sidebar-component-title"],["appAutoResize","",3,"overFlowX","resizeOffset","useMaxHeight"],[3,"nodes","options"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["l10nTranslate","",1,"text-danger","fs-xxs","p-2"],["l10nTranslate",""],[1,"px-2","pt-2","pb-0","fs-xs"],[1,"text-start","text-truncate"],["l10nTranslate","",1,"fs-xs","fw-bold","me-2"],[1,"text-start","text-truncate","mt-1"],[1,"d-flex","justify-content-between","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary",3,"click"],[1,"mx-0","mt-2","mb-0"],[1,"fw-bold","me-1",3,"icon"],[1,"node-wrapper",3,"click","appTap"],[3,"node"],[1,"node-content-wrapper"],[3,"index","node"],["animation","spin",1,"fw-bold",3,"icon"]],template:function(n,s){n&1&&(M(0,F1,5,2,"div",3),M(1,B1,27,7),c(2,"div",4)(3,"tree-root",5,0),L(5,j1,4,15,"ng-template",null,1,Xt)(7,G1,2,1,"ng-template",null,2,Xt),d()()),n&2&&(w(s.sideBarHeader?0:-1),l(),w(s.copyMoveOn?1:-1),l(),u("overFlowX","auto")("resizeOffset",s.resizeOffset)("useMaxHeight",!1),l(),u("nodes",s.nodes)("options",s.options))},dependencies:[$i,Bs,Hs,On,Nn,ye,Ce,wr],encapsulation:2});let i=e;return i})();function U1(i,e){if(i&1&&(c(0,"span"),m(1,"fa-icon",10),p(2),ve(3,"pathSlice"),d()),i&2){let r=f();l(),u("icon",r.selection.isDir?r.icons.faFolderClosed:r.icons.faFile),l(),re(" ",Ct(3,2,r.selection.path,-1)," ")}}function $1(i,e){i&1&&(c(0,"span",2),p(1,"Select a file"),d())}function q1(i,e){if(i&1&&(c(0,"span",7),p(1),d()),i&2){let r=f();l(),R(r.errorSelection)}}var mo=(()=>{let e=class e{constructor(){this.currentRoots=[],this.submitEvent=new P,this.allowSpaces=!1,this.toggleNodesAtStartup=!0,this.mustHaveShareOutsidePermission=!1,this.layout=h(H),this.icons={faFile:wi,faFolderClosed:Br},this.errorSelection=null,this.selection=null}onSelect(t){if(t){if(this.mustHaveShareOutsidePermission){if(t.permissions.indexOf(At.SHARE_OUTSIDE)===-1){this.errorSelection=this.layout.translateString("You do not have share permission"),this.selection=null;return}if(t.path.split("/").length<=2){this.errorSelection=this.layout.translateString("You can not share a space"),this.selection=null;return}}let n=t,s=this.currentRoots.find(o=>o.file.id===n.id);s?(this.errorSelection=this.layout.translateString("This item is already selected"),this.selection=null):(s=this.currentRoots.find(o=>n.path.startsWith(o.file.path)),s?(this.errorSelection=`${this.layout.translateString("Parent item is already selected")}: ${s.file.path}`,this.selection=null):(this.errorSelection=null,this.selection=n))}else this.selection=null,this.errorSelection=null}onSubmit(){this.submitEvent.emit({id:this.selection.id,name:this.selection.name,path:this.selection.path,mime:this.selection.mime,permissions:this.selection.permissions}),this.layout.closeDialog()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-files-tree-dialog"]],inputs:{currentRoots:"currentRoots",allowSpaces:"allowSpaces",toggleNodesAtStartup:"toggleNodesAtStartup",mustHaveShareOutsidePermission:"mustHaveShareOutsidePermission"},outputs:{submitEvent:"submitEvent"},decls:13,vars:11,consts:[[1,"modal-header"],[1,"modal-title"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","py-2","px-0"],[3,"selected","enableNavigateTo","enableCopyMove","showFiles","allowShares","allowSpaces","sideBarHeader","toggleNodesAtStartup","resizeOffset"],[1,"modal-footer"],[1,"me-auto","fs-sm","text-danger","text-truncate"],["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"],[3,"icon"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h4",1),M(2,U1,4,5,"span")(3,$1,2,0,"span",2),d(),c(4,"button",3),b("click",function(){return s.layout.closeDialog()}),d()(),c(5,"div",4)(6,"app-files-tree",5),b("selected",function(a){return s.onSelect(a)}),d()(),c(7,"div",6),M(8,q1,2,1,"span",7),c(9,"button",8),b("click",function(){return s.layout.closeDialog()}),p(10,"Cancel"),d(),c(11,"button",9),b("click",function(){return s.onSubmit()}),p(12,"Confirm"),d()()),n&2&&(l(2),w(s.selection?2:3),l(4),u("enableNavigateTo",!1)("enableCopyMove",!1)("showFiles",!0)("allowShares",!1)("allowSpaces",s.allowSpaces)("sideBarHeader",!1)("toggleNodesAtStartup",s.toggleNodesAtStartup)("resizeOffset",200),l(2),w(s.errorSelection?8:-1),l(3),u("disabled",!s.selection))},dependencies:[ye,ho,Ce,jr],encapsulation:2});let i=e;return i})();function W1(i,e){if(i&1){let r=I();c(0,"input",12),ve(1,"translate"),b("ngModelChange",function(n){S(r);let s=f();return _(s.checkInput(n,!0))}),d()}if(i&2){let r=f();V("is-invalid",!r.rootNameIsValid),u("ngModel",r.newSpaceRoot.name)("placeholder",Ct(1,4,"Name",r.locale.language))}}function K1(i,e){if(i&1&&(c(0,"span",9),p(1),d()),i&2){let r=f();l(),R(r.error)}}function Y1(i,e){if(i&1){let r=I();c(0,"button",13),b("click",function(){S(r);let n=f();return _(n.onSubmit())}),p(1,"Confirm"),d()}}function X1(i,e){if(i&1){let r=I();c(0,"button",14),b("click",function(){S(r);let n=f();return _(n.onValidRoot())}),p(1,"Check the location"),d()}}var go=(()=>{let e=class e{constructor(){this.currentRoots=[],this.submitEvent=new P,this.withRootName=!0,this.locale=h(Et),this.layout=h(H),this.icons={faFolderClosed:pr},this.newSpaceRoot={name:"",externalPath:""},this.rootNameIsValid=!1,this.rootPathIsValid=!1,this.rootIsValid=!1,this.spacesService=h(Ot)}ngOnInit(){this.withRootName||(this.rootNameIsValid=!0)}keyEnter(){this.rootIsValid?this.onSubmit():this.onValidRoot()}onValidRoot(){if(this.withRootName&&!this.newSpaceRoot.name||!this.newSpaceRoot.externalPath){this.error="Name and location are required";return}this.newSpaceRoot.externalPath[0]!=="/"&&(this.newSpaceRoot.externalPath="/"+this.newSpaceRoot.externalPath);for(let t of this.currentRoots){let n=t.externalPath[t.externalPath.length-1]==="/"?t.externalPath:`${t.externalPath}/`;if(this.newSpaceRoot.externalPath.startsWith(n)){this.rootPathIsValid=!1,this.error="Parent location already exists in files";return}}this.spacesService.checkSpaceRootPath(this.newSpaceRoot.externalPath).subscribe({next:()=>{this.rootPathIsValid=!0,this.rootNameIsValid=!0,this.rootIsValid=!0,this.error=null},error:t=>{this.rootPathIsValid=!1,this.error=t.error.message}})}onSubmit(){this.submitEvent.emit(this.newSpaceRoot),this.layout.closeDialog()}checkInput(t,n=!1){n?(this.newSpaceRoot.name=t,this.rootNameIsValid=!!t):(this.newSpaceRoot.externalPath=t,this.rootPathIsValid=!!t),this.rootIsValid&&(this.rootIsValid=!1)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-space-root-path-dialog"]],hostBindings:function(n,s){n&1&&b("keyup.enter",function(){return s.keyEnter()})},inputs:{currentRoots:"currentRoots",withRootName:"withRootName"},outputs:{submitEvent:"submitEvent"},decls:14,vars:13,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",3,"click"],[1,"modal-body","form-validation"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModel","is-invalid","placeholder"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-4",3,"ngModelChange","autoFocus","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-sm","text-danger","text-truncate"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModelChange","ngModel","placeholder"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h4",1),m(2,"fa-icon",2),c(3,"span",3),p(4,"Add an external location"),d()(),c(5,"button",4),b("click",function(){return s.layout.closeDialog()}),d()(),c(6,"div",5),M(7,W1,2,7,"input",6),c(8,"input",7),ve(9,"translate"),b("ngModelChange",function(a){return s.checkInput(a)}),d()(),c(10,"div",8),M(11,K1,2,1,"span",9),M(12,Y1,2,0,"button",10)(13,X1,2,0,"button",11),d()),n&2&&(l(2),u("icon",s.icons.faFolderClosed),l(5),w(s.withRootName?7:-1),l(),V("is-invalid",!s.rootPathIsValid),u("placeholder",Be("",Ct(9,10,"Location",s.locale.language),": /home/sync-in/data"))("autoFocus",!s.withRootName)("ngModel",s.newSpaceRoot.externalPath),l(3),w(s.error?11:-1),l(),w(s.rootIsValid?12:13))},dependencies:[Ce,ye,xt,vi,St,bi,_t,Si,er],encapsulation:2});let i=e;return i})();var vo=(()=>{let e=class e{constructor(){this.locale=h(Et)}ngOnInit(){this.setFilePath()}ngOnChanges(){this.setFilePath()}setFilePath(){let t=this.share.file?wt(this.share.file.name,-1):"";t?this.fileName=t:this.share.parent?.id?this.fileName=this.share.parent.name:this.share instanceof Jt&&this.share.externalPath&&(this.fileName=this.share.externalPath)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-share-file-name"]],inputs:{share:"share"},features:[tt],decls:4,vars:2,consts:[[1,"d-flex","align-items-center"],["draggable","false","height","30","width","30","alt","",3,"error","src"],[1,"d-flex","flex-column","overflow-wrap-and-whitespace","ms-2"]],template:function(n,s){n&1&&($t(0,"div",0)(1,"img",1),qn("error",function(){return s.share.fallBackMimeUrl()}),qt(),$t(2,"div",2),p(3),qt()()),n&2&&(l(),ke("src",s.share.mimeUrl,ze),l(2),re(" ",s.fileName," "))},encapsulation:2});let i=e;return i})();function Q1(i,e){if(i&1&&(c(0,"span"),p(1),d()),i&2){let r=f();l(),R(r.share.name)}}function J1(i,e){i&1&&(c(0,"span",3),p(1,"Create a new share"),d())}function Z1(i,e){if(i&1&&m(0,"fa-icon",4),i&2){let r=f();u("icon",r.icons.faSpinner)}}function el(i,e){i&1&&(c(0,"h4",5)(1,"span",3),p(2,"Edit share"),d()())}function tl(i,e){if(i&1&&(m(0,"fa-icon",40),c(1,"span",41),p(2,"Settings"),d()),i&2){let r=f();u("icon",r.icons.faCog)}}function il(i,e){if(i&1&&(c(0,"div",44)(1,"label",45),p(2,"Storage Usage"),d(),m(3,"app-storage-usage",46),d()),i&2){let r=f(2);l(3),u("item",r.share)}}function nl(i,e){if(i&1){let r=I();c(0,"div",42)(1,"app-storage-quota",43),He("quotaChange",function(n){S(r);let s=f();return Ve(s.share.storageQuota,n)||(s.share.storageQuota=n),_(n)}),d()(),M(2,il,4,1,"div",44)}if(i&2){let r=f();l(),Re("quota",r.share.storageQuota),u("fullWidth",!0),l(),w(r.share.storageUsage?2:-1)}}function rl(i,e){if(i&1){let r=I();c(0,"div")(1,"label",47),p(2,"Full-text search"),d(),c(3,"div",22)(4,"input",48),He("ngModelChange",function(n){S(r);let s=f();return Ve(s.share.storageIndexing,n)||(s.share.storageIndexing=n),_(n)}),d(),c(5,"label",49),p(6),d()()()}if(i&2){let r=f();l(4),Re("ngModel",r.share.storageIndexing),l(2),re(" ",r.share.storageIndexing?"enabled":"disabled"," ")}}function sl(i,e){if(i&1&&(c(0,"div",15)(1,"label",50),p(2,"File"),d(),m(3,"app-share-file-name",51),d()),i&2){let r=f();l(3),u("share",r.share)}}function ol(i,e){if(i&1&&(c(0,"div",58)(1,"label",59),p(2,"Deactivation date"),d(),c(3,"div",60),p(4),ve(5,"amDateFormat"),d()()),i&2){let r=f(2);l(4),R(mi(5,1,r.share.disabledAt))}}function al(i,e){if(i&1&&(c(0,"div",32)(1,"div",52)(2,"label",53),p(3,"Creation date"),d(),c(4,"div",54),p(5),ve(6,"amDateFormat"),d()(),c(7,"div",55)(8,"label",56),p(9,"Modification date"),d(),c(10,"div",57),p(11),ve(12,"amDateFormat"),d()(),M(13,ol,6,3,"div",58),d()),i&2){let r=f();l(5),R(mi(6,3,r.share.createdAt)),l(6),R(mi(12,5,r.share.modifiedAt)),l(2),w(r.share.disabledAt&&!r.share.enabled?13:-1)}}function ll(i,e){if(i&1&&(m(0,"fa-icon",40),c(1,"span",61),p(2,"Members"),d(),c(3,"span"),p(4),d()),i&2){let r=f();u("icon",r.icons.faUsers),l(4),re("(",r.share.members.length,")")}}function cl(i,e){if(i&1&&(m(0,"fa-icon",40),c(1,"span",61),p(2,"Links"),d(),c(3,"span"),p(4),d()),i&2){let r=f();u("icon",r.icons.LINKS),l(4),re("(",r.share.links.length,")")}}function dl(i,e){if(i&1){let r=I();c(0,"button",63),b("click",function(){S(r);let n=f(2);return _(n.confirmDeletion=!0)}),p(1," Remove "),d()}if(i&2){let r=f(2);u("disabled",r.confirmDeletion)}}function ul(i,e){if(i&1){let r=I();c(0,"button",66),b("click",function(){S(r);let n=f(3);return _(n.openAdminRootDialog())}),m(1,"fa-icon",40),p(2," External location "),d()}if(i&2){let r=f(3);l(),u("icon",r.icons.faUserShield)}}function fl(i,e){if(i&1){let r=I();c(0,"button",64),b("click",function(){S(r);let n=f(2);return _(n.openSelectRootDialog())}),m(1,"fa-icon",40)(2,"fa-icon",40),p(3," File "),d(),M(4,ul,3,1,"button",65)}if(i&2){let r=f(2);l(),u("icon",r.icons.faPlus),l(),u("icon",r.icons.SHARES),l(2),w(r.user.isAdmin?4:-1)}}function pl(i,e){if(i&1&&M(0,dl,2,1,"button",62)(1,fl,5,3),i&2){let r=f();w(r.share.id?0:r.allowFilesOptions?1:-1)}}function hl(i,e){if(i&1){let r=I();c(0,"button",64),b("click",function(){S(r);let n=f();return _(n.openCreateLinkDialog())}),m(1,"fa-icon",40)(2,"fa-icon",40),p(3," Link "),d()}if(i&2){let r=f();l(),u("icon",r.icons.faPlus),l(),u("icon",r.icons.LINKS)}}var bo=(()=>{let e=class e{constructor(){this.parentShareId=null,this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.allowFilesOptions=!0,this.shareChange=new P,this.locale=h(Et),this.layout=h(H),this.icons={SHARED:ee.SHARED_WITH_OTHERS,SHARES:ee.SHARES,LINKS:ee.LINKS,faPlus:dr,faSpinner:yi,faUserShield:sr,faUsers:rr,faCog:ar},this.allowedPermissions=[],this.confirmDeletion=!1,this.loading=!1,this.submitted=!1,this.userService=h(_i),this.user=this.userService.user,this.sharesService=h(Ei),this.linksService=h(Mi),this.spacesService=h(Ot)}ngOnInit(){this.share||([this.share,this.parentShareId]=this.sharesService.initShareFromFile(this.user,this.file,this.isSharesRepo,this.inSharesList)),this.allowedPermissions=Object.keys(this.share.hPerms)}searchMembers(t){let n={search:t,ignoreUserIds:[this.user.id,...this.share.parent?.ownerId?[this.share.parent.ownerId]:[],...this.share.members.filter(s=>s.isUser).map(s=>s.id)],ignoreGroupIds:this.share.members.filter(s=>s.isGroup).map(s=>s.id)};return this.userService.searchMembers(n,[At.SHARE_INSIDE])}openSelectRootDialog(){this.layout.openDialog(mo,"xl",{initialState:{toggleNodesAtStartup:!1,allowSpaces:!0,mustHaveShareOutsidePermission:!0}}).content.submitEvent.pipe(vt(1)).subscribe(n=>{let s=n.path.split("/"),o={id:n.id,name:n.name,path:wt(n.path,2),permissions:n.permissions,mime:n.mime,ownerId:s[1]===$e.PERSONAL?this.user.id:null,inTrash:!1,isDir:n.mime===qe,space:{alias:s[1],name:s[1],root:{alias:"",name:""}}},a=Ze(oe({},this.share),{file:o,externalPath:null});a.name=a.file.name,this.share=new Jt(a),this.allowedPermissions=Object.keys(this.share.hPerms)})}openAdminRootDialog(){this.layout.openDialog(go,null,{initialState:{withRootName:!1}}).content.submitEvent.pipe(vt(1)).subscribe(n=>{let s=Ze(oe({},this.share),{file:null,externalPath:n.externalPath,name:n.externalPath.split("/").at(-1)});this.share=new Jt(s),this.allowedPermissions=Object.keys(this.share.hPerms)})}openEditLinkDialog(t){this.linksService.editLinkDialog(t,this.share,Er.SHARE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.share)}cantSubmit(){return this.submitted||!this.share.externalPath&&!this.share.file}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.parentShareId?this.sharesService.deleteShareChild(this.parentShareId,this.share.id):this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.loading=!1,this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Delete share",this.share.name,n)}}):this.share.id===0?this.sharesService.createShare(this.share).subscribe({next:t=>{this.loading=!1,this.share=t,this.shareChange.emit(["add",t]),this.layout.closeDialog()},error:t=>{this.onError(),this.layout.sendNotification("error","Create share",this.share.name,t)}}):(this.parentShareId?this.sharesService.updateShareChild(this.parentShareId,this.share.id,this.share):this.parentSpaceId?this.spacesService.updateSpaceShare(this.parentSpaceId,this.share):this.sharesService.updateShare(this.share)).subscribe({next:n=>{this.loading=!1,this.share=n,this.shareChange.emit(["update",n]),this.layout.closeDialog()},error:n=>{this.onError(),this.layout.sendNotification("error","Edit share",this.share.name,n)}})}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-share-dialog"]],inputs:{share:"share",file:"file",parentShareId:"parentShareId",parentSpaceId:"parentSpaceId",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList",allowFilesOptions:"allowFilesOptions"},outputs:{shareChange:"shareChange"},decls:61,vars:41,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"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[2,"max-width","80%"],[1,"mb-3","px-0"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-between"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"col-6"],[1,"mb-3"],["for","from","l10nTranslate",""],["id","from",3,"share","showFullPath"],["for","permissions","l10nTranslate",""],[1,"d-flex"],["id","permissions",3,"permissions","replaceEmptyPermissions"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","filterPermissions","allowedPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],[1,"d-flex","flex-column","align-items-start","mb-3"],[1,"w-100",3,"quotaChange","quota","fullWidth"],[1,"d-flex","flex-column","mb-3"],["for","storage","l10nTranslate",""],["id","storage",3,"item"],["for","switchFullText","l10nTranslate",""],["id","switchFullText","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchFullText","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],["for","shareFilePath","l10nTranslate","",1,"no-select"],["id","shareFilePath",3,"share"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h4",1),m(2,"fa-icon",2),M(3,Q1,2,1,"span")(4,J1,2,0,"span",3),M(5,Z1,1,1,"fa-icon",4),d(),M(6,el,3,0,"h4",5),c(7,"button",6),b("click",function(){return s.layout.closeDialog()}),d()(),c(8,"div",7)(9,"tabset",8),m(10,"hr",9),c(11,"tab",10),b("selectTab",function(){return s.tabView=null}),L(12,tl,3,1,"ng-template",11),c(13,"div",12)(14,"div",13)(15,"div",14)(16,"div",15)(17,"label",16),p(18," Share name "),d(),c(19,"input",17),He("ngModelChange",function(a){return Ve(s.share.name,a)||(s.share.name=a),a}),d()(),c(20,"div",15)(21,"label",18),p(22," Description "),d(),c(23,"input",19),He("ngModelChange",function(a){return Ve(s.share.description,a)||(s.share.description=a),a}),d()(),M(24,nl,3,3),c(25,"div",20)(26,"div")(27,"label",21),p(28,"Share status"),d(),c(29,"div",22)(30,"input",23),He("ngModelChange",function(a){return Ve(s.share.enabled,a)||(s.share.enabled=a),a}),d(),c(31,"label",24),p(32),d()()(),M(33,rl,7,2,"div"),d()()(),c(34,"div",25),M(35,sl,4,1,"div",15),c(36,"div",26)(37,"label",27),p(38,"Shared from"),d(),m(39,"app-share-repository",28),d(),c(40,"div",26)(41,"label",29),p(42,"File permissions"),d(),c(43,"div",30),m(44,"app-file-permissions",31),d()(),M(45,al,14,7,"div",32),d()()(),c(46,"tab",33),b("selectTab",function(){return s.tabView="members"}),L(47,ll,5,2,"ng-template",11),c(48,"div",9)(49,"app-user-search",34),He("membersChange",function(a){return Ve(s.share.members,a)||(s.share.members=a),a}),d()()(),c(50,"tab",33),b("selectTab",function(){return s.tabView="links"}),L(51,cl,5,2,"ng-template",11),c(52,"div",9)(53,"app-user-search",35),He("membersChange",function(a){return Ve(s.share.links,a)||(s.share.links=a),a}),d()()()()(),c(54,"div",36),M(55,pl,2,1),M(56,hl,4,2,"button",37),c(57,"button",38),b("click",function(){return s.onCancel()}),p(58,"Cancel"),d(),c(59,"button",39),b("click",function(){return s.onSubmit()}),p(60),d()()),n&2&&(l(2),u("icon",s.icons.SHARED),l(),w(s.share.id?3:4),l(2),w(s.loading?5:-1),l(),w(s.share.id?6:-1),l(),Fe(Be("btn-close btn-close-white ",s.share.id?"ms-2":"ms-auto"," ms-2")),l(2),u("justified",!0),l(10),Fe(Be("form-control form-control-sm ",s.share.name?"":"is-invalid")),Re("ngModel",s.share.name),l(4),Re("ngModel",s.share.description),l(),w(s.share.externalPath?24:-1),l(6),Re("ngModel",s.share.enabled),l(2),re(" ",s.share.enabled?"enabled":"disabled"," "),l(),w(s.share.externalPath?33:-1),l(2),w(s.share.file!=null&&s.share.file.name||s.share.externalPath?35:-1),l(4),u("share",s.share)("showFullPath",!0),l(5),u("permissions",s.share.hPerms)("replaceEmptyPermissions",!0),l(),w(s.share!=null&&s.share.id?45:-1),l(4),Re("members",s.share.members),u("withPermissions",!0)("filterPermissions",!0)("allowedPermissions",s.allowedPermissions)("searchFunction",s.searchMembers.bind(s)),l(4),Re("members",s.share.links),u("filterPermissions",!0)("allowedPermissions",s.allowedPermissions)("withPermissions",!0)("editFunction",s.openEditLinkDialog.bind(s))("hideInput",!0),l(2),w(s.tabView?-1:55),l(),w(s.tabView==="links"?56:-1),l(3),Fe(Be("btn btn-sm ",s.confirmDeletion?"btn-danger":"btn-primary")),u("disabled",s.cantSubmit()),l(),re(" ",s.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[Ce,ye,Pr,Or,Nr,Tr,Si,Zn,vi,Jn,St,bi,xt,_t,Lr,Fr,vo,Hr,Ir,Mr,Ar],encapsulation:2});let i=e;return i})();var Xi=class{constructor(e){this.isShareLink=!1,Object.assign(this,e),this.owner.avatarUrl=Cr(this.owner.login),this.isShareLink=this.type===kr.LINK,this.setMimeUrl()}fallBackMimeUrl(){this.mimeUrl=Nt}setMimeUrl(){!this.file||this.file.mime===qe?this.mimeUrl=ct(Rr):this.mimeUrl=ct(this.file.mime)}};var yo=i=>({$implicit:i}),ml=(i,e)=>e.id;function gl(i,e){if(i&1&&m(0,"fa-icon",17),i&2){let r=f(3);u("icon",r.icons.LINKS)}}function vl(i,e){i&1&&Ie(0)}function bl(i,e){if(i&1&&(c(0,"ul"),L(1,vl,1,0,"ng-container",10),d()),i&2){let r=f().$implicit;f(2);let t=Yt(15);l(),u("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,yo,r.children))}}function yl(i,e){if(i&1){let r=I();c(0,"li")(1,"div",14),b("click",function(){let n=S(r).$implicit,s=f(2);return _(s.onSelect(n))})("dblclick",function(){S(r);let n=f(2);return _(n.openChildShare())}),c(2,"div",15)(3,"img",16),b("error",function(){let n=S(r).$implicit;return _(n.fallBackMimeUrl())}),d(),M(4,gl,1,1,"fa-icon",17),c(5,"span",18),p(6),d()(),c(7,"div",19)(8,"span",20),p(9),d(),m(10,"app-user-avatar",21),d()(),M(11,bl,2,4,"ul"),d()}if(i&2){let r=e.$implicit,t=f(2);l(),V("selected",t.selected&&t.selected.id===r.id),l(2),u("src",r.mimeUrl,ze),l(),w(r.isShareLink?4:-1),l(2),R(r.name),l(3),R(r.owner.fullName),l(),u("user",r.owner)("height",26)("width",26),l(),w((r.children==null?null:r.children.length)>0?11:-1)}}function Cl(i,e){if(i&1&&nn(0,yl,12,10,"li",null,ml),i&2){let r=e.$implicit,t=f();rn(t.toShares(r))}}function Sl(i,e){i&1&&Ie(0)}var j6=(()=>{let e=class e{constructor(){this.fromAdmin=!1,this.sharesCountEvent=new P,this.layout=h(H),this.icons={SHARED:ee.SHARED_WITH_OTHERS,LINKS:ee.LINKS},this.loading=!1,this.childSharesLength=0,this.sharesService=h(Ei),this.linksService=h(Mi),this.spacesService=h(Ot)}ngOnInit(){this.loadChildShares()}toShares(t){return t}loadChildShares(){this.loading=!0;let t;if(this.share)t=this.sharesService.listChildShares(this.share.id);else if(this.space)t=this.spacesService.listSpaceShares(this.space.id);else{console.error("share or space not defined");return}t.subscribe({next:n=>{this.childSharesLength=n.length,this.sharesCountEvent.emit(n.length),this.setShares(n.map(s=>new Xi(s))),this.loading=!1},error:n=>{this.childShares=[],this.childSharesLength=0,this.loading=!1,this.layout.sendNotification("error","Child shares",n.error.message)}})}onSelect(t){this.selected=t}openChildShare(){if(this.selected.isShareLink){let t;if(this.share)t=this.linksService.shareLinkChild(this.share.id,this.selected.id);else if(this.space)t=this.spacesService.getSpaceShareLink(this.space.id,this.selected.id);else{console.error("share or space not defined");return}t.subscribe({next:n=>{this.layout.openDialog(Vr,"md",{initialState:{share:n}}).content.shareChange.pipe(vt(1)).subscribe(o=>{let[a,g]=o;a==="update"?this.selected.name=g.name:this.loadChildShares()})},error:n=>this.layout.sendNotification("error","Edit children shares",this.selected.name,n)})}else{let t;if(this.share)t=this.sharesService.getShareChild(this.share.id,this.selected.id);else if(this.space)t=this.spacesService.getSpaceShare(this.space.id,this.selected.id);else{console.error("share or space not defined");return}t.subscribe({next:n=>{this.layout.openDialog(bo,"lg",{initialState:Ze(oe(oe({},this.share?{parentShareId:this.share.id}:{}),this.space?{parentSpaceId:this.space.id}:{}),{share:n})}).content.shareChange.pipe(vt(1)).subscribe(o=>{let[a,g]=o;a==="update"?(this.selected.name=g.name,this.selected.alias=g.alias):this.loadChildShares()})},error:n=>this.layout.sendNotification("error","Edit children shares",this.selected.name,n)})}}setShares(t){let n={id:this.share?.id||0,children:[]};this.recurseChildrenShares(t,n),this.childShares=n.children}recurseChildrenShares(t,n){for(let s of t)s.parentId===n.id?(n.children=n.children??[],n.children.push(s),this.recurseChildrenShares(t,s)):n.id===0&&!s.parentId&&(n.children=n.children??[],n.children.push(s),this.recurseChildrenShares(t,s))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=y({type:e,selectors:[["app-shared-children-dialog"]],inputs:{fromAdmin:"fromAdmin",share:"share",space:"space"},outputs:{sharesCountEvent:"sharesCountEvent"},decls:22,vars:9,consts:[["recursiveList",""],[1,"modal-header","align-items-center"],[1,"modal-title","w-100"],[1,"d-flex"],[1,"me-2",3,"icon"],[1,"ms-auto","me-2"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],["appAutoResize","",1,"modal-body",2,"padding-right","24px",3,"resizeOffset"],[1,"tree"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"modal-footer"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["data-dismiss","modal","l10nTranslate","","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"app-div-hovered",3,"click","dblclick"],[1,"me-auto","text-truncate"],["alt","","draggable","false","height","28",3,"error","src"],[1,"align-middle","ms-1",3,"icon"],[1,"ms-1","align-middle"],[1,"d-flex","align-items-center"],[1,"fs-xxxs","me-2"],["tooltipPlacement","top","container","body",3,"user","height","width"]],template:function(n,s){if(n&1){let o=I();c(0,"div",1)(1,"h4",2)(2,"div",3)(3,"div"),m(4,"fa-icon",4),c(5,"span"),p(6),d()(),c(7,"div",5)(8,"span",6),p(9,"Child shares"),d(),p(10),d()()(),c(11,"button",7),b("click",function(){return S(o),_(s.layout.closeDialog())}),d()(),c(12,"div",8)(13,"ul",9),L(14,Cl,2,0,"ng-template",null,0,Xt)(16,Sl,1,0,"ng-container",10),d()(),c(17,"div",11)(18,"button",12),b("click",function(){return S(o),_(s.openChildShare())}),p(19,"Edit"),d(),c(20,"button",13),b("click",function(){return S(o),_(s.layout.closeDialog())}),p(21,"Close"),d()()}if(n&2){let o=Yt(15);l(4),u("icon",s.icons.SHARED),l(2),R((s.share==null?null:s.share.name)||(s.space==null?null:s.space.name)),l(4),re("\xA0(",s.childSharesLength,") "),l(2),u("resizeOffset",170),l(4),u("ngTemplateOutlet",o)("ngTemplateOutletContext",yt(7,yo,s.childShares)),l(2),u("disabled",!s.selected)}},dependencies:[$i,at,ye,Ce,Dr],styles:[`ul.tree[_ngcontent-%COMP%], ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-left:18px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0;padding:0;line-height:30px;border-left:1px solid rgb(100,100,100);white-space:nowrap}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inline-flex;width:100%;cursor:pointer;border-radius:4px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-left:none}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{position:relative;top:-.3em;height:1.2rem;width:1rem;color:#fff;border-bottom:1px solid rgb(100,100,100);content:"";display:inline-block}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child:before{border-left:1px solid rgb(100,100,100)}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
`]});let i=e;return i})();export{Jl as a,Zl as b,$i as c,_l as d,xl as e,El as f,wi as g,Ml as h,wl as i,Al as j,Dl as k,Nl as l,Ol as m,Br as n,E as o,Pn as p,d0 as q,u0 as r,zn as s,ro as t,gt as u,fo as v,po as w,jr as x,ho as y,mo as z,go as A,bo as B,j6 as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as b}from"./chunk-
|
|
1
|
+
import{k as b}from"./chunk-3XVM35O2.js";import{b as u,e as h}from"./chunk-UJPPR4MX.js";import{$a as f,Dd as g,Ha as d,Na as o,Ne as x,Qb as s,Rb as v,dg as R,hg as E,ia as p,qb as c,rb as t,sb as i,tb as r}from"./chunk-C36MW4ME.js";import"./chunk-N3U6637P.js";var A=(()=>{let e=class e{constructor(){this.logoUrl=b,this.icons={faExclamationCircle:x},this.activatedRoute=p(u),this.activatedRoute.params.subscribe(l=>this.error=E[l.error])}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=f({type:e,selectors:[["app-public-link-error"]],decls:14,vars:3,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],["size","4x",1,"text-white",3,"icon"],["l10nTranslate","",1,"error-code","mt-2",2,"font-size","24px"],[1,"error-text"],[1,"hr"],["l10nTranslate",""]],template:function(n,m){n&1&&(t(0,"div",0)(1,"div",1)(2,"a",2),r(3,"img",3),i()(),r(4,"fa-icon",4),t(5,"div",5),s(6,"Link error"),i(),t(7,"div",6),r(8,"span",7)(9,"br"),t(10,"span",8),s(11),i(),r(12,"br")(13,"br"),i()()),n&2&&(o(3),c("src",m.logoUrl,d),o(),c("icon",m.icons.faExclamationCircle),o(7),v(m.error))},dependencies:[h,g,R],encapsulation:2});let a=e;return a})();export{A as PublicLinkErrorComponent};
|